12 |
- !function(){function require(e){var t=require.modules[e];if(!t)throw new Error('failed to require "'+e+'"');return"exports"in t||"function"!=typeof t.definition||(t.client=t.component=!0,t.definition.call(this,t.exports={},t),delete t.definition),t.exports}require.loader="component",require.helper={},require.helper.semVerSort=function(e,t){for(var i=e.version.split("."),r=t.version.split("."),n=0;n<i.length;++n){var o=parseInt(i[n],10),s=parseInt(r[n],10);if(o!==s)return o>s?1:-1;var a=i[n].substr((""+o).length),c=r[n].substr((""+s).length);if(""===a&&""!==c)return 1;if(""!==a&&""===c)return-1;if(""!==a&&""!==c)return a>c?1:-1}return 0},require.latest=function(e,t){function i(e){throw new Error('failed to find latest module of "'+e+'"')}var r=/(.*)~(.*)@v?(\d+\.\d+\.\d+[^\/]*)$/,n=/(.*)~(.*)/;n.test(e)||i(e);for(var o=Object.keys(require.modules),s=[],a=[],c=0;c<o.length;c++){var u=o[c];if(new RegExp(e+"@").test(u)){var h=u.substr(e.length+1),l=r.exec(u);null!=l?s.push({version:h,name:u}):a.push({version:h,name:u})}}if(0===s.concat(a).length&&i(e),s.length>0){var f=s.sort(require.helper.semVerSort).pop().name;return t===!0?f:require(f)}var f=a.pop().name;return t===!0?f:require(f)},require.modules={},require.register=function(e,t){require.modules[e]={definition:t}},require.define=function(e,t){require.modules[e]={exports:t}},require.register("chaijs~assertion-error@1.0.0",function(e,t){function i(){function e(e,i){Object.keys(i).forEach(function(r){~t.indexOf(r)||(e[r]=i[r])})}var t=[].slice.call(arguments);return function(){for(var t=[].slice.call(arguments),i=0,r={};i<t.length;i++)e(r,t[i]);return r}}function r(e,t,r){var n=i("name","message","stack","constructor","toJSON"),o=n(t||{});this.message=e||"Unspecified AssertionError",this.showDiff=!1;for(var s in o)this[s]=o[s];r=r||arguments.callee,r&&Error.captureStackTrace&&Error.captureStackTrace(this,r)}t.exports=r,r.prototype=Object.create(Error.prototype),r.prototype.name="AssertionError",r.prototype.constructor=r,r.prototype.toJSON=function(e){var t=i("constructor","toJSON","stack"),r=t({name:this.name},this);return!1!==e&&this.stack&&(r.stack=this.stack),r}}),require.register("chaijs~type-detect@0.1.1",function(e,t){function i(e){var t=Object.prototype.toString.call(e);return n[t]?n[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}function r(){this.tests={}}var e=t.exports=i,n={"[object Array]":"array","[object RegExp]":"regexp","[object Function]":"function","[object Arguments]":"arguments","[object Date]":"date"};e.Library=r,r.prototype.of=i,r.prototype.define=function(e,t){return 1===arguments.length?this.tests[e]:(this.tests[e]=t,this)},r.prototype.test=function(e,t){if(t===i(e))return!0;var r=this.tests[t];if(r&&"regexp"===i(r))return r.test(e);if(r&&"function"===i(r))return r(e);throw new ReferenceError('Type test "'+t+'" not defined or invalid.')}}),require.register("chaijs~deep-eql@0.1.3",function(e,t){function i(e,t,i){return r(e,t)?!0:"date"===d(e)?o(e,t):"regexp"===d(e)?s(e,t):p.isBuffer(e)?h(e,t):"arguments"===d(e)?a(e,t,i):n(e,t)?"object"!==d(e)&&"object"!==d(t)&&"array"!==d(e)&&"array"!==d(t)?r(e,t):f(e,t,i):!1}function r(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function n(e,t){return d(e)===d(t)}function o(e,t){return"date"!==d(t)?!1:r(e.getTime(),t.getTime())}function s(e,t){return"regexp"!==d(t)?!1:r(e.toString(),t.toString())}function a(e,t,r){return"arguments"!==d(t)?!1:(e=[].slice.call(e),t=[].slice.call(t),i(e,t,r))}function c(e){var t=[];for(var i in e)t.push(i);return t}function u(e,t){if(e.length!==t.length)return!1;for(var i=0,r=!0;i<e.length;i++)if(e[i]!==t[i]){r=!1;break}return r}function h(e,t){return p.isBuffer(t)?u(e,t):!1}function l(e){return null!==e&&void 0!==e}function f(e,t,r){if(!l(e)||!l(t))return!1;if(e.prototype!==t.prototype)return!1;var n;if(r){for(n=0;n<r.length;n++)if(r[n][0]===e&&r[n][1]===t||r[n][0]===t&&r[n][1]===e)return!0}else r=[];try{var o=c(e),s=c(t)}catch(a){return!1}if(o.sort(),s.sort(),!u(o,s))return!1;r.push([e,t]);var h;for(n=o.length-1;n>=0;n--)if(h=o[n],!i(e[h],t[h],r))return!1;return!0}var p,d=require("chaijs~type-detect@0.1.1");try{p=require("buffer").Buffer}catch(b){p={},p.isBuffer=function(){return!1}}t.exports=i}),require.register("chai",function(e,t){t.exports=require("chai/lib/chai.js")}),require.register("chai/lib/chai.js",function(e,t){var i=[],e=t.exports={};e.version="1.10.0",e.AssertionError=require("chaijs~assertion-error@1.0.0");var r=require("chai/lib/chai/utils/index.js");e.use=function(e){return~i.indexOf(e)||(e(this,r),i.push(e)),this};var n=require("chai/lib/chai/config.js");e.config=n;var o=require("chai/lib/chai/assertion.js");e.use(o);var s=require("chai/lib/chai/core/assertions.js");e.use(s);var a=require("chai/lib/chai/interface/expect.js");e.use(a);var c=require("chai/lib/chai/interface/should.js");e.use(c);var u=require("chai/lib/chai/interface/assert.js");e.use(u)}),require.register("chai/lib/chai/assertion.js",function(e,t){var i=require("chai/lib/chai/config.js"),r=function(){};t.exports=function(e,t){function n(e,t,i){s(this,"ssfi",i||arguments.callee),s(this,"object",e),s(this,"message",t)}var o=e.AssertionError,s=t.flag;e.Assertion=n,Object.defineProperty(n,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),i.includeStack},set:function(e){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),i.includeStack=e}}),Object.defineProperty(n,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),i.showDiff},set:function(e){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),i.showDiff=e}}),n.addProperty=function(e,i){t.addProperty(this.prototype,e,i)},n.addMethod=function(e,i){t.addMethod(this.prototype,e,i)},n.addChainableMethod=function(e,i,r){t.addChainableMethod(this.prototype,e,i,r)},n.addChainableNoop=function(e,i){t.addChainableMethod(this.prototype,e,r,i)},n.overwriteProperty=function(e,i){t.overwriteProperty(this.prototype,e,i)},n.overwriteMethod=function(e,i){t.overwriteMethod(this.prototype,e,i)},n.overwriteChainableMethod=function(e,i,r){t.overwriteChainableMethod(this.prototype,e,i,r)},n.prototype.assert=function(e,r,n,a,c,u){var h=t.test(this,arguments);if(!0!==u&&(u=!1),!0!==i.showDiff&&(u=!1),!h){var r=t.getMessage(this,arguments),l=t.getActual(this,arguments);throw new o(r,{actual:l,expected:a,showDiff:u},i.includeStack?this.assert:s(this,"ssfi"))}},Object.defineProperty(n.prototype,"_obj",{get:function(){return s(this,"object")},set:function(e){s(this,"object",e)}})}}),require.register("chai/lib/chai/config.js",function(e,t){t.exports={includeStack:!1,showDiff:!0,truncateThreshold:40}}),require.register("chai/lib/chai/core/assertions.js",function(e,t){t.exports=function(e,t){function i(e,i){i&&x(this,"message",i),e=e.toLowerCase();var r=x(this,"object"),n=~["a","e","i","o","u"].indexOf(e.charAt(0))?"an ":"a ";this.assert(e===t.type(r),"expected #{this} to be "+n+e,"expected #{this} not to be "+n+e)}function r(){x(this,"contains",!0)}function n(e,i){i&&x(this,"message",i);var r=x(this,"object"),n=!1;if("array"===t.type(r)&&"object"===t.type(e)){for(var o in r)if(t.eql(r[o],e)){n=!0;break}}else if("object"===t.type(e)){if(!x(this,"negate")){for(var s in e)new j(r).property(s,e[s]);return}var a={};for(var s in e)a[s]=r[s];n=t.eql(a,e)}else n=r&&~r.indexOf(e);this.assert(n,"expected #{this} to include "+t.inspect(e),"expected #{this} to not include "+t.inspect(e))}function o(){var e=x(this,"object"),t=Object.prototype.toString.call(e);this.assert("[object Arguments]"===t,"expected #{this} to be arguments but got "+t,"expected #{this} to not be arguments")}function s(e,t){t&&x(this,"message",t);var i=x(this,"object");return x(this,"deep")?this.eql(e):void this.assert(e===i,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",e,this._obj,!0)}function a(e,i){i&&x(this,"message",i),this.assert(t.eql(e,x(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",e,this._obj,!0)}function c(e,t){t&&x(this,"message",t);var i=x(this,"object");if(x(this,"doLength")){new j(i,t).to.have.property("length");var r=i.length;this.assert(r>e,"expected #{this} to have a length above #{exp} but got #{act}","expected #{this} to not have a length above #{exp}",e,r)}else this.assert(i>e,"expected #{this} to be above "+e,"expected #{this} to be at most "+e)}function u(e,t){t&&x(this,"message",t);var i=x(this,"object");if(x(this,"doLength")){new j(i,t).to.have.property("length");var r=i.length;this.assert(r>=e,"expected #{this} to have a length at least #{exp} but got #{act}","expected #{this} to have a length below #{exp}",e,r)}else this.assert(i>=e,"expected #{this} to be at least "+e,"expected #{this} to be below "+e)}function h(e,t){t&&x(this,"message",t);var i=x(this,"object");if(x(this,"doLength")){new j(i,t).to.have.property("length");var r=i.length;this.assert(e>r,"expected #{this} to have a length below #{exp} but got #{act}","expected #{this} to not have a length below #{exp}",e,r)}else this.assert(e>i,"expected #{this} to be below "+e,"expected #{this} to be at least "+e)}function l(e,t){t&&x(this,"message",t);var i=x(this,"object");if(x(this,"doLength")){new j(i,t).to.have.property("length");var r=i.length;this.assert(e>=r,"expected #{this} to have a length at most #{exp} but got #{act}","expected #{this} to have a length above #{exp}",e,r)}else this.assert(e>=i,"expected #{this} to be at most "+e,"expected #{this} to be above "+e)}function f(e,i){i&&x(this,"message",i);var r=t.getName(e);this.assert(x(this,"object")instanceof e,"expected #{this} to be an instance of "+r,"expected #{this} to not be an instance of "+r)}function p(e,i){i&&x(this,"message",i);var r=x(this,"object");this.assert(r.hasOwnProperty(e),"expected #{this} to have own property "+t.inspect(e),"expected #{this} to not have own property "+t.inspect(e))}function d(){x(this,"doLength",!0)}function b(e,t){t&&x(this,"message",t);var i=x(this,"object");new j(i,t).to.have.property("length");var r=i.length;this.assert(r==e,"expected #{this} to have a length of #{exp} but got #{act}","expected #{this} to not have a length of #{act}",e,r)}function g(e){var i,r=x(this,"object"),n=!0;if(e=e instanceof Array?e:Array.prototype.slice.call(arguments),!e.length)throw new Error("keys required");var o=Object.keys(r),s=e,a=e.length;if(n=e.every(function(e){return~o.indexOf(e)}),x(this,"negate")||x(this,"contains")||(n=n&&e.length==o.length),a>1){e=e.map(function(e){return t.inspect(e)});var c=e.pop();i=e.join(", ")+", and "+c}else i=t.inspect(e[0]);i=(a>1?"keys ":"key ")+i,i=(x(this,"contains")?"contain ":"have ")+i,this.assert(n,"expected #{this} to "+i,"expected #{this} to not "+i,s.sort(),o.sort(),!0)}function v(e,i,r){r&&x(this,"message",r);var n=x(this,"object");new j(n,r).is.a("function");var o=!1,s=null,a=null,c=null;0===arguments.length?(i=null,e=null):e&&(e instanceof RegExp||"string"==typeof e)?(i=e,e=null):e&&e instanceof Error?(s=e,e=null,i=null):"function"==typeof e?(a=e.prototype.name||e.name,"Error"===a&&e!==Error&&(a=(new e).name)):e=null;try{n()}catch(u){if(s)return this.assert(u===s,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp}",s instanceof Error?s.toString():s,u instanceof Error?u.toString():u),x(this,"object",u),this;if(e&&(this.assert(u instanceof e,"expected #{this} to throw #{exp} but #{act} was thrown","expected #{this} to not throw #{exp} but #{act} was thrown",a,u instanceof Error?u.toString():u),!i))return x(this,"object",u),this;var h="object"===t.type(u)&&"message"in u?u.message:""+u;if(null!=h&&i&&i instanceof RegExp)return this.assert(i.exec(h),"expected #{this} to throw error matching #{exp} but got #{act}","expected #{this} to throw error not matching #{exp}",i,h),x(this,"object",u),this;if(null!=h&&i&&"string"==typeof i)return this.assert(~h.indexOf(i),"expected #{this} to throw error including #{exp} but got #{act}","expected #{this} to throw error not including #{act}",i,h),x(this,"object",u),this;o=!0,c=u}var l="",f=null!==a?a:s?"#{exp}":"an error";o&&(l=" but #{act} was thrown"),this.assert(o===!0,"expected #{this} to throw "+f+l,"expected #{this} to not throw "+f+l,s instanceof Error?s.toString():s,c instanceof Error?c.toString():c),x(this,"object",c)}function y(e,t,i){return e.every(function(e){return i?t.some(function(t){return i(e,t)}):-1!==t.indexOf(e)})}var j=e.Assertion,x=(Object.prototype.toString,t.flag);["to","be","been","is","and","has","have","with","that","at","of","same"].forEach(function(e){j.addProperty(e,function(){return this})}),j.addProperty("not",function(){x(this,"negate",!0)}),j.addProperty("deep",function(){x(this,"deep",!0)}),j.addChainableMethod("an",i),j.addChainableMethod("a",i),j.addChainableMethod("include",n,r),j.addChainableMethod("contain",n,r),j.addChainableNoop("ok",function(){this.assert(x(this,"object"),"expected #{this} to be truthy","expected #{this} to be falsy")}),j.addChainableNoop("true",function(){this.assert(!0===x(this,"object"),"expected #{this} to be true","expected #{this} to be false",this.negate?!1:!0)}),j.addChainableNoop("false",function(){this.assert(!1===x(this,"object"),"expected #{this} to be false","expected #{this} to be true",this.negate?!0:!1)}),j.addChainableNoop("null",function(){this.assert(null===x(this,"object"),"expected #{this} to be null","expected #{this} not to be null")}),j.addChainableNoop("undefined",function(){this.assert(void 0===x(this,"object"),"expected #{this} to be undefined","expected #{this} not to be undefined")}),j.addChainableNoop("exist",function(){this.assert(null!=x(this,"object"),"expected #{this} to exist","expected #{this} to not exist")}),j.addChainableNoop("empty",function(){var e=x(this,"object"),t=e;Array.isArray(e)||"string"==typeof object?t=e.length:"object"==typeof e&&(t=Object.keys(e).length),this.assert(!t,"expected #{this} to be empty","expected #{this} not to be empty")}),j.addChainableNoop("arguments",o),j.addChainableNoop("Arguments",o),j.addMethod("equal",s),j.addMethod("equals",s),j.addMethod("eq",s),j.addMethod("eql",a),j.addMethod("eqls",a),j.addMethod("above",c),j.addMethod("gt",c),j.addMethod("greaterThan",c),j.addMethod("least",u),j.addMethod("gte",u),j.addMethod("below",h),j.addMethod("lt",h),j.addMethod("lessThan",h),j.addMethod("most",l),j.addMethod("lte",l),j.addMethod("within",function(e,t,i){i&&x(this,"message",i);var r=x(this,"object"),n=e+".."+t;if(x(this,"doLength")){new j(r,i).to.have.property("length");var o=r.length;this.assert(o>=e&&t>=o,"expected #{this} to have a length within "+n,"expected #{this} to not have a length within "+n)}else this.assert(r>=e&&t>=r,"expected #{this} to be within "+n,"expected #{this} to not be within "+n)}),j.addMethod("instanceof",f),j.addMethod("instanceOf",f),j.addMethod("property",function(e,i,r){r&&x(this,"message",r);var n=x(this,"deep")?"deep property ":"property ",o=x(this,"negate"),s=x(this,"object"),a=x(this,"deep")?t.getPathValue(e,s):s[e];if(o&&void 0!==i){if(void 0===a)throw r=null!=r?r+": ":"",new Error(r+t.inspect(s)+" has no "+n+t.inspect(e))}else this.assert(void 0!==a,"expected #{this} to have a "+n+t.inspect(e),"expected #{this} to not have "+n+t.inspect(e));void 0!==i&&this.assert(i===a,"expected #{this} to have a "+n+t.inspect(e)+" of #{exp}, but got #{act}","expected #{this} to not have a "+n+t.inspect(e)+" of #{act}",i,a),x(this,"object",a)}),j.addMethod("ownProperty",p),j.addMethod("haveOwnProperty",p),j.addChainableMethod("length",b,d),j.addMethod("lengthOf",b),j.addMethod("match",function(e,t){t&&x(this,"message",t);var i=x(this,"object");this.assert(e.exec(i),"expected #{this} to match "+e,"expected #{this} not to match "+e)}),j.addMethod("string",function(e,i){i&&x(this,"message",i);var r=x(this,"object");new j(r,i).is.a("string"),this.assert(~r.indexOf(e),"expected #{this} to contain "+t.inspect(e),"expected #{this} to not contain "+t.inspect(e))}),j.addMethod("keys",g),j.addMethod("key",g),j.addMethod("throw",v),j.addMethod("throws",v),j.addMethod("Throw",v),j.addMethod("respondTo",function(e,i){i&&x(this,"message",i);var r=x(this,"object"),n=x(this,"itself"),o="function"!==t.type(r)||n?r[e]:r.prototype[e];this.assert("function"==typeof o,"expected #{this} to respond to "+t.inspect(e),"expected #{this} to not respond to "+t.inspect(e))}),j.addProperty("itself",function(){x(this,"itself",!0)}),j.addMethod("satisfy",function(e,i){i&&x(this,"message",i);var r=x(this,"object"),n=e(r);this.assert(n,"expected #{this} to satisfy "+t.objDisplay(e),"expected #{this} to not satisfy"+t.objDisplay(e),this.negate?!1:!0,n)}),j.addMethod("closeTo",function(e,i,r){r&&x(this,"message",r);var n=x(this,"object");if(new j(n,r).is.a("number"),"number"!==t.type(e)||"number"!==t.type(i))throw new Error("the arguments to closeTo must be numbers");this.assert(Math.abs(n-e)<=i,"expected #{this} to be close to "+e+" +/- "+i,"expected #{this} not to be close to "+e+" +/- "+i)}),j.addMethod("members",function(e,i){i&&x(this,"message",i);var r=x(this,"object");new j(r).to.be.an("array"),new j(e).to.be.an("array");var n=x(this,"deep")?t.eql:void 0;return x(this,"contains")?this.assert(y(e,r,n),"expected #{this} to be a superset of #{act}","expected #{this} to not be a superset of #{act}",r,e):void this.assert(y(r,e,n)&&y(e,r,n),"expected #{this} to have the same members as #{act}","expected #{this} to not have the same members as #{act}",r,e)})}}),require.register("chai/lib/chai/interface/assert.js",function(exports,module){module.exports=function(chai,util){var Assertion=chai.Assertion,flag=util.flag,assert=chai.assert=function(e,t){var i=new Assertion(null,null,chai.assert);i.assert(e,t,"[ negation message unavailable ]")};assert.fail=function(e,t,i,r){throw i=i||"assert.fail()",new chai.AssertionError(i,{actual:e,expected:t,operator:r},assert.fail)},assert.ok=function(e,t){new Assertion(e,t).is.ok},assert.notOk=function(e,t){new Assertion(e,t).is.not.ok},assert.equal=function(e,t,i){var r=new Assertion(e,i,assert.equal);r.assert(t==flag(r,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",t,e)},assert.notEqual=function(e,t,i){var r=new Assertion(e,i,assert.notEqual);r.assert(t!=flag(r,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",t,e)},assert.strictEqual=function(e,t,i){new Assertion(e,i).to.equal(t)},assert.notStrictEqual=function(e,t,i){new Assertion(e,i).to.not.equal(t)},assert.deepEqual=function(e,t,i){new Assertion(e,i).to.eql(t)},assert.notDeepEqual=function(e,t,i){new Assertion(e,i).to.not.eql(t)},assert.isTrue=function(e,t){new Assertion(e,t).is["true"]},assert.isFalse=function(e,t){new Assertion(e,t).is["false"]},assert.isNull=function(e,t){new Assertion(e,t).to.equal(null)},assert.isNotNull=function(e,t){new Assertion(e,t).to.not.equal(null)},assert.isUndefined=function(e,t){new Assertion(e,t).to.equal(void 0)},assert.isDefined=function(e,t){new Assertion(e,t).to.not.equal(void 0)},assert.isFunction=function(e,t){new Assertion(e,t).to.be.a("function")},assert.isNotFunction=function(e,t){new Assertion(e,t).to.not.be.a("function")},assert.isObject=function(e,t){new Assertion(e,t).to.be.a("object")},assert.isNotObject=function(e,t){new Assertion(e,t).to.not.be.a("object")},assert.isArray=function(e,t){new Assertion(e,t).to.be.an("array")},assert.isNotArray=function(e,t){new Assertion(e,t).to.not.be.an("array")},assert.isString=function(e,t){new Assertion(e,t).to.be.a("string")},assert.isNotString=function(e,t){new Assertion(e,t).to.not.be.a("string")},assert.isNumber=function(e,t){new Assertion(e,t).to.be.a("number")},assert.isNotNumber=function(e,t){new Assertion(e,t).to.not.be.a("number")},assert.isBoolean=function(e,t){new Assertion(e,t).to.be.a("boolean")},assert.isNotBoolean=function(e,t){new Assertion(e,t).to.not.be.a("boolean")},assert.typeOf=function(e,t,i){new Assertion(e,i).to.be.a(t)},assert.notTypeOf=function(e,t,i){new Assertion(e,i).to.not.be.a(t)},assert.instanceOf=function(e,t,i){new Assertion(e,i).to.be.instanceOf(t)},assert.notInstanceOf=function(e,t,i){new Assertion(e,i).to.not.be.instanceOf(t)},assert.include=function(e,t,i){new Assertion(e,i,assert.include).include(t)},assert.notInclude=function(e,t,i){new Assertion(e,i,assert.notInclude).not.include(t)},assert.match=function(e,t,i){new Assertion(e,i).to.match(t)},assert.notMatch=function(e,t,i){new Assertion(e,i).to.not.match(t)},assert.property=function(e,t,i){new Assertion(e,i).to.have.property(t)},assert.notProperty=function(e,t,i){new Assertion(e,i).to.not.have.property(t)},assert.deepProperty=function(e,t,i){new Assertion(e,i).to.have.deep.property(t)},assert.notDeepProperty=function(e,t,i){new Assertion(e,i).to.not.have.deep.property(t)},assert.propertyVal=function(e,t,i,r){new Assertion(e,r).to.have.property(t,i)},assert.propertyNotVal=function(e,t,i,r){new Assertion(e,r).to.not.have.property(t,i)},assert.deepPropertyVal=function(e,t,i,r){new Assertion(e,r).to.have.deep.property(t,i)},assert.deepPropertyNotVal=function(e,t,i,r){new Assertion(e,r).to.not.have.deep.property(t,i)},assert.lengthOf=function(e,t,i){new Assertion(e,i).to.have.length(t)},assert.Throw=function(e,t,i,r){("string"==typeof t||t instanceof RegExp)&&(i=t,t=null);var n=new Assertion(e,r).to.Throw(t,i);return flag(n,"object")},assert.doesNotThrow=function(e,t,i){"string"==typeof t&&(i=t,t=null),new Assertion(e,i).to.not.Throw(t)},assert.operator=function(val,operator,val2,msg){if(!~["==","===",">",">=","<","<=","!=","!=="].indexOf(operator))throw new Error('Invalid operator "'+operator+'"');var test=new Assertion(eval(val+operator+val2),msg);test.assert(!0===flag(test,"object"),"expected "+util.inspect(val)+" to be "+operator+" "+util.inspect(val2),"expected "+util.inspect(val)+" to not be "+operator+" "+util.inspect(val2))},assert.closeTo=function(e,t,i,r){new Assertion(e,r).to.be.closeTo(t,i)},assert.sameMembers=function(e,t,i){new Assertion(e,i).to.have.same.members(t)},assert.includeMembers=function(e,t,i){new Assertion(e,i).to.include.members(t)},assert.ifError=function(e,t){new Assertion(e,t).to.not.be.ok},function e(t,i){return assert[i]=assert[t],e}("Throw","throw")("Throw","throws")}}),require.register("chai/lib/chai/interface/expect.js",function(e,t){t.exports=function(e){e.expect=function(t,i){return new e.Assertion(t,i)}}}),require.register("chai/lib/chai/interface/should.js",function(e,t){t.exports=function(e){function t(){function e(){return this instanceof String||this instanceof Number?new i(this.constructor(this),null,e):this instanceof Boolean?new i(1==this,null,e):new i(this,null,e)}function t(e){Object.defineProperty(this,"should",{value:e,enumerable:!0,configurable:!0,writable:!0})}Object.defineProperty(Object.prototype,"should",{set:t,get:e,configurable:!0});var r={};return r.equal=function(e,t,r){new i(e,r).to.equal(t)},r.Throw=function(e,t,r,n){new i(e,n).to.Throw(t,r)},r.exist=function(e,t){new i(e,t).to.exist},r.not={},r.not.equal=function(e,t,r){new i(e,r).to.not.equal(t)},r.not.Throw=function(e,t,r,n){new i(e,n).to.not.Throw(t,r)},r.not.exist=function(e,t){new i(e,t).to.not.exist},r["throw"]=r.Throw,r.not["throw"]=r.not.Throw,r}var i=e.Assertion;e.should=t,e.Should=t}}),require.register("chai/lib/chai/utils/addChainableMethod.js",function(e,t){var i=require("chai/lib/chai/utils/transferFlags.js"),r=require("chai/lib/chai/utils/flag.js"),n=require("chai/lib/chai/config.js"),o="__proto__"in Object,s=/^(?:length|name|arguments|caller)$/,a=Function.prototype.call,c=Function.prototype.apply;t.exports=function(e,t,u,h){"function"!=typeof h&&(h=function(){});var l={method:u,chainingBehavior:h};e.__methods||(e.__methods={}),e.__methods[t]=l,Object.defineProperty(e,t,{get:function(){l.chainingBehavior.call(this);var t=function f(){var e=r(this,"ssfi");e&&n.includeStack===!1&&r(this,"ssfi",f);var t=l.method.apply(this,arguments);return void 0===t?this:t};if(o){var u=t.__proto__=Object.create(this);u.call=a,u.apply=c}else{var h=Object.getOwnPropertyNames(e);h.forEach(function(i){if(!s.test(i)){var r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r)}})}return i(this,t),t},configurable:!0})}}),require.register("chai/lib/chai/utils/addMethod.js",function(e,t){var i=require("chai/lib/chai/config.js"),r=require("chai/lib/chai/utils/flag.js");t.exports=function(e,t,n){e[t]=function(){var o=r(this,"ssfi");o&&i.includeStack===!1&&r(this,"ssfi",e[t]);var s=n.apply(this,arguments);return void 0===s?this:s}}}),require.register("chai/lib/chai/utils/addProperty.js",function(e,t){t.exports=function(e,t,i){Object.defineProperty(e,t,{get:function(){var e=i.call(this);return void 0===e?this:e},configurable:!0})}}),require.register("chai/lib/chai/utils/flag.js",function(e,t){t.exports=function(e,t,i){var r=e.__flags||(e.__flags=Object.create(null));return 3!==arguments.length?r[t]:void(r[t]=i)}}),require.register("chai/lib/chai/utils/getActual.js",function(e,t){t.exports=function(e,t){return t.length>4?t[4]:e._obj}}),require.register("chai/lib/chai/utils/getEnumerableProperties.js",function(e,t){t.exports=function(e){var t=[];for(var i in e)t.push(i);return t}}),require.register("chai/lib/chai/utils/getMessage.js",function(e,t){var i=require("chai/lib/chai/utils/flag.js"),r=require("chai/lib/chai/utils/getActual.js"),n=(require("chai/lib/chai/utils/inspect.js"),require("chai/lib/chai/utils/objDisplay.js"));t.exports=function(e,t){var o=i(e,"negate"),s=i(e,"object"),a=t[3],c=r(e,t),u=o?t[2]:t[1],h=i(e,"message");return"function"==typeof u&&(u=u()),u=u||"",u=u.replace(/#{this}/g,n(s)).replace(/#{act}/g,n(c)).replace(/#{exp}/g,n(a)),h?h+": "+u:u}}),require.register("chai/lib/chai/utils/getName.js",function(e,t){t.exports=function(e){if(e.name)return e.name;var t=/^\s?function ([^(]*)\(/.exec(e);return t&&t[1]?t[1]:""}}),require.register("chai/lib/chai/utils/getPathValue.js",function(e,t){function i(e){var t=e.replace(/\[/g,".["),i=t.match(/(\\\.|[^.]+?)+/g);return i.map(function(e){var t=/\[(\d+)\]$/,i=t.exec(e);return i?{i:parseFloat(i[1])}:{p:e}})}function r(e,t){for(var i,r=t,n=0,o=e.length;o>n;n++){var s=e[n];r?("undefined"!=typeof s.p?r=r[s.p]:"undefined"!=typeof s.i&&(r=r[s.i]),n==o-1&&(i=r)):i=void 0}return i}t.exports=function(e,t){var n=i(e);return r(n,t)}}),require.register("chai/lib/chai/utils/getProperties.js",function(e,t){t.exports=function(){function e(e){-1===t.indexOf(e)&&t.push(e)}for(var t=Object.getOwnPropertyNames(subject),i=Object.getPrototypeOf(subject);null!==i;)Object.getOwnPropertyNames(i).forEach(e),i=Object.getPrototypeOf(i);return t}}),require.register("chai/lib/chai/utils/index.js",function(e,t){var e=t.exports={};e.test=require("chai/lib/chai/utils/test.js"),e.type=require("chai/lib/chai/utils/type.js"),e.getMessage=require("chai/lib/chai/utils/getMessage.js"),e.getActual=require("chai/lib/chai/utils/getActual.js"),e.inspect=require("chai/lib/chai/utils/inspect.js"),e.objDisplay=require("chai/lib/chai/utils/objDisplay.js"),e.flag=require("chai/lib/chai/utils/flag.js"),e.transferFlags=require("chai/lib/chai/utils/transferFlags.js"),e.eql=require("chaijs~deep-eql@0.1.3"),e.getPathValue=require("chai/lib/chai/utils/getPathValue.js"),e.getName=require("chai/lib/chai/utils/getName.js"),e.addProperty=require("chai/lib/chai/utils/addProperty.js"),e.addMethod=require("chai/lib/chai/utils/addMethod.js"),e.overwriteProperty=require("chai/lib/chai/utils/overwriteProperty.js"),e.overwriteMethod=require("chai/lib/chai/utils/overwriteMethod.js"),e.addChainableMethod=require("chai/lib/chai/utils/addChainableMethod.js"),e.overwriteChainableMethod=require("chai/lib/chai/utils/overwriteChainableMethod.js")}),require.register("chai/lib/chai/utils/inspect.js",function(e,t){function i(e,t,i){var n={showHidden:t,seen:[],stylize:function(e){return e}};return r(n,e,"undefined"==typeof i?2:i)}function r(t,i,p){if(i&&"function"==typeof i.inspect&&i.inspect!==e.inspect&&(!i.constructor||i.constructor.prototype!==i)){var y=i.inspect(p);return"string"!=typeof y&&(y=r(t,y,p)),y}var j=n(t,i);if(j)return j;if(v(i)){if("outerHTML"in i)return i.outerHTML;try{if(document.xmlVersion){var x=new XMLSerializer;return x.serializeToString(i)}var w="http://www.w3.org/1999/xhtml",m=document.createElementNS(w,"_");return m.appendChild(i.cloneNode(!1)),html=m.innerHTML.replace("><",">"+i.innerHTML+"<"),m.innerHTML="",html}catch(q){}}var A=g(i),O=t.showHidden?b(i):A;if(0===O.length||f(i)&&(1===O.length&&"stack"===O[0]||2===O.length&&"description"===O[0]&&"stack"===O[1])){if("function"==typeof i){var M=d(i),S=M?": "+M:"";return t.stylize("[Function"+S+"]","special")}if(h(i))return t.stylize(RegExp.prototype.toString.call(i),"regexp");if(l(i))return t.stylize(Date.prototype.toUTCString.call(i),"date");if(f(i))return o(i)}var _="",E=!1,P=["{","}"];if(u(i)&&(E=!0,P=["[","]"]),"function"==typeof i){var M=d(i),S=M?": "+M:"";_=" [Function"+S+"]"}if(h(i)&&(_=" "+RegExp.prototype.toString.call(i)),l(i)&&(_=" "+Date.prototype.toUTCString.call(i)),f(i))return o(i);if(0===O.length&&(!E||0==i.length))return P[0]+_+P[1];if(0>p)return h(i)?t.stylize(RegExp.prototype.toString.call(i),"regexp"):t.stylize("[Object]","special");t.seen.push(i);var k;return k=E?s(t,i,p,A,O):O.map(function(e){return a(t,i,p,A,e,E)}),t.seen.pop(),c(k,_,P)}function n(e,t){switch(typeof t){case"undefined":return e.stylize("undefined","undefined");case"string":var i="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(i,"string");case"number":return 0===t&&1/t===-1/0?e.stylize("-0","number"):e.stylize(""+t,"number");case"boolean":return e.stylize(""+t,"boolean")}return null===t?e.stylize("null","null"):void 0}function o(e){return"["+Error.prototype.toString.call(e)+"]"}function s(e,t,i,r,n){for(var o=[],s=0,c=t.length;c>s;++s)o.push(Object.prototype.hasOwnProperty.call(t,String(s))?a(e,t,i,r,String(s),!0):"");return n.forEach(function(n){n.match(/^\d+$/)||o.push(a(e,t,i,r,n,!0))}),o}function a(e,t,i,n,o,s){var a,c;if(t.__lookupGetter__&&(t.__lookupGetter__(o)?c=t.__lookupSetter__(o)?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):t.__lookupSetter__(o)&&(c=e.stylize("[Setter]","special"))),n.indexOf(o)<0&&(a="["+o+"]"),c||(e.seen.indexOf(t[o])<0?(c=null===i?r(e,t[o],null):r(e,t[o],i-1),c.indexOf("\n")>-1&&(c=s?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n"))):c=e.stylize("[Circular]","special")),"undefined"==typeof a){if(s&&o.match(/^\d+$/))return c;a=JSON.stringify(""+o),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function c(e,t,i){var r=0,n=e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.length+1},0);return n>60?i[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+i[1]:i[0]+t+" "+e.join(", ")+" "+i[1]}function u(e){return Array.isArray(e)||"object"==typeof e&&"[object Array]"===p(e)}function h(e){return"object"==typeof e&&"[object RegExp]"===p(e)}function l(e){return"object"==typeof e&&"[object Date]"===p(e)}function f(e){return"object"==typeof e&&"[object Error]"===p(e)}function p(e){return Object.prototype.toString.call(e)}var d=require("chai/lib/chai/utils/getName.js"),b=require("chai/lib/chai/utils/getProperties.js"),g=require("chai/lib/chai/utils/getEnumerableProperties.js");t.exports=i;var v=function(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}}),require.register("chai/lib/chai/utils/objDisplay.js",function(e,t){var i=require("chai/lib/chai/utils/inspect.js"),r=require("chai/lib/chai/config.js");t.exports=function(e){var t=i(e),n=Object.prototype.toString.call(e);if(r.truncateThreshold&&t.length>=r.truncateThreshold){if("[object Function]"===n)return e.name&&""!==e.name?"[Function: "+e.name+"]":"[Function]";
- if("[object Array]"===n)return"[ Array("+e.length+") ]";if("[object Object]"===n){var o=Object.keys(e),s=o.length>2?o.splice(0,2).join(", ")+", ...":o.join(", ");return"{ Object ("+s+") }"}return t}return t}}),require.register("chai/lib/chai/utils/overwriteMethod.js",function(e,t){t.exports=function(e,t,i){var r=e[t],n=function(){return this};r&&"function"==typeof r&&(n=r),e[t]=function(){var e=i(n).apply(this,arguments);return void 0===e?this:e}}}),require.register("chai/lib/chai/utils/overwriteProperty.js",function(e,t){t.exports=function(e,t,i){var r=Object.getOwnPropertyDescriptor(e,t),n=function(){};r&&"function"==typeof r.get&&(n=r.get),Object.defineProperty(e,t,{get:function(){var e=i(n).call(this);return void 0===e?this:e},configurable:!0})}}),require.register("chai/lib/chai/utils/overwriteChainableMethod.js",function(e,t){t.exports=function(e,t,i,r){var n=e.__methods[t],o=n.chainingBehavior;n.chainingBehavior=function(){var e=r(o).call(this);return void 0===e?this:e};var s=n.method;n.method=function(){var e=i(s).apply(this,arguments);return void 0===e?this:e}}}),require.register("chai/lib/chai/utils/test.js",function(e,t){var i=require("chai/lib/chai/utils/flag.js");t.exports=function(e,t){var r=i(e,"negate"),n=t[0];return r?!n:n}}),require.register("chai/lib/chai/utils/transferFlags.js",function(e,t){t.exports=function(e,t,i){var r=e.__flags||(e.__flags=Object.create(null));t.__flags||(t.__flags=Object.create(null)),i=3===arguments.length?i:!0;for(var n in r)(i||"object"!==n&&"ssfi"!==n&&"message"!=n)&&(t.__flags[n]=r[n])}}),require.register("chai/lib/chai/utils/type.js",function(e,t){var i={"[object Arguments]":"arguments","[object Array]":"array","[object Date]":"date","[object Function]":"function","[object Number]":"number","[object RegExp]":"regexp","[object String]":"string"};t.exports=function(e){var t=Object.prototype.toString.call(e);return i[t]?i[t]:null===e?"null":void 0===e?"undefined":e===Object(e)?"object":typeof e}}),"object"==typeof exports?module.exports=require("chai"):"function"==typeof define&&define.amd?define("chai",[],function(){return require("chai")}):(this||window).chai=require("chai")}();
|