UNPKG

webpack

Version:

Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

132 lines 30.8 kB
!function(e){function t(e){var t=require("path").join(__dirname,""+e+"."+b+".hot-update.js");require("fs").readFile(t,"utf-8",function(e,r){if(e){if(f.onError)return f.onError(e);throw e}var n={};require("vm").runInThisContext("(function(exports) {"+r+"\n})",t)(n),a(n.id,n.modules)})}function r(e){var t=require("path").join(__dirname,""+b+".hot-update.json");require("fs").readFile(t,"utf-8",function(t,r){if(t)return e();try{var n=JSON.parse(r)}catch(o){return e(o)}e(null,n)})}function n(e){var t=E[e];if(!t)return f;var r=function(r){return t.hot.active?E[r]?(E[r].parents.indexOf(e)<0&&E[r].parents.push(e),t.children.indexOf(r)<0&&t.children.push(r)):m=[e]:(console.warn("[HMR] unexpected require("+r+") from disposed module "+e),m=[]),f(r)};for(var n in f)Object.prototype.hasOwnProperty.call(f,n)&&(r[n]=f[n]);return r.e=function(e,t){"ready"===x&&i("prepare"),O++,f.e(e,function(){function n(){O--,"prepare"===x&&(w[e]||u(e),0===O&&0===j&&c())}try{t.call(null,r)}finally{n()}})},r}function o(e){var t={_acceptedDependencies:{},_declinedDependencies:{},_selfAccepted:!1,_selfDeclined:!1,_disposeHandlers:[],active:!0,accept:function(e,r){if("undefined"==typeof e)t._selfAccepted=!0;else if("function"==typeof e)t._selfAccepted=e;else if("number"==typeof e)t._acceptedDependencies[e]=r;else for(var n=0;n<e.length;n++)t._acceptedDependencies[e[n]]=r},decline:function(e){if("undefined"==typeof e)t._selfDeclined=!0;else if("number"==typeof e)t._declinedDependencies[e]=!0;else for(var r=0;r<e.length;r++)t._declinedDependencies[e[r]]=!0},dispose:function(e){t._disposeHandlers.push(e)},addDisposeHandler:function(e){t._disposeHandlers.push(e)},removeDisposeHandler:function(e){var r=t._disposeHandlers.indexOf(e);r>=0&&t._disposeHandlers.splice(r,1)},check:s,apply:l,status:function(e){return e?void g.push(e):x},addStatusHandler:function(e){g.push(e)},removeStatusHandler:function(e){var t=g.indexOf(e);t>=0&&g.splice(t,1)},data:v[e]};return t}function i(e){x=e;for(var t=0;t<g.length;t++)g[t].call(null,e)}function s(e,t){if("idle"!==x)throw new Error("check() is only allowed in idle status");"function"==typeof e?(y=!1,t=e):(y=e,t=t||function(e){if(e)throw e}),i("check"),r(function(e,r){if(e)return t(e);if(!r)return i("idle"),void t(null,null);q={},_={},w={};for(var n=0;n<r.c.length;n++)_[r.c[n]]=!0;d=r.h,i("prepare"),p=t,h={};for(var o in A)u(o);0===O&&0===j&&c()})}function a(e,t){if(_[e]&&q[e]){q[e]=!1;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(h[r]=t[r]);0===--j&&0===O&&c()}}function u(e){_[e]?(q[e]=!0,j++,t(e)):w[e]=!0}function c(){i("ready");var e=p;if(p=null,e)if(y)l(y,e);else{var t=[];for(var r in h)Object.prototype.hasOwnProperty.call(h,r)&&t.push(+r);e(null,t)}}function l(t,r){function n(e){for(var t=[e],r=[],n=t.slice();n.length>0;){var i=n.pop(),e=E[i];if(e&&!e.hot._selfAccepted){if(e.hot._selfDeclined)return new Error("Aborted because of self decline: "+i);if(0===i)return;for(var s=0;s<e.parents.length;s++){var a=e.parents[s],u=E[a];if(u.hot._declinedDependencies[i])return new Error("Aborted because of declined dependency: "+i+" in "+a);t.indexOf(a)>=0||(u.hot._acceptedDependencies[i]?(r[a]||(r[a]=[]),o(r[a],[i])):(delete r[a],t.push(a),n.push(a)))}}}return[t,r]}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];e.indexOf(n)<0&&e.push(n)}}if("ready"!==x)throw new Error("apply() is only allowed in ready status");"function"==typeof t?(r=t,t={}):t&&"object"==typeof t?r=r||function(e){if(e)throw e}:(t={},r=r||function(e){if(e)throw e});var s={},a=[],u={};for(var c in h)if(Object.prototype.hasOwnProperty.call(h,c)){var l=+c,p=n(l);if(!p){if(t.ignoreUnaccepted)continue;return i("abort"),r(new Error("Aborted because "+l+" is not accepted"))}if(p instanceof Error)return i("abort"),r(p);u[l]=h[l],o(a,p[0]);for(var l in p[1])Object.prototype.hasOwnProperty.call(p[1],l)&&(s[l]||(s[l]=[]),o(s[l],p[1][l]))}for(var y=[],g=0;g<a.length;g++){var l=a[g];E[l]&&E[l].hot._selfAccepted&&y.push({module:l,errorHandler:E[l].hot._selfAccepted})}i("dispose");for(var j=a.slice();j.length>0;){var l=j.pop(),O=E[l];if(O){for(var w={},q=O.hot._disposeHandlers,_=0;_<q.length;_++){var A=q[_];A(w)}v[l]=w,O.hot.active=!1,delete E[l];for(var _=0;_<O.children.length;_++){var D=E[O.children[_]];if(D){var k=D.parents.indexOf(l);k>=0&&(D.parents.splice(k,1),0===D.parents.length&&D.hot&&D.hot._disposeHandlers&&D.hot._disposeHandlers.length>0&&j.push(D.id))}}}}for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l))for(var O=E[l],P=s[l],_=0;_<P.length;_++){var S=P[_],k=O.children.indexOf(S);k>=0&&O.children.splice(k,1)}i("apply"),b=d;for(var l in u)Object.prototype.hasOwnProperty.call(u,l)&&(e[l]=u[l]);var H=null;for(var l in s)if(Object.prototype.hasOwnProperty.call(s,l)){for(var O=E[l],P=s[l],N=[],g=0;g<P.length;g++){var S=P[g],A=O.hot._acceptedDependencies[S];N.indexOf(A)>=0||N.push(A)}for(var g=0;g<N.length;g++){var A=N[g];try{A(s)}catch(z){H||(H=z)}}}for(var g=0;g<y.length;g++){var F=y[g],l=F.module;m=[l];try{f(l)}catch(z){if("function"==typeof F.errorHandler)try{F.errorHandler(z)}catch(z){H||(H=z)}else H||(H=z)}}return H?(i("fail"),r(H)):(i("idle"),void r(null,a))}function f(t){if(E[t])return E[t].exports;var r=E[t]={exports:{},id:t,loaded:!1,hot:o(t),parents:m,children:[]};return e[t].call(r.exports,r,r.exports,n(t)),r.loaded=!0,r.exports}var p,h,d,y=!0,b="9a7dd4edff40677c4dd2",v={},m=[],g=[],x="idle",j=0,O=0,w={},q={},_={},E={},A={0:1};return f.e=function(t,r){if(1===A[t])r.call(null,f);else if(A[t])A[t].push(r);else{A[t]=[r];var n=__dirname+"/"+t+".bundle.js";require("fs").readFile(n,"utf-8",function(t,r){if(t){if(f.onError)return f.onError(t);throw t}var o={};require("vm").runInThisContext("(function(exports, require, __dirname, __filename) {"+r+"\n})",n)(o,require,require("path").dirname(n),n);var i=o.modules,s=o.ids;for(var a in i)e[a]=i[a];for(var u=[],c=0;c<s.length;c++)Array.isArray(A[s[c]])&&(u=u.concat(A[s[c]])),A[s[c]]=1;for(c=0;c<u.length;c++)u[c].call(null,f)})}},f.m=e,f.c=E,f.p="",f.h=function(){return b},n(0)(0)}([/*!*****************************************!*\ !*** ./runtime/module-caching/index.js ***! \*****************************************/ function(e,t,r){r(/*! should */18);it("should cache modules correctly",function(e){delete r.c[2],r(/*! ./singluar.js */2).value.should.be.eql(1),r(/*! ./singluar.js */2).value.should.be.eql(1),r(/*! ./singluar.js */2).value=2,r(/*! ./singluar.js */2).value.should.be.eql(2),r.e(1,function(){r(/*! ./singluar.js */2).value.should.be.eql(2),e()})}),it("should be able the remove modules from cache with require.cache and require.resolve",function(){var e=r(/*! ./singluar2 */4),t=4,n=4;t.should.have.type("number"),n.should.be.eql(t),r.c.should.have.type("object"),r.c[t].should.have.type("object"),delete r.c[t],r(/*! ./singluar2 */4).should.be.not.equal(e)})},/*!**************************************!*\ !*** (webpack)/~/should/lib/util.js ***! \**************************************/ function(e,t,r){function n(e){return l(e)&&(e.__ArrayLike||Array.isArray(e))}function o(e){return"number"==typeof e||e instanceof Number}function i(e){return"string"==typeof e||e instanceof String}function s(e){return"boolean"==typeof e||e instanceof Boolean}function a(e){return"undefined"!=typeof Buffer&&e instanceof Buffer}function u(e){return l(e)&&"[object Date]"===c(e)}function c(e){return Object.prototype.toString.call(e)}function l(e){return"object"==typeof e&&null!==e}function f(e){return l(e)&&"[object RegExp]"===c(e)}function p(e){return null==e}function h(e){return null===e}function d(e){return"[object Arguments]"===c(e)}function y(e){return l(e)&&"[object Error]"===c(e)||e instanceof Error}function b(e){return void 0===e}/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ t.isWrapperType=function(e){return o(e)||i(e)||s(e)},t.merge=function(e,t){if(e&&t)for(var r in t)e[r]=t[r];return e},t.isArray=n,t.isNumber=o,t.isBoolean=s,t.isString=i,t.isBuffer=a,t.isDate=u,t.isObject=l,t.isRegExp=f,t.isNullOrUndefined=p,t.isNull=h,t.isArguments=d,t.isFunction=function(e){return"function"==typeof e||e instanceof Function},t.isError=y,t.isUndefined=b,t.inspect=r(/*! ./inspect */17).inspect,t.AssertionError=r(/*! assert */5).AssertionError;var v=Object.prototype.hasOwnProperty;t.forOwn=function(e,t,r){for(var n in e)v.call(e,n)&&t.call(r,e[n],n)};var m=/^\s*function\s*(\S*)\s*\(/;t.functionName=function(e){if(e.name)return e.name;var t=e.toString().match(m)[1];return t},t.formatProp=function(e){return e=JSON.stringify(""+e),e=e.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?e.substr(1,e.length-2):e.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\")}},/*!********************************************!*\ !*** ./runtime/module-caching/singluar.js ***! \********************************************/ function(e){e.exports.value=1},/*!*************************************!*\ !*** (webpack)/~/should/lib/eql.js ***! \*************************************/ function(e,t,r){function n(e,t){if(e===t)return!0;if(i.isBuffer(e)&&i.isBuffer(t)){if(e.length!=t.length)return!1;for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return i.isDate(e)&&i.isDate(t)?e.getTime()===t.getTime():i.isRegExp(e)&&i.isRegExp(t)?e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase:i.isObject(e)||i.isObject(t)?o(e,t):e==t}function o(e,t){if(i.isNullOrUndefined(e)||i.isNullOrUndefined(t))return!1;if(e.prototype!==t.prototype)return!1;if(i.isArguments(e))return i.isArguments(t)?(e=s.call(e),t=s.call(t),n(e,t)):!1;try{var r,o,a=Object.keys(e),u=Object.keys(t)}catch(c){return!1}if(a.length!=u.length)return!1;for(a.sort(),u.sort(),o=a.length-1;o>=0;o--)if(a[o]!=u[o])return!1;for(o=a.length-1;o>=0;o--)if(r=a[o],!n(e[r],t[r]))return!1;return!0}/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var i=r(/*! ./util */1);e.exports=n;var s=Array.prototype.slice},/*!*********************************************!*\ !*** ./runtime/module-caching/singluar2.js ***! \*********************************************/ function(){},/*!*************************!*\ !*** external "assert" ***! \*************************/ function(e){e.exports=require("assert")},/*!********************************************!*\ !*** (webpack)/~/should/lib/ext/assert.js ***! \********************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */1),o=r(/*! assert */5),i=o.AssertionError;e.exports=function(e){var t=e.format;n.merge(e,o),e.exist=e.exists=function(r,n){if(null==r)throw new i({message:n||"expected "+t(r)+" to exist",stackStartFunction:e.exist})},e.not={},e.not.exist=e.not.exists=function(r,n){if(null!=r)throw new i({message:n||"expected "+t(r)+" to not exist",stackStartFunction:e.not.exist})}}},/*!******************************************!*\ !*** (webpack)/~/should/lib/ext/bool.js ***! \******************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){t.add("true",function(){this.is.exactly(!0)},!0),t.alias("true","True"),t.add("false",function(){this.is.exactly(!1)},!0),t.alias("false","False"),t.add("ok",function(){this.params={operator:"to be truthy"},this.assert(this.obj)},!0)}},/*!*******************************************!*\ !*** (webpack)/~/should/lib/ext/chain.js ***! \*******************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){function r(e){Object.defineProperty(t.prototype,e,{get:function(){return this},enumerable:!0})}["an","of","a","and","be","have","with","is","which","the"].forEach(r)}},/*!*********************************************!*\ !*** (webpack)/~/should/lib/ext/contain.js ***! \*********************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */1),o=r(/*! ../eql */3);e.exports=function(e,t){var r=e.format;t.add("containEql",function(e){this.params={operator:"to contain "+r(e)};var t=this.obj;n.isArray(t)?this.assert(t.some(function(t){return o(t,e)})):n.isString(t)?this.assert(t.indexOf(String(e))>=0):n.isObject(t)?n.forOwn(e,function(e,r){t.should.have.property(r,e)}):this.assert(!1)}),t.add("containDeepOrdered",function(t){this.params={operator:"to contain "+r(t)};var o=this.obj;if(n.isArray(o))if(n.isArray(t)){var i=0;o.forEach(function(r){try{e(r).not.be.Null.and.containDeep(t[i]),i++}catch(n){if(n instanceof e.AssertionError)return;throw n}},this),this.assert(i==t.length)}else this.assert(!1);else n.isString(o)?this.assert(o.indexOf(String(t))>=0):n.isObject(o)?n.isObject(t)?n.forOwn(t,function(t,r){e(o[r]).not.be.Null.and.containDeep(t)}):this.assert(!1):this.eql(t)}),t.add("containDeep",function(t){this.params={operator:"to contain "+r(t)};var o=this.obj;if(n.isArray(o))if(n.isArray(t)){var i={};t.forEach(function(t){this.assert(o.some(function(r,n){if(n in i)return!1;try{return e(r).not.be.Null.and.containDeep(t),i[n]=!0,!0}catch(o){if(o instanceof e.AssertionError)return!1;throw o}}))},this)}else this.assert(!1);else n.isString(o)?this.assert(o.indexOf(String(t))>=0):n.isObject(o)?n.isObject(t)?n.forOwn(t,function(t,r){e(o[r]).not.be.Null.and.containDeep(t)}):this.assert(!1):this.eql(t)})}},/*!*****************************************!*\ !*** (webpack)/~/should/lib/ext/eql.js ***! \*****************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../eql */3);e.exports=function(e,t){t.add("eql",function(e,t){this.params={operator:"to equal",expected:e,showDiff:!0,message:t},this.assert(n(e,this.obj))}),t.add("equal",function(e,t){this.params={operator:"to be",expected:e,showDiff:!0,message:t},this.assert(e===this.obj)}),t.alias("equal","exactly")}},/*!*******************************************!*\ !*** (webpack)/~/should/lib/ext/error.js ***! \*******************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */1);e.exports=function(e,t){var r=e.format;t.add("throw",function(t,o){var i=this.obj,s={},a="",u=!1,c=!0;try{i()}catch(l){u=!0,s=l}if(u)if(t){if("string"==typeof t)c=t==s.message;else if(t instanceof RegExp)c=t.test(s.message);else if("function"==typeof t)c=s instanceof t;else if(n.isObject(t))try{s.should.match(t)}catch(l){if(!(l instanceof e.AssertionError))throw l;a=": "+l.message,c=!1}if(c){if("function"==typeof t&&o)try{s.should.match(o)}catch(l){if(!(l instanceof e.AssertionError))throw l;a=": "+l.message,c=!1}}else"string"==typeof t||t instanceof RegExp?a=" with a message matching "+r(t)+", but got '"+s.message+"'":"function"==typeof t&&(a=" of type "+n.functionName(t)+", but got "+n.functionName(s.constructor))}else a=" (got "+r(s)+")";this.params={operator:"to throw exception"+a},this.assert(u),this.assert(c)}),t.alias("throw","throwError")}},/*!*******************************************!*\ !*** (webpack)/~/should/lib/ext/match.js ***! \*******************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */1),o=r(/*! ../eql */3);e.exports=function(e,t){var r=e.format;t.add("match",function(i,s){if(this.params={operator:"to match "+r(i),message:s},!o(this.obj,i))if(n.isRegExp(i)){if(n.isString(this.obj))this.assert(i.exec(this.obj));else if(n.isArray(this.obj))this.obj.forEach(function(e){this.assert(i.exec(e))},this);else if(n.isObject(this.obj)){var a=[],u=[];n.forOwn(this.obj,function(e,t){i.exec(e)?u.push(n.formatProp(t)):a.push(n.formatProp(t)+" ("+r(e)+")")},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)}}else if(n.isFunction(i)){var c;try{c=i(this.obj)}catch(l){throw l instanceof e.AssertionError&&(this.params.operator+="\n "+l.message),l}c instanceof t&&(this.params.operator+="\n "+c.getMessage()),n.isBoolean(c)&&this.assert(c)}else n.isObject(i)?(a=[],u=[],n.forOwn(i,function(t,o){try{e(this.obj[o]).match(t),u.push(n.formatProp(o))}catch(i){if(!(i instanceof e.AssertionError))throw i;a.push(n.formatProp(o)+" ("+r(this.obj[o])+")")}},this),a.length&&(this.params.operator+="\n not matched properties: "+a.join(", ")),u.length&&(this.params.operator+="\n matched properties: "+u.join(", ")),this.assert(0==a.length)):this.assert(!1)}),t.add("matchEach",function(e,t){this.params={operator:"to match each "+r(e),message:t};var i=e;n.isRegExp(e)?i=function(t){return!!e.exec(t)}:n.isFunction(e)||(i=function(t){return o(t,e)}),n.forOwn(this.obj,function(e,t){var r=i(e,t);n.isBoolean(r)&&this.assert(r)},this)})}},/*!********************************************!*\ !*** (webpack)/~/should/lib/ext/number.js ***! \********************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){t.add("NaN",function(){this.params={operator:"to be NaN"},this.assert(this.obj!==this.obj)},!0),t.add("Infinity",function(){this.params={operator:"to be Infinity"},this.is.a.Number.and.not.a.NaN.and.assert(!isFinite(this.obj))},!0),t.add("within",function(e,t,r){this.params={operator:"to be within "+e+".."+t,message:r},this.assert(this.obj>=e&&this.obj<=t)}),t.add("approximately",function(e,t,r){this.params={operator:"to be approximately "+e+" ±"+t,message:r},this.assert(Math.abs(this.obj-e)<=t)}),t.add("above",function(e,t){this.params={operator:"to be above "+e,message:t},this.assert(this.obj>e)}),t.add("below",function(e,t){this.params={operator:"to be below "+e,message:t},this.assert(this.obj<e)}),t.alias("above","greaterThan"),t.alias("below","lessThan")}},/*!**********************************************!*\ !*** (webpack)/~/should/lib/ext/property.js ***! \**********************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */1),o=r(/*! ../eql */3),i=Array.prototype.slice;e.exports=function(e,t){var r=e.format;t.add("enumerable",function(e,t){e=String(e),this.params={operator:"to have enumerable property "+n.formatProp(e)},this.assert(this.obj.propertyIsEnumerable(e)),arguments.length>1&&(this.params.operator+=" equal to "+r(t),this.assert(o(t,this.obj[e])))}),t.add("property",function(e,t){if(e=String(e),arguments.length>1){var r={};r[e]=t,this.have.properties(r)}else this.have.properties(e);this.obj=this.obj[e]}),t.add("properties",function(e){var t={};arguments.length>1?e=i.call(arguments):n.isArray(e)||(n.isString(e)?e=[e]:(t=e,e=Object.keys(e)));var s=Object(this.obj),a=[];e.forEach(function(e){e in s||a.push(n.formatProp(e))});var u=a;0===u.length?u=e.map(n.formatProp):this.anyOne&&(u=e.filter(function(e){return a.indexOf(n.formatProp(e))<0}).map(n.formatProp));var c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", ");this.params={operator:c},this.assert(0===a.length||this.anyOne&&a.length!=e.length);var l=Object.keys(t);if(l.length){var f=[];u=[],l.forEach(function(e){var i=t[e];o(s[e],i)?u.push(n.formatProp(e)+" of "+r(i)):f.push(n.formatProp(e)+" of "+r(i)+" (got "+r(s[e])+")")}),(0!==f.length&&!this.anyOne||this.anyOne&&0===u.length)&&(u=f),c=(1===u.length?"to have property ":"to have "+(this.anyOne?"any of ":"")+"properties ")+u.join(", "),this.params={operator:c},this.assert(0===f.length||this.anyOne&&f.length!=l.length)}}),t.add("length",function(e,t){this.have.property("length",e,t)}),t.alias("length","lengthOf");var s=Object.prototype.hasOwnProperty;t.add("ownProperty",function(e,t){e=String(e),this.params={operator:"to have own property "+n.formatProp(e),message:t},this.assert(s.call(this.obj,e)),this.obj=this.obj[e]}),t.alias("ownProperty","hasOwnProperty"),t.add("empty",function(){if(this.params={operator:"to be empty"},n.isString(this.obj)||n.isArray(this.obj)||n.isArguments(this.obj))this.have.property("length",0);else{var e=Object(this.obj);for(var t in e)this.have.not.ownProperty(t)}},!0),t.add("keys",function(e){arguments.length>1?e=i.call(arguments):1===arguments.length&&n.isString(e)?e=[e]:0===arguments.length&&(e=[]),e=e.map(String);var t=Object(this.obj),r=[];e.forEach(function(e){s.call(this.obj,e)||r.push(n.formatProp(e))},this);var o=[];Object.keys(t).forEach(function(t){e.indexOf(t)<0&&o.push(n.formatProp(t))});var a=0===e.length?"to be empty":"to have "+(1===e.length?"key ":"keys ");this.params={operator:a+e.map(n.formatProp).join(", ")},r.length>0&&(this.params.operator+="\n missing keys: "+r.join(", ")),o.length>0&&(this.params.operator+="\n extra keys: "+o.join(", ")),this.assert(0===r.length&&0===o.length)}),t.alias("keys","key"),t.add("propertyByPath",function(t){arguments.length>1?t=i.call(arguments):1===arguments.length&&n.isString(t)?t=[t]:0===arguments.length&&(t=[]);var r=t.map(n.formatProp);t=t.map(String);for(var o,s=e(Object(this.obj)),a=[];o=t.shift();)this.params={operator:"to have property by path "+r.join(", ")+" - failed on "+n.formatProp(o)},s=s.have.property(o),a.push(o);this.params={operator:"to have property by path "+r.join(", ")},this.obj=s.obj})}},/*!********************************************!*\ !*** (webpack)/~/should/lib/ext/string.js ***! \********************************************/ function(e){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ e.exports=function(e,t){t.add("startWith",function(t,r){this.params={operator:"to start with "+e.format(t),message:r},this.assert(0===this.obj.indexOf(t))}),t.add("endWith",function(t,r){this.params={operator:"to end with "+e.format(t),message:r},this.assert(this.obj.indexOf(t,this.obj.length-t.length)>=0)})}},/*!******************************************!*\ !*** (webpack)/~/should/lib/ext/type.js ***! \******************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ../util */1);e.exports=function(e,t){t.add("Number",function(){this.params={operator:"to be a number"},this.assert(n.isNumber(this.obj))},!0),t.add("arguments",function(){this.params={operator:"to be arguments"},this.assert(n.isArguments(this.obj))},!0),t.add("type",function(e,t){this.params={operator:"to have type "+e,message:t},(typeof this.obj).should.be.exactly(e,t)}),t.add("instanceof",function(e,t){this.params={operator:"to be an instance of "+n.functionName(e),message:t},this.assert(Object(this.obj)instanceof e)}),t.add("Function",function(){this.params={operator:"to be a function"},this.assert(n.isFunction(this.obj))},!0),t.add("Object",function(){this.params={operator:"to be an object"},this.assert(n.isObject(this.obj))},!0),t.add("String",function(){this.params={operator:"to be a string"},this.assert(n.isString(this.obj))},!0),t.add("Array",function(){this.params={operator:"to be an array"},this.assert(n.isArray(this.obj))},!0),t.add("Boolean",function(){this.params={operator:"to be a boolean"},this.assert(n.isBoolean(this.obj))},!0),t.add("Error",function(){this.params={operator:"to be an error"},this.assert(n.isError(this.obj))},!0),t.add("null",function(){this.params={operator:"to be null"},this.assert(null===this.obj)},!0),t.alias("null","Null"),t.alias("instanceof","instanceOf")}},/*!*****************************************!*\ !*** (webpack)/~/should/lib/inspect.js ***! \*****************************************/ function(e,t,r){function n(e,r){var n={seen:[],stylize:i};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),b(r)?n.showHidden=r:r&&t._extend(n,r),m(n.showHidden)&&(n.showHidden=!1),m(n.depth)&&(n.depth=2),m(n.colors)&&(n.colors=!1),m(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),a(n,e,n.depth)}function o(e,t){var r=n.styles[t];return r?"["+n.colors[r][0]+"m"+e+"["+n.colors[r][1]+"m":e}function i(e){return e}function s(e){var t={};return e.forEach(function(e){t[e]=!0}),t}function a(e,r,n){if(e.customInspect&&r&&g(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return x(o)||(o=a(e,o,n)),o}var i=u(e,r);if(i)return i;var d=Object.keys(r),y=s(d);e.showHidden&&(d=Object.getOwnPropertyNames(r));var v,m=r;try{q(r)||(m=r.valueOf())}catch(O){}if(x(m)&&(d=d.filter(function(e){return!(e>=0&&e<m.length)})),_(r))return l(r);if(0===d.length){if(g(r)){var A=r.name?": "+r.name:"";return e.stylize("[Function"+A+"]","special")}if(w(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(q(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(m))return v=c(e,m),e.stylize("[String: "+v+"]","string");if(j(m))return v=c(e,m),e.stylize("[Number: "+v+"]","number");if(b(m))return v=c(e,m),e.stylize("[Boolean: "+v+"]","boolean")}var D="",k=!1,P=["{","}"];if(E(r)&&(k=!0,P=["[","]"]),g(r)){var S=r.name?": "+r.name:"";D=" [Function"+S+"]"}if(w(r)&&(D=" "+RegExp.prototype.toString.call(r)),q(r)&&(D=" "+Date.prototype.toUTCString.call(r)),_(r)&&(D=" "+l(r)),x(m)&&(v=c(e,m),D=" [String: "+v+"]"),j(m)&&(v=c(e,m),D=" [Number: "+v+"]"),b(m)&&(v=c(e,m),D=" [Boolean: "+v+"]"),0===d.length&&(!k||0===r.length))return P[0]+D+P[1];if(0>n)return w(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var H;return H=k?f(e,r,n,y,d):d.map(function(t){return p(e,r,n,y,t,k)}),e.seen.pop(),h(H,D,P)}function u(e,t){if(m(t))return e.stylize("undefined","undefined");if(x(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return j(t)?0===t&&0>1/t?e.stylize("-0","number"):e.stylize(""+t,"number"):b(t)?e.stylize(""+t,"boolean"):O(t)?e.stylize("null","null"):void 0}function c(e,t){var r=e.stylize;e.stylize=i;var n=u(e,t);return e.stylize=r,n}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,r,n,o){for(var i=[],s=0,a=t.length;a>s;++s)i.push(d(t,String(s))?p(e,t,r,n,String(s),!0):"");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(e,t,r,n,o,!0))}),i}function p(e,t,r,n,o,i){var s,u,c;if(c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]},c.get?u=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(u=e.stylize("[Setter]","special")),d(n,o)||(s="["+o+"]"),u||(e.seen.indexOf(c.value)<0?(u=O(r)?a(e,c.value,null):a(e,c.value,r-1),u.indexOf("\n")>-1&&(u=i?u.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+u.split("\n").map(function(e){return" "+e}).join("\n"))):u=e.stylize("[Circular]","special")),m(s)){if(i&&o.match(/^\d+$/))return u;s=JSON.stringify(""+o),s.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'").replace(/\\\\/g,"\\"),s=e.stylize(s,"string"))}return s+": "+u}function h(e,t,r){var n=e.reduce(function(e,t){return e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return n>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var y=r(/*! ./util */1),b=y.isBoolean,v=y.isObject,m=y.isUndefined,g=y.isFunction,x=y.isString,j=y.isNumber,O=y.isNull,w=y.isRegExp,q=y.isDate,_=y.isError,E=y.isArray;t.inspect=n,n.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},t._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}},/*!****************************************!*\ !*** (webpack)/~/should/lib/should.js ***! \****************************************/ function(e,t,r){/*! * Should * Copyright(c) 2010-2014 TJ Holowaychuk <tj@vision-media.ca> * MIT Licensed */ var n=r(/*! ./util */1),o=n.AssertionError,i=n.inspect,s=function(e){return new a(n.isWrapperType(e)?e.valueOf():e)},a=s.Assertion=function(e){this.obj=e};a.add=function(e,t,r){var n={enumerable:!0};n[r?"get":"value"]=function(){var e=new a(this.obj);e.copy=e.copyIfMissing,e.anyOne=this.anyOne;try{t.apply(e,arguments)}catch(r){if(this.copy(e),r instanceof s.AssertionError){if(this.negate)return this.obj=e.obj,this.negate=!1,this;this.assert(!1)}throw r}return this.copy(e),this.negate&&this.assert(!1),this.obj=e.obj,this.negate=!1,this},Object.defineProperty(a.prototype,e,n)},a.alias=function(e,t){var r=Object.getOwnPropertyDescriptor(a.prototype,e);if(!r)throw new Error("Alias "+e+" -> "+t+" could not be created as "+e+" not defined");Object.defineProperty(a.prototype,t,r)},s.AssertionError=o,s.format=function(e){return n.isDate(e)&&"function"!=typeof e.inspect?e.toISOString():i(e,{depth:null})},s.use=function(e){return e(this,a),this},t=e.exports=s,Object.defineProperty(Object.prototype,"should",{set:function(){},get:function(){return s(this)},configurable:!0}),a.prototype={constructor:a,assert:function(e){if(e)return this;var t=this.params,r=t.message,n=!1;r||(r=this.getMessage(),n=!0);var i=new o({message:r,actual:this.obj,expected:t.expected,stackStartFunction:this.assert});throw i.showDiff=t.showDiff,i.operator=t.operator,i.generatedMessage=n,i},getMessage:function(){return"expected "+("obj"in this.params?this.params.obj:s.format(this.obj))+(this.negate?" not ":" ")+this.params.operator+("expected"in this.params?" "+s.format(this.params.expected):"")},copy:function(e){this.params=e.params},copyIfMissing:function(e){this.params||(this.params=e.params)},get not(){return this.negate=!this.negate,this},get any(){return this.anyOne=!0,this}},s.use(r(/*! ./ext/assert */6)).use(r(/*! ./ext/chain */8)).use(r(/*! ./ext/bool */7)).use(r(/*! ./ext/number */13)).use(r(/*! ./ext/eql */10)).use(r(/*! ./ext/type */16)).use(r(/*! ./ext/string */15)).use(r(/*! ./ext/property */14)).use(r(/*! ./ext/error */11)).use(r(/*! ./ext/match */12)).use(r(/*! ./ext/contain */9))}]); /* //@ sourceMappingURL=bundle.js.map //# sourceMappingURL=bundle.js.map */