From 8edb39314197acb01b0d1646022397243a8a1212 Mon Sep 17 00:00:00 2001 From: Sean Adkinson Date: Tue, 26 Aug 2014 17:48:04 -0700 Subject: [PATCH] Adding crypto dependencies to index --- app/index.html | 2 + dist/scripts/vendor.js | 128 ++++++++++++++++++++++++++++++ dist/scripts/vendor.min.js | 26 +++--- dist/scripts/vendor/enc-base64.js | 109 +++++++++++++++++++++++++ dist/scripts/vendor/hmac-sha1.js | 17 ++++ 5 files changed, 269 insertions(+), 13 deletions(-) create mode 100644 dist/scripts/vendor/enc-base64.js create mode 100644 dist/scripts/vendor/hmac-sha1.js diff --git a/app/index.html b/app/index.html index 3ad647cfd..69f93abda 100644 --- a/app/index.html +++ b/app/index.html @@ -50,6 +50,8 @@ + + diff --git a/dist/scripts/vendor.js b/dist/scripts/vendor.js index 14364cefe..7a6dc2284 100644 --- a/dist/scripts/vendor.js +++ b/dist/scripts/vendor.js @@ -36666,6 +36666,134 @@ var toObject = function (o) { }); +/* +CryptoJS v3.1.2 +code.google.com/p/crypto-js +(c) 2009-2013 by Jeff Mott. All rights reserved. +code.google.com/p/crypto-js/wiki/License +*/ +var CryptoJS=CryptoJS||function(g,l){var e={},d=e.lib={},m=function(){},k=d.Base={extend:function(a){m.prototype=this;var c=new m;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, +p=d.WordArray=k.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||n).stringify(this)},concat:function(a){var c=this.words,q=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var b=0;b>>2]|=(q[b>>>2]>>>24-8*(b%4)&255)<<24-8*((f+b)%4);else if(65535>>2]=q[b>>>2];else c.push.apply(c,q);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< +32-8*(c%4);a.length=g.ceil(c/4)},clone:function(){var a=k.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],b=0;b>>2]>>>24-8*(f%4)&255;b.push((d>>>4).toString(16));b.push((d&15).toString(16))}return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>3]|=parseInt(a.substr(f, +2),16)<<24-4*(f%8);return new p.init(b,c/2)}},j=b.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var b=[],f=0;f>>2]>>>24-8*(f%4)&255));return b.join("")},parse:function(a){for(var c=a.length,b=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new p.init(b,c)}},h=b.Utf8={stringify:function(a){try{return decodeURIComponent(escape(j.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return j.parse(unescape(encodeURIComponent(a)))}}, +r=d.BufferedBlockAlgorithm=k.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=h.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,b=c.words,f=c.sigBytes,d=this.blockSize,e=f/(4*d),e=a?g.ceil(e):g.max((e|0)-this._minBufferSize,0);a=e*d;f=g.min(4*a,f);if(a){for(var k=0;ka;a++){if(16>a)m[a]=d[e+a]|0;else{var c=m[a-3]^m[a-8]^m[a-14]^m[a-16];m[a]=c<<1|c>>>31}c=(n<<5|n>>>27)+l+m[a];c=20>a?c+((j&h|~j&g)+1518500249):40>a?c+((j^h^g)+1859775393):60>a?c+((j&h|j&g|h&g)-1894007588):c+((j^h^ +g)-899497514);l=g;g=h;h=j<<30|j>>>2;j=n;n=c}b[0]=b[0]+n|0;b[1]=b[1]+j|0;b[2]=b[2]+h|0;b[3]=b[3]+g|0;b[4]=b[4]+l|0},_doFinalize:function(){var d=this._data,e=d.words,b=8*this._nDataBytes,g=8*d.sigBytes;e[g>>>5]|=128<<24-g%32;e[(g+64>>>9<<4)+14]=Math.floor(b/4294967296);e[(g+64>>>9<<4)+15]=b;d.sigBytes=4*e.length;this._process();return this._hash},clone:function(){var e=d.clone.call(this);e._hash=this._hash.clone();return e}});g.SHA1=d._createHelper(l);g.HmacSHA1=d._createHmacHelper(l)})(); +(function(){var g=CryptoJS,l=g.enc.Utf8;g.algo.HMAC=g.lib.Base.extend({init:function(e,d){e=this._hasher=new e.init;"string"==typeof d&&(d=l.parse(d));var g=e.blockSize,k=4*g;d.sigBytes>k&&(d=e.finalize(d));d.clamp();for(var p=this._oKey=d.clone(),b=this._iKey=d.clone(),n=p.words,j=b.words,h=0;h>> 2] >>> (24 - (i % 4) * 8)) & 0xff; + var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff; + var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff; + + var triplet = (byte1 << 16) | (byte2 << 8) | byte3; + + for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) { + base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f)); + } + } + + // Add padding + var paddingChar = map.charAt(64); + if (paddingChar) { + while (base64Chars.length % 4) { + base64Chars.push(paddingChar); + } + } + + return base64Chars.join(''); + }, + + /** + * Converts a Base64 string to a word array. + * + * @param {string} base64Str The Base64 string. + * + * @return {WordArray} The word array. + * + * @static + * + * @example + * + * var wordArray = CryptoJS.enc.Base64.parse(base64String); + */ + parse: function (base64Str) { + // Shortcuts + var base64StrLength = base64Str.length; + var map = this._map; + + // Ignore padding + var paddingChar = map.charAt(64); + if (paddingChar) { + var paddingIndex = base64Str.indexOf(paddingChar); + if (paddingIndex != -1) { + base64StrLength = paddingIndex; + } + } + + // Convert + var words = []; + var nBytes = 0; + for (var i = 0; i < base64StrLength; i++) { + if (i % 4) { + var bits1 = map.indexOf(base64Str.charAt(i - 1)) << ((i % 4) * 2); + var bits2 = map.indexOf(base64Str.charAt(i)) >>> (6 - (i % 4) * 2); + words[nBytes >>> 2] |= (bits1 | bits2) << (24 - (nBytes % 4) * 8); + nBytes++; + } + } + + return WordArray.create(words, nBytes); + }, + + _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' + }; +}()); + // // showdown.js -- A javascript port of Markdown. // diff --git a/dist/scripts/vendor.min.js b/dist/scripts/vendor.min.js index 292ad2a79..5d08c553d 100644 --- a/dist/scripts/vendor.min.js +++ b/dist/scripts/vendor.min.js @@ -8,17 +8,17 @@ if(g>a){var h=Math.min(b,g-a);if(f.iterN(a,h,c))return!0;if(0==(b-=h))break;a=0} },protocol:nc("$$protocol"),host:nc("$$host"),port:nc("$$port"),path:oc("$$path",function(a){return"/"==a.charAt(0)?a:"/"+a}),search:function(a,b){switch(arguments.length){case 0:return this.$$search;case 1:if(u(a))this.$$search=V(a);else{if(!t(a))throw ge("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");f(a,function(b,c){null==b&&delete a[c]}),this.$$search=a}break;default:r(b)||null===b?delete this.$$search[a]:this.$$search[a]=b}return this.$$compose(),this},hash:oc("$$hash",p),replace:function(){return this.$$replace=!0,this}};var he,ie=d("$parse"),je={},ke=Function.prototype.call,le=Function.prototype.apply,me=Function.prototype.bind,ne={"null":function(){return null},"true":function(){return!0},"false":function(){return!1},undefined:o,"+":function(a,b,d,e){return d=d(a,b),e=e(a,b),s(d)?s(e)?d+e:d:s(e)?e:c},"-":function(a,b,c,d){return c=c(a,b),d=d(a,b),(s(c)?c:0)-(s(d)?d:0)},"*":function(a,b,c,d){return c(a,b)*d(a,b)},"/":function(a,b,c,d){return c(a,b)/d(a,b)},"%":function(a,b,c,d){return c(a,b)%d(a,b)},"^":function(a,b,c,d){return c(a,b)^d(a,b)},"=":o,"===":function(a,b,c,d){return c(a,b)===d(a,b)},"!==":function(a,b,c,d){return c(a,b)!==d(a,b)},"==":function(a,b,c,d){return c(a,b)==d(a,b)},"!=":function(a,b,c,d){return c(a,b)!=d(a,b)},"<":function(a,b,c,d){return c(a,b)":function(a,b,c,d){return c(a,b)>d(a,b)},"<=":function(a,b,c,d){return c(a,b)<=d(a,b)},">=":function(a,b,c,d){return c(a,b)>=d(a,b)},"&&":function(a,b,c,d){return c(a,b)&&d(a,b)},"||":function(a,b,c,d){return c(a,b)||d(a,b)},"&":function(a,b,c,d){return c(a,b)&d(a,b)},"|":function(a,b,c,d){return d(a,b)(a,b,c(a,b))},"!":function(a,b,c){return!c(a,b)}},oe={n:"\n",f:"\f",r:"\r",t:" ",v:" ","'":"'",'"':'"'},pe=function(a){this.options=a};pe.prototype={constructor:pe,lex:function(a){for(this.text=a,this.index=0,this.ch=c,this.lastCh=":",this.tokens=[];this.index="0"&&"9">=a},isWhitespace:function(a){return" "===a||"\r"===a||" "===a||"\n"===a||" "===a||" "===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,c){c=c||this.index;var d=s(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,c)+"]":" "+c;throw ie("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",a,d,this.text)},readNumber:function(){for(var a="",b=this.index;this.index0){var e=this.tokens[0],f=e.text;if(f===a||f===b||f===c||f===d||!a&&!b&&!c&&!d)return e}return!1},expect:function(a,b,c,d){var e=this.peek(a,b,c,d);return e?(this.tokens.shift(),e):!1},consume:function(a){this.expect(a)||this.throwError("is unexpected, expecting ["+a+"]",this.peek())},unaryFn:function(a,b){return l(function(c,d){return a(c,d,b)},{constant:b.constant})},ternaryFn:function(a,b,c){return l(function(d,e){return a(d,e)?b(d,e):c(d,e)},{constant:a.constant&&b.constant&&c.constant})},binaryFn:function(a,b,c){return l(function(d,e){return b(d,e,a,c)},{constant:a.constant&&c.constant})},statements:function(){for(var a=[];;)if(this.tokens.length>0&&!this.peek("}",")",";","]")&&a.push(this.filterChain()),!this.expect(";"))return 1===a.length?a[0]:function(b,c){for(var d,e=0;e","<=",">="))&&(b=this.binaryFn(b,a.fn,this.relational())),b},additive:function(){for(var a,b=this.multiplicative();a=this.expect("+","-");)b=this.binaryFn(b,a.fn,this.multiplicative());return b},multiplicative:function(){for(var a,b=this.unary();a=this.expect("*","/","%");)b=this.binaryFn(b,a.fn,this.unary());return b},unary:function(){var a;return this.expect("+")?this.primary():(a=this.expect("-"))?this.binaryFn(qe.ZERO,a.fn,this.unary()):(a=this.expect("!"))?this.unaryFn(a.fn,this.unary()):this.primary()},fieldAccess:function(a){var b=this,c=this.expect().text,d=wc(c,this.options,this.text);return l(function(b,c,e){return d(e||a(b,c))},{assign:function(d,e,f){var g=a(d,f);return g||a.assign(d,g={}),uc(g,c,e,b.text,b.options)}})},objectIndex:function(a){var b=this,d=this.expression();return this.consume("]"),l(function(e,f){var g,h,i=a(e,f),j=d(e,f);return rc(j,b.text),i?(g=sc(i[j],b.text),g&&g.then&&b.options.unwrapPromises&&(h=g,"$$v"in g||(h.$$v=c,h.then(function(a){h.$$v=a})),g=g.$$v),g):c},{assign:function(c,e,f){var g=rc(d(c,f),b.text),h=sc(a(c,f),b.text);return h||a.assign(c,h={}),h[g]=e}})},functionCall:function(a,b){var c=[];if(")"!==this.peekToken().text)do c.push(this.expression());while(this.expect(","));this.consume(")");var d=this;return function(e,f){for(var g=[],h=b?b(e,f):e,i=0;i=rd&&(c.href||c.name||c.$set("href",""),a.append(b.createComment("IE fix"))),c.href||c.xlinkHref||c.name?void 0:function(a,b){var c="[object SVGAnimatedString]"===yd.call(b.prop("href"))?"xlink:href":"href";b.on("click",function(a){b.attr(c)||a.preventDefault()})}}}),De={};f(Ud,function(a,b){if("multiple"!=a){var c=Pb("ng-"+b);De[c]=function(){return{priority:100,link:function(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}}}}}),f(["src","srcset","href"],function(a){var b=Pb("ng-"+a);De[b]=function(){return{priority:99,link:function(c,d,e){var f=a,g=a;"href"===a&&"[object SVGAnimatedString]"===yd.call(d.prop("href"))&&(g="xlinkHref",e.$attr[g]="xlink:href",f=null),e.$observe(b,function(b){return b?(e.$set(g,b),void(rd&&f&&d.prop(f,e[g]))):void("href"===a&&e.$set(g,null))})}}}});var Ee={$addControl:o,$removeControl:o,$setValidity:o,$setDirty:o,$setPristine:o};ad.$inject=["$element","$attrs","$scope","$animate"];var Fe=function(a){return["$timeout",function(b){var d={name:"form",restrict:a?"EAC":"E",controller:ad,compile:function(){return{pre:function(a,d,e,f){if(!e.action){var g=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1};Jd(d[0],"submit",g),d.on("$destroy",function(){b(function(){Kd(d[0],"submit",g)},0,!1)})}var h=d.parent().controller("form"),i=e.name||e.ngForm;i&&uc(a,i,f,i),h&&d.on("$destroy",function(){h.$removeControl(f),i&&uc(a,i,c,i),l(f,Ee)})}}}};return d}]},Ge=Fe(),He=Fe(!0),Ie=/^(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?$/,Je=/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,Ke=/^\s*(\-|\+)?(\d+|(\d*(\.\d*)))\s*$/,Le={text:ed,number:fd,url:gd,email:hd,radio:id,checkbox:jd,hidden:o,button:o,submit:o,reset:o,file:o},Me=["badInput"],Ne=["$browser","$sniffer",function(a,b){return{restrict:"E",require:"?ngModel",link:function(c,d,e,f){f&&(Le[md(e.type)]||Le.text)(c,d,e,f,b,a)}}}],Oe="ng-valid",Pe="ng-invalid",Qe="ng-pristine",Re="ng-dirty",Se=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate",function(a,b,c,e,g,h){function i(a,b){b=b?"-"+_(b,"-"):"",h.removeClass(e,(a?Pe:Oe)+b),h.addClass(e,(a?Oe:Pe)+b)}this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$name=c.name;var j=g(c.ngModel),k=j.assign;if(!k)throw d("ngModel")("nonassign","Expression '{0}' is non-assignable. Element: {1}",c.ngModel,T(e));this.$render=o,this.$isEmpty=function(a){return r(a)||""===a||null===a||a!==a};var l=e.inheritedData("$formController")||Ee,m=0,n=this.$error={};e.addClass(Qe),i(!0),this.$setValidity=function(a,b){n[a]!==!b&&(b?(n[a]&&m--,m||(i(!0),this.$valid=!0,this.$invalid=!1)):(i(!1),this.$invalid=!0,this.$valid=!1,m++),n[a]=!b,i(b,a),l.$setValidity(a,b,this))},this.$setPristine=function(){this.$dirty=!1,this.$pristine=!0,h.removeClass(e,Re),h.addClass(e,Qe)},this.$setViewValue=function(c){this.$viewValue=c,this.$pristine&&(this.$dirty=!0,this.$pristine=!1,h.removeClass(e,Qe),h.addClass(e,Re),l.$setDirty()),f(this.$parsers,function(a){c=a(c)}),this.$modelValue!==c&&(this.$modelValue=c,k(a,c),f(this.$viewChangeListeners,function(a){try{a()}catch(c){b(c)}}))};var p=this;a.$watch(function(){var b=j(a);if(p.$modelValue!==b){var c=p.$formatters,d=c.length;for(p.$modelValue=b;d--;)b=c[d](b);p.$viewValue!==b&&(p.$viewValue=b,p.$render())}return b})}],Te=function(){return{require:["ngModel","^?form"],controller:Se,link:function(a,b,c,d){var e=d[0],f=d[1]||Ee;f.$addControl(e),a.$on("$destroy",function(){f.$removeControl(e)})}}},Ue=q({require:"ngModel",link:function(a,b,c,d){d.$viewChangeListeners.push(function(){a.$eval(c.ngChange)})}}),Ve=function(){return{require:"?ngModel",link:function(a,b,c,d){if(d){c.required=!0;var e=function(a){return c.required&&d.$isEmpty(a)?void d.$setValidity("required",!1):(d.$setValidity("required",!0),a)};d.$formatters.push(e),d.$parsers.unshift(e),c.$observe("required",function(){e(d.$viewValue)})}}}},We=function(){return{require:"ngModel",link:function(a,b,d,e){var g=/\/(.*)\//.exec(d.ngList),h=g&&new RegExp(g[1])||d.ngList||",",i=function(a){if(!r(a)){var b=[];return a&&f(a.split(h),function(a){a&&b.push(Dd(a))}),b}};e.$parsers.push(i),e.$formatters.push(function(a){return Cd(a)?a.join(", "):c}),e.$isEmpty=function(a){return!a||!a.length}}}},Xe=/^(true|false|\d+)$/,Ye=function(){return{priority:100,compile:function(a,b){return Xe.test(b.ngValue)?function(a,b,c){c.$set("value",a.$eval(c.ngValue))}:function(a,b,c){a.$watch(c.ngValue,function(a){c.$set("value",a)})}}}},Ze=_c({compile:function(a){return a.addClass("ng-binding"),function(a,b,d){b.data("$binding",d.ngBind),a.$watch(d.ngBind,function(a){b.text(a==c?"":a)})}}}),$e=["$interpolate",function(a){return function(b,c,d){var e=a(c.attr(d.$attr.ngBindTemplate));c.addClass("ng-binding").data("$binding",e),d.$observe("ngBindTemplate",function(a){c.text(a)})}}],_e=["$sce","$parse",function(a,b){return{compile:function(c){return c.addClass("ng-binding"),function(c,d,e){function f(){return(g(c)||"").toString()}d.data("$binding",e.ngBindHtml);var g=b(e.ngBindHtml);c.$watch(f,function(){d.html(a.getTrustedHtml(g(c))||"")})}}}}],af=kd("",!0),bf=kd("Odd",0),cf=kd("Even",1),df=_c({compile:function(a,b){b.$set("ngCloak",c),a.removeClass("ng-cloak")}}),ef=[function(){return{scope:!0,controller:"@",priority:500}}],ff={};f("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=Pb("ng-"+a);ff[b]=["$parse",function(c){return{compile:function(d,e){var f=c(e[b]);return function(b,c){c.on(md(a),function(a){b.$apply(function(){f(b,{$event:a})})})}}}}]});var gf=["$animate",function(a){return{transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(c,d,e,f,g){var h,i,j;c.$watch(e.ngIf,function(f){S(f)?i||(i=c.$new(),g(i,function(c){c[c.length++]=b.createComment(" end ngIf: "+e.ngIf+" "),h={clone:c},a.enter(c,d.parent(),d)})):(j&&(j.remove(),j=null),i&&(i.$destroy(),i=null),h&&(j=fb(h.clone),a.leave(j,function(){j=null}),h=null))})}}}],hf=["$http","$templateCache","$anchorScroll","$animate","$sce",function(a,b,c,d,e){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:Ad.noop,compile:function(f,g){var h=g.ngInclude||g.src,i=g.onload||"",j=g.autoscroll;return function(f,g,k,l,m){var n,o,p,q=0,r=function(){o&&(o.remove(),o=null),n&&(n.$destroy(),n=null),p&&(d.leave(p,function(){o=null}),o=p,p=null)};f.$watch(e.parseAsResourceUrl(h),function(e){var h=function(){!s(j)||j&&!f.$eval(j)||c()},k=++q;e?(a.get(e,{cache:b}).success(function(a){if(k===q){var b=f.$new();l.template=a;var c=m(b,function(a){r(),d.enter(a,null,g,h)});n=b,p=c,n.$emit("$includeContentLoaded"),f.$eval(i)}}).error(function(){k===q&&r()}),f.$emit("$includeContentRequested")):(r(),l.template=null)})}}}}],jf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,c,d,e){c.html(e.template),a(c.contents())(b)}}}],kf=_c({priority:450,compile:function(){return{pre:function(a,b,c){a.$eval(c.ngInit)}}}}),lf=_c({terminal:!0,priority:1e3}),mf=["$locale","$interpolate",function(a,b){var c=/{}/g;return{restrict:"EA",link:function(d,e,g){var h=g.count,i=g.$attr.when&&e.attr(g.$attr.when),j=g.offset||0,k=d.$eval(i)||{},l={},m=b.startSymbol(),n=b.endSymbol(),o=/^when(Minus)?(.+)$/;f(g,function(a,b){o.test(b)&&(k[md(b.replace("when","").replace("Minus","-"))]=e.attr(g.$attr[b]))}),f(k,function(a,d){l[d]=b(a.replace(c,m+h+"-"+j+n))}),d.$watch(function(){var b=parseFloat(d.$eval(h));return isNaN(b)?"":(b in k||(b=a.pluralCat(b-j)),l[b](d,e,!0))},function(a){e.text(a)})}}}],nf=["$parse","$animate",function(a,c){function g(a){return a.clone[0]}function h(a){return a.clone[a.clone.length-1]}var i="$$NG_REMOVED",j=d("ngRepeat");return{transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,link:function(d,k,l,m,n){var o,p,q,r,s,t,u,v,w,x=l.ngRepeat,y=x.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?\s*$/),z={$id:Eb};if(!y)throw j("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",x);if(t=y[1],u=y[2],o=y[3],o?(p=a(o),q=function(a,b,c){return w&&(z[w]=a),z[v]=b,z.$index=c,p(d,z)}):(r=function(a,b){return Eb(b)},s=function(a){return a}),y=t.match(/^(?:([\$\w]+)|\(([\$\w]+)\s*,\s*([\$\w]+)\))$/),!y)throw j("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",t);v=y[3]||y[1],w=y[2];var A={};d.$watchCollection(u,function(a){var l,m,o,p,t,u,y,z,B,C,D,E,F=k[0],G={},H=[];if(e(a))C=a,B=q||r;else{B=q||s,C=[];for(u in a)a.hasOwnProperty(u)&&"$"!=u.charAt(0)&&C.push(u);C.sort()}for(p=C.length,m=H.length=C.length,l=0;m>l;l++)if(u=a===C?l:C[l],y=a[u],z=B(u,y,l),db(z,"`track by` id"),A.hasOwnProperty(z))D=A[z],delete A[z],G[z]=D,H[l]=D;else{if(G.hasOwnProperty(z))throw f(H,function(a){a&&a.scope&&(A[a.id]=a)}),j("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}",x,z);H[l]={id:z},G[z]=!1}for(u in A)A.hasOwnProperty(u)&&(D=A[u],E=fb(D.clone),c.leave(E),f(E,function(a){a[i]=!0}),D.scope.$destroy());for(l=0,m=C.length;m>l;l++){if(u=a===C?l:C[l],y=a[u],D=H[l],H[l-1]&&(F=h(H[l-1])),D.scope){t=D.scope,o=F;do o=o.nextSibling;while(o&&o[i]);g(D)!=o&&c.move(fb(D.clone),null,sd(F)),F=h(D)}else t=d.$new();t[v]=y,w&&(t[w]=u),t.$index=l,t.$first=0===l,t.$last=l===p-1,t.$middle=!(t.$first||t.$last),t.$odd=!(t.$even=0===(1&l)),D.scope||n(t,function(a){a[a.length++]=b.createComment(" end ngRepeat: "+x+" "),c.enter(a,null,sd(F)),F=a,D.scope=t,D.clone=a,G[D.id]=D})}A=G})}}}],of=["$animate",function(a){return function(b,c,d){b.$watch(d.ngShow,function(b){a[S(b)?"removeClass":"addClass"](c,"ng-hide")})}}],pf=["$animate",function(a){return function(b,c,d){b.$watch(d.ngHide,function(b){a[S(b)?"addClass":"removeClass"](c,"ng-hide")})}}],qf=_c(function(a,b,c){a.$watch(c.ngStyle,function(a,c){c&&a!==c&&f(c,function(a,c){b.css(c,"")}),a&&b.css(a)},!0)}),rf=["$animate",function(a){return{restrict:"EA",require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(b,c,d,e){var g=d.ngSwitch||d.on,h=[],i=[],j=[],k=[];b.$watch(g,function(c){var g,l;for(g=0,l=j.length;l>g;++g)j[g].remove();for(j.length=0,g=0,l=k.length;l>g;++g){var m=i[g];k[g].$destroy(),j[g]=m,a.leave(m,function(){j.splice(g,1)})}i.length=0,k.length=0,(h=e.cases["!"+c]||e.cases["?"])&&(b.$eval(d.change),f(h,function(c){var d=b.$new();k.push(d),c.transclude(d,function(b){var d=c.element;i.push(b),a.enter(b,d.parent(),d)})}))})}}}],sf=_c({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,b,c,d,e){d.cases["!"+c.ngSwitchWhen]=d.cases["!"+c.ngSwitchWhen]||[],d.cases["!"+c.ngSwitchWhen].push({transclude:e,element:b})}}),tf=_c({transclude:"element",priority:800,require:"^ngSwitch",link:function(a,b,c,d,e){d.cases["?"]=d.cases["?"]||[],d.cases["?"].push({transclude:e,element:b})}}),uf=_c({link:function(a,b,c,e,f){if(!f)throw d("ngTransclude")("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",T(b));f(function(a){b.empty(),b.append(a)})}}),vf=["$templateCache",function(a){return{restrict:"E",terminal:!0,compile:function(b,c){if("text/ng-template"==c.type){var d=c.id,e=b[0].text;a.put(d,e)}}}}],wf=d("ngOptions"),xf=q({terminal:!0}),yf=["$compile","$parse",function(a,d){var e=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,h={$setViewValue:o};return{restrict:"E",require:["select","?ngModel"],controller:["$element","$scope","$attrs",function(a,b,c){var d,e,f=this,g={},i=h;f.databound=c.ngModel,f.init=function(a,b,c){i=a,d=b,e=c},f.addOption=function(b){db(b,'"option value"'),g[b]=!0,i.$viewValue==b&&(a.val(b),e.parent()&&e.remove())},f.removeOption=function(a){this.hasOption(a)&&(delete g[a],i.$viewValue==a&&this.renderUnknownOption(a))},f.renderUnknownOption=function(b){var c="? "+Eb(b)+" ?";e.val(c),a.prepend(e),a.val(c),e.prop("selected",!0)},f.hasOption=function(a){return g.hasOwnProperty(a)},b.$on("$destroy",function(){f.renderUnknownOption=o})}],link:function(h,i,j,k){function l(a,b,c,d){c.$render=function(){var a=c.$viewValue;d.hasOption(a)?(y.parent()&&y.remove(),b.val(a),""===a&&o.prop("selected",!0)):r(a)&&o?b.val(""):d.renderUnknownOption(a)},b.on("change",function(){a.$apply(function(){y.parent()&&y.remove(),c.$setViewValue(b.val())})})}function m(a,b,c){var d;c.$render=function(){var a=new Fb(c.$viewValue);f(b.find("option"),function(b){b.selected=s(a.get(b.value))})},a.$watch(function(){L(d,c.$viewValue)||(d=K(c.$viewValue),c.$render())}),b.on("change",function(){a.$apply(function(){var a=[];f(b.find("option"),function(b){b.selected&&a.push(b.value)}),c.$setViewValue(a)})})}function n(b,f,h){function i(){var a=!1;if(t){var c=h.$modelValue;if(y&&Cd(c)){a=new Fb([]);for(var d={},e=0;eC;C++){if(r=C,n){if(r=L[C],"$"===r.charAt(0))continue;M[n]=r}if(M[m]=K[r],a=o(b,M)||"",(c=H[a])||(c=H[a]=[],I.push(a)),t)D=s(N.remove(y?y(b,M):p(b,M)));else{if(y){var O={};O[m]=J,D=y(b,O)===y(b,M)}else D=J===p(b,M);N=N||D}G=l(b,M),G=s(G)?G:"",c.push({id:y?y(b,M):n?L[C]:C,label:G,selected:D})}for(t||(v||null===J?H[""].unshift({id:"",label:"",selected:!N}):N||H[""].unshift({id:"?",label:"",selected:!0})),B=0,u=I.length;u>B;B++){for(a=I[B],c=H[a],z.length<=B?(e={element:x.clone().attr("label",a),label:c.label},j=[e],z.push(j),f.append(e.element)):(j=z[B],e=j[0],e.label!=a&&e.element.attr("label",e.label=a)),E=null,C=0,A=c.length;A>C;C++)d=c[C],(k=j[C+1])?(E=k.element,k.label!==d.label&&E.text(k.label=d.label),k.id!==d.id&&E.val(k.id=d.id),E[0].selected!==d.selected&&(E.prop("selected",k.selected=d.selected),rd&&E.prop("selected",k.selected))):(""===d.id&&v?F=v:(F=w.clone()).val(d.id).prop("selected",d.selected).attr("selected",d.selected).text(d.label),j.push(k={element:F,label:d.label,id:d.id,selected:d.selected}),E?E.after(F):e.element.append(F),E=F);for(C++;j.length>C;)j.pop().element.remove()}for(;z.length>B;)z.pop()[0].element.remove()}var k;if(!(k=u.match(e)))throw wf("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",u,T(f));var l=d(k[2]||k[1]),m=k[4]||k[6],n=k[5],o=d(k[3]||""),p=d(k[2]?k[1]:m),q=d(k[7]),r=k[8],y=r?d(k[8]):null,z=[[{element:f,label:""}]];v&&(a(v)(b),v.removeClass("ng-scope"),v.remove()),f.empty(),f.on("change",function(){b.$apply(function(){var a,d,e,g,i,k,l,o,r,s=q(b)||[],u={};if(t){for(e=[],k=0,o=z.length;o>k;k++)for(a=z[k],i=1,l=a.length;l>i;i++)if((g=a[i].element)[0].selected){if(d=g.val(),n&&(u[n]=d),y)for(r=0;rz;z++)if(""===A[z].value){o=v=A.eq(z);break}p.init(q,v,y),t&&(q.$isEmpty=function(a){return!a||0===a.length}),u?n(h,i,q):t?m(h,i,q):l(h,i,q,p)}}}}],zf=["$interpolate",function(a){var b={addOption:o,removeOption:o};return{restrict:"E",priority:100,compile:function(c,d){if(r(d.value)){var e=a(c.text(),!0);e||d.$set("value",c.text())}return function(a,c,d){var f="$selectController",g=c.parent(),h=g.data(f)||g.parent().data(f);h&&h.databound?c.prop("selected",!1):h=b,e?a.$watch(e,function(a,b){d.$set("value",a),a!==b&&h.removeOption(b),h.addOption(a)}):h.addOption(d.value),c.on("$destroy",function(){h.removeOption(d.value)})}}}}],Af=q({restrict:"E",terminal:!0});return a.angular.bootstrap?void console.log("WARNING: Tried to load angular more than once."):(ab(),hb(Ad),void sd(b).ready(function(){Z(b,$)}))}(window,document),!window.angular.$$csp()&&window.angular.element(document).find("head").prepend(''),function(a,b,c){"use strict";b.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(a,d){function e(){var a,e,f,i;for(a in h)k(g[a])&&d.cookies(a,c);for(a in g)e=g[a],b.isString(e)||(e=""+e,g[a]=e),e!==h[a]&&(d.cookies(a,e),i=!0);if(i){i=!1,f=d.cookies();for(a in g)g[a]!==f[a]&&(k(f[a])?delete g[a]:g[a]=f[a],i=!0)}}var f,g={},h={},i=!1,j=b.copy,k=b.isUndefined;return d.addPollFn(function(){var b=d.cookies();f!=b&&(f=b,j(b,h),j(b,g),i&&a.$apply())})(),i=!0,a.$watch(e),g}]).factory("$cookieStore",["$cookies",function(a){return{get:function(c){var d=a[c];return d?b.fromJson(d):d},put:function(c,d){a[c]=b.toJson(d)},remove:function(b){delete a[b]}}}])}(window,window.angular),function(a,b,c){"use strict";function d(a){return null!=a&&""!==a&&"hasOwnProperty"!==a&&h.test("."+a)}function e(a,b){if(!d(b))throw g("badmember",'Dotted member path "@{0}" is invalid.',b);for(var e=b.split("."),f=0,h=e.length;h>f&&a!==c;f++){var i=e[f];a=null!==a?a[i]:c}return a}function f(a,c){c=c||{},b.forEach(c,function(a,b){delete c[b]});for(var d in a)!a.hasOwnProperty(d)||"$"===d.charAt(0)&&"$"===d.charAt(1)||(c[d]=a[d]);return c}var g=b.$$minErr("$resource"),h=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;b.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(a,d){function h(a){return i(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function i(a,b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,b?"%20":"+")}function j(a,b){this.template=a,this.defaults=b||{},this.urlParams={}}function k(h,i,r){function s(a,b){var c={};return b=o({},i,b),n(b,function(b,d){q(b)&&(b=b()),c[d]=b&&b.charAt&&"@"==b.charAt(0)?e(a,b.substr(1)):b}),c}function t(a){return a.resource}function u(a){f(a||{},this)}var v=new j(h);return r=o({},l,r),n(r,function(e,h){var i=/^(POST|PUT|PATCH)$/i.test(e.method);u[h]=function(h,j,k,l){var r,w,x,y={};switch(arguments.length){case 4:x=l,w=k;case 3:case 2:if(!q(j)){y=h,r=j,w=k;break}if(q(h)){w=h,x=j;break}w=j,x=k;case 1:q(h)?w=h:i?r=h:y=h;break;case 0:break;default:throw g("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var z=this instanceof u,A=z?r:e.isArray?[]:new u(r),B={},C=e.interceptor&&e.interceptor.response||t,D=e.interceptor&&e.interceptor.responseError||c;n(e,function(a,b){"params"!=b&&"isArray"!=b&&"interceptor"!=b&&(B[b]=p(a))}),i&&(B.data=r),v.setUrlParams(B,o({},s(r,e.params||{}),y),e.url);var E=a(B).then(function(a){var c=a.data,d=A.$promise;if(c){if(b.isArray(c)!==!!e.isArray)throw g("badcfg","Error in resource configuration. Expected response to contain an {0} but got an {1}",e.isArray?"array":"object",b.isArray(c)?"array":"object");e.isArray?(A.length=0,n(c,function(a){A.push("object"==typeof a?new u(a):a)})):(f(c,A),A.$promise=d)}return A.$resolved=!0,a.resource=A,a},function(a){return A.$resolved=!0,(x||m)(a),d.reject(a)});return E=E.then(function(a){var b=C(a);return(w||m)(b,a.headers),b},D),z?E:(A.$promise=E,A.$resolved=!1,A)},u.prototype["$"+h]=function(a,b,c){q(a)&&(c=b,b=a,a={});var d=u[h].call(this,a,this,b,c);return d.$promise||d}}),u.bind=function(a){return k(h,o({},i,a),r)},u}var l={get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},"delete":{method:"DELETE"}},m=b.noop,n=b.forEach,o=b.extend,p=b.copy,q=b.isFunction;return j.prototype={setUrlParams:function(a,c,d){var e,f,i=this,j=d||i.template,k=i.urlParams={}; n(j.split(/\W/),function(a){if("hasOwnProperty"===a)throw g("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(a)&&a&&new RegExp("(^|[^\\\\]):"+a+"(\\W|$)").test(j)&&(k[a]=!0)}),j=j.replace(/\\:/g,":"),c=c||{},n(i.urlParams,function(a,d){e=c.hasOwnProperty(d)?c[d]:i.defaults[d],b.isDefined(e)&&null!==e?(f=h(e),j=j.replace(new RegExp(":"+d+"(\\W|$)","g"),function(a,b){return f+b})):j=j.replace(new RegExp("(/?):"+d+"(\\W|$)","g"),function(a,b,c){return"/"==c.charAt(0)?c:b+c})}),j=j.replace(/\/+$/,"")||"/",j=j.replace(/\/\.(?=\w+($|\?))/,"."),a.url=j.replace(/\/\\\./,"/."),n(c,function(b,c){i.urlParams[c]||(a.params=a.params||{},a.params[c]=b)})}},k}])}(window,window.angular),function(a,b){"use strict";function c(){this.$get=["$$sanitizeUri",function(a){return function(b){var c=[];return f(b,i(c,function(b,c){return!/^unsafe/.test(a(b,c))})),c.join("")}}]}function d(a){var c=[],d=i(c,b.noop);return d.chars(a),c.join("")}function e(a){var b,c={},d=a.split(",");for(b=0;b=0&&t[f]!=d;f--);if(f>=0){for(e=t.length-1;e>=f;e--)c.end&&c.end(t[e]);t.length=f}}"string"!=typeof a&&(a=null===a||"undefined"==typeof a?"":""+a);var f,h,i,s,t=[],v=a;for(t.last=function(){return t[t.length-1]};a;){if(s="",h=!0,t.last()&&A[t.last()]?(a=a.replace(new RegExp("(.*)<\\s*\\/\\s*"+t.last()+"[^>]*>","i"),function(a,b){return b=b.replace(p,"$1").replace(r,"$1"),c.chars&&c.chars(g(b)),""}),e("",t.last())):(0===a.indexOf("",f)===f&&(c.comment&&c.comment(a.substring(4,f)),a=a.substring(f+3),h=!1)):q.test(a)?(i=a.match(q),i&&(a=a.replace(i[0],""),h=!1)):o.test(a)?(i=a.match(l),i&&(a=a.substring(i[0].length),i[0].replace(l,e),h=!1)):n.test(a)&&(i=a.match(k),i?(i[4]&&(a=a.substring(i[0].length),i[0].replace(k,d)),h=!1):(s+="<",a=a.substring(1))),h&&(f=a.indexOf("<"),s+=0>f?a:a.substring(0,f),a=0>f?"":a.substring(f),c.chars&&c.chars(g(s)))),a==v)throw j("badparse","The sanitizer was unable to parse the following block of html: {0}",a);v=a}e()}function g(a){if(!a)return"";var b=F.exec(a),c=b[1],d=b[3],e=b[2];return e&&(E.innerHTML=e.replace(//g,">")}function i(a,c){var d=!1,e=b.bind(a,a.push);return{start:function(a,f,g){a=b.lowercase(a),!d&&A[a]&&(d=a),d||B[a]!==!0||(e("<"),e(a),b.forEach(f,function(d,f){var g=b.lowercase(f),i="img"===a&&"src"===g||"background"===g;D[g]!==!0||C[g]===!0&&!c(d,i)||(e(" "),e(f),e('="'),e(h(d)),e('"'))}),e(g?"/>":">"))},end:function(a){a=b.lowercase(a),d||B[a]!==!0||(e("")),a==d&&(d=!1)},chars:function(a){d||e(h(a))}}}var j=b.$$minErr("$sanitize"),k=/^<((?:[a-zA-Z])[\w:-]*)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*(>?)/,l=/^<\/\s*([\w:-]+)[^>]*>/,m=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,n=/^/g,q=/]*?)>/i,r=//g,s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t=/([^\#-~| |!])/g,u=e("area,br,col,hr,img,wbr"),v=e("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),w=e("rp,rt"),x=b.extend({},w,v),y=b.extend({},v,e("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,script,section,table,ul")),z=b.extend({},w,e("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),A=e("script,style"),B=b.extend({},u,y,z,x),C=e("background,cite,href,longdesc,src,usemap"),D=b.extend({},C,e("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,target,title,type,valign,value,vspace,width")),E=document.createElement("pre"),F=/^(\s*)([\s\S]*?)(\s*)$/;b.module("ngSanitize",[]).provider("$sanitize",c),b.module("ngSanitize").filter("linky",["$sanitize",function(a){var c=/((ftp|https?):\/\/|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"]/,e=/^mailto:/;return function(f,g){function h(a){a&&n.push(d(a))}function i(a,c){n.push("'),h(c),n.push("")}if(!f)return f;for(var j,k,l,m=f,n=[];j=m.match(c);)k=j[0],j[2]==j[3]&&(k="mailto:"+k),l=j.index,h(m.substr(0,l)),i(k,j[0].replace(e,"")),m=m.substring(l+j[0].length);return h(m),a(n.join(""))}}])}(window,window.angular),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.transition","ui.bootstrap.collapse","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.bindHtml","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.position","ui.bootstrap.datepicker","ui.bootstrap.dropdown","ui.bootstrap.modal","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["template/accordion/accordion-group.html","template/accordion/accordion.html","template/alert/alert.html","template/carousel/carousel.html","template/carousel/slide.html","template/datepicker/datepicker.html","template/datepicker/day.html","template/datepicker/month.html","template/datepicker/popup.html","template/datepicker/year.html","template/modal/backdrop.html","template/modal/window.html","template/pagination/pager.html","template/pagination/pagination.html","template/tooltip/tooltip-html-unsafe-popup.html","template/tooltip/tooltip-popup.html","template/popover/popover.html","template/progressbar/bar.html","template/progressbar/progress.html","template/progressbar/progressbar.html","template/rating/rating.html","template/tabs/tab.html","template/tabs/tabset.html","template/timepicker/timepicker.html","template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(a,b,c){function d(a){for(var b in a)if(void 0!==f.style[b])return a[b]}var e=function(d,f,g){g=g||{};var h=a.defer(),i=e[g.animation?"animationEndEventName":"transitionEndEventName"],j=function(){c.$apply(function(){d.unbind(i,j),h.resolve(d)})};return i&&d.bind(i,j),b(function(){angular.isString(f)?d.addClass(f):angular.isFunction(f)?f(d):angular.isObject(f)&&d.css(f),i||h.resolve(d)}),h.promise.cancel=function(){i&&d.unbind(i,j),h.reject("Transition cancelled")},h.promise},f=document.createElement("trans"),g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},h={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return e.transitionEndEventName=d(g),e.animationEndEventName=d(h),e}]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(a){return{link:function(b,c,d){function e(b){function d(){j===e&&(j=void 0)}var e=a(c,b);return j&&j.cancel(),j=e,e.then(d,d),e}function f(){k?(k=!1,g()):(c.removeClass("collapse").addClass("collapsing"),e({height:c[0].scrollHeight+"px"}).then(g))}function g(){c.removeClass("collapsing"),c.addClass("collapse in"),c.css({height:"auto"})}function h(){if(k)k=!1,i(),c.css({height:0});else{c.css({height:c[0].scrollHeight+"px"});{c[0].offsetWidth}c.removeClass("collapse in").addClass("collapsing"),e({height:0}).then(i)}}function i(){c.removeClass("collapsing"),c.addClass("collapse")}var j,k=!0;b.$watch(d.collapse,function(a){a?h():f()})}}}]),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse"]).constant("accordionConfig",{closeOthers:!0}).controller("AccordionController",["$scope","$attrs","accordionConfig",function(a,b,c){this.groups=[],this.closeOthers=function(d){var e=angular.isDefined(b.closeOthers)?a.$eval(b.closeOthers):c.closeOthers;e&&angular.forEach(this.groups,function(a){a!==d&&(a.isOpen=!1)})},this.addGroup=function(a){var b=this;this.groups.push(a),a.$on("$destroy",function(){b.removeGroup(a)})},this.removeGroup=function(a){var b=this.groups.indexOf(a);-1!==b&&this.groups.splice(b,1)}}]).directive("accordion",function(){return{restrict:"EA",controller:"AccordionController",transclude:!0,replace:!1,templateUrl:"template/accordion/accordion.html"}}).directive("accordionGroup",function(){return{require:"^accordion",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/accordion/accordion-group.html",scope:{heading:"@",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(a){this.heading=a}},link:function(a,b,c,d){d.addGroup(a),a.$watch("isOpen",function(b){b&&d.closeOthers(a)}),a.toggleOpen=function(){a.isDisabled||(a.isOpen=!a.isOpen)}}}}).directive("accordionHeading",function(){return{restrict:"EA",transclude:!0,template:"",replace:!0,require:"^accordionGroup",link:function(a,b,c,d,e){d.setHeading(e(a,function(){}))}}}).directive("accordionTransclude",function(){return{require:"^accordionGroup",link:function(a,b,c,d){a.$watch(function(){return d[c.accordionTransclude]},function(a){a&&(b.html(""),b.append(a))})}}}),angular.module("ui.bootstrap.alert",[]).controller("AlertController",["$scope","$attrs",function(a,b){a.closeable="close"in b}]).directive("alert",function(){return{restrict:"EA",controller:"AlertController",templateUrl:"template/alert/alert.html",transclude:!0,replace:!0,scope:{type:"@",close:"&"}}}),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(a,b,c){b.addClass("ng-binding").data("$binding",c.bindHtmlUnsafe),a.$watch(c.bindHtmlUnsafe,function(a){b.html(a||"")})}}),angular.module("ui.bootstrap.buttons",[]).constant("buttonConfig",{activeClass:"active",toggleEvent:"click"}).controller("ButtonsController",["buttonConfig",function(a){this.activeClass=a.activeClass||"active",this.toggleEvent=a.toggleEvent||"click"}]).directive("btnRadio",function(){return{require:["btnRadio","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){var e=d[0],f=d[1];f.$render=function(){b.toggleClass(e.activeClass,angular.equals(f.$modelValue,a.$eval(c.btnRadio)))},b.bind(e.toggleEvent,function(){var d=b.hasClass(e.activeClass);(!d||angular.isDefined(c.uncheckable))&&a.$apply(function(){f.$setViewValue(d?null:a.$eval(c.btnRadio)),f.$render()})})}}}).directive("btnCheckbox",function(){return{require:["btnCheckbox","ngModel"],controller:"ButtonsController",link:function(a,b,c,d){function e(){return g(c.btnCheckboxTrue,!0)}function f(){return g(c.btnCheckboxFalse,!1)}function g(b,c){var d=a.$eval(b);return angular.isDefined(d)?d:c}var h=d[0],i=d[1];i.$render=function(){b.toggleClass(h.activeClass,angular.equals(i.$modelValue,e()))},b.bind(h.toggleEvent,function(){a.$apply(function(){i.$setViewValue(b.hasClass(h.activeClass)?f():e()),i.$render()})})}}}),angular.module("ui.bootstrap.carousel",["ui.bootstrap.transition"]).controller("CarouselController",["$scope","$timeout","$transition",function(a,b,c){function d(){e();var c=+a.interval;!isNaN(c)&&c>=0&&(g=b(f,c))}function e(){g&&(b.cancel(g),g=null)}function f(){h?(a.next(),d()):a.pause()}var g,h,i=this,j=i.slides=a.slides=[],k=-1;i.currentSlide=null;var l=!1;i.select=a.select=function(e,f){function g(){if(!l){if(i.currentSlide&&angular.isString(f)&&!a.noTransition&&e.$element){e.$element.addClass(f);{e.$element[0].offsetWidth}angular.forEach(j,function(a){angular.extend(a,{direction:"",entering:!1,leaving:!1,active:!1})}),angular.extend(e,{direction:f,active:!0,entering:!0}),angular.extend(i.currentSlide||{},{direction:f,leaving:!0}),a.$currentTransition=c(e.$element,{}),function(b,c){a.$currentTransition.then(function(){h(b,c)},function(){h(b,c)})}(e,i.currentSlide)}else h(e,i.currentSlide);i.currentSlide=e,k=m,d()}}function h(b,c){angular.extend(b,{direction:"",active:!0,leaving:!1,entering:!1}),angular.extend(c||{},{direction:"",active:!1,leaving:!1,entering:!1}),a.$currentTransition=null}var m=j.indexOf(e);void 0===f&&(f=m>k?"next":"prev"),e&&e!==i.currentSlide&&(a.$currentTransition?(a.$currentTransition.cancel(),b(g)):g())},a.$on("$destroy",function(){l=!0}),i.indexOfSlide=function(a){return j.indexOf(a)},a.next=function(){var b=(k+1)%j.length;return a.$currentTransition?void 0:i.select(j[b],"next")},a.prev=function(){var b=0>k-1?j.length-1:k-1;return a.$currentTransition?void 0:i.select(j[b],"prev")},a.isActive=function(a){return i.currentSlide===a},a.$watch("interval",d),a.$on("$destroy",e),a.play=function(){h||(h=!0,d())},a.pause=function(){a.noPause||(h=!1,e())},i.addSlide=function(b,c){b.$element=c,j.push(b),1===j.length||b.active?(i.select(j[j.length-1]),1==j.length&&a.play()):b.active=!1},i.removeSlide=function(a){var b=j.indexOf(a);j.splice(b,1),j.length>0&&a.active?i.select(b>=j.length?j[b-1]:j[b]):k>b&&k--}}]).directive("carousel",[function(){return{restrict:"EA",transclude:!0,replace:!0,controller:"CarouselController",require:"carousel",templateUrl:"template/carousel/carousel.html",scope:{interval:"=",noTransition:"=",noPause:"="}}}]).directive("slide",function(){return{require:"^carousel",restrict:"EA",transclude:!0,replace:!0,templateUrl:"template/carousel/slide.html",scope:{active:"=?"},link:function(a,b,c,d){d.addSlide(a,b),a.$on("$destroy",function(){d.removeSlide(a)}),a.$watch("active",function(b){b&&d.select(a)})}}}),angular.module("ui.bootstrap.dateparser",[]).service("dateParser",["$locale","orderByFilter",function(a,b){function c(a,b,c){return 1===b&&c>28?29===c&&(a%4===0&&a%100!==0||a%400===0):3===b||5===b||8===b||10===b?31>c:!0}this.parsers={};var d={yyyy:{regex:"\\d{4}",apply:function(a){this.year=+a}},yy:{regex:"\\d{2}",apply:function(a){this.year=+a+2e3}},y:{regex:"\\d{1,4}",apply:function(a){this.year=+a}},MMMM:{regex:a.DATETIME_FORMATS.MONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.MONTH.indexOf(b)}},MMM:{regex:a.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(b){this.month=a.DATETIME_FORMATS.SHORTMONTH.indexOf(b)}},MM:{regex:"0[1-9]|1[0-2]",apply:function(a){this.month=a-1}},M:{regex:"[1-9]|1[0-2]",apply:function(a){this.month=a-1}},dd:{regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},d:{regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(a){this.date=+a}},EEEE:{regex:a.DATETIME_FORMATS.DAY.join("|")},EEE:{regex:a.DATETIME_FORMATS.SHORTDAY.join("|")}};this.createParser=function(a){var c=[],e=a.split("");return angular.forEach(d,function(b,d){var f=a.indexOf(d);if(f>-1){a=a.split(""),e[f]="("+b.regex+")",a[f]="$";for(var g=f+1,h=f+d.length;h>g;g++)e[g]="",a[g]="$";a=a.join(""),c.push({index:f,apply:b.apply})}}),{regex:new RegExp("^"+e.join("")+"$"),map:b(c,"index")}},this.parse=function(b,d){if(!angular.isString(b))return b;d=a.DATETIME_FORMATS[d]||d,this.parsers[d]||(this.parsers[d]=this.createParser(d));var e=this.parsers[d],f=e.regex,g=e.map,h=b.match(f);if(h&&h.length){for(var i,j={year:1900,month:0,date:1,hours:0},k=1,l=h.length;l>k;k++){var m=g[k-1];m.apply&&m.apply.call(j,h[k])}return c(j.year,j.month,j.date)&&(i=new Date(j.year,j.month,j.date,j.hours)),i}}}]),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(a,b){function c(a,c){return a.currentStyle?a.currentStyle[c]:b.getComputedStyle?b.getComputedStyle(a)[c]:a.style[c]}function d(a){return"static"===(c(a,"position")||"static")}var e=function(b){for(var c=a[0],e=b.offsetParent||c;e&&e!==c&&d(e);)e=e.offsetParent;return e||c};return{position:function(b){var c=this.offset(b),d={top:0,left:0},f=e(b[0]);f!=a[0]&&(d=this.offset(angular.element(f)),d.top+=f.clientTop-f.scrollTop,d.left+=f.clientLeft-f.scrollLeft);var g=b[0].getBoundingClientRect();return{width:g.width||b.prop("offsetWidth"),height:g.height||b.prop("offsetHeight"),top:c.top-d.top,left:c.left-d.left}},offset:function(c){var d=c[0].getBoundingClientRect();return{width:d.width||c.prop("offsetWidth"),height:d.height||c.prop("offsetHeight"),top:d.top+(b.pageYOffset||a[0].documentElement.scrollTop),left:d.left+(b.pageXOffset||a[0].documentElement.scrollLeft)}},positionElements:function(a,b,c,d){var e,f,g,h,i=c.split("-"),j=i[0],k=i[1]||"center";e=d?this.offset(a):this.position(a),f=b.prop("offsetWidth"),g=b.prop("offsetHeight");var l={center:function(){return e.left+e.width/2-f/2},left:function(){return e.left},right:function(){return e.left+e.width}},m={center:function(){return e.top+e.height/2-g/2},top:function(){return e.top},bottom:function(){return e.top+e.height}};switch(j){case"right":h={top:m[k](),left:l[j]()};break;case"left":h={top:m[k](),left:e.left-f};break;case"bottom":h={top:m[j](),left:l[k]()};break;default:h={top:e.top-g,left:l[k]()}}return h}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.position"]).constant("datepickerConfig",{formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",datepickerMode:"day",minMode:"day",maxMode:"year",showWeeks:!0,startingDay:0,yearRange:20,minDate:null,maxDate:null}).controller("DatepickerController",["$scope","$attrs","$parse","$interpolate","$timeout","$log","dateFilter","datepickerConfig",function(a,b,c,d,e,f,g,h){var i=this,j={$setViewValue:angular.noop};this.modes=["day","month","year"],angular.forEach(["formatDay","formatMonth","formatYear","formatDayHeader","formatDayTitle","formatMonthTitle","minMode","maxMode","showWeeks","startingDay","yearRange"],function(c,e){i[c]=angular.isDefined(b[c])?8>e?d(b[c])(a.$parent):a.$parent.$eval(b[c]):h[c]}),angular.forEach(["minDate","maxDate"],function(d){b[d]?a.$parent.$watch(c(b[d]),function(a){i[d]=a?new Date(a):null,i.refreshView()}):i[d]=h[d]?new Date(h[d]):null}),a.datepickerMode=a.datepickerMode||h.datepickerMode,a.uniqueId="datepicker-"+a.$id+"-"+Math.floor(1e4*Math.random()),this.activeDate=angular.isDefined(b.initDate)?a.$parent.$eval(b.initDate):new Date,a.isActive=function(b){return 0===i.compare(b.date,i.activeDate)?(a.activeDateId=b.uid,!0):!1},this.init=function(a){j=a,j.$render=function(){i.render()}},this.render=function(){if(j.$modelValue){var a=new Date(j.$modelValue),b=!isNaN(a);b?this.activeDate=a:f.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.'),j.$setValidity("date",b)}this.refreshView()},this.refreshView=function(){if(this.element){this._refreshView();var a=j.$modelValue?new Date(j.$modelValue):null;j.$setValidity("date-disabled",!a||this.element&&!this.isDisabled(a))}},this.createDateObject=function(a,b){var c=j.$modelValue?new Date(j.$modelValue):null;return{date:a,label:g(a,b),selected:c&&0===this.compare(a,c),disabled:this.isDisabled(a),current:0===this.compare(a,new Date)}},this.isDisabled=function(c){return this.minDate&&this.compare(c,this.minDate)<0||this.maxDate&&this.compare(c,this.maxDate)>0||b.dateDisabled&&a.dateDisabled({date:c,mode:a.datepickerMode})},this.split=function(a,b){for(var c=[];a.length>0;)c.push(a.splice(0,b));return c},a.select=function(b){if(a.datepickerMode===i.minMode){var c=j.$modelValue?new Date(j.$modelValue):new Date(0,0,0,0,0,0,0);c.setFullYear(b.getFullYear(),b.getMonth(),b.getDate()),j.$setViewValue(c),j.$render()}else i.activeDate=b,a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)-1]},a.move=function(a){var b=i.activeDate.getFullYear()+a*(i.step.years||0),c=i.activeDate.getMonth()+a*(i.step.months||0);i.activeDate.setFullYear(b,c,1),i.refreshView()},a.toggleMode=function(b){b=b||1,a.datepickerMode===i.maxMode&&1===b||a.datepickerMode===i.minMode&&-1===b||(a.datepickerMode=i.modes[i.modes.indexOf(a.datepickerMode)+b])},a.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};var k=function(){e(function(){i.element[0].focus()},0,!1)};a.$on("datepicker.focus",k),a.keydown=function(b){var c=a.keys[b.which];if(c&&!b.shiftKey&&!b.altKey)if(b.preventDefault(),b.stopPropagation(),"enter"===c||"space"===c){if(i.isDisabled(i.activeDate))return;a.select(i.activeDate),k()}else!b.ctrlKey||"up"!==c&&"down"!==c?(i.handleKeyDown(c,b),i.refreshView()):(a.toggleMode("up"===c?1:-1),k())}}]).directive("datepicker",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/datepicker.html",scope:{datepickerMode:"=?",dateDisabled:"&"},require:["datepicker","?^ngModel"],controller:"DatepickerController",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}).directive("daypicker",["dateFilter",function(a){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/day.html",require:"^datepicker",link:function(b,c,d,e){function f(a,b){return 1!==b||a%4!==0||a%100===0&&a%400!==0?i[b]:29}function g(a,b){var c=new Array(b),d=new Date(a),e=0;for(d.setHours(12);b>e;)c[e++]=new Date(d),d.setDate(d.getDate()+1);return c}function h(a){var b=new Date(a);b.setDate(b.getDate()+4-(b.getDay()||7));var c=b.getTime();return b.setMonth(0),b.setDate(1),Math.floor(Math.round((c-b)/864e5)/7)+1}b.showWeeks=e.showWeeks,e.step={months:1},e.element=c;var i=[31,28,31,30,31,30,31,31,30,31,30,31];e._refreshView=function(){var c=e.activeDate.getFullYear(),d=e.activeDate.getMonth(),f=new Date(c,d,1),i=e.startingDay-f.getDay(),j=i>0?7-i:-i,k=new Date(f);j>0&&k.setDate(-j+1);for(var l=g(k,42),m=0;42>m;m++)l[m]=angular.extend(e.createDateObject(l[m],e.formatDay),{secondary:l[m].getMonth()!==d,uid:b.uniqueId+"-"+m});b.labels=new Array(7);for(var n=0;7>n;n++)b.labels[n]={abbr:a(l[n].date,e.formatDayHeader),full:a(l[n].date,"EEEE")};if(b.title=a(e.activeDate,e.formatDayTitle),b.rows=e.split(l,7),b.showWeeks){b.weekNumbers=[];for(var o=h(b.rows[0][0].date),p=b.rows.length;b.weekNumbers.push(o++)f;f++)c[f]=angular.extend(e.createDateObject(new Date(d,f,1),e.formatMonth),{uid:b.uniqueId+"-"+f});b.title=a(e.activeDate,e.formatMonthTitle),b.rows=e.split(c,3)},e.compare=function(a,b){return new Date(a.getFullYear(),a.getMonth())-new Date(b.getFullYear(),b.getMonth())},e.handleKeyDown=function(a){var b=e.activeDate.getMonth();if("left"===a)b-=1;else if("up"===a)b-=3;else if("right"===a)b+=1;else if("down"===a)b+=3;else if("pageup"===a||"pagedown"===a){var c=e.activeDate.getFullYear()+("pageup"===a?-1:1);e.activeDate.setFullYear(c)}else"home"===a?b=0:"end"===a&&(b=11);e.activeDate.setMonth(b)},e.refreshView()}}}]).directive("yearpicker",["dateFilter",function(){return{restrict:"EA",replace:!0,templateUrl:"template/datepicker/year.html",require:"^datepicker",link:function(a,b,c,d){function e(a){return parseInt((a-1)/f,10)*f+1}var f=d.yearRange;d.step={years:f},d.element=b,d._refreshView=function(){for(var b=new Array(f),c=0,g=e(d.activeDate.getFullYear());f>c;c++)b[c]=angular.extend(d.createDateObject(new Date(g+c,0,1),d.formatYear),{uid:a.uniqueId+"-"+c});a.title=[b[0].label,b[f-1].label].join(" - "),a.rows=d.split(b,5)},d.compare=function(a,b){return a.getFullYear()-b.getFullYear()},d.handleKeyDown=function(a){var b=d.activeDate.getFullYear();"left"===a?b-=1:"up"===a?b-=5:"right"===a?b+=1:"down"===a?b+=5:"pageup"===a||"pagedown"===a?b+=("pageup"===a?-1:1)*d.step.years:"home"===a?b=e(d.activeDate.getFullYear()):"end"===a&&(b=e(d.activeDate.getFullYear())+f-1),d.activeDate.setFullYear(b)},d.refreshView()}}}]).constant("datepickerPopupConfig",{datepickerPopup:"yyyy-MM-dd",currentText:"Today",clearText:"Clear",closeText:"Done",closeOnDateSelection:!0,appendToBody:!1,showButtonBar:!0}).directive("datepickerPopup",["$compile","$parse","$document","$position","dateFilter","dateParser","datepickerPopupConfig",function(a,b,c,d,e,f,g){return{restrict:"EA",require:"ngModel",scope:{isOpen:"=?",currentText:"@",clearText:"@",closeText:"@",dateDisabled:"&"},link:function(h,i,j,k){function l(a){return a.replace(/([A-Z])/g,function(a){return"-"+a.toLowerCase()})}function m(a){if(a){if(angular.isDate(a)&&!isNaN(a))return k.$setValidity("date",!0),a;if(angular.isString(a)){var b=f.parse(a,n)||new Date(a);return isNaN(b)?void k.$setValidity("date",!1):(k.$setValidity("date",!0),b)}return void k.$setValidity("date",!1)}return k.$setValidity("date",!0),null}var n,o=angular.isDefined(j.closeOnDateSelection)?h.$parent.$eval(j.closeOnDateSelection):g.closeOnDateSelection,p=angular.isDefined(j.datepickerAppendToBody)?h.$parent.$eval(j.datepickerAppendToBody):g.appendToBody;h.showButtonBar=angular.isDefined(j.showButtonBar)?h.$parent.$eval(j.showButtonBar):g.showButtonBar,h.getText=function(a){return h[a+"Text"]||g[a+"Text"]},j.$observe("datepickerPopup",function(a){n=a||g.datepickerPopup,k.$render()});var q=angular.element("
");q.attr({"ng-model":"date","ng-change":"dateSelection()"});var r=angular.element(q.children()[0]);j.datepickerOptions&&angular.forEach(h.$parent.$eval(j.datepickerOptions),function(a,b){r.attr(l(b),a)}),angular.forEach(["minDate","maxDate"],function(a){j[a]&&(h.$parent.$watch(b(j[a]),function(b){h[a]=b}),r.attr(l(a),a))}),j.dateDisabled&&r.attr("date-disabled","dateDisabled({ date: date, mode: mode })"),k.$parsers.unshift(m),h.dateSelection=function(a){angular.isDefined(a)&&(h.date=a),k.$setViewValue(h.date),k.$render(),o&&(h.isOpen=!1,i[0].focus())},i.bind("input change keyup",function(){h.$apply(function(){h.date=k.$modelValue})}),k.$render=function(){var a=k.$viewValue?e(k.$viewValue,n):"";i.val(a),h.date=m(k.$modelValue)};var s=function(a){h.isOpen&&a.target!==i[0]&&h.$apply(function(){h.isOpen=!1})},t=function(a){h.keydown(a)};i.bind("keydown",t),h.keydown=function(a){27===a.which?(a.preventDefault(),a.stopPropagation(),h.close()):40!==a.which||h.isOpen||(h.isOpen=!0)},h.$watch("isOpen",function(a){a?(h.$broadcast("datepicker.focus"),h.position=p?d.offset(i):d.position(i),h.position.top=h.position.top+i.prop("offsetHeight"),c.bind("click",s)):c.unbind("click",s)}),h.select=function(a){if("today"===a){var b=new Date;angular.isDate(k.$modelValue)?(a=new Date(k.$modelValue),a.setFullYear(b.getFullYear(),b.getMonth(),b.getDate())):a=new Date(b.setHours(0,0,0,0))}h.dateSelection(a)},h.close=function(){h.isOpen=!1,i[0].focus()};var u=a(q)(h);p?c.find("body").append(u):i.after(u),h.$on("$destroy",function(){u.remove(),i.unbind("keydown",t),c.unbind("click",s)})}}}]).directive("datepickerPopupWrap",function(){return{restrict:"EA",replace:!0,transclude:!0,templateUrl:"template/datepicker/popup.html",link:function(a,b){b.bind("click",function(a){a.preventDefault(),a.stopPropagation()})}}}),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(a){var b=null;this.open=function(e){b||(a.bind("click",c),a.bind("keydown",d)),b&&b!==e&&(b.isOpen=!1),b=e},this.close=function(e){b===e&&(b=null,a.unbind("click",c),a.unbind("keydown",d))};var c=function(a){a&&a.isDefaultPrevented()||b.$apply(function(){b.isOpen=!1})},d=function(a){27===a.which&&(b.focusToggleElement(),c())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(a,b,c,d,e,f){var g,h=this,i=a.$new(),j=d.openClass,k=angular.noop,l=b.onToggle?c(b.onToggle):angular.noop;this.init=function(d){h.$element=d,b.isOpen&&(g=c(b.isOpen),k=g.assign,a.$watch(g,function(a){i.isOpen=!!a}))},this.toggle=function(a){return i.isOpen=arguments.length?!!a:!i.isOpen},this.isOpen=function(){return i.isOpen},i.focusToggleElement=function(){h.toggleElement&&h.toggleElement[0].focus()},i.$watch("isOpen",function(b,c){f[b?"addClass":"removeClass"](h.$element,j),b?(i.focusToggleElement(),e.open(i)):e.close(i),k(a,b),angular.isDefined(b)&&b!==c&&l(a,{open:!!b})}),a.$on("$locationChangeSuccess",function(){i.isOpen=!1}),a.$on("$destroy",function(){i.$destroy()})}]).directive("dropdown",function(){return{restrict:"CA",controller:"DropdownController",link:function(a,b,c,d){d.init(b)}}}).directive("dropdownToggle",function(){return{restrict:"CA",require:"?^dropdown",link:function(a,b,c,d){if(d){d.toggleElement=b;var e=function(e){e.preventDefault(),b.hasClass("disabled")||c.disabled||a.$apply(function(){d.toggle()})};b.bind("click",e),b.attr({"aria-haspopup":!0,"aria-expanded":!1}),a.$watch(d.isOpen,function(a){b.attr("aria-expanded",!!a)}),a.$on("$destroy",function(){b.unbind("click",e)})}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var a=[];return{add:function(b,c){a.push({key:b,value:c})},get:function(b){for(var c=0;c0),i()})}function i(){if(k&&-1==g()){var a=l;j(k,l,150,function(){a.$destroy(),a=null}),k=void 0,l=void 0}}function j(c,d,e,f){function g(){g.done||(g.done=!0,c.remove(),f&&f())}d.animate=!1;var h=a.transitionEndEventName;if(h){var i=b(g,e);c.bind(h,function(){b.cancel(i),g(),d.$apply()})}else b(g,0)}var k,l,m="modal-open",n=f.createNew(),o={};return e.$watch(g,function(a){l&&(l.index=a)}),c.bind("keydown",function(a){var b;27===a.which&&(b=n.top(),b&&b.value.keyboard&&(a.preventDefault(),e.$apply(function(){o.dismiss(b.key,"escape key press") })))}),o.open=function(a,b){n.add(a,{deferred:b.deferred,modalScope:b.scope,backdrop:b.backdrop,keyboard:b.keyboard});var f=c.find("body").eq(0),h=g();h>=0&&!k&&(l=e.$new(!0),l.index=h,k=d("
")(l),f.append(k));var i=angular.element("
");i.attr({"template-url":b.windowTemplateUrl,"window-class":b.windowClass,size:b.size,index:n.length()-1,animate:"animate"}).html(b.content);var j=d(i)(b.scope);n.top().value.modalDomEl=j,f.append(j),f.addClass(m)},o.close=function(a,b){var c=n.get(a).value;c&&(c.deferred.resolve(b),h(a))},o.dismiss=function(a,b){var c=n.get(a).value;c&&(c.deferred.reject(b),h(a))},o.dismissAll=function(a){for(var b=this.getTop();b;)this.dismiss(b.key,a),b=this.getTop()},o.getTop=function(){return n.top()},o}]).provider("$modal",function(){var a={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(b,c,d,e,f,g,h){function i(a){return a.template?d.when(a.template):e.get(a.templateUrl,{cache:f}).then(function(a){return a.data})}function j(a){var c=[];return angular.forEach(a,function(a){(angular.isFunction(a)||angular.isArray(a))&&c.push(d.when(b.invoke(a)))}),c}var k={};return k.open=function(b){var e=d.defer(),f=d.defer(),k={result:e.promise,opened:f.promise,close:function(a){h.close(k,a)},dismiss:function(a){h.dismiss(k,a)}};if(b=angular.extend({},a.options,b),b.resolve=b.resolve||{},!b.template&&!b.templateUrl)throw new Error("One of template or templateUrl options is required.");var l=d.all([i(b)].concat(j(b.resolve)));return l.then(function(a){var d=(b.scope||c).$new();d.$close=k.close,d.$dismiss=k.dismiss;var f,i={},j=1;b.controller&&(i.$scope=d,i.$modalInstance=k,angular.forEach(b.resolve,function(b,c){i[c]=a[j++]}),f=g(b.controller,i)),h.open(k,{scope:d,deferred:e,content:a[0],backdrop:b.backdrop,keyboard:b.keyboard,windowClass:b.windowClass,windowTemplateUrl:b.windowTemplateUrl,size:b.size})},function(a){e.reject(a)}),l.then(function(){f.resolve(!0)},function(){f.reject(!1)}),k},k}]};return a}),angular.module("ui.bootstrap.pagination",[]).controller("PaginationController",["$scope","$attrs","$parse",function(a,b,c){var d=this,e={$setViewValue:angular.noop},f=b.numPages?c(b.numPages).assign:angular.noop;this.init=function(f,g){e=f,this.config=g,e.$render=function(){d.render()},b.itemsPerPage?a.$parent.$watch(c(b.itemsPerPage),function(b){d.itemsPerPage=parseInt(b,10),a.totalPages=d.calculateTotalPages()}):this.itemsPerPage=g.itemsPerPage},this.calculateTotalPages=function(){var b=this.itemsPerPage<1?1:Math.ceil(a.totalItems/this.itemsPerPage);return Math.max(b||0,1)},this.render=function(){a.page=parseInt(e.$viewValue,10)||1},a.selectPage=function(b){a.page!==b&&b>0&&b<=a.totalPages&&(e.$setViewValue(b),e.$render())},a.getText=function(b){return a[b+"Text"]||d.config[b+"Text"]},a.noPrevious=function(){return 1===a.page},a.noNext=function(){return a.page===a.totalPages},a.$watch("totalItems",function(){a.totalPages=d.calculateTotalPages()}),a.$watch("totalPages",function(b){f(a.$parent,b),a.page>b?a.selectPage(b):e.$render()})}]).constant("paginationConfig",{itemsPerPage:10,boundaryLinks:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0}).directive("pagination",["$parse","paginationConfig",function(a,b){return{restrict:"EA",scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@"},require:["pagination","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pagination.html",replace:!0,link:function(c,d,e,f){function g(a,b,c){return{number:a,text:b,active:c}}function h(a,b){var c=[],d=1,e=b,f=angular.isDefined(k)&&b>k;f&&(l?(d=Math.max(a-Math.floor(k/2),1),e=d+k-1,e>b&&(e=b,d=e-k+1)):(d=(Math.ceil(a/k)-1)*k+1,e=Math.min(d+k-1,b)));for(var h=d;e>=h;h++){var i=g(h,h,h===a);c.push(i)}if(f&&!l){if(d>1){var j=g(d-1,"...",!1);c.unshift(j)}if(b>e){var m=g(e+1,"...",!1);c.push(m)}}return c}var i=f[0],j=f[1];if(j){var k=angular.isDefined(e.maxSize)?c.$parent.$eval(e.maxSize):b.maxSize,l=angular.isDefined(e.rotate)?c.$parent.$eval(e.rotate):b.rotate;c.boundaryLinks=angular.isDefined(e.boundaryLinks)?c.$parent.$eval(e.boundaryLinks):b.boundaryLinks,c.directionLinks=angular.isDefined(e.directionLinks)?c.$parent.$eval(e.directionLinks):b.directionLinks,i.init(j,b),e.maxSize&&c.$parent.$watch(a(e.maxSize),function(a){k=parseInt(a,10),i.render()});var m=i.render;i.render=function(){m(),c.page>0&&c.page<=c.totalPages&&(c.pages=h(c.page,c.totalPages))}}}}}]).constant("pagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("pager",["pagerConfig",function(a){return{restrict:"EA",scope:{totalItems:"=",previousText:"@",nextText:"@"},require:["pager","?ngModel"],controller:"PaginationController",templateUrl:"template/pagination/pager.html",replace:!0,link:function(b,c,d,e){var f=e[0],g=e[1];g&&(b.align=angular.isDefined(d.align)?b.$parent.$eval(d.align):a.align,f.init(g,a))}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).provider("$tooltip",function(){function a(a){var b=/[A-Z]/g,c="-";return a.replace(b,function(a,b){return(b?c:"")+a.toLowerCase()})}var b={placement:"top",animation:!0,popupDelay:0},c={mouseenter:"mouseleave",click:"click",focus:"blur"},d={};this.options=function(a){angular.extend(d,a)},this.setTriggers=function(a){angular.extend(c,a)},this.$get=["$window","$compile","$timeout","$parse","$document","$position","$interpolate",function(e,f,g,h,i,j,k){return function(e,l,m){function n(a){var b=a||o.trigger||m,d=c[b]||b;return{show:b,hide:d}}var o=angular.extend({},b,d),p=a(e),q=k.startSymbol(),r=k.endSymbol(),s="
';return{restrict:"EA",scope:!0,compile:function(){var a=f(s);return function(b,c,d){function f(){b.tt_isOpen?m():k()}function k(){(!y||b.$eval(d[l+"Enable"]))&&(b.tt_popupDelay?v||(v=g(p,b.tt_popupDelay,!1),v.then(function(a){a()})):p()())}function m(){b.$apply(function(){q()})}function p(){return v=null,u&&(g.cancel(u),u=null),b.tt_content?(r(),t.css({top:0,left:0,display:"block"}),w?i.find("body").append(t):c.after(t),z(),b.tt_isOpen=!0,b.$digest(),z):angular.noop}function q(){b.tt_isOpen=!1,g.cancel(v),v=null,b.tt_animation?u||(u=g(s,500)):s()}function r(){t&&s(),t=a(b,function(){}),b.$digest()}function s(){u=null,t&&(t.remove(),t=null)}var t,u,v,w=angular.isDefined(o.appendToBody)?o.appendToBody:!1,x=n(void 0),y=angular.isDefined(d[l+"Enable"]),z=function(){var a=j.positionElements(c,t,b.tt_placement,w);a.top+="px",a.left+="px",t.css(a)};b.tt_isOpen=!1,d.$observe(e,function(a){b.tt_content=a,!a&&b.tt_isOpen&&q()}),d.$observe(l+"Title",function(a){b.tt_title=a}),d.$observe(l+"Placement",function(a){b.tt_placement=angular.isDefined(a)?a:o.placement}),d.$observe(l+"PopupDelay",function(a){var c=parseInt(a,10);b.tt_popupDelay=isNaN(c)?o.popupDelay:c});var A=function(){c.unbind(x.show,k),c.unbind(x.hide,m)};d.$observe(l+"Trigger",function(a){A(),x=n(a),x.show===x.hide?c.bind(x.show,f):(c.bind(x.show,k),c.bind(x.hide,m))});var B=b.$eval(d[l+"Animation"]);b.tt_animation=angular.isDefined(B)?!!B:o.animation,d.$observe(l+"AppendToBody",function(a){w=angular.isDefined(a)?h(a)(b):w}),w&&b.$on("$locationChangeSuccess",function(){b.tt_isOpen&&q()}),b.$on("$destroy",function(){g.cancel(u),g.cancel(v),A(),s()})}}}}}]}).directive("tooltipPopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-popup.html"}}).directive("tooltip",["$tooltip",function(a){return a("tooltip","tooltip","mouseenter")}]).directive("tooltipHtmlUnsafePopup",function(){return{restrict:"EA",replace:!0,scope:{content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/tooltip/tooltip-html-unsafe-popup.html"}}).directive("tooltipHtmlUnsafe",["$tooltip",function(a){return a("tooltipHtmlUnsafe","tooltip","mouseenter")}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("popoverPopup",function(){return{restrict:"EA",replace:!0,scope:{title:"@",content:"@",placement:"@",animation:"&",isOpen:"&"},templateUrl:"template/popover/popover.html"}}).directive("popover",["$tooltip",function(a){return a("popover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("progressConfig",{animate:!0,max:100}).controller("ProgressController",["$scope","$attrs","progressConfig",function(a,b,c){var d=this,e=angular.isDefined(b.animate)?a.$parent.$eval(b.animate):c.animate;this.bars=[],a.max=angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max,this.addBar=function(b,c){e||c.css({transition:"none"}),this.bars.push(b),b.$watch("value",function(c){b.percent=+(100*c/a.max).toFixed(2)}),b.$on("$destroy",function(){c=null,d.removeBar(b)})},this.removeBar=function(a){this.bars.splice(this.bars.indexOf(a),1)}}]).directive("progress",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",require:"progress",scope:{},templateUrl:"template/progressbar/progress.html"}}).directive("bar",function(){return{restrict:"EA",replace:!0,transclude:!0,require:"^progress",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/bar.html",link:function(a,b,c,d){d.addBar(a,b)}}}).directive("progressbar",function(){return{restrict:"EA",replace:!0,transclude:!0,controller:"ProgressController",scope:{value:"=",type:"@"},templateUrl:"template/progressbar/progressbar.html",link:function(a,b,c,d){d.addBar(a,angular.element(b.children()[0]))}}}),angular.module("ui.bootstrap.rating",[]).constant("ratingConfig",{max:5,stateOn:null,stateOff:null}).controller("RatingController",["$scope","$attrs","ratingConfig",function(a,b,c){var d={$setViewValue:angular.noop};this.init=function(e){d=e,d.$render=this.render,this.stateOn=angular.isDefined(b.stateOn)?a.$parent.$eval(b.stateOn):c.stateOn,this.stateOff=angular.isDefined(b.stateOff)?a.$parent.$eval(b.stateOff):c.stateOff;var f=angular.isDefined(b.ratingStates)?a.$parent.$eval(b.ratingStates):new Array(angular.isDefined(b.max)?a.$parent.$eval(b.max):c.max);a.range=this.buildTemplateObjects(f)},this.buildTemplateObjects=function(a){for(var b=0,c=a.length;c>b;b++)a[b]=angular.extend({index:b},{stateOn:this.stateOn,stateOff:this.stateOff},a[b]);return a},a.rate=function(b){!a.readonly&&b>=0&&b<=a.range.length&&(d.$setViewValue(b),d.$render())},a.enter=function(b){a.readonly||(a.value=b),a.onHover({value:b})},a.reset=function(){a.value=d.$viewValue,a.onLeave()},a.onKeydown=function(b){/(37|38|39|40)/.test(b.which)&&(b.preventDefault(),b.stopPropagation(),a.rate(a.value+(38===b.which||39===b.which?1:-1)))},this.render=function(){a.value=d.$viewValue}}]).directive("rating",function(){return{restrict:"EA",require:["rating","ngModel"],scope:{readonly:"=?",onHover:"&",onLeave:"&"},controller:"RatingController",templateUrl:"template/rating/rating.html",replace:!0,link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f)}}}),angular.module("ui.bootstrap.tabs",[]).controller("TabsetController",["$scope",function(a){var b=this,c=b.tabs=a.tabs=[];b.select=function(a){angular.forEach(c,function(b){b.active&&b!==a&&(b.active=!1,b.onDeselect())}),a.active=!0,a.onSelect()},b.addTab=function(a){c.push(a),1===c.length?a.active=!0:a.active&&b.select(a)},b.removeTab=function(a){var d=c.indexOf(a);if(a.active&&c.length>1){var e=d==c.length-1?d-1:d+1;b.select(c[e])}c.splice(d,1)}}]).directive("tabset",function(){return{restrict:"EA",transclude:!0,replace:!0,scope:{type:"@"},controller:"TabsetController",templateUrl:"template/tabs/tabset.html",link:function(a,b,c){a.vertical=angular.isDefined(c.vertical)?a.$parent.$eval(c.vertical):!1,a.justified=angular.isDefined(c.justified)?a.$parent.$eval(c.justified):!1}}}).directive("tab",["$parse",function(a){return{require:"^tabset",restrict:"EA",replace:!0,templateUrl:"template/tabs/tab.html",transclude:!0,scope:{active:"=?",heading:"@",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},compile:function(b,c,d){return function(b,c,e,f){b.$watch("active",function(a){a&&f.select(b)}),b.disabled=!1,e.disabled&&b.$parent.$watch(a(e.disabled),function(a){b.disabled=!!a}),b.select=function(){b.disabled||(b.active=!0)},f.addTab(b),b.$on("$destroy",function(){f.removeTab(b)}),b.$transcludeFn=d}}}}]).directive("tabHeadingTransclude",[function(){return{restrict:"A",require:"^tab",link:function(a,b){a.$watch("headingElement",function(a){a&&(b.html(""),b.append(a))})}}}]).directive("tabContentTransclude",function(){function a(a){return a.tagName&&(a.hasAttribute("tab-heading")||a.hasAttribute("data-tab-heading")||"tab-heading"===a.tagName.toLowerCase()||"data-tab-heading"===a.tagName.toLowerCase())}return{restrict:"A",require:"^tabset",link:function(b,c,d){var e=b.$eval(d.tabContentTransclude);e.$transcludeFn(e.$parent,function(b){angular.forEach(b,function(b){a(b)?e.headingElement=b:c.append(b)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("timepickerConfig",{hourStep:1,minuteStep:1,showMeridian:!0,meridians:null,readonlyInput:!1,mousewheel:!0}).controller("TimepickerController",["$scope","$attrs","$parse","$log","$locale","timepickerConfig",function(a,b,c,d,e,f){function g(){var b=parseInt(a.hours,10),c=a.showMeridian?b>0&&13>b:b>=0&&24>b;return c?(a.showMeridian&&(12===b&&(b=0),a.meridian===p[1]&&(b+=12)),b):void 0}function h(){var b=parseInt(a.minutes,10);return b>=0&&60>b?b:void 0}function i(a){return angular.isDefined(a)&&a.toString().length<2?"0"+a:a}function j(a){k(),o.$setViewValue(new Date(n)),l(a)}function k(){o.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1}function l(b){var c=n.getHours(),d=n.getMinutes();a.showMeridian&&(c=0===c||12===c?12:c%12),a.hours="h"===b?c:i(c),a.minutes="m"===b?d:i(d),a.meridian=n.getHours()<12?p[0]:p[1]}function m(a){var b=new Date(n.getTime()+6e4*a);n.setHours(b.getHours(),b.getMinutes()),j()}var n=new Date,o={$setViewValue:angular.noop},p=angular.isDefined(b.meridians)?a.$parent.$eval(b.meridians):f.meridians||e.DATETIME_FORMATS.AMPMS;this.init=function(c,d){o=c,o.$render=this.render;var e=d.eq(0),g=d.eq(1),h=angular.isDefined(b.mousewheel)?a.$parent.$eval(b.mousewheel):f.mousewheel;h&&this.setupMousewheelEvents(e,g),a.readonlyInput=angular.isDefined(b.readonlyInput)?a.$parent.$eval(b.readonlyInput):f.readonlyInput,this.setupInputEvents(e,g)};var q=f.hourStep;b.hourStep&&a.$parent.$watch(c(b.hourStep),function(a){q=parseInt(a,10)});var r=f.minuteStep;b.minuteStep&&a.$parent.$watch(c(b.minuteStep),function(a){r=parseInt(a,10)}),a.showMeridian=f.showMeridian,b.showMeridian&&a.$parent.$watch(c(b.showMeridian),function(b){if(a.showMeridian=!!b,o.$error.time){var c=g(),d=h();angular.isDefined(c)&&angular.isDefined(d)&&(n.setHours(c),j())}else l()}),this.setupMousewheelEvents=function(b,c){var d=function(a){a.originalEvent&&(a=a.originalEvent);var b=a.wheelDelta?a.wheelDelta:-a.deltaY;return a.detail||b>0};b.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementHours():a.decrementHours()),b.preventDefault()}),c.bind("mousewheel wheel",function(b){a.$apply(d(b)?a.incrementMinutes():a.decrementMinutes()),b.preventDefault()})},this.setupInputEvents=function(b,c){if(a.readonlyInput)return a.updateHours=angular.noop,void(a.updateMinutes=angular.noop);var d=function(b,c){o.$setViewValue(null),o.$setValidity("time",!1),angular.isDefined(b)&&(a.invalidHours=b),angular.isDefined(c)&&(a.invalidMinutes=c)};a.updateHours=function(){var a=g();angular.isDefined(a)?(n.setHours(a),j("h")):d(!0)},b.bind("blur",function(){!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=i(a.hours)})}),a.updateMinutes=function(){var a=h();angular.isDefined(a)?(n.setMinutes(a),j("m")):d(void 0,!0)},c.bind("blur",function(){!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=i(a.minutes)})})},this.render=function(){var a=o.$modelValue?new Date(o.$modelValue):null;isNaN(a)?(o.$setValidity("time",!1),d.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.')):(a&&(n=a),k(),l())},a.incrementHours=function(){m(60*q)},a.decrementHours=function(){m(60*-q)},a.incrementMinutes=function(){m(r)},a.decrementMinutes=function(){m(-r)},a.toggleMeridian=function(){m(720*(n.getHours()<12?1:-1))}}]).directive("timepicker",function(){return{restrict:"EA",require:["timepicker","?^ngModel"],controller:"TimepickerController",replace:!0,scope:{},templateUrl:"template/timepicker/timepicker.html",link:function(a,b,c,d){var e=d[0],f=d[1];f&&e.init(f,b.find("input"))}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(a){var b=/^\s*(.*?)(?:\s+as\s+(.*?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+(.*)$/;return{parse:function(c){var d=c.match(b);if(!d)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+c+'".');return{itemName:d[3],source:a(d[4]),viewMapper:a(d[2]||d[1]),modelMapper:a(d[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(a,b,c,d,e,f,g){var h=[9,13,27,38,40];return{require:"ngModel",link:function(i,j,k,l){var m,n=i.$eval(k.typeaheadMinLength)||1,o=i.$eval(k.typeaheadWaitMs)||0,p=i.$eval(k.typeaheadEditable)!==!1,q=b(k.typeaheadLoading).assign||angular.noop,r=b(k.typeaheadOnSelect),s=k.typeaheadInputFormatter?b(k.typeaheadInputFormatter):void 0,t=k.typeaheadAppendToBody?i.$eval(k.typeaheadAppendToBody):!1,u=b(k.ngModel).assign,v=g.parse(k.typeahead),w=i.$new();i.$on("$destroy",function(){w.$destroy()});var x="typeahead-"+w.$id+"-"+Math.floor(1e4*Math.random());j.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":x});var y=angular.element("
");y.attr({id:x,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(k.typeaheadTemplateUrl)&&y.attr("template-url",k.typeaheadTemplateUrl);var z=function(){w.matches=[],w.activeIdx=-1,j.attr("aria-expanded",!1)},A=function(a){return x+"-option-"+a};w.$watch("activeIdx",function(a){0>a?j.removeAttr("aria-activedescendant"):j.attr("aria-activedescendant",A(a))});var B=function(a){var b={$viewValue:a};q(i,!0),c.when(v.source(i,b)).then(function(c){var d=a===l.$viewValue;if(d&&m)if(c.length>0){w.activeIdx=0,w.matches.length=0;for(var e=0;e=n?o>0?(C&&d.cancel(C),C=d(function(){B(a)},o)):B(a):(q(i,!1),z()),p?a:a?void l.$setValidity("editable",!1):(l.$setValidity("editable",!0),a)}),l.$formatters.push(function(a){var b,c,d={};return s?(d.$model=a,s(i,d)):(d[v.itemName]=a,b=v.viewMapper(i,d),d[v.itemName]=void 0,c=v.viewMapper(i,d),b!==c?b:a)}),w.select=function(a){var b,c,e={};e[v.itemName]=c=w.matches[a].model,b=v.modelMapper(i,e),u(i,b),l.$setValidity("editable",!0),r(i,{$item:c,$model:b,$label:v.viewMapper(i,e)}),z(),d(function(){j[0].focus()},0,!1)},j.bind("keydown",function(a){0!==w.matches.length&&-1!==h.indexOf(a.which)&&(a.preventDefault(),40===a.which?(w.activeIdx=(w.activeIdx+1)%w.matches.length,w.$digest()):38===a.which?(w.activeIdx=(w.activeIdx?w.activeIdx:w.matches.length)-1,w.$digest()):13===a.which||9===a.which?w.$apply(function(){w.select(w.activeIdx)}):27===a.which&&(a.stopPropagation(),z(),w.$digest()))}),j.bind("blur",function(){m=!1});var D=function(a){j[0]!==a.target&&(z(),w.$digest())};e.bind("click",D),i.$on("$destroy",function(){e.unbind("click",D)});var E=a(y)(w);t?e.find("body").append(E):j.after(E)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(a,b,c){a.templateUrl=c.templateUrl,a.isOpen=function(){return a.matches.length>0},a.isActive=function(b){return a.active==b},a.selectActive=function(b){a.active=b},a.selectMatch=function(b){a.select({activeIdx:b})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(a,b,c,d){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(e,f,g){var h=d(g.templateUrl)(e.$parent)||"template/typeahead/typeahead-match.html";a.get(h,{cache:b}).success(function(a){f.replaceWith(c(a.trim())(e))})}}}]).filter("typeaheadHighlight",function(){function a(a){return a.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(b,c){return c?(""+b).replace(new RegExp(a(c),"gi"),"$&"):b}}),angular.module("template/accordion/accordion-group.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion-group.html",'
\n
\n

\n {{heading}}\n

\n
\n
\n
\n
\n
')}]),angular.module("template/accordion/accordion.html",[]).run(["$templateCache",function(a){a.put("template/accordion/accordion.html",'
')}]),angular.module("template/alert/alert.html",[]).run(["$templateCache",function(a){a.put("template/alert/alert.html",'\n')}]),angular.module("template/carousel/carousel.html",[]).run(["$templateCache",function(a){a.put("template/carousel/carousel.html",'\n')}]),angular.module("template/carousel/slide.html",[]).run(["$templateCache",function(a){a.put("template/carousel/slide.html","
\n")}]),angular.module("template/datepicker/datepicker.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/datepicker.html",'
\n \n \n \n
')}]),angular.module("template/datepicker/day.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/day.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
{{label.abbr}}
{{ weekNumbers[$index] }}\n \n
\n')}]),angular.module("template/datepicker/month.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/month.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("template/datepicker/popup.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/popup.html",'\n')}]),angular.module("template/datepicker/year.html",[]).run(["$templateCache",function(a){a.put("template/datepicker/year.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(a){a.put("template/modal/backdrop.html",'\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(a){a.put("template/modal/window.html",'')}]),angular.module("template/pagination/pager.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pager.html",'')}]),angular.module("template/pagination/pagination.html",[]).run(["$templateCache",function(a){a.put("template/pagination/pagination.html",'')}]),angular.module("template/tooltip/tooltip-html-unsafe-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-html-unsafe-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(a){a.put("template/tooltip/tooltip-popup.html",'
\n
\n
\n
\n')}]),angular.module("template/popover/popover.html",[]).run(["$templateCache",function(a){a.put("template/popover/popover.html",'
\n
\n\n
\n

\n
\n
\n
\n') -}]),angular.module("template/progressbar/bar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/bar.html",'
')}]),angular.module("template/progressbar/progress.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progress.html",'
')}]),angular.module("template/progressbar/progressbar.html",[]).run(["$templateCache",function(a){a.put("template/progressbar/progressbar.html",'
\n
\n
')}]),angular.module("template/rating/rating.html",[]).run(["$templateCache",function(a){a.put("template/rating/rating.html",'\n \n ({{ $index < value ? \'*\' : \' \' }})\n \n')}]),angular.module("template/tabs/tab.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tab.html",'
  • \n {{heading}}\n
  • \n')}]),angular.module("template/tabs/tabset-titles.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset-titles.html","
      \n
    \n")}]),angular.module("template/tabs/tabset.html",[]).run(["$templateCache",function(a){a.put("template/tabs/tabset.html",'\n
    \n \n
    \n
    \n
    \n
    \n
    \n')}]),angular.module("template/timepicker/timepicker.html",[]).run(["$templateCache",function(a){a.put("template/timepicker/timepicker.html",'\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
     
    \n \n :\n \n
     
    \n')}]),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-match.html",'')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(a){a.put("template/typeahead/typeahead-popup.html",'')}]),function(a){"function"==typeof define?define(a):"function"==typeof YUI?YUI.add("es5",a):a()}(function(){function a(){}function b(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}function c(a){var b=typeof a;return null===a||"undefined"===b||"boolean"===b||"number"===b||"string"===b}function d(a){var b,d,e;if(c(a))return a;if(d=a.valueOf,"function"==typeof d&&(b=d.call(a),c(b)))return b;if(e=a.toString,"function"==typeof e&&(b=e.call(a),c(b)))return b;throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if("function"!=typeof c)throw new TypeError("Function.prototype.bind called on incompatible "+c);var d=m.call(arguments,1),e=function(){if(this instanceof e){var a=c.apply(this,d.concat(m.call(arguments)));return Object(a)===a?a:this}return c.apply(b,d.concat(m.call(arguments)))};return c.prototype&&(a.prototype=c.prototype,e.prototype=new a,a.prototype=null),e});var e,f,g,h,i,j=Function.prototype.call,k=Array.prototype,l=Object.prototype,m=k.slice,n=j.bind(l.toString),o=j.bind(l.hasOwnProperty);if((i=o(l,"__defineGetter__"))&&(e=j.bind(l.__defineGetter__),f=j.bind(l.__defineSetter__),g=j.bind(l.__lookupGetter__),h=j.bind(l.__lookupSetter__)),2!=[1,2].splice(0).length){var p=Array.prototype.splice;Array.prototype.splice=function(){function a(a){for(var b=[];a--;)b.unshift(a);return b}var b,c=[];return c.splice.bind(c,0,0).apply(null,a(20)),c.splice.bind(c,0,0).apply(null,a(26)),b=c.length,c.splice(5,0,"XXX"),b+1==c.length?!0:void 0}()?function(a,b){return arguments.length?p.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(m.call(arguments,2))):[]}:function(a,b){var c,d=m.call(arguments,2),e=d.length;if(!arguments.length)return[];if(void 0===a&&(a=0),void 0===b&&(b=this.length-a),e>0){if(0>=b){if(a==this.length)return this.push.apply(this,d),[];if(0==a)return this.unshift.apply(this,d),[]}return c=m.call(this,a,a+b),d.push.apply(d,m.call(this,a+b,this.length)),d.unshift.apply(d,m.call(this,0,a)),d.unshift(0,this.length),p.apply(this,d),c}return p.call(this,a,b)}}if(1!=[].unshift(0)){var q=Array.prototype.unshift;Array.prototype.unshift=function(){return q.apply(this,arguments),this.length}}Array.isArray||(Array.isArray=function(a){return"[object Array]"==n(a)});var r=Object("a"),s="a"!=r[0]||!(0 in r);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=G(this),c=s&&"[object String]"==n(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=n(a))throw new TypeError;for(;++e>>0,e=Array(d),f=arguments[1];if("[object Function]"!=n(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var b,c=G(this),d=s&&"[object String]"==n(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if("[object Function]"!=n(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}),Array.prototype.every||(Array.prototype.every=function(a){var b=G(this),c=s&&"[object String]"==n(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=n(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=G(this),c=s&&"[object String]"==n(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=n(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=G(this),c=s&&"[object String]"==n(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=n(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=G(this),c=s&&"[object String]"==n(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=n(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>f)return e;do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var c=s&&"[object String]"==n(this)?this.split(""):G(this),d=c.length>>>0;if(!d)return-1;var e=0;for(arguments.length>1&&(e=b(arguments[1])),e=e>=0?e:Math.max(0,d+e);d>e;e++)if(e in c&&c[e]===a)return e;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var c=s&&"[object String]"==n(this)?this.split(""):G(this),d=c.length>>>0;if(!d)return-1;var e=d-1;for(arguments.length>1&&(e=Math.min(e,b(arguments[1]))),e=e>=0?e:d-Math.abs(e);e>=0;e--)if(e in c&&a===c[e])return e;return-1}),!Object.keys){var t=!0,u=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],v=u.length;for(var w in{toString:null})t=!1;Object.keys=function H(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var H=[];for(var b in a)o(a,b)&&H.push(b);if(t)for(var c=0,d=v;d>c;c++){var e=u[c];o(a,e)&&H.push(e)}return H}}var x=-621987552e5,y="-000001";Date.prototype.toISOString&&-1!==new Date(x).toISOString().indexOf(y)||(Date.prototype.toISOString=function(){var a,b,c,d,e;if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");for(d=this.getUTCFullYear(),e=this.getUTCMonth(),d+=Math.floor(e/12),e=(e%12+12)%12,a=[e+1,this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds()],d=(0>d?"-":d>9999?"+":"")+("00000"+Math.abs(d)).slice(d>=0&&9999>=d?-4:-6),b=a.length;b--;)c=a[b],10>c&&(a[b]="0"+c);return d+"-"+a.slice(0,2).join("-")+"T"+a.slice(2).join(":")+"."+("000"+this.getUTCMilliseconds()).slice(-3)+"Z"});var z=!1;try{z=Date.prototype.toJSON&&null===new Date(0/0).toJSON()&&-1!==new Date(x).toJSON().indexOf(y)&&Date.prototype.toJSON.call({toISOString:function(){return!0}})}catch(A){}if(z||(Date.prototype.toJSON=function(){var a,b=Object(this),c=d(b);if("number"==typeof c&&!isFinite(c))return null;if(a=b.toISOString,"function"!=typeof a)throw new TypeError("toISOString property is not callable");return a.call(b)}),Date=function(a){function b(c,d,e,f,g,h,i){var j=arguments.length;if(this instanceof a){var k=1==j&&String(c)===c?new a(b.parse(c)):j>=7?new a(c,d,e,f,g,h,i):j>=6?new a(c,d,e,f,g,h):j>=5?new a(c,d,e,f,g):j>=4?new a(c,d,e,f):j>=3?new a(c,d,e):j>=2?new a(c,d):j>=1?new a(c):new a;return k.constructor=b,k}return a.apply(this,arguments)}function c(a,b){var c=b>1?1:0;return e[b]+Math.floor((a-1969+c)/4)-Math.floor((a-1901+c)/100)+Math.floor((a-1601+c)/400)+365*(a-1970)}var d=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),e=[0,31,59,90,120,151,181,212,243,273,304,334,365];for(var f in a)b[f]=a[f];return b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function(b){var e=d.exec(b);if(e){var f,g=Number(e[1]),h=Number(e[2]||1)-1,i=Number(e[3]||1)-1,j=Number(e[4]||0),k=Number(e[5]||0),l=Number(e[6]||0),m=Math.floor(1e3*Number(e[7]||0)),n=!e[4]||e[8]?0:Number(new a(1970,0)),o="-"===e[9]?1:-1,p=Number(e[10]||0),q=Number(e[11]||0);return(k>0||l>0||m>0?24:25)>j&&60>k&&60>l&&1e3>m&&h>-1&&12>h&&24>p&&60>q&&i>-1&&i=-864e13&&864e13>=f)?f:0/0}return a.parse.apply(this,arguments)},b}(Date),Date.now||(Date.now=function(){return(new Date).getTime()}),Number.prototype.toFixed&&"0.000"===8e-5.toFixed(3)&&"0"!==.9.toFixed(0)&&"1.25"===1.255.toFixed(2)&&"1000000000000000128"===0xde0b6b3a7640080.toFixed(0)||!function(){function a(a,b){for(var c=-1;++c=0;)c+=h[b],h[b]=Math.floor(c/a),c=c%a*f}function c(){for(var a=g,b="";--a>=0;)if(""!==b||0===a||0!==h[a]){var c=String(h[a]);""===b?b=c:b+="0000000".slice(0,7-c.length)+c}return b}function d(a,b,c){return 0===b?c:b%2===1?d(a,b-1,c*a):d(a*a,b/2,c)}function e(a){for(var b=0;a>=4096;)b+=12,a/=4096;for(;a>=2;)b+=1,a/=2;return b}var f,g,h;f=1e7,g=6,h=[0,0,0,0,0,0],Number.prototype.toFixed=function(f){var g,h,i,j,k,l,m,n;if(g=Number(f),g=g!==g?0:Math.floor(g),0>g||g>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(h=Number(this),h!==h)return"NaN";if(-1e21>=h||h>=1e21)return String(h);if(i="",0>h&&(i="-",h=-h),j="0",h>1e-21)if(k=e(h*d(2,69,1))-69,l=0>k?h*d(2,-k,1):h/d(2,k,1),l*=4503599627370496,k=52-k,k>0){for(a(0,l),m=g;m>=7;)a(1e7,0),m-=7;for(a(d(10,m,1),0),m=k-1;m>=23;)b(1<<23),m-=23;b(1<0?(n=j.length,j=g>=n?i+"0.0000000000000000000".slice(0,g-n+2)+j:i+j.slice(0,n-g)+"."+j.slice(n-g)):j=i+j,j}}(),"0".split(void 0,0).length){var B=String.prototype.split;String.prototype.split=function(a,b){return void 0===a&&0===b?[]:B.apply(this,arguments)}}if("".substr&&"b"!=="0b".substr(-1)){var C=String.prototype.substr;String.prototype.substr=function(a,b){return C.call(this,0>a&&(a=this.length+a)<0?0:a,b)}}var D=" \n \f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||D.trim()){D="["+D+"]";var E=new RegExp("^"+D+D+"*"),F=new RegExp(D+D+"*$");String.prototype.trim=function(){if(void 0===this||null===this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(E,"").replace(F,"")}}var G=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}});var Showdown={extensions:{}},forEach=Showdown.forEach=function(a,b){if("function"==typeof a.forEach)a.forEach(b);else{var c,d=a.length;for(c=0;d>c;c++)b(a[c],c,a)}},stdExtName=function(a){return a.replace(/[_-]||\s/g,"").toLowerCase()};Showdown.converter=function(a){var b,c,d,e=0,f=[],g=[];if("undefind"!=typeof module&&"undefined"!=typeof exports&&"undefind"!=typeof require){var h=require("fs");if(h){var i=h.readdirSync((__dirname||".")+"/extensions").filter(function(a){return~a.indexOf(".js")}).map(function(a){return a.replace(/\.js$/,"")});Showdown.forEach(i,function(a){var b=stdExtName(a);Showdown.extensions[b]=require("./extensions/"+a)})}}if(this.makeHtml=function(a){return b={},c={},d=[],a=a.replace(/~/g,"~T"),a=a.replace(/\$/g,"~D"),a=a.replace(/\r\n/g,"\n"),a=a.replace(/\r/g,"\n"),a="\n\n"+a+"\n\n",a=M(a),a=a.replace(/^[ \t]+$/gm,""),Showdown.forEach(f,function(b){a=l(b,a)}),a=z(a),a=n(a),a=m(a),a=p(a),a=K(a),a=a.replace(/~D/g,"$$"),a=a.replace(/~T/g,"~"),Showdown.forEach(g,function(b){a=l(b,a)}),a},a&&a.extensions){var j=this;Showdown.forEach(a.extensions,function(a){if("string"==typeof a&&(a=Showdown.extensions[stdExtName(a)]),"function"!=typeof a)throw"Extension '"+a+"' could not be loaded. It was either not found or is not a valid extension.";Showdown.forEach(a(j),function(a){a.type?"language"===a.type||"lang"===a.type?f.push(a):("output"===a.type||"html"===a.type)&&g.push(a):g.push(a)})})}var k,l=function(a,b){if(a.regex){var c=new RegExp(a.regex,"g");return b.replace(c,a.replace)}return a.filter?a.filter(b):void 0},m=function(a){return a+="~0",a=a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(a,d,e,f,g){return d=d.toLowerCase(),b[d]=G(e),f?f+g:(g&&(c[d]=g.replace(/"/g,""")),"")}),a=a.replace(/~0/,"")},n=function(a){a=a.replace(/\n/g,"\n\n");return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,o),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,o),a=a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o),a=a.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,o),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o),a=a.replace(/\n\n/g,"\n")},o=function(a,b){var c=b;return c=c.replace(/\n\n/g,"\n"),c=c.replace(/^\n/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(d.push(c)-1)+"K\n\n"},p=function(a){a=w(a);var b=A("
    ");return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,b),a=x(a),a=y(a),a=E(a),a=n(a),a=F(a)},q=function(a){return a=B(a),a=r(a),a=H(a),a=u(a),a=s(a),a=I(a),a=G(a),a=D(a),a=a.replace(/ +\n/g,"
    \n")},r=function(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=N(b,"\\`*_")})},s=function(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,t),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,t),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,t)},t=function(a,d,e,f,g,h,i,j){void 0==j&&(j="");var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(""==n)if(""==m&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m,void 0!=b[m])n=b[m],void 0!=c[m]&&(o=c[m]);else{if(!(k.search(/\(\s*\)$/m)>-1))return k;n=""}n=N(n,"*_");var p='"},u=function(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,v),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,v)},v=function(a,d,e,f,g,h,i,j){var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(o||(o=""),""==n){if(""==m&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m,void 0==b[m])return k;n=b[m],void 0!=c[m]&&(o=c[m])}l=l.replace(/"/g,"""),n=N(n,"*_");var p=''+l+''+q(c)+"")}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,c){return A('

    '+q(c)+"

    ")}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,c,d){var e=c.length;return A("'+q(d)+"")})},x=function(a){a+="~0";var b=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return e?a=a.replace(b,function(a,b,c){var d=b,e=c.search(/[*+-]/g)>-1?"ul":"ol";d=d.replace(/\n{2,}/g,"\n\n\n");var f=k(d);return f=f.replace(/\s+$/,""),f="<"+e+">"+f+"\n"}):(b=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(b,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",f=f.replace(/\n{2,}/g,"\n\n\n"),h=k(f);return h=e+"<"+g+">\n"+h+"\n"})),a=a.replace(/~0/,"")};k=function(a){return e++,a=a.replace(/\n{2,}$/,"\n"),a+="~0",a=a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(a,b,c,d,e){var f=e,g=b;return g||f.search(/\n{2,}/)>-1?f=p(L(f)):(f=x(L(f)),f=f.replace(/\n$/,""),f=q(f)),"
  • "+f+"
  • \n"}),a=a.replace(/~0/g,""),e--,a};var y=function(a){return a+="~0",a=a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=C(L(d)),d=M(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="
    "+d+"\n
    ",A(d)+e}),a=a.replace(/~0/,"")},z=function(a){return a+="~0",a=a.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(a,b,c){var d=b,e=c;return e=C(e),e=M(e),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),e="
    "+e+"\n
    ",A(e)}),a=a.replace(/~0/,"")},A=function(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(d.push(a)-1)+"K\n\n"},B=function(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d){var e=d;return e=e.replace(/^([ \t]*)/g,""),e=e.replace(/[ \t]*$/g,""),e=C(e),b+""+e+""})},C=function(a){return a=a.replace(/&/g,"&"),a=a.replace(//g,">"),a=N(a,"*_{}[]\\",!1)},D=function(a){return a=a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),a=a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")},E=function(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=p(c),c=c.replace(/(^|\n)/g,"$1 "),c=c.replace(/(\s*
    [^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^  /gm,"~0"),c=c.replace(/~0/g,"")}),A("
    \n"+c+"\n
    ")})},F=function(a){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");for(var b=a.split(/\n{2,}/g),c=[],e=b.length,f=0;e>f;f++){var g=b[f];g.search(/~K(\d+)K/g)>=0?c.push(g):g.search(/\S/)>=0&&(g=q(g),g=g.replace(/^([ \t]*)/g,"

    "),g+="

    ",c.push(g))}e=c.length;for(var f=0;e>f;f++)for(;c[f].search(/~K(\d+)K/)>=0;){var h=d[RegExp.$1];h=h.replace(/\$/g,"$$$$"),c[f]=c[f].replace(/~K\d+K/,h)}return c.join("\n\n")},G=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),a=a.replace(/<(?![a-z\/?\$!])/gi,"<")},H=function(a){return a=a.replace(/\\(\\)/g,O),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,O)},I=function(a){return a=a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'
    $1'),a=a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(a,b){return J(K(b))})},J=function(a){var b=[function(a){return"&#"+a.charCodeAt(0)+";"},function(a){return"&#x"+a.charCodeAt(0).toString(16)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if("@"==a)a=b[Math.floor(2*Math.random())](a);else if(":"!=a){var c=Math.random();a=c>.9?b[2](a):c>.45?b[1](a):b[0](a)}return a}),a=''+a+"",a=a.replace(/">.+:/g,'">')},K=function(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)})},L=function(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,"")},M=function(a){return a=a.replace(/\t(?=\t)/g," "),a=a.replace(/\t/g,"~A~B"),a=a.replace(/~B(.+?)~A/g,function(a,b){for(var c=b,d=4-c.length%4,e=0;d>e;e++)c+=" ";return c}),a=a.replace(/~A/g," "),a=a.replace(/~B/g,"")},N=function(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,O)},O=function(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}},"undefined"!=typeof module&&(module.exports=Showdown),"function"==typeof define&&define.amd&&define("showdown",function(){return Showdown}),function(){var a=function(a){var b,c={},d="text-align:left;";return c.th=function(a){if(""===a.trim())return"";var b=a.trim().replace(/ /g,"_").toLowerCase();return''+a+""},c.td=function(b){return''+a.makeHtml(b)+""},c.ths=function(){var a="",b=0,d=[].slice.apply(arguments);for(b;b\n",a+="\n"},c.tr=function(){var a,b=[].slice.apply(arguments);return a="\n",a+=c.tds.apply(this,b),a+="\n"},b=function(a){var b,d,e=0,f=a.split("\n"),g=[],h=[];for(e;e"),d=b.substring(1,b.length-1).split("|"),g.push(c.thead.apply(this,d)),b=f[++e],b.trim().match(/^[|]{1}[-=| ]+[|]{1}$/)){for(b=f[++e],g.push("");b.trim().match(/^[|]{1}.*[|]{1}$/);)b=b.trim(),g.push(c.tr.apply(this,b.substring(1,b.length-1).split("|"))),b=f[++e];g.push(""),g.push(""),h.push(g.join("\n"));continue}b=f[--e]}h.push(b)}return h.join("\n")},[{type:"lang",filter:b}]};"undefined"!=typeof window&&window.Showdown&&window.Showdown.extensions&&(window.Showdown.extensions.table=a),"undefined"!=typeof module&&(module.exports=a)}(),!function(a){if("object"==typeof exports)module.exports=a();else if("function"==typeof define&&define.amd)define(a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),(b.RAML||(b.RAML={})).Parser=a()}}(function(){var a;return function b(a,c,d){function e(g,h){if(!c[g]){if(!a[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,b,a,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;gb;b++)if(b in this&&this[b]===a)return b;return-1};e=a("./errors").MarkedYAMLError,f=a("./nodes"),g=a("./util"),this.ConstructorError=function(a){function b(){return h=b.__super__.constructor.apply(this,arguments)}return k(b,a),b}(e),this.BaseConstructor=function(){function a(){this.constructed_objects={},this.constructing_nodes=[],this.deferred_constructors=[]}return a.prototype.yaml_constructors={},a.prototype.yaml_multi_constructors={},a.add_constructor=function(a,b){return this.prototype.hasOwnProperty("yaml_constructors")||(this.prototype.yaml_constructors=g.extend({},this.prototype.yaml_constructors)),this.prototype.yaml_constructors[a]=b},a.add_multi_constructor=function(a,b){return this.prototype.hasOwnProperty("yaml_multi_constructors")||(this.prototype.yaml_multi_constructors=g.extend({},this.prototype.yaml_multi_constructors)),this.prototype.yaml_multi_constructors[a]=b -},a.prototype.construct_document=function(a){var b;for(this.applyAstTransformations(a),b=this.construct_object(a);!g.is_empty(this.deferred_constructors);)this.deferred_constructors.pop()();return this.applyTransformations(b),b},a.prototype.defer=function(a){return this.deferred_constructors.push(a)},a.prototype.construct_object=function(a){var b,d,e,g,h;if(a.unique_id in this.constructed_objects)return this.constructed_objects[a.unique_id];if(h=a.unique_id,l.call(this.constructing_nodes,h)>=0)throw new c.ConstructorError(null,null,"found unconstructable recursive node",a.start_mark);if(this.constructing_nodes.push(a.unique_id),b=null,g=null,a.tag in this.yaml_constructors)b=this.yaml_constructors[a.tag];else{for(e in this.yaml_multi_constructors)if(a.tag.indexOf(0===e)){g=a.tag.slice(e.length),b=this.yaml_multi_constructors[e];break}null==b&&(null in this.yaml_multi_constructors?(g=a.tag,b=this.yaml_multi_constructors[null]):null in this.yaml_constructors?b=this.yaml_constructors[null]:a instanceof f.ScalarNode?b=this.construct_scalar:a instanceof f.SequenceNode?b=this.construct_sequence:a instanceof f.MappingNode&&(b=this.construct_mapping))}return d=b.call(this,null!=g?g:a,a),this.constructed_objects[a.unique_id]=d,this.constructing_nodes.pop(),d},a.prototype.construct_scalar=function(a){if(!(a instanceof f.ScalarNode))throw new c.ConstructorError(null,null,"expected a scalar node but found "+a.id,a.start_mark);return a.value},a.prototype.construct_sequence=function(a){var b,d,e,g,h;if(!(a instanceof f.SequenceNode))throw new c.ConstructorError(null,null,"expected an array node but found "+a.id,a.start_mark);for(g=a.value,h=[],d=0,e=g.length;e>d;d++)b=g[d],h.push(this.construct_object(b));return h},a.prototype.construct_mapping=function(a){var b,d,e,g,h,i,j,k,l,m,n,o,p,q;if(!(a instanceof f.MappingNode))throw new c.ConstructorError(null,null,"expected a map node but found "+a.id,a.start_mark);for(h={},o=a.value,k=0,m=o.length;m>k;k++)if(p=o[k],g=p[0],j=p[1],b=this.construct_object(g),i=this.construct_object(j),"object"==typeof b&&"tag:yaml.org,2002:seq"===g.tag)for(q=g.value,l=0,n=q.length;n>l;l++)d=q[l],e=this.construct_object(d),h[e]=i;else{if("object"==typeof b)throw new c.ConstructorError("while constructing a map",a.start_mark,"found unhashable key",g.start_mark);h[b]=i}return h},a.prototype.construct_pairs=function(a){var b,d,e,g,h,i,j,k,l;if(!(a instanceof f.MappingNode))throw new c.ConstructorError(null,null,"expected a map node but found "+a.id,a.start_mark);for(e=[],k=a.value,i=0,j=k.length;j>i;i++)l=k[i],d=l[0],h=l[1],b=this.construct_object(d),g=this.construct_object(h),e.push([b,g]);return e},a}(),this.Constructor=function(a){function b(){return i=b.__super__.constructor.apply(this,arguments)}var e,g,h;return k(b,a),e={"true":!0,"false":!1},h=/^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[\x20\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\.([0-9]*))?(?:[\x20\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$/,g={year:1,month:2,day:3,hour:4,minute:5,second:6,fraction:7,tz:8,tz_sign:9,tz_hour:10,tz_minute:11},b.prototype.yaml_constructors={},b.prototype.yaml_multi_constructors={},b.prototype.construct_scalar=function(a){var c,d,e,g,h,i;if(a instanceof f.MappingNode)for(h=a.value,e=0,g=h.length;g>e;e++)if(i=h[e],c=i[0],d=i[1],"tag:yaml.org,2002:value"===c.tag)return this.construct_scalar(d);return b.__super__.construct_scalar.call(this,a)},b.prototype.flatten_mapping=function(a){var b,d,e,g,h,i,j,k,l,m,n,o,p;for(e=[],b=0;bk;k++){if(h=p[k],!(h instanceof f.MappingNode))throw new c.ConstructorError("while constructing a map",a.start_mark,"expected a map for merging, but found "+h.id,h.start_mark);this.flatten_mapping(h),g.push(h.value)}for(g.reverse(),l=0,n=g.length;n>l;l++)i=g[l],e=e.concat(i)}else"tag:yaml.org,2002:value"===d.tag?(d.tag="tag:yaml.org,2002:str",b++):b++;return e.length?a.value=e.concat(a.value):void 0},b.prototype.construct_mapping=function(a){return a instanceof f.MappingNode&&this.flatten_mapping(a),b.__super__.construct_mapping.call(this,a)},b.prototype.construct_yaml_null=function(a){return this.construct_scalar(a),null},b.prototype.construct_yaml_bool=function(a){var b;return b=this.construct_scalar(a),e[b.toLowerCase()]},b.prototype.construct_yaml_int=function(a){var b,c,d,e,f,g,h,i,j;if(g=this.construct_scalar(a),g=g.replace(/_/g,""),f="-"===g[0]?-1:1,j=g[0],l.call("+-",j)>=0&&(g=g.slice(1)),"0"===g)return 0;if(0===g.indexOf("0b"))return f*parseInt(g.slice(2),2);if(0===g.indexOf("0x"))return f*parseInt(g.slice(2),16);if(0===g.indexOf("0o"))return f*parseInt(g.slice(2),8);if("0"===g[0])return f*parseInt(g,8);if(l.call(g,":")>=0){for(d=function(){var a,b,c,d;for(c=g.split(/:/g),d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(parseInt(e));return d}(),d.reverse(),b=1,g=0,h=0,i=d.length;i>h;h++)c=d[h],g+=c*b,b*=60;return f*g}return f*parseInt(g)},b.prototype.construct_yaml_float=function(a){var b,c,d,e,f,g,h,i,j;if(g=this.construct_scalar(a),g=g.replace(/_/g,"").toLowerCase(),f="-"===g[0]?-1:1,j=g[0],l.call("+-",j)>=0&&(g=g.slice(1)),".inf"===g)return 1/0*f;if(".nan"===g)return 0/0;if(l.call(g,":")>=0){for(d=function(){var a,b,c,d;for(c=g.split(/:/g),d=[],a=0,b=c.length;b>a;a++)e=c[a],d.push(parseFloat(e));return d}(),d.reverse(),b=1,g=0,h=0,i=d.length;i>h;h++)c=d[h],g+=c*b,b*=60;return f*g}return f*parseFloat(g)},b.prototype.construct_yaml_binary=function(a){var b,e;e=this.construct_scalar(a);try{return"undefined"!=typeof window&&null!==window?atob(e):new d(e,"base64").toString("ascii")}catch(f){throw b=f,new c.ConstructorError(null,null,"failed to decode base64 data: "+b,a.start_mark)}},b.prototype.construct_yaml_timestamp=function(a){var b,c,d,e,f,i,j,k,l,m,n,o,p,q,r,s,t;r=this.construct_scalar(a),j=a.value.match(h),s={};for(i in g)f=g[i],s[i]=j[f];if(t=parseInt(s.year),m=parseInt(s.month)-1,c=parseInt(s.day),!s.hour)return new Date(Date.UTC(t,m,c));if(e=parseInt(s.hour),l=parseInt(s.minute),n=parseInt(s.second),k=0,s.fraction){for(d=s.fraction.slice(0,6);d.length<6;)d+="0";d=parseInt(d),k=Math.round(d/1e3)}return s.tz_sign&&(q="-"===s.tz_sign?1:-1,(o=parseInt(s.tz_hour))&&(e+=q*o),(p=parseInt(s.tz_minute))&&(l+=q*p)),b=new Date(Date.UTC(t,m,c,e,l,n,k))},b.prototype.construct_yaml_pair_list=function(a,b){var d,e=this;if(d=[],!(b instanceof f.SequenceNode))throw new c.ConstructorError("while constructing "+a,b.start_mark,"expected an array but found "+b.id,b.start_mark);return this.defer(function(){var g,h,i,j,k,l,m,n,o,p;for(n=b.value,p=[],l=0,m=n.length;m>l;l++){if(i=n[l],!(i instanceof f.MappingNode))throw new c.ConstructorError("while constructing "+a,b.start_mark,"expected a map of length 1 but found "+i.id,i.start_mark);if(1!==i.value.length)throw new c.ConstructorError("while constructing "+a,b.start_mark,"expected a map of length 1 but found "+i.id,i.start_mark);o=i.value[0],h=o[0],k=o[1],g=e.construct_object(h),j=e.construct_object(k),p.push(d.push([g,j]))}return p}),d},b.prototype.construct_yaml_omap=function(a){return this.construct_yaml_pair_list("an ordered map",a)},b.prototype.construct_yaml_pairs=function(a){return this.construct_yaml_pair_list("pairs",a)},b.prototype.construct_yaml_set=function(a){var b,c=this;return b=[],this.defer(function(){var d,e;e=[];for(d in c.construct_mapping(a))e.push(b.push(d));return e}),b},b.prototype.construct_yaml_str=function(a){return this.construct_scalar(a)},b.prototype.construct_yaml_seq=function(a){var b,c=this;return b=[],this.defer(function(){var d,e,f,g,h;for(g=c.construct_sequence(a),h=[],e=0,f=g.length;f>e;e++)d=g[e],h.push(b.push(d));return h}),b},b.prototype.construct_yaml_map=function(a){var b,c=this;return b={},this.defer(function(){var d,e,f,g;f=c.construct_mapping(a),g=[];for(d in f)e=f[d],g.push(b[d]=e);return g}),b},b.prototype.construct_yaml_object=function(a,b){var c,d=this;return c=new b,this.defer(function(){var b,e,f,g;f=d.construct_mapping(a,!0),g=[];for(b in f)e=f[b],g.push(c[b]=e);return g}),c},b.prototype.construct_undefined=function(a){throw new c.ConstructorError(null,null,"could not determine a constructor for the tag "+a.tag,a.start_mark)},b}(this.BaseConstructor),this.Constructor.add_constructor("tag:yaml.org,2002:null",this.Constructor.prototype.construct_yaml_null),this.Constructor.add_constructor("tag:yaml.org,2002:bool",this.Constructor.prototype.construct_yaml_bool),this.Constructor.add_constructor("tag:yaml.org,2002:int",this.Constructor.prototype.construct_yaml_int),this.Constructor.add_constructor("tag:yaml.org,2002:float",this.Constructor.prototype.construct_yaml_float),this.Constructor.add_constructor("tag:yaml.org,2002:binary",this.Constructor.prototype.construct_yaml_binary),this.Constructor.add_constructor("tag:yaml.org,2002:timestamp",this.Constructor.prototype.construct_yaml_timestamp),this.Constructor.add_constructor("tag:yaml.org,2002:omap",this.Constructor.prototype.construct_yaml_omap),this.Constructor.add_constructor("tag:yaml.org,2002:pairs",this.Constructor.prototype.construct_yaml_pairs),this.Constructor.add_constructor("tag:yaml.org,2002:set",this.Constructor.prototype.construct_yaml_set),this.Constructor.add_constructor("tag:yaml.org,2002:str",this.Constructor.prototype.construct_yaml_str),this.Constructor.add_constructor("tag:yaml.org,2002:seq",this.Constructor.prototype.construct_yaml_seq),this.Constructor.add_constructor("tag:yaml.org,2002:map",this.Constructor.prototype.construct_yaml_map),this.Constructor.add_constructor(null,this.Constructor.prototype.construct_undefined),b.exports.Constructor=this.Constructor,b.exports.ConstructorError=this.ConstructorError}).call(this)}).call(this,a("buffer").Buffer)},{"./errors":3,"./nodes":7,"./util":20,buffer:31}],3:[function(){(function(){var a,b=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1},c={}.hasOwnProperty,d=function(a,b){function d(){this.constructor=a}for(var e in b)c.call(b,e)&&(a[e]=b[e]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};this.Mark=function(){function a(a,b,c,d,e){this.name=a,this.line=b,this.column=c,this.buffer=d,this.pointer=e}return a.prototype.get_snippet=function(a,c){var d,e,f,g,h,i,j;if(null==a&&(a=4),null==c&&(c=75),null==this.buffer)return null;for(d="\x00\r\n…\u2028\u2029",f="",g=this.pointer;g>0&&(i=this.buffer[g-1],b.call(d,i)<0);)if(g--,this.pointer-g>c/2-1){f=" ... ",g+=5;break}for(h="",e=this.pointer;ec/2-1){h=" ... ",e-=5;break}return""+new Array(a).join(" ")+f+this.buffer.slice(g,e)+h+"\n"+new Array(a+this.pointer-g+f.length).join(" ")+"^"},a.prototype.toString=function(){var a,b;return a=this.get_snippet(),b=' in "'+this.name+'", line '+(this.line+1)+", column "+(this.column+1),a?b:""+b+":\n"+a},a}(),this.YAMLError=function(a){function b(){b.__super__.constructor.call(this)}return d(b,a),b}(Error),this.MarkedYAMLError=function(a){function b(a,c,d,e,f){this.context=a,this.context_mark=c,this.message=d,this.problem_mark=e,this.note=f,b.__super__.constructor.call(this),this.message||(this.message=this.context),this.problem_mark||(this.problem_mark=this.context_mark)}return d(b,a),b.prototype.toString=function(){var a;return a=[],null!=this.context&&a.push(this.context),null==this.context_mark||null!=this.message&&null!=this.problem_mark&&this.context_mark.name===this.problem_mark.name&&this.context_mark.line===this.problem_mark.line&&this.context_mark.column===this.problem_mark.column||a.push(this.context_mark.toString()),null!=this.message&&a.push(this.message),null!=this.problem_mark&&a.push(this.problem_mark.toString()),null!=this.note&&a.push(this.note),a.join("\n")},b}(this.YAMLError),this.ValidationError=function(b){function c(){return a=c.__super__.constructor.apply(this,arguments)}return d(c,b),c}(this.MarkedYAMLError)}).call(this)},{}],4:[function(){(function(){var a,b,c,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};this.Event=function(){function a(a,b){this.start_mark=a,this.end_mark=b}return a}(),this.NodeEvent=function(a){function b(a,b,c){this.anchor=a,this.start_mark=b,this.end_mark=c}return i(b,a),b}(this.Event),this.CollectionStartEvent=function(a){function b(a,b,c,d,e){this.anchor=a,this.tag=b,this.implicit=c,this.start_mark=d,this.end_mark=e}return i(b,a),b}(this.NodeEvent),this.CollectionEndEvent=function(b){function c(){return a=c.__super__.constructor.apply(this,arguments)}return i(c,b),c}(this.Event),this.StreamStartEvent=function(a){function b(a,b,c,d,e){this.start_mark=a,this.end_mark=b,this.explicit=c,this.version=d,this.tags=e}return i(b,a),b}(this.Event),this.StreamEndEvent=function(a){function c(){return b=c.__super__.constructor.apply(this,arguments)}return i(c,a),c}(this.Event),this.DocumentStartEvent=function(a){function b(a,b,c,d,e){this.start_mark=a,this.end_mark=b,this.explicit=c,this.version=d,this.tags=e}return i(b,a),b}(this.Event),this.DocumentEndEvent=function(a){function b(a,b,c){this.start_mark=a,this.end_mark=b,this.explicit=c}return i(b,a),b}(this.Event),this.AliasEvent=function(a){function b(){return c=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(this.NodeEvent),this.ScalarEvent=function(a){function b(a,b,c,d,e,f,g){this.anchor=a,this.tag=b,this.implicit=c,this.value=d,this.start_mark=e,this.end_mark=f,this.style=g}return i(b,a),b}(this.NodeEvent),this.SequenceStartEvent=function(a){function b(){return d=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(this.CollectionStartEvent),this.SequenceEndEvent=function(a){function b(){return e=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(this.CollectionEndEvent),this.MappingStartEvent=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(this.CollectionStartEvent),this.MappingEndEvent=function(a){function b(){return g=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(this.CollectionEndEvent)}).call(this)},{}],5:[function(a){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=a("./errors").MarkedYAMLError,c=a("./nodes"),this.JoinError=function(a){function b(){return d=b.__super__.constructor.apply(this,arguments)}return f(b,a),b}(b),this.Joiner=function(){function a(){}return a.prototype.join_resources=function(a,b){var d,e,f,g,h=this;return null==b&&(b=0),d=[],(null!=a?a.value:void 0)&&(d=a.value.filter(function(a){var b;return null!=(b=a[0])?b.value.match(/^\//):void 0})),e=[],d.length>0?((null!=a?a.value:void 0)&&(a.value=a.value.filter(function(a){return!a[0].value.match(/^\//)})),f=new c.ScalarNode("tag:yaml.org,2002:str","resources",d[0][0].start_mark,d[d.length-1][1].end_mark),d.forEach(function(a){var d,f;return d=new c.ScalarNode("tag:yaml.org,2002:str","relativeUri",a[0].start_mark,a[1].end_mark),f=new c.ScalarNode("tag:yaml.org,2002:str",a[0].value,a[0].start_mark,a[1].end_mark),"tag:yaml.org,2002:null"===a[1].tag&&(a[1]=new c.MappingNode("tag:yaml.org,2002:map",[],a[0].start_mark,a[1].end_mark)),a[1].value.push([d,f]),e.push(a[1]),h.join_methods(a[1]),h.join_resources(a[1],++b)}),g=new c.SequenceNode("tag:yaml.org,2002:seq",e,d[0][0].start_mark,d[d.length-1][1].end_mark),a.value.push([f,g])):void 0},a.prototype.join_methods=function(a){var b,d,e,f,g=this;return b=[],a&&a.value&&(b=a.value.filter(function(a){var b;return g.isHttpMethod(null!=(b=a[0])?b.value:void 0)})),d=[],b.length>0?(a.value=a.value.filter(function(a){return!g.isHttpMethod(a[0].value)}),e=new c.ScalarNode("tag:yaml.org,2002:str","methods",b[0][0].start_mark,b[b.length-1][1].end_mark),b.forEach(function(a){var b,e;return b=new c.ScalarNode("tag:yaml.org,2002:str","method",a[0].start_mark,a[1].end_mark),e=new c.ScalarNode("tag:yaml.org,2002:str",a[0].value,a[0].start_mark,a[1].end_mark),"tag:yaml.org,2002:null"===a[1].tag&&(a[1]=new c.MappingNode("tag:yaml.org,2002:map",[],a[1].start_mark,a[1].end_mark)),a[1].value.push([b,e]),d.push(a[1])}),f=new c.SequenceNode("tag:yaml.org,2002:seq",d,b[0][0].start_mark,b[b.length-1][1].end_mark),a.value.push([e,f])):void 0},a}()}).call(this)},{"./errors":3,"./nodes":7}],6:[function(a){(function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;o=a("./util"),g=a("./reader"),i=a("./scanner"),e=a("./parser"),b=a("./composer"),h=a("./resolver"),c=a("./construct"),p=a("./validator"),d=a("./joiner"),l=a("./traits"),n=a("./resourceTypes"),j=a("./schemas"),f=a("./protocols"),k=a("./securitySchemes"),m=a("./transformations"),this.make_loader=function(a,q,r,s,t,u,v,w,x,y,z,A,B,C){return null==a&&(a=g.Reader),null==q&&(q=i.Scanner),null==r&&(r=e.Parser),null==s&&(s=b.Composer),null==t&&(t=h.Resolver),null==u&&(u=p.Validator),null==v&&(v=n.ResourceTypes),null==w&&(w=l.Traits),null==x&&(x=j.Schemas),null==y&&(y=f.Protocols),null==z&&(z=d.Joiner),null==A&&(A=k.SecuritySchemes),null==B&&(B=c.Constructor),null==C&&(C=m.Transformations),function(){function b(a,b,e,f){var g,h,i;for(this.parent=null!=f?f:null,d[0].call(this,a,b),d[1].call(this,e),d[2].call(this,e),d[3].call(this,e),i=d.slice(4),g=0,h=i.length;h>g;g++)c=i[g],c.call(this)}var c,d;return d=[a,q,s,C,r,t,u,w,v,x,y,z,B,A],o.extend.apply(o,[b.prototype].concat(function(){var a,b,e;for(e=[],a=0,b=d.length;b>a;a++)c=d[a],e.push(c.prototype);return e}())),b}()},this.Loader=this.make_loader()}).call(this)},{"./composer":1,"./construct":2,"./joiner":5,"./parser":8,"./protocols":9,"./reader":11,"./resolver":12,"./resourceTypes":13,"./scanner":14,"./schemas":15,"./securitySchemes":16,"./traits":18,"./transformations":19,"./util":20,"./validator":21}],7:[function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=a("./errors").MarkedYAMLError,d=0,this.ApplicationError=function(a){function b(){return e=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(b),this.Node=function(){function a(a,b,c,e){this.tag=a,this.value=b,this.start_mark=c,this.end_mark=e,this.unique_id="node_"+d++}return a.prototype.clone=function(){var a;return a=new this.constructor(this.tag,this.value,this.start_mark,this.end_mark)},a}(),this.ScalarNode=function(a){function b(a,c,d,e,f){this.tag=a,this.value=c,this.start_mark=d,this.end_mark=e,this.style=f,b.__super__.constructor.apply(this,arguments)}return i(b,a),b.prototype.id="scalar",b.prototype.clone=function(){var a;return a=new this.constructor(this.tag,this.value,this.start_mark,this.end_mark,this.style)},b.prototype.cloneRemoveIs=function(){return this.clone()},b.prototype.combine=function(a){if("tag:yaml.org,2002:null"===this.tag&&"tag:yaml.org,2002:map"===a.tag)return this.value=new c.MappingNode("tag:yaml.org,2002:map",[],a.start_mark,a.end_mark),this.value.combine(a);if(!(a instanceof c.ScalarNode))throw new c.ApplicationError("while applying node",null,"different YAML structures",this.start_mark);return this.value=a.value},b.prototype.remove_question_mark_properties=function(){},b}(this.Node),this.CollectionNode=function(a){function b(a,c,d,e,f){this.tag=a,this.value=c,this.start_mark=d,this.end_mark=e,this.flow_style=f,b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(this.Node),this.SequenceNode=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return i(b,a),b.prototype.id="sequence",b.prototype.clone=function(){var a,b,c,d,e,f,g;for(b=[],g=this.value,e=0,f=g.length;f>e;e++)a=g[e],d=a.clone(),b.push(d);return c=new this.constructor(this.tag,b,this.start_mark,this.end_mark,this.flow_style)},b.prototype.cloneRemoveIs=function(){return this.clone()},b.prototype.combine=function(a){var b,d,e,f,g,h;if(!(a instanceof c.SequenceNode))throw new c.ApplicationError("while applying node",null,"different YAML structures",this.start_mark);for(g=a.value,h=[],e=0,f=g.length;f>e;e++)b=g[e],d=b.clone(),h.push(this.value.push(d));return h},b.prototype.remove_question_mark_properties=function(){var a,b,c,d,e;for(d=this.value,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a.remove_question_mark_properties());return e},b}(this.CollectionNode),this.MappingNode=function(a){function b(){return g=b.__super__.constructor.apply(this,arguments)}return i(b,a),b.prototype.id="mapping",b.prototype.clone=function(){var a,b,c,d,e,f,g,h;for(b=[],h=this.value,f=0,g=h.length;g>f;f++)c=h[f],a=c[0].clone(),e=c[1].clone(),b.push([a,e]);return d=new this.constructor(this.tag,b,this.start_mark,this.end_mark,this.flow_style)},b.prototype.cloneRemoveIs=function(){var a,b,c,d,e,f,g,h,i;for(b=[],h=this.value,f=0,g=h.length;g>f;f++)c=h[f],a=c[0].cloneRemoveIs(),e=c[1].cloneRemoveIs(),"is"!==(i=a.value)&&b.push([a,e]);return d=new this.constructor(this.tag,b,this.start_mark,this.end_mark,this.flow_style)},b.prototype.cloneForTrait=function(){var a,b,c,d,e,f,g,h,i;for(b=[],h=this.value,f=0,g=h.length;g>f;f++)c=h[f],a=c[0].clone(),e=c[1].clone(),"usage"!==(i=a.value)&&"displayName"!==i&&b.push([a,e]);return d=new this.constructor(this.tag,b,this.start_mark,this.end_mark,this.flow_style)},b.prototype.cloneForResourceType=function(){var a,b,c,d,e,f,g,h,i;for(b=[],h=this.value,f=0,g=h.length;g>f;f++)c=h[f],a=c[0].cloneRemoveIs(),e=c[1].cloneRemoveIs(),"is"!==(i=a.value)&&"type"!==i&&"usage"!==i&&"displayName"!==i&&b.push([a,e]);return d=new this.constructor(this.tag,b,this.start_mark,this.end_mark,this.flow_style)},b.prototype.combine=function(a){var b,d,e,f,g,h,i,j,k,l;if("tag:yaml.org,2002:null"===a.tag&&(a=new c.MappingNode("tag:yaml.org,2002:map",[],a.start_mark,a.end_mark)),!(a instanceof c.MappingNode))throw new c.ApplicationError("while applying node",null,"different YAML structures",this.start_mark);for(k=a.value,l=[],i=0,j=k.length;j>i;i++)h=k[i],b=h[0].value,d=this.value.some(function(a){return a[0].value===b||a[0].value+"?"===b||a[0].value===b+"?"}),l.push(d?function(){var a,d,i,j;for(i=this.value,j=[],a=0,d=i.length;d>a;a++)f=i[a],g=f[0].value,g===b||g+"?"===b||g===b+"?"?("tag:yaml.org,2002:null"===f[1].tag&&"tag:yaml.org,2002:map"===h[1].tag&&(e=new c.MappingNode("tag:yaml.org,2002:map",[],f[1].start_mark,f[1].end_mark),f[1]=e),f[1].combine(h[1]),j.push("?"!==f[0].value.slice(-1)||"?"!==h[0].value.slice(-1)?"?"===f[0].value.slice(-1)?f[0].value=f[0].value.slice(0,-1):void 0:void 0)):j.push(void 0);return j}.call(this):this.value.push([h[0].clone(),h[1].clone()]));return l},b.prototype.remove_question_mark_properties=function(){var a,b,c,d,e;for(this.value=this.value.filter(function(a){return"?"!==a[0].value.slice(-1)}),d=this.value,e=[],b=0,c=d.length;c>b;b++)a=d[b],e.push(a[1].remove_question_mark_properties());return e},b}(this.CollectionNode)}).call(this)},{"./errors":3}],8:[function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},i=[].slice;d=a("./events"),b=a("./errors").MarkedYAMLError,e=a("./tokens"),this.ParserError=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return h(b,a),b}(b),this.Parser=function(){function a(){this.current_event=null,this.yaml_version=null,this.tag_handles={},this.states=[],this.marks=[],this.state="parse_stream_start"}var b;return b={"!":"!","!!":"tag:yaml.org,2002:"},a.prototype.dispose=function(){return this.states=[],this.state=null},a.prototype.check_event=function(){var a,b,c,d;if(b=1<=arguments.length?i.call(arguments,0):[],null===this.current_event&&null!=this.state&&(this.current_event=this[this.state]()),null!==this.current_event){if(0===b.length)return!0;for(c=0,d=b.length;d>c;c++)if(a=b[c],this.current_event instanceof a)return!0}return!1},a.prototype.peek_event=function(){return null===this.current_event&&null!=this.state&&(this.current_event=this[this.state]()),this.current_event},a.prototype.get_event=function(){var a;return null===this.current_event&&null!=this.state&&(this.current_event=this[this.state]()),a=this.current_event,this.current_event=null,a},a.prototype.parse_stream_start=function(){var a,b;return b=this.get_token(),a=new d.StreamStartEvent(b.start_mark,b.end_mark),this.state="parse_implicit_document_start",a},a.prototype.parse_implicit_document_start=function(){var a,c,f,g;return this.check_token(e.DirectiveToken,e.DocumentStartToken,e.StreamEndToken)?this.parse_document_start():(this.tag_handles=b,g=this.peek_token(),f=a=g.start_mark,c=new d.DocumentStartEvent(f,a,!1),this.states.push("parse_document_end"),this.state="parse_block_node",c)},a.prototype.parse_document_start=function(){for(var a,b,f,g,h,i,j;this.check_token(e.DocumentEndToken);)this.get_token();if(this.check_token(e.StreamEndToken)){if(h=this.get_token(),b=new d.StreamEndEvent(h.start_mark,h.end_mark),0!==this.states.length)throw new Error("assertion error, states should be empty");if(0!==this.marks.length)throw new Error("assertion error, marks should be empty");this.state=null}else{if(f=this.peek_token().start_mark,j=this.process_directives(),i=j[0],g=j[1],!this.check_token(e.DocumentStartToken))throw new c.ParserError("expected '', but found "+this.peek_token().id,this.peek_token().start_mark);h=this.get_token(),a=h.end_mark,b=new d.DocumentStartEvent(f,a,!0,i,g),this.states.push("parse_document_end"),this.state="parse_document_content"}return b},a.prototype.parse_document_end=function(){var a,b,c,f,g;return g=this.peek_token(),f=a=g.start_mark,c=!1,this.check_token(e.DocumentEndToken)&&(g=this.get_token(),a=g.end_mark,c=!0),b=new d.DocumentEndEvent(f,a,c),this.state="parse_document_start",b},a.prototype.parse_document_content=function(){var a;return this.check_token(e.DirectiveToken,e.DocumentStartToken,e.DocumentEndToken,e.StreamEndToken)?(a=this.process_empty_scalar(this.peek_token().start_mark),this.state=this.states.pop(),a):this.parse_block_node()},a.prototype.process_directives=function(){var a,d,f,h,i,j,k,l,m,n;for(this.yaml_version=null,this.tag_handles={};this.check_token(e.DirectiveToken);)if(j=this.get_token(),"YAML"===j.name){if(null!==this.yaml_version)throw new c.ParserError(null,null,"found duplicate YAML directive",j.start_mark);if(l=j.value,d=l[0],f=l[1],1!==d||2!==f)throw new c.ParserError(null,null,"found incompatible YAML document (version 1.2 is required)",j.start_mark);this.yaml_version=j.value}else if("TAG"===j.name){if(m=j.value,a=m[0],h=m[1],a in this.tag_handles)throw new c.ParserError(null,null,"duplicate tag handle "+a,j.start_mark);this.tag_handles[a]=h}i=null,n=this.tag_handles;for(a in n)g.call(n,a)&&(h=n[a],null==i&&(i={}),i[a]=h);k=[this.yaml_version,i];for(a in b)g.call(b,a)&&(h=b[a],h in this.tag_handles||(this.tag_handles[a]=h));return k},a.prototype.parse_block_node=function(){return this.parse_node(!0)},a.prototype.parse_flow_node=function(){return this.parse_node()},a.prototype.parse_block_node_or_indentless_sequence=function(){return this.parse_node(!0,!0)},a.prototype.parse_node=function(a,b){var f,g,h,i,j,k,l,m,n,o,p;if(null==a&&(a=!1),null==b&&(b=!1),this.check_token(e.AliasToken))p=this.get_token(),h=new d.AliasEvent(p.value,p.start_mark,p.end_mark),this.state=this.states.pop();else{if(f=null,n=null,l=g=o=null,this.check_token(e.AnchorToken)?(p=this.get_token(),l=p.start_mark,g=p.end_mark,f=p.value,this.check_token(e.TagToken)&&(p=this.get_token(),o=p.start_mark,g=p.end_mark,n=p.value)):this.check_token(e.TagToken)&&(p=this.get_token(),l=o=p.start_mark,g=p.end_mark,n=p.value,this.check_token(e.AnchorToken)&&(p=this.get_token(),g=p.end_mark,f=p.value)),null!==n)if(i=n[0],m=n[1],null!==i){if(!(i in this.tag_handles))throw new c.ParserError("while parsing a node",l,"found undefined tag handle "+i,o);n=this.tag_handles[i]+m}else n=m;if(null===l&&(l=g=this.peek_token().start_mark),h=null,j=null===n||"!"===n,b&&this.check_token(e.BlockEntryToken))g=this.peek_token().end_mark,h=new d.SequenceStartEvent(f,n,j,l,g),this.state="parse_indentless_sequence_entry";else if(this.check_token(e.ScalarToken))p=this.get_token(),g=p.end_mark,j=p.plain&&null===n||"!"===n?[!0,!1]:null===n?[!1,!0]:[!1,!1],h=new d.ScalarEvent(f,n,j,p.value,l,g,p.style),this.state=this.states.pop();else if(this.check_token(e.FlowSequenceStartToken))g=this.peek_token().end_mark,h=new d.SequenceStartEvent(f,n,j,l,g,!0),this.state="parse_flow_sequence_first_entry";else if(this.check_token(e.FlowMappingStartToken))g=this.peek_token().end_mark,h=new d.MappingStartEvent(f,n,j,l,g,!0),this.state="parse_flow_mapping_first_key";else if(a&&this.check_token(e.BlockSequenceStartToken))g=this.peek_token().end_mark,h=new d.SequenceStartEvent(f,n,j,l,g,!1),this.state="parse_block_sequence_first_entry";else if(a&&this.check_token(e.BlockMappingStartToken))g=this.peek_token().end_mark,h=new d.MappingStartEvent(f,n,j,l,g,!1),this.state="parse_block_mapping_first_key";else{if(null===f&&null===n)throw k=a?"block":"flow",p=this.peek_token(),new c.ParserError("while parsing a "+k+" node",l,"expected the node content, but found "+p.id,p.start_mark);h=new d.ScalarEvent(f,n,[j,!1],"",l,g),this.state=this.states.pop()}}return h},a.prototype.parse_block_sequence_first_entry=function(){var a;return a=this.get_token(),this.marks.push(a.start_mark),this.parse_block_sequence_entry()},a.prototype.parse_block_sequence_entry=function(){var a,b;if(this.check_token(e.BlockEntryToken))return b=this.get_token(),this.check_token(e.BlockEntryToken,e.BlockEndToken)?(this.state="parse_block_sequence_entry",this.process_empty_scalar(b.end_mark)):(this.states.push("parse_block_sequence_entry"),this.parse_block_node());if(!this.check_token(e.BlockEndToken))throw b=this.peek_token(),new c.ParserError("while parsing a block collection",this.marks.slice(-1)[0],"expected , but found "+b.id,b.start_mark);return b=this.get_token(),a=new d.SequenceEndEvent(b.start_mark,b.end_mark),this.state=this.states.pop(),this.marks.pop(),a},a.prototype.parse_indentless_sequence_entry=function(){var a,b;return this.check_token(e.BlockEntryToken)?(b=this.get_token(),this.check_token(e.BlockEntryToken,e.KeyToken,e.ValueToken,e.BlockEndToken)?(this.state="parse_indentless_sequence_entry",this.process_empty_scalar(b.end_mark)):(this.states.push("parse_indentless_sequence_entry"),this.parse_block_node())):(b=this.peek_token(),a=new d.SequenceEndEvent(b.start_mark,b.start_mark),this.state=this.states.pop(),a)},a.prototype.parse_block_mapping_first_key=function(){var a;return a=this.get_token(),this.marks.push(a.start_mark),this.parse_block_mapping_key()},a.prototype.parse_block_mapping_key=function(){var a,b;if(this.check_token(e.KeyToken))return b=this.get_token(),this.check_token(e.KeyToken,e.ValueToken,e.BlockEndToken)?(this.state="parse_block_mapping_value",this.process_empty_scalar(b.end_mark)):(this.states.push("parse_block_mapping_value"),this.parse_block_node_or_indentless_sequence());if(!this.check_token(e.BlockEndToken))throw b=this.peek_token(),new c.ParserError("while parsing a block mapping",this.marks.slice(-1)[0],"expected , but found "+b.id,b.start_mark);return b=this.get_token(),a=new d.MappingEndEvent(b.start_mark,b.end_mark),this.state=this.states.pop(),this.marks.pop(),a},a.prototype.parse_block_mapping_value=function(){var a;return this.check_token(e.ValueToken)?(a=this.get_token(),this.check_token(e.KeyToken,e.ValueToken,e.BlockEndToken)?(this.state="parse_block_mapping_key",this.process_empty_scalar(a.end_mark)):(this.states.push("parse_block_mapping_key"),this.parse_block_node_or_indentless_sequence())):(this.state="parse_block_mapping_key",a=this.peek_token(),this.process_empty_scalar(a.start_mark)) -},a.prototype.parse_flow_sequence_first_entry=function(){var a;return a=this.get_token(),this.marks.push(a.start_mark),this.parse_flow_sequence_entry(!0)},a.prototype.parse_flow_sequence_entry=function(a){var b,f;if(null==a&&(a=!1),!this.check_token(e.FlowSequenceEndToken)){if(!a){if(!this.check_token(e.FlowEntryToken))throw f=this.peek_token(),new c.ParserError("while parsing a flow sequence",this.marks.slice(-1)[0],"expected ',' or ']', but got "+f.id,f.start_mark);this.get_token()}if(this.check_token(e.KeyToken))return f=this.peek_token(),b=new d.MappingStartEvent(null,null,!0,f.start_mark,f.end_mark,!0),this.state="parse_flow_sequence_entry_mapping_key",b;if(!this.check_token(e.FlowSequenceEndToken))return this.states.push("parse_flow_sequence_entry"),this.parse_flow_node()}return f=this.get_token(),b=new d.SequenceEndEvent(f.start_mark,f.end_mark),this.state=this.states.pop(),this.marks.pop(),b},a.prototype.parse_flow_sequence_entry_mapping_key=function(){var a;return a=this.get_token(),this.check_token(e.ValueToken,e.FlowEntryToken,e.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_value",this.process_empty_scalar(a.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_value"),this.parse_flow_node())},a.prototype.parse_flow_sequence_entry_mapping_value=function(){var a;return this.check_token(e.ValueToken)?(a=this.get_token(),this.check_token(e.FlowEntryToken,e.FlowSequenceEndToken)?(this.state="parse_flow_sequence_entry_mapping_end",this.process_empty_scalar(a.end_mark)):(this.states.push("parse_flow_sequence_entry_mapping_end"),this.parse_flow_node())):(this.state="parse_flow_sequence_entry_mapping_end",a=this.peek_token(),this.process_empty_scalar(a.start_mark))},a.prototype.parse_flow_sequence_entry_mapping_end=function(){var a;return this.state="parse_flow_sequence_entry",a=this.peek_token(),new d.MappingEndEvent(a.start_mark,a.start_mark)},a.prototype.parse_flow_mapping_first_key=function(){var a;return a=this.get_token(),this.marks.push(a.start_mark),this.parse_flow_mapping_key(!0)},a.prototype.parse_flow_mapping_key=function(a){var b,f;if(null==a&&(a=!1),!this.check_token(e.FlowMappingEndToken)){if(!a){if(!this.check_token(e.FlowEntryToken))throw f=this.peek_token(),new c.ParserError("while parsing a flow mapping",this.marks.slice(-1)[0],"expected ',' or '}', but got "+f.id,f.start_mark);this.get_token()}if(this.check_token(e.KeyToken))return f=this.get_token(),this.check_token(e.ValueToken,e.FlowEntryToken,e.FlowMappingEndToken)?(this.state="parse_flow_mapping_value",this.process_empty_scalar(f.end_mark)):(this.states.push("parse_flow_mapping_value"),this.parse_flow_node());if(!this.check_token(e.FlowMappingEndToken))return this.states.push("parse_flow_mapping_empty_value"),this.parse_flow_node()}return f=this.get_token(),b=new d.MappingEndEvent(f.start_mark,f.end_mark),this.state=this.states.pop(),this.marks.pop(),b},a.prototype.parse_flow_mapping_value=function(){var a;return this.check_token(e.ValueToken)?(a=this.get_token(),this.check_token(e.FlowEntryToken,e.FlowMappingEndToken)?(this.state="parse_flow_mapping_key",this.process_empty_scalar(a.end_mark)):(this.states.push("parse_flow_mapping_key"),this.parse_flow_node())):(this.state="parse_flow_mapping_key",a=this.peek_token(),this.process_empty_scalar(a.start_mark))},a.prototype.parse_flow_mapping_empty_value=function(){return this.state="parse_flow_mapping_key",this.process_empty_scalar(this.peek_token().start_mark)},a.prototype.process_empty_scalar=function(a){return new d.ScalarEvent(null,null,[!0,!1],"",a,a)},a}()}).call(this)},{"./errors":3,"./events":4,"./tokens":17}],9:[function(a){(function(){var b,c,d,e,f=function(a,b){return function(){return a.apply(b,arguments)}};d=a("url"),b=a("./errors").MarkedYAMLError,c=a("./nodes"),e=a("./util"),this.Protocols=function(){function a(){this.apply_protocols=f(this.apply_protocols,this)}return a.prototype.apply_protocols=function(a){var b;return(b=this.apply_protocols_to_root(a))?this.apply_protocols_to_resources(a,b):void 0},a.prototype.apply_protocols_to_root=function(a){var b,e,f,g;if(this.has_property(a,"protocols"))return this.get_property(a,"protocols");if(b=this.property_value(a,"baseUri"))return e=d.parse(b),f=(e.protocol||"http:").slice(0,-1).toUpperCase(),g=[new c.ScalarNode("tag:yaml.org,2002:str","protocols",a.start_mark,a.end_mark),new c.SequenceNode("tag:yaml.org,2002:seq",[new c.ScalarNode("tag:yaml.org,2002:str",f,a.start_mark,a.end_mark)],a.start_mark,a.end_mark)],a.value.push(g),g[1]},a.prototype.apply_protocols_to_resources=function(a,b){var c,d,e,f,g;for(f=this.child_resources(a),g=[],d=0,e=f.length;e>d;d++)c=f[d],this.apply_protocols_to_resources(c,b),g.push(this.apply_protocols_to_methods(c,b));return g},a.prototype.apply_protocols_to_methods=function(a,b){var d,f,g,h,i;for(h=this.child_methods(a[1]),i=[],f=0,g=h.length;g>f;f++)d=h[f],this.has_property(d[1],"protocols")?i.push(void 0):(e.isMapping(d[1])||(d[1]=new c.MappingNode("tag:yaml.org,2002:map",[],d[1].start_mark,d[1].end_mark)),i.push(d[1].value.push([new c.ScalarNode("tag:yaml.org,2002:str","protocols",d[0].start_mark,d[0].end_mark),b.clone()])));return i},a}()}).call(this)},{"./errors":3,"./nodes":7,"./util":20,url:46}],10:[function(a,b,c){(function(){var b,d,e,f={}.hasOwnProperty,g=function(a,b){function c(){this.constructor=a}for(var d in b)f.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};this.errors=a("./errors"),this.loader=a("./loader"),d=a("./util"),this.FileError=function(a){function b(){return e=b.__super__.constructor.apply(this,arguments)}return g(b,a),b}(this.errors.MarkedYAMLError),this.FileReader=function(){function b(b){this.q=a("q"),this.url=a("url"),b&&(this.readFileAsyncOverride=b)}return b.prototype.readFileAsync=function(a){var b;if(this.readFileAsyncOverride)return this.readFileAsyncOverride(a);if(b=this.url.parse(a),null!=b.protocol){if(b.protocol.match(/^https?/i))return this.fetchFileAsync(a);throw new c.FileError("while reading "+a,null,"unknown protocol "+b.protocol,this.start_mark)}return"undefined"!=typeof window&&null!==window?this.fetchFileAsync(a):this.fetchLocalFileAsync(a)},b.prototype.fetchLocalFileAsync=function(b){var d,e=this;return d=this.q.defer(),a("fs").readFile(b,function(a,f){return a?d.reject(new c.FileError("while reading "+b,null,"cannot read "+b+" ("+a+")",e.start_mark)):d.resolve(f.toString())}),d.promise},b.prototype.fetchFileAsync=function(b){var d,e,f,g=this;d=this.q.defer(),f="undefined"!=typeof window&&null!==window?new XMLHttpRequest:new(a("xmlhttprequest").XMLHttpRequest);try{return f.open("GET",b,!1),f.setRequestHeader("Accept","application/raml+yaml, */*"),f.onreadystatechange=function(){return 4===f.readyState?"number"==typeof f.status&&200===f.status||"string"==typeof f.status&&f.status.match(/^200/i)?d.resolve(f.responseText):d.reject(new c.FileError("while fetching "+b,null,"cannot fetch "+b+" ("+f.statusText+")",g.start_mark)):void 0},f.send(null),d.promise}catch(h){throw e=h,new c.FileError("while fetching "+b,null,"cannot fetch "+b+" ("+e+"), check that the server is up and that CORS is enabled",this.start_mark)}},b}(),this.RamlParser=function(){function e(c){this.settings=null!=c?c:b,this.q=a("q"),this.url=a("url"),this.nodes=a("./nodes"),this.loadDefaultSettings(c)}return e.prototype.loadDefaultSettings=function(a){return Object.keys(b).forEach(function(c){return c in a?void 0:a[c]=b[c]})},e.prototype.loadFile=function(a,b){var d,e=this;null==b&&(b=this.settings);try{return b.reader.readFileAsync(a).then(function(c){return e.load(c,a,b)})}catch(f){return d=f,this.q.fcall(function(){throw new c.FileError("while fetching "+a,null,"cannot fetch "+a+" ("+d+")",null)})}},e.prototype.composeFile=function(a,b,d){var e,f=this;null==b&&(b=this.settings);try{return b.reader.readFileAsync(a).then(function(c){return f.compose(c,a,b,d)})}catch(g){return e=g,this.q.fcall(function(){throw new c.FileError("while fetching "+a,null,"cannot fetch "+a+" ("+e+")",null)})}},e.prototype.compose=function(a,b,c,d){return null==c&&(c=this.settings),null==d&&(d={src:b}),c.compose=!1,this.parseStream(a,b,c,d)},e.prototype.load=function(a,b,c){return null==c&&(c=this.settings),c.compose=!0,this.parseStream(a,b,c,{src:b})},e.prototype.parseStream=function(a,b,d,e){var f,g=this;return null==d&&(d=this.settings),f=new c.loader.Loader(a,b,d,e),this.q.fcall(function(){return f.getYamlRoot()}).then(function(a){var b;return b=f.getPendingFilesList(),g.getPendingFiles(f,a,b)}).then(function(a){return f.composeRamlTree(a,d),d.compose?null!=a?f.construct_document(a):null:a})},e.prototype.getPendingFiles=function(a,b,c){var d,e,f,g,h;for(f=[],e=void 0,g=0,h=c.length;h>g;g++)d=c[g],f.push(this.getPendingFile(a,d).then(function(a){return a&&!e?e=a:void 0}));return this.q.all(f).then(function(){return e?e:b})},e.prototype.getPendingFile=function(a,b){var d,e,f,g,h,i=this;if(h=b.parentNode,e=b.event,g=b.parentKey,f=b.targetFileUri,b.includingContext&&(f=this.url.resolve(b.includingContext,b.targetFileUri)),a.parent&&this.isInIncludeTagsStack(f,a))throw new c.FileError("while composing scalar out of !include",null,"detected circular !include of "+e.value,e.start_mark);try{return"fragment"===b.type?this.settings.reader.readFileAsync(f).then(function(b){return i.compose(b,f,{validate:!1,transform:!1,compose:!0},a)}).then(function(a){return i.appendNewNodeToParent(h,g,a)})["catch"](function(a){return i.addContextToError(a,e)}):this.settings.reader.readFileAsync(f).then(function(a){var b;return b=new i.nodes.ScalarNode("tag:yaml.org,2002:str",a,e.start_mark,e.end_mark,e.style),i.appendNewNodeToParent(h,g,b)})["catch"](function(a){return i.addContextToError(a,e)})}catch(j){return d=j,this.addContextToError(d,e)}},e.prototype.addContextToError=function(a,b){throw"FileError"===a.constructor.name?(a.problem_mark||(a.problem_mark=b.start_mark),a):new c.FileError("while reading file",null,"error: "+a,b.start_mark)},e.prototype.isInIncludeTagsStack=function(a,b){for(;b=b.parent;)if(b.src===a)return!0;return!1},e.prototype.appendNewNodeToParent=function(a,b,c){return a?(d.isSequence(a)?a.value[b]=c:a.value.push([b,c]),null):c},e}(),b={validate:!0,transform:!0,compose:!0,reader:new c.FileReader(null)},this.loadFile=function(a,d){var e;return null==d&&(d=b),e=new c.RamlParser(d),e.loadFile(a,d)},this.composeFile=function(a,d,e){var f;return null==d&&(d=b),null==e&&(e=a),f=new c.RamlParser(d),f.composeFile(a,d,e)},this.compose=function(a,d,e,f){var g;return null==e&&(e=b),null==f&&(f=d),g=new c.RamlParser(e),g.compose(a,d,e,f)},this.load=function(a,d,e){var f;return null==e&&(e=b),f=new c.RamlParser(e),f.load(a,d,e,null)}}).call(this)},{"./errors":3,"./loader":6,"./nodes":7,"./util":20,fs:22,q:51,url:46,xmlhttprequest:53}],11:[function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},i=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};e=a("./errors"),b=e.Mark,d=e.MarkedYAMLError,this.ReaderError=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return h(b,a),b}(d),this.Reader=function(){function a(a,b){this.string=a,this.src=b,this.line=0,this.column=0,this.index=0,this.string+="\x00"}var d;return d=/[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD]/,a.prototype.peek=function(a){return null==a&&(a=0),this.string[this.index+a]},a.prototype.prefix=function(a){return null==a&&(a=1),this.string.slice(this.index,this.index+a)},a.prototype.forward=function(a){var b,c;for(null==a&&(a=1),c=[];a;)b=this.string[this.index],this.index++,i.call("\n…₂\u2029",b)>=0||"\r"===b&&"\n"!==this.string[this.index]?(this.line++,this.column=0):(this.check_printable(b),this.column++),c.push(a--);return c},a.prototype.create_mark=function(a,c){return null==a&&(a=this.line),null==c&&(c=this.column),new b(this.src,a,c,this.string,this.index)},a.prototype.get_mark=function(){return this.create_mark()},a.prototype.check_printable=function(a){if(d.exec(a))throw new c.ReaderError("while reading file",null,"non printable characters are not allowed column: "+this.get_mark().column,this.get_mark())},a}()}).call(this)},{"./errors":3}],12:[function(a){(function(){var b,c,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},i=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};c=a("./nodes"),d=a("./util"),b=a("./errors").YAMLError,this.ResolverError=function(a){function b(){return e=b.__super__.constructor.apply(this,arguments)}return h(b,a),b}(b),this.BaseResolver=function(){function a(){this.resolver_exact_paths=[],this.resolver_prefix_paths=[]}var b,e,f;return e="tag:yaml.org,2002:str",f="tag:yaml.org,2002:seq",b="tag:yaml.org,2002:map",a.prototype.yaml_implicit_resolvers={},a.prototype.yaml_path_resolvers={},a.add_implicit_resolver=function(a,b,c){var e,f,g,h,i;for(null==c&&(c=[null]),this.prototype.hasOwnProperty("yaml_implicit_resolvers")||(this.prototype.yaml_implicit_resolvers=d.extend({},this.prototype.yaml_implicit_resolvers)),i=[],g=0,h=c.length;h>g;g++)e=c[g],i.push((null!=(f=this.prototype.yaml_implicit_resolvers)[e]?(f=this.prototype.yaml_implicit_resolvers)[e]:f[e]=[]).push([a,b]));return i},a.prototype.descend_resolver=function(a,b){var c,e,f,g,h,i,j,k,l,m,n,o,p;if(!d.is_empty(this.yaml_path_resolvers)){if(e={},h=[],a)for(c=this.resolver_prefix_paths.length,m=this.resolver_prefix_paths.slice(-1)[0],i=0,k=m.length;k>i;i++)n=m[i],g=n[0],f=n[1],this.check_resolver_prefix(c,g,f,a,b)&&(g.length>c?h.push([g,f]):e[f]=this.yaml_path_resolvers[g][f]);else for(o=this.yaml_path_resolvers,j=0,l=o.length;l>j;j++)p=o[j],g=p[0],f=p[1],g?h.push([g,f]):e[f]=this.yaml_path_resolvers[g][f];return this.resolver_exact_paths.push(e),this.resolver_prefix_paths.push(h)}},a.prototype.ascend_resolver=function(){return d.is_empty(this.yaml_path_resolvers)?void 0:(this.resolver_exact_paths.pop(),this.resolver_prefix_paths.pop())},a.prototype.check_resolver_prefix=function(a,b,d,e,f){var g,h,i;if(i=b[a-1],h=i[0],g=i[1],"string"==typeof h){if(e.tag!==h)return}else if(null!==h&&!(e instanceof h))return;if((g!==!0||null===f)&&(g!==!1&&null!==g||null!==f)){if("string"==typeof g){if(!(f instanceof c.ScalarNode)&&g===f.value)return}else if("number"==typeof g&&g!==f)return;return!0}},a.prototype.resolve=function(a,d,g){var h,j,k,l,m,n,o,p,q,r,s,t;if(a===c.ScalarNode&&g[0]){for(m=""===d?null!=(q=this.yaml_implicit_resolvers[""])?q:[]:null!=(r=this.yaml_implicit_resolvers[d[0]])?r:[],m=m.concat(null!=(s=this.yaml_implicit_resolvers[null])?s:[]),o=0,p=m.length;p>o;o++)if(t=m[o],n=t[0],l=t[1],d.match(l))return n;g=g[1]}h=!0;for(k in this.yaml_path_resolvers)null=={}[k]&&(h=!1);if(!h){if(j=this.resolver_exact_paths.slice(-1)[0],i.call(j,a)>=0)return j[a];if(i.call(j,null)>=0)return j[null]}return a===c.ScalarNode?e:a===c.SequenceNode?f:a===c.MappingNode?b:void 0},a}(),this.Resolver=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return h(b,a),b}(this.BaseResolver),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:bool",/^(?:true|True|TRUE|false|False|FALSE)$/,"tTfF"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:float",/^(?:[-+]?(?:[0-9][0-9_]*)\.[0-9_]*(?:[eE][-+][0-9]+)?|\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*|[-+]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/,"-+0123456789."),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:int",/^(?:[-+]?0b[01_]+|[-+]?0[0-7_]+|[-+]?(?:0|[1-9][0-9_]*)|[-+]?0x[0-9a-fA-F_]+|[-+]?0o[0-7_]+|[-+]?[1-9][0-9_]*(?::[0-5]?[0-9])+)$/,"-+0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:merge",/^(?:<<)$/,"<"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:null",/^(?:~|null|Null|NULL|)$/,["~","n","N",""]),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:timestamp",/^(?:[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]|[0-9][0-9][0-9][0-9]-[0-9][0-9]?-[0-9][0-9]?(?:[Tt]|[\x20\t]+)[0-9][0-9]?:[0-9][0-9]:[0-9][0-9](?:\.[0-9]*)?(?:[\x20\t]*(?:Z|[-+][0-9][0-9]?(?::[0-9][0-9])?))?)$/,"0123456789"),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:value",/^(?:=)$/,"="),this.Resolver.add_implicit_resolver("tag:yaml.org,2002:yaml",/^(?:!|&|\*)$/,"!&*")}).call(this)},{"./errors":3,"./nodes":7,"./util":20}],13:[function(a,b,c){(function(){var b,d,e,f,g={}.hasOwnProperty,h=function(a,b){function c(){this.constructor=a}for(var d in b)g.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},i=function(a,b){return function(){return a.apply(b,arguments)}};b=a("./errors").MarkedYAMLError,d=a("./nodes"),e=a("./util"),this.ResourceTypeError=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return h(b,a),b}(b),this.ResourceTypes=function(){function a(){this.apply_parameters_to_type=i(this.apply_parameters_to_type,this),this.apply_type=i(this.apply_type,this),this.apply_types=i(this.apply_types,this),this.get_type=i(this.get_type,this),this.has_types=i(this.has_types,this),this.load_types=i(this.load_types,this),this.declaredTypes={}}return a.prototype.load_types=function(a){var b,c=this;return this.load_default_media_type(a),this.has_property(a,"resourceTypes")&&(b=this.property_value(a,"resourceTypes"),b&&"object"==typeof b)?b.forEach(function(a){return a&&"object"==typeof a&&"object"==typeof a.value?a.value.forEach(function(a){return c.declaredTypes[a[0].value]=a}):void 0}):void 0},a.prototype.has_types=function(a){return 0===Object.keys(this.declaredTypes).length&&this.has_property(a,"resourceTypes")&&this.load_types(a),Object.keys(this.declaredTypes).length>0},a.prototype.get_type=function(a){return this.declaredTypes[a]},a.prototype.apply_types=function(a,b){var c,d=this;return null==b&&(b=""),e.isMapping(a)?this.has_types(a)?(c=this.child_resources(a),c.forEach(function(a){var c;return d.apply_default_media_type_to_resource(a[1]),d.has_property(a[1],"type")&&(c=d.get_property(a[1],"type"),d.apply_type(b+a[0].value,a,c)),d.apply_types(a[1],b+a[0].value)})):(c=this.child_resources(a),c.forEach(function(a){return d.apply_default_media_type_to_resource(a[1])})):void 0},a.prototype.apply_type=function(a,b,c){var d;return d=this.resolve_inheritance_chain(a,c),d.combine(b[1]),b[1]=d,b[1].remove_question_mark_properties()},a.prototype.resolve_inheritance_chain=function(a,b){var d,e,f,g,h,i,j,k,l,m,n,o;for(f=this.key_or_value(b),e=this.apply_parameters_to_type(a,f,b),o=[f],h={},h[f]=e,this.apply_default_media_type_to_resource(e),this.apply_traits_to_resource(a,e,!1);this.has_property(e,"type");){if(b=this.get_property(e,"type"),k=this.key_or_value(b),k in h)throw l=o.concat(k).join(" -> "),g=this.get_type(f)[0],new c.ResourceTypeError("while applying resourceTypes",null,'circular reference of "'+k+'" has been detected: '+l,g.start_mark);j=this.apply_parameters_to_type(a,k,b),this.apply_default_media_type_to_resource(j),this.apply_traits_to_resource(a,j,!1),f=k,e=j,h[f]=e,o.push(f)}for(n=o.pop(),d=h[n].cloneForResourceType(),m=d;i=o.pop();)d=h[i].cloneForResourceType(),m.combine(d);return m},a.prototype.apply_parameters_to_type=function(a,b,d){var e,f;if(!(null!=b?b.trim():void 0))throw new c.ResourceTypeError("while applying resource type",null,"resource type name must be provided",d.start_mark);if(!(f=this.get_type(b)))throw new c.ResourceTypeError("while applying resource type",null,"there is no resource type named "+b,d.start_mark);return f=f[1].clone(),e=this._get_parameters_from_type_key(a,d),this.apply_parameters(f,e,d),f},a.prototype._get_parameters_from_type_key=function(a,b){var d,f,g,h,i,j,k;if(h={},g={resourcePath:a.replace(/\/\/*/g,"/"),resourcePathName:this.extractResourcePathName(a)},e.isMapping(b)&&(f=this.value_or_undefined(b),e.isMapping(f[0][1])))for(k=f[0][1].value,i=0,j=k.length;j>i;i++){if(d=k[i],d[0].value in g)throw new c.ResourceTypeError("while applying parameters",null,"invalid parameter name: "+d[0].value+" is reserved",d[0].start_mark);h[d[0].value]=d[1].value}return e.extend(h,g)},a}()}).call(this)},{"./errors":3,"./nodes":7,"./util":20}],14:[function(a,b,c){(function(){var b,d,e,f,g,h={}.hasOwnProperty,i=function(a,b){function c(){this.constructor=a}for(var d in b)h.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},j=[].slice,k=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};b=a("./errors").MarkedYAMLError,e=a("./tokens"),f=a("./util"),this.ScannerError=function(a){function b(){return g=b.__super__.constructor.apply(this,arguments)}return i(b,a),b}(b),d=function(){function a(a,b,c,d,e,f){this.token_number=a,this.required=b,this.index=c,this.line=d,this.column=e,this.mark=f}return a}(),this.Scanner=function(){function a(a){this.settings=a,this.done=!1,this.ramlHeaderFound=!this.settings.validate,this.flow_level=0,this.tokens=[],this.fetch_stream_start(),this.tokens_taken=0,this.indent=-1,this.indents=[],this.allow_simple_key=!0,this.possible_simple_keys={}}var b,g,i,l,m,n,o;return b="\r\n…\u2028\u2029",i=" ",g="0123456789",m={0:"\x00",a:"",b:"\b",t:" "," ":" ",n:"\n",v:" ",f:"\f",r:"\r",e:""," ":" ",'"':'"',"\\":"\\",N:"…",_:" ",L:"\u2028",P:"\u2029"},l={x:2,u:4,U:8},n="#%RAML 0.8",o=/^#%RAML .+$/,a.prototype.check_token=function(){var a,b,c,d;for(b=1<=arguments.length?j.call(arguments,0):[];this.need_more_tokens();)this.fetch_more_tokens();if(0!==this.tokens.length){if(0===b.length)return!0;for(c=0,d=b.length;d>c;c++)if(a=b[c],this.tokens[0]instanceof a)return!0}return!1},a.prototype.peek_token=function(){for(;this.need_more_tokens();)this.fetch_more_tokens();return 0!==this.tokens.length?this.tokens[0]:void 0},a.prototype.get_token=function(){for(;this.need_more_tokens();)this.fetch_more_tokens();return 0!==this.tokens.length?(this.tokens_taken++,this.tokens.shift()):void 0},a.prototype.need_more_tokens=function(){return this.done?!1:0===this.tokens.length?!0:(this.stale_possible_simple_keys(),this.next_possible_simple_key()===this.tokens_taken?!0:!1)},a.prototype.fetch_more_tokens=function(){var a;if(this.scan_to_next_token(),this.stale_possible_simple_keys(),this.unwind_indent(this.column),a=this.peek(),"\x00"===a)return this.fetch_stream_end();if("%"===a&&this.check_directive())return this.fetch_directive();if("-"===a&&this.check_document_start())return this.fetch_document_start();if("."===a&&this.check_document_end())return this.fetch_document_end();if("["===a)return this.fetch_flow_sequence_start();if("{"===a)return this.fetch_flow_mapping_start();if("]"===a)return this.fetch_flow_sequence_end();if("}"===a)return this.fetch_flow_mapping_end();if(","===a)return this.fetch_flow_entry();if("-"===a&&this.check_block_entry())return this.fetch_block_entry();if("?"===a&&this.check_key())return this.fetch_key();if(":"===a&&this.check_value())return this.fetch_value();if("*"===a)return this.fetch_alias();if("&"===a)return this.fetch_anchor();if("!"===a)return this.fetch_tag();if("|"===a&&0===this.flow_level)return this.fetch_literal();if(">"===a&&0===this.flow_level)return this.fetch_folded();if("'"===a)return this.fetch_single();if('"'===a)return this.fetch_double();if(this.check_plain())return this.fetch_plain();throw new c.ScannerError("while scanning for the next token",null,"found character "+a+" that cannot start any token",this.get_mark())},a.prototype.next_possible_simple_key=function(){var a,b,c,d;c=null,d=this.possible_simple_keys;for(b in d)h.call(d,b)&&(a=d[b],(null===c||a.token_numbera;)b=this.get_mark(),this.indent=this.indents.pop(),c.push(this.tokens.push(new e.BlockEndToken(b,b)));return c}},a.prototype.add_indent=function(a){return a>this.indent?(this.indents.push(this.indent),this.indent=a,!0):!1},a.prototype.fetch_stream_start=function(){var a;return a=this.get_mark(),this.tokens.push(new e.StreamStartToken(a,a,this.encoding))},a.prototype.fetch_stream_end=function(){var a;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_possible_simple_key=!1,this.possible_simple_keys={},a=this.get_mark(),this.tokens.push(new e.StreamEndToken(a,a)),this.done=!0},a.prototype.fetch_directive=function(){return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_directive())},a.prototype.fetch_document_start=function(){return this.fetch_document_indicator(e.DocumentStartToken)},a.prototype.fetch_document_end=function(){return this.fetch_document_indicator(e.DocumentEndToken)},a.prototype.fetch_document_indicator=function(a){var b;return this.unwind_indent(-1),this.remove_possible_simple_key(),this.allow_simple_key=!1,b=this.get_mark(),this.forward(3),this.tokens.push(new a(b,this.get_mark()))},a.prototype.fetch_flow_sequence_start=function(){return this.fetch_flow_collection_start(e.FlowSequenceStartToken)},a.prototype.fetch_flow_mapping_start=function(){return this.fetch_flow_collection_start(e.FlowMappingStartToken)},a.prototype.fetch_flow_collection_start=function(a){var b;return this.save_possible_simple_key(),this.flow_level++,this.allow_simple_key=!0,b=this.get_mark(),this.forward(),this.tokens.push(new a(b,this.get_mark()))},a.prototype.fetch_flow_sequence_end=function(){return this.fetch_flow_collection_end(e.FlowSequenceEndToken)},a.prototype.fetch_flow_mapping_end=function(){return this.fetch_flow_collection_end(e.FlowMappingEndToken)},a.prototype.fetch_flow_collection_end=function(a){var b;return this.remove_possible_simple_key(),this.flow_level--,this.allow_simple_key=!1,b=this.get_mark(),this.forward(),this.tokens.push(new a(b,this.get_mark()))},a.prototype.fetch_flow_entry=function(){var a;return this.allow_simple_key=!0,this.remove_possible_simple_key(),a=this.get_mark(),this.forward(),this.tokens.push(new e.FlowEntryToken(a,this.get_mark()))},a.prototype.fetch_block_entry=function(){var a,b;if(0===this.flow_level){if(!this.allow_simple_key)throw new c.ScannerError(null,null,"sequence entries are not allowed here",this.get_mark());this.add_indent(this.column)&&(a=this.get_mark(),this.tokens.push(new e.BlockSequenceStartToken(a,a)))}return this.allow_simple_key=!0,this.remove_possible_simple_key(),b=this.get_mark(),this.forward(),this.tokens.push(new e.BlockEntryToken(b,this.get_mark()))},a.prototype.fetch_key=function(){var a,b;if(0===this.flow_level){if(!this.allow_simple_key)throw new c.ScannerError(null,null,"mapping keys are not allowed here",this.get_mark());this.add_indent(this.column)&&(a=this.get_mark(),this.tokens.push(new e.BlockMappingStartToken(a,a)))}return this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key(),b=this.get_mark(),this.forward(),this.tokens.push(new e.KeyToken(b,this.get_mark()))},a.prototype.fetch_value=function(){var a,b,d;if(a=this.possible_simple_keys[this.flow_level])delete this.possible_simple_keys[this.flow_level],this.tokens.splice(a.token_number-this.tokens_taken,0,new e.KeyToken(a.mark,a.mark)),0===this.flow_level&&this.add_indent(a.column)&&this.tokens.splice(a.token_number-this.tokens_taken,0,new e.BlockMappingStartToken(a.mark,a.mark)),this.allow_simple_key=!1;else{if(0===this.flow_level){if(!this.allow_simple_key)throw new c.ScannerError(null,null,"mapping values are not allowed here",this.get_mark());this.add_indent(this.column)&&(b=this.get_mark(),this.tokens.push(new e.BlockMappingStartToken(b,b)))}this.allow_simple_key=!this.flow_level,this.remove_possible_simple_key()}return d=this.get_mark(),this.forward(),this.tokens.push(new e.ValueToken(d,this.get_mark()))},a.prototype.fetch_alias=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(e.AliasToken))},a.prototype.fetch_anchor=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_anchor(e.AnchorToken))},a.prototype.fetch_tag=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_tag())},a.prototype.fetch_literal=function(){return this.fetch_block_scalar("|")},a.prototype.fetch_folded=function(){return this.fetch_block_scalar(">")},a.prototype.fetch_block_scalar=function(a){return this.allow_simple_key=!0,this.remove_possible_simple_key(),this.tokens.push(this.scan_block_scalar(a))},a.prototype.fetch_single=function(){return this.fetch_flow_scalar("'")},a.prototype.fetch_double=function(){return this.fetch_flow_scalar('"')},a.prototype.fetch_flow_scalar=function(a){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_flow_scalar(a))},a.prototype.fetch_plain=function(){return this.save_possible_simple_key(),this.allow_simple_key=!1,this.tokens.push(this.scan_plain())},a.prototype.check_directive=function(){return 0===this.column?!0:!1},a.prototype.check_document_start=function(){var a;return 0===this.column&&"---"===this.prefix(3)&&(a=this.peek(3),k.call(b+i+"\x00",a)>=0)?!0:!1},a.prototype.check_document_end=function(){var a;return 0===this.column&&"..."===this.prefix(3)&&(a=this.peek(3),k.call(b+i+"\x00",a)>=0)?!0:!1},a.prototype.check_block_entry=function(){var a;return a=this.peek(1),k.call(b+i+"\x00",a)>=0},a.prototype.check_key=function(){var a;return 0!==this.flow_level?!0:(a=this.peek(1),k.call(b+i+"\x00",a)>=0)},a.prototype.check_value=function(){var a;return 0!==this.flow_level?!0:(a=this.peek(1),k.call(b+i+"\x00",a)>=0)},a.prototype.check_plain=function(){var a,c;return a=this.peek(),k.call(b+i+"\x00-?:,[]{}#&*!|>'\"%@`",a)<0||(c=this.peek(1),k.call(b+i+"\x00",c)<0&&("-"===a||0===this.flow_level&&k.call("?:",a)>=0))},a.prototype.scan_to_next_token=function(){var a,d,e,f,g;for(0===this.index&&""===this.peek()&&this.forward(),d=!1,g=[];!d;){for(;" "===this.peek();)this.forward();if(a="","#"===this.peek())for(;f=this.peek(),k.call(b+"\x00",f)<0;)this.ramlHeaderFound||(a+=this.peek()),this.forward();if(!this.ramlHeaderFound){if(e=a.trim(),!e||!o.test(e))throw new c.ScannerError("version validation",null,"The first line must be: '"+n+"'",this.create_mark(0,0));if(e!==n)throw new c.ScannerError("version validation",null,"Unsupported RAML version: '"+a+"'",this.create_mark(0,0));this.ramlHeaderFound=!0}g.push(this.scan_line_break()?0===this.flow_level?this.allow_simple_key=!0:void 0:d=!0)}return g},a.prototype.scan_directive=function(){var a,c,d,f,g;if(d=this.get_mark(),this.forward(),c=this.scan_directive_name(d),f=null,"YAML"===c)f=this.scan_yaml_directive_value(d),a=this.get_mark();else if("TAG"===c)f=this.scan_tag_directive_value(d),a=this.get_mark();else for(a=this.get_mark();g=this.peek(),k.call(b+"\x00",g)<0;)this.forward(); -return this.scan_directive_ignored_line(d),new e.DirectiveToken(c,f,d,a)},a.prototype.scan_directive_name=function(a){var d,e,f;for(e=0,d=this.peek(e);d>="0"&&"9">=d||d>="A"&&"Z">=d||d>="a"&&"z">=d||k.call("-_",d)>=0;)e++,d=this.peek(e);if(0===e)throw new c.ScannerError("while scanning a directive",a,"expected alphanumeric or numeric character but found "+d,this.get_mark());if(f=this.prefix(e),this.forward(e),d=this.peek(),k.call(b+"\x00 ",d)<0)throw new c.ScannerError("while scanning a directive",a,"expected alphanumeric or numeric character but found "+d,this.get_mark());return f},a.prototype.scan_yaml_directive_value=function(a){for(var d,e,f;" "===this.peek();)this.forward();if(d=this.scan_yaml_directive_number(a),"."!==this.peek())throw new c.ScannerError("while scanning a directive",a,"expected a digit or '.' but found "+this.peek(),this.get_mark());if(this.forward(),e=this.scan_yaml_directive_number(a),f=this.peek(),k.call(b+"\x00 ",f)<0)throw new c.ScannerError("while scanning a directive",a,"expected a digit or ' ' but found "+this.peek(),this.get_mark());return[d,e]},a.prototype.scan_yaml_directive_number=function(a){var b,d,e,f;if(b=this.peek(),!(b>="0"&&"9">=b))throw new c.ScannerError("while scanning a directive",a,"expected a digit but found "+b,this.get_mark());for(d=0;"0"<=(f=this.peek(d))&&"9">=f;)d++;return e=parseInt(this.prefix(d)),this.forward(d),e},a.prototype.scan_tag_directive_value=function(a){for(var b,c;" "===this.peek();)this.forward();for(b=this.scan_tag_directive_handle(a);" "===this.peek();)this.forward();return c=this.scan_tag_directive_prefix(a),[b,c]},a.prototype.scan_tag_directive_handle=function(a){var b,d;if(d=this.scan_tag_handle("directive",a),b=this.peek()," "!==b)throw new c.ScannerError("while scanning a directive",a,"expected ' ' but found "+b,this.get_mark());return d},a.prototype.scan_tag_directive_prefix=function(a){var d,e;if(e=this.scan_tag_uri("directive",a),d=this.peek(),k.call(b+"\x00 ",d)<0)throw new c.ScannerError("while scanning a directive",a,"expected ' ' but found "+d,this.get_mark());return e},a.prototype.scan_directive_ignored_line=function(a){for(var d,e;" "===this.peek();)this.forward();if("#"===this.peek())for(;e=this.peek(),k.call(b+"\x00",e)<0;)this.forward();if(d=this.peek(),k.call(b+"\x00",d)<0)throw new c.ScannerError("while scanning a directive",a,"expected a comment or a line break but found "+d,this.get_mark());return this.scan_line_break()},a.prototype.scan_anchor=function(a){var d,e,f,g,h,j;for(h=this.get_mark(),e=this.peek(),g="*"===e?"alias":"anchor",this.forward(),f=0,d=this.peek(f);d>="0"&&"9">=d||d>="A"&&"Z">=d||d>="a"&&"z">=d||k.call("-_",d)>=0;)f++,d=this.peek(f);if(0===f)throw new c.ScannerError("while scanning an "+g,h,"expected alphabetic or numeric character but found '"+d+"'",this.get_mark());if(j=this.prefix(f),this.forward(f),d=this.peek(),k.call(b+i+"\x00?:,]}%@`",d)<0)throw new c.ScannerError("while scanning an "+g,h,"expected alphabetic or numeric character but found '"+d+"'",this.get_mark());return new a(j,h,this.get_mark())},a.prototype.scan_tag=function(){var a,d,f,g,h,j;if(g=this.get_mark(),a=this.peek(1),"<"===a){if(d=null,this.forward(2),h=this.scan_tag_uri("tag",g),">"!==this.peek())throw new c.ScannerError("while parsing a tag",g,"expected '>' but found "+this.peek(),this.get_mark());this.forward()}else if(k.call(b+i+"\x00",a)>=0)d=null,h="!",this.forward();else{for(f=1,j=!1;k.call(b+"\x00 ",a)<0;){if("!"===a){j=!0;break}f++,a=this.peek(f)}j?d=this.scan_tag_handle("tag",g):(d="!",this.forward()),h=this.scan_tag_uri("tag",g)}if(a=this.peek(),k.call(b+"\x00 ",a)<0)throw new c.ScannerError("while scanning a tag",g,"expected ' ' but found "+a,this.get_mark());return new e.TagToken([d,h],g,this.get_mark())},a.prototype.scan_block_scalar=function(a){var c,d,g,h,i,j,l,m,n,o,p,q,r,s,t,u,v,w,x,y;for(i=">"===a,g=[],r=this.get_mark(),this.forward(),s=this.scan_block_scalar_indicators(r),d=s[0],j=s[1],this.scan_block_scalar_ignored_line(r),q=this.indent+1,1>q&&(q=1),null==j?(t=this.scan_block_scalar_indentation(),c=t[0],p=t[1],h=t[2],l=Math.max(q,p)):(l=q+j-1,u=this.scan_block_scalar_breaks(l),c=u[0],h=u[1]),o="";this.column===l&&"\x00"!==this.peek();){for(g=g.concat(c),v=this.peek(),m=k.call(" ",v)<0,n=0;w=this.peek(n),k.call(b+"\x00",w)<0;)n++;if(g.push(this.prefix(n)),this.forward(n),o=this.scan_line_break(),x=this.scan_block_scalar_breaks(l),c=x[0],h=x[1],this.column!==l||"\x00"===this.peek())break;i&&"\n"===o&&m&&(y=this.peek(),k.call(" ",y)<0)?f.is_empty(c)&&g.push(" "):g.push(o)}return d!==!1&&g.push(o),d===!0&&(g=g.concat(c)),new e.ScalarToken(g.join(""),!1,r,h,a)},a.prototype.scan_block_scalar_indicators=function(a){var d,e,f;if(e=null,f=null,d=this.peek(),k.call("+-",d)>=0){if(e="+"===d,this.forward(),d=this.peek(),k.call(g,d)>=0){if(f=parseInt(d),0===f)throw new c.ScannerError("while scanning a block scalar",a,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward()}}else if(k.call(g,d)>=0){if(f=parseInt(d),0===f)throw new c.ScannerError("while scanning a block scalar",a,"expected indentation indicator in the range 1-9 but found 0",this.get_mark());this.forward(),d=this.peek(),k.call("+-",d)>=0&&(e="+"===d,this.forward())}if(d=this.peek(),k.call(b+"\x00 ",d)<0)throw new c.ScannerError("while scanning a block scalar",a,"expected chomping or indentation indicators, but found "+d,this.get_mark());return[e,f]},a.prototype.scan_block_scalar_ignored_line=function(a){for(var d,e;" "===this.peek();)this.forward();if("#"===this.peek())for(;e=this.peek(),k.call(b+"\x00",e)<0;)this.forward();if(d=this.peek(),k.call(b+"\x00",d)<0)throw new c.ScannerError("while scanning a block scalar",a,"expected a comment or a line break but found "+d,this.get_mark());return this.scan_line_break()},a.prototype.scan_block_scalar_indentation=function(){var a,c,d,e;for(a=[],d=0,c=this.get_mark();e=this.peek(),k.call(b+" ",e)>=0;)" "!==this.peek()?(a.push(this.scan_line_break()),c=this.get_mark()):(this.forward(),this.column>d&&(d=this.column));return[a,d,c]},a.prototype.scan_block_scalar_breaks=function(a){var c,d,e;for(c=[],d=this.get_mark();this.column=0;)for(c.push(this.scan_line_break()),d=this.get_mark();this.column=0)f.push(e),this.forward();else{if(!a||"\\"!==e)return f;if(this.forward(),e=this.peek(),e in m)f.push(m[e]),this.forward();else if(e in l){for(n=l[e],this.forward(),j=o=0;n>=0?n>o:o>n;j=n>=0?++o:--o)if(q=this.peek(j),k.call(g+"ABCDEFabcdef",q)<0)throw new c.ScannerError("while scanning a double-quoted scalar",d,"expected escape sequence of "+n+" hexadecimal numbers, but found "+this.peek(j),this.get_mark());h=parseInt(this.prefix(n),16),f.push(String.fromCharCode(h)),this.forward(n)}else{if(!(k.call(b,e)>=0))throw new c.ScannerError("while scanning a double-quoted scalar",d,"found unknown escape character "+e,this.get_mark());this.scan_line_break(),f=f.concat(this.scan_flow_scalar_breaks(a,d))}}else f.push("'"),this.forward(2)}},a.prototype.scan_flow_scalar_spaces=function(a,d){var e,f,g,h,j,l,m;for(g=[],h=0;m=this.peek(h),k.call(i,m)>=0;)h++;if(l=this.prefix(h),this.forward(h),f=this.peek(),"\x00"===f)throw new c.ScannerError("while scanning a quoted scalar",d,"found unexpected end of stream",this.get_mark());return k.call(b,f)>=0?(j=this.scan_line_break(),e=this.scan_flow_scalar_breaks(a,d),"\n"!==j?g.push(j):e||g.push(" "),g=g.concat(e)):g.push(l),g},a.prototype.scan_flow_scalar_breaks=function(a,d){var e,f,g,h,j;for(e=[];;){if(f=this.prefix(3),"---"===f||"..."===f&&(g=this.peek(3),k.call(b+i+"\x00",g)>=0))throw new c.ScannerError("while scanning a quoted scalar",d,"found unexpected document separator",this.get_mark());for(;h=this.peek(),k.call(i,h)>=0;)this.forward();if(j=this.peek(),!(k.call(b,j)>=0))return e;e.push(this.scan_line_break())}},a.prototype.scan_plain=function(){var a,d,f,g,h,j,l,m,n;for(d=[],l=f=this.get_mark(),g=this.indent+1,j=[];;){if(h=0,"#"===this.peek())break;for(;;){if(a=this.peek(h),k.call(b+i+"\x00",a)>=0||0===this.flow_level&&":"===a&&(m=this.peek(h+1),k.call(b+i+"\x00",m)>=0)||0!==this.flow_level&&k.call(",:?[]{}",a)>=0)break;h++}if(0!==this.flow_level&&":"===a&&(n=this.peek(h+1),k.call(b+i+"\x00,[]{}",n)<0))throw this.forward(h),new c.ScannerError("while scanning a plain scalar",l,"found unexpected ':'",this.get_mark(),"Please check http://pyyaml.org/wiki/YAMLColonInFlowContext");if(0===h)break;if(this.allow_simple_key=!1,d=d.concat(j),d.push(this.prefix(h)),this.forward(h),f=this.get_mark(),j=this.scan_plain_spaces(g,l),null==j||0===j.length||"#"===this.peek()||0===this.flow_level&&this.column=0;)e++;if(h=this.prefix(e),this.forward(e),c=this.peek(),k.call(b,c)>=0){if(f=this.scan_line_break(),this.allow_simple_key=!0,g=this.prefix(3),"---"===g||"..."===g&&this.peek(k.call(b+i+"\x00",3)>=0))return;for(a=[];l=this.peek(),k.call(b+" ",l)>=0;)if(" "===this.peek())this.forward();else if(a.push(this.scan_line_break()),g=this.prefix(3),"---"===g||"..."===g&&this.peek(k.call(b+i+"\x00",3)>=0))return;"\n"!==f?d.push(f):0===a.length&&d.push(" "),d=d.concat(a)}else h&&d.push(h);return d},a.prototype.scan_tag_handle=function(a,b){var d,e,f;if(d=this.peek(),"!"!==d)throw new c.ScannerError("while scanning a "+a,b,"expected '!' but found "+d,this.get_mark());if(e=1,d=this.peek(e)," "!==d){for(;d>="0"&&"9">=d||d>="A"&&"Z">=d||d>="a"&&"z">=d||k.call("-_",d)>=0;)e++,d=this.peek(e);if("!"!==d)throw this.forward(e),new c.ScannerError("while scanning a "+a,b,"expected '!' but found "+d,this.get_mark());e++}return f=this.prefix(e),this.forward(e),f},a.prototype.scan_tag_uri=function(a,b){var d,e,f;for(e=[],f=0,d=this.peek(f);d>="0"&&"9">=d||d>="A"&&"Z">=d||d>="a"&&"z">=d||k.call("-;/?:@&=+$,_.!~*'()[]%",d)>=0;)"%"===d?(e.push(this.prefix(f)),this.forward(f),f=0,e.push(this.scan_uri_escapes(a,b))):f++,d=this.peek(f);if(0!==f&&(e.push(this.prefix(f)),this.forward(f),f=0),0===e.length)throw new c.ScannerError("while parsing a "+a,b,"expected URI but found "+d,this.get_mark());return e.join("")},a.prototype.scan_uri_escapes=function(a,b){var d,e,f,g;for(d=[],f=this.get_mark();"%"===this.peek();){for(this.forward(),e=g=0;2>=g;e=++g)throw new c.ScannerError("while scanning a "+a,b,"expected URI escape sequence of 2 hexadecimal numbers but found "+this.peek(e),this.get_mark());d.push(String.fromCharCode(parseInt(this.prefix(2),16))),this.forward(2)}return d.join("")},a.prototype.scan_line_break=function(){var a;return a=this.peek(),k.call("\r\n…",a)>=0?("\r\n"===this.prefix(2)?this.forward(2):this.forward(),"\n"):k.call("\u2028\u2029",a)>=0?(this.forward(),a):""},a}()}).call(this)},{"./errors":3,"./tokens":17,"./util":20}],15:[function(a){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g=function(a,b){return function(){return a.apply(b,arguments)}};b=a("./errors").MarkedYAMLError,c=a("./nodes"),this.SchemaError=function(a){function b(){return d=b.__super__.constructor.apply(this,arguments)}return f(b,a),b}(b),this.Schemas=function(){function a(){this.get_schemas_used=g(this.get_schemas_used,this),this.apply_schemas=g(this.apply_schemas,this),this.get_all_schemas=g(this.get_all_schemas,this),this.has_schemas=g(this.has_schemas,this),this.load_schemas=g(this.load_schemas,this),this.declaredSchemas={}}return a.prototype.load_schemas=function(a){var b,c=this;return this.has_property(a,"schemas")&&(b=this.property_value(a,"schemas"),b&&"object"==typeof b)?b.forEach(function(a){return a&&"object"==typeof a&&"object"==typeof a.value?a.value.forEach(function(a){return c.declaredSchemas[a[0].value]=a}):void 0}):void 0},a.prototype.has_schemas=function(a){return 0===this.declaredSchemas.length&&this.has_property(a,"schemas")&&this.load_schemas(a),Object.keys(this.declaredSchemas).length>0},a.prototype.get_all_schemas=function(){return this.declaredSchemas},a.prototype.apply_schemas=function(a){var b,c,d=this;return b=this.child_resources(a),c=this.get_schemas_used(b),c.forEach(function(a){return a[1].value in d.declaredSchemas?a[1].value=d.declaredSchemas[a[1].value][1].value:void 0})},a.prototype.get_schemas_used=function(a){var b,c=this;return b=[],a.forEach(function(a){var d;return d=c.get_properties(a[1],"schema"),b=b.concat(d)}),b},a}()}).call(this)},{"./errors":3,"./nodes":7}],16:[function(a){(function(){var b,c,d,e={}.hasOwnProperty,f=function(a,b){function c(){this.constructor=a}for(var d in b)e.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},g=function(a,b){return function(){return a.apply(b,arguments)}};b=a("./errors").MarkedYAMLError,c=a("./nodes"),this.SecuritySchemeError=function(a){function b(){return d=b.__super__.constructor.apply(this,arguments)}return f(b,a),b}(b),this.SecuritySchemes=function(){function a(){this.get_security_scheme=g(this.get_security_scheme,this),this.get_all_schemes=g(this.get_all_schemes,this),this.load_security_schemes=g(this.load_security_schemes,this),this.declaredSchemes={}}return a.prototype.load_security_schemes=function(a){var b,c=this;return this.has_property(a,"securitySchemes")&&(b=this.property_value(a,"securitySchemes"),b&&"object"==typeof b)?b.forEach(function(a){return"tag:yaml.org,2002:map"===a.tag?a.value.forEach(function(a){return c.declaredSchemes[a[0].value]=a[1].value}):void 0}):void 0},a.prototype.get_all_schemes=function(){return this.declaredSchemes},a.prototype.get_security_scheme=function(a){return this.declaredSchemes[a]},a}()}).call(this)},{"./errors":3,"./nodes":7}],17:[function(){(function(){var a,b,c,d,e,f,g,h,i,j,k,l,m,n,o={}.hasOwnProperty,p=function(a,b){function c(){this.constructor=a}for(var d in b)o.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};this.Token=function(){function a(a,b){this.start_mark=a,this.end_mark=b}return a}(),this.DirectiveToken=function(a){function b(a,b,c,d){this.name=a,this.value=b,this.start_mark=c,this.end_mark=d}return p(b,a),b.prototype.id="",b}(this.Token),this.DocumentStartToken=function(b){function c(){return a=c.__super__.constructor.apply(this,arguments)}return p(c,b),c.prototype.id="",c}(this.Token),this.DocumentEndToken=function(a){function c(){return b=c.__super__.constructor.apply(this,arguments)}return p(c,a),c.prototype.id="",c}(this.Token),this.StreamStartToken=function(a){function b(a,b,c){this.start_mark=a,this.end_mark=b,this.encoding=c}return p(b,a),b.prototype.id="",b}(this.Token),this.StreamEndToken=function(a){function b(){return g=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="",b}(this.Token),this.BlockSequenceStartToken=function(a){function b(){return h=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="",b}(this.Token),this.BlockMappingStartToken=function(a){function b(){return i=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="",b}(this.Token),this.BlockEndToken=function(a){function b(){return j=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="",b}(this.Token),this.FlowSequenceStartToken=function(a){function b(){return k=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="[",b}(this.Token),this.FlowMappingStartToken=function(a){function b(){return l=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="{",b}(this.Token),this.FlowSequenceEndToken=function(a){function b(){return m=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="]",b}(this.Token),this.FlowMappingEndToken=function(a){function b(){return n=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="}",b}(this.Token),this.KeyToken=function(a){function b(){return c=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="?",b}(this.Token),this.ValueToken=function(a){function b(){return d=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id=":",b}(this.Token),this.BlockEntryToken=function(a){function b(){return e=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id="-",b}(this.Token),this.FlowEntryToken=function(a){function b(){return f=b.__super__.constructor.apply(this,arguments)}return p(b,a),b.prototype.id=",",b}(this.Token),this.AliasToken=function(a){function b(a,b,c){this.value=a,this.start_mark=b,this.end_mark=c}return p(b,a),b.prototype.id="",b}(this.Token),this.AnchorToken=function(a){function b(a,b,c){this.value=a,this.start_mark=b,this.end_mark=c}return p(b,a),b.prototype.id="",b}(this.Token),this.TagToken=function(a){function b(a,b,c){this.value=a,this.start_mark=b,this.end_mark=c}return p(b,a),b.prototype.id="",b}(this.Token),this.ScalarToken=function(a){function b(a,b,c,d,e){this.value=a,this.plain=b,this.start_mark=c,this.end_mark=d,this.style=e}return p(b,a),b.prototype.id="",b}(this.Token)}).call(this)},{}],18:[function(a,b,c){(function(){var b,d,e,f,g,h,i={}.hasOwnProperty,j=function(a,b){function c(){this.constructor=a}for(var d in b)i.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a};b=a("./errors").MarkedYAMLError,e=a("./nodes"),d=a("inflection"),f=a("./util"),this.TraitError=function(a){function b(){return g=b.__super__.constructor.apply(this,arguments)}return j(b,a),b}(b),this.ParameterError=function(a){function b(){return h=b.__super__.constructor.apply(this,arguments)}return j(b,a),b}(b),this.Traits=function(){function a(){this.declaredTraits={}}return a.prototype.load_traits=function(a){var b,c=this;return this.has_property(a,"traits")&&(b=this.property_value(a,"traits"),b&&"object"==typeof b)?b.forEach(function(a){return a&&"object"==typeof a&&"object"==typeof a.value?a.value.forEach(function(a){return c.declaredTraits[a[0].value]=a}):void 0}):void 0},a.prototype.has_traits=function(a){return 0===this.declaredTraits.length&&this.has_property(a,"traits")&&this.load_traits(a),Object.keys(this.declaredTraits).length>0},a.prototype.get_trait=function(a){return a in this.declaredTraits?this.declaredTraits[a][1]:null},a.prototype.apply_traits=function(a,b,c){var d,e=this;return null==b&&(b=""),null==c&&(c=!0),f.isMapping(a)&&this.has_traits(a)?(d=this.child_resources(a),d.forEach(function(a){return e.apply_traits_to_resource(b+a[0].value,a[1],c)})):void 0},a.prototype.apply_traits_to_resource=function(a,b,c){var d,e,g=this;if(f.isMapping(b))return d=this.child_methods(b),this.has_property(b,"is")&&(e=this.property_value(b,"is"),e.forEach(function(b){return d.forEach(function(c){return g.apply_trait(a,c,b)})})),d.forEach(function(b){return g.has_property(b[1],"is")?(e=g.property_value(b[1],"is"),e.forEach(function(c){return g.apply_trait(a,b,c)})):void 0}),c&&b.remove_question_mark_properties(),this.apply_traits(b,a,c)},a.prototype.apply_trait=function(a,b,d){var e,f,g,h;if(h=this.key_or_value(d),!(null!=h?h.trim():void 0))throw new c.TraitError("while applying trait",null,"trait name must be provided",d.start_mark);if(!(g=this.get_trait(h)))throw new c.TraitError("while applying trait",null,"there is no trait named "+h,d.start_mark);return e=this.get_parameters_from_is_key(a,b[0].value,d),f=g.cloneForTrait(),this.apply_parameters(f,e,d),this.apply_default_media_type_to_method(f),f.combine(b[1]),b[1]=f},a.prototype.apply_parameters=function(a,b,d){var e,f,g;this._apply_parameters(a,b,d,f={resourcePath:!0,resourcePathName:!0,methodName:!0}),g=[];for(e in b){if(!f[e])throw new c.ParameterError("while applying parameters",null,"unused parameter: "+e,d.start_mark);g.push(void 0)}return g},a.prototype._apply_parameters=function(a,b,e,g){var h,i=this;if(a)return f.isString(a)?void((h=a.value.match(/<<\s*([^\|\s>]+)\s*(\|.*)?\s*>>/g))&&h.forEach(function(f){var h,i,j,k,l;if(i=null!=f&&null!=(k=f.trim())?k.replace(/[<>]+/g,"").trim():void 0,l=i.split(/\s*\|\s*/),i=l[0],h=l[1],!(i in b))throw new c.ParameterError("while applying parameters",null,"value was not provided for parameter: "+i,e.start_mark);if(j=b[i],g[i]=!0,h)if(h.match(/!\s*singularize/))j=d.singularize(j);else{if(!h.match(/!\s*pluralize/))throw new c.ParameterError("while validating parameter",null,"unknown function applied to parameter",a.start_mark);j=d.pluralize(j)}return a.value=a.value.replace(f,j)})):f.isSequence(a)?void a.value.forEach(function(a){return i._apply_parameters(a,b,e,g)}):void(f.isMapping(a)&&a.value.forEach(function(a){return i._apply_parameters(a[0],b,e,g),i._apply_parameters(a[1],b,e,g)}))},a.prototype.get_parameters_from_is_key=function(a,b,d){var e,g,h,i,j,k,l;if(i={},h={methodName:b,resourcePath:a.replace(/\/\/*/g,"/"),resourcePathName:this.extractResourcePathName(a)},f.isMapping(d)&&(g=this.value_or_undefined(d),f.isMapping(g[0][1])))for(l=g[0][1].value,j=0,k=l.length;k>j;j++){if(e=l[j],e[0].value in h)throw new c.TraitError("while applying parameters",null,"invalid parameter name: "+e[0].value+" is reserved",e[0].start_mark);i[e[0].value]=e[1].value}return f.extend(i,h)},a.prototype.extractResourcePathName=function(a){var b,c;for(b=a.split(/\//);c=b.pop();)if(!("undefined"!=typeof c&&null!==c?c.match(/[{}]/):void 0))return c;return""},a}()}).call(this)},{"./errors":3,"./nodes":7,"./util":20,inflection:49}],19:[function(a){(function(){var b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}};c=a("uritemplate"),b=a("./nodes"),d=a("./util"),this.Transformations=function(){function a(a){this.settings=a,this.isContentTypeString=e(this.isContentTypeString,this),this.add_key_value_to_node=e(this.add_key_value_to_node,this),this.apply_default_media_type_to_resource=e(this.apply_default_media_type_to_resource,this),this.get_media_type=e(this.get_media_type,this),this.load_default_media_type=e(this.load_default_media_type,this),this.applyAstTransformations=e(this.applyAstTransformations,this),this.applyTransformations=e(this.applyTransformations,this),this.declaredSchemas={}}return a.prototype.applyTransformations=function(a){var b;return this.settings.transform?(this.applyTransformationsToRoot(a),b=a.resources,this.applyTransformationsToResources(a,b)):void 0},a.prototype.applyAstTransformations=function(a){return this.settings.transform?this.transform_document(a):void 0},a.prototype.load_default_media_type=function(a){return d.isMapping(a||(null!=a?a.value:void 0))?this.mediaType=this.property_value(a,"mediaType"):void 0},a.prototype.get_media_type=function(){return this.mediaType},a.prototype.applyTransformationsToRoot=function(a){var b,d;return a.baseUri?(d=c.parse(a.baseUri),b=d.expressions.filter(function(a){return"templateText"in a}).map(function(a){return a.templateText}),b.length&&(a.baseUriParameters||(a.baseUriParameters={})),b.forEach(function(b){return b in a.baseUriParameters||(a.baseUriParameters[b]={type:"string",required:!0,displayName:b},"version"!==b)?void 0:a.baseUriParameters[b]["enum"]=[a.version]})):void 0},a.prototype.applyTransformationsToResources=function(a,b){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s;if(null!=b?b.length:void 0){for(s=[],k=0,n=b.length;n>k;k++){if(i=b[k],e=i.securedBy?i.securedBy:null!=a?a.securedBy:void 0,null!=(q=i.methods)?q.length:void 0)for(r=i.methods,l=0,o=r.length;o>l;l++)f=r[l],"securedBy"in f||e&&(f.securedBy=e);for(h=i.relativeUri.split("/");!h[0]&&h.length;)h.shift();i.relativeUriPathSegments=h,j=c.parse(i.relativeUri),d=j.expressions.filter(function(a){return"templateText"in a}).map(function(a){return a.templateText}),d.length&&(i.uriParameters||(i.uriParameters={}));for(m=0,p=d.length;p>m;m++)g=d[m],g in i.uriParameters||(i.uriParameters[g]={type:"string",required:!0,displayName:g});s.push(this.applyTransformationsToResources(a,i.resources))}return s}},a.prototype.apply_default_media_type_to_resource=function(a){var b,c,e,f,g,h,i,j,k;if(this.mediaType&&d.isMapping(a)){for(i=this.child_resources(a),e=0,g=i.length;g>e;e++)b=i[e],this.apply_default_media_type_to_resource(b[1]);for(j=this.child_methods(a),k=[],f=0,h=j.length;h>f;f++)c=j[f],k.push(this.apply_default_media_type_to_method(c[1]));return k}},a.prototype.apply_default_media_type_to_method=function(a){var b,c=this;if(this.mediaType&&d.isMapping(a)&&(this.has_property(a,"body")&&this.apply_default_media_type_to_body(this.get_property(a,"body")),this.has_property(a,"responses"))){if(b=this.get_property(a,"responses"),!b||!b.value)return;return b.value.forEach(function(a){return c.has_property(a[1],"body")?c.apply_default_media_type_to_body(c.get_property(a[1],"body")):void 0})}},a.prototype.apply_default_media_type_to_body=function(a){var c,e,f,g,h,i;if(d.isMapping(a))return(null!=a&&null!=(g=a.value)&&null!=(h=g[0])&&null!=(i=h[0])?i.value:void 0)&&(c=a.value[0][0].value,!c.match(/\//))?(e=new b.MappingNode("tag:yaml.org,2002:map",[],a.start_mark,a.end_mark),f=new b.ScalarNode("tag:yaml.org,2002:str",this.mediaType,a.start_mark,a.end_mark),e.value.push([f,a.clone()]),a.value=e.value):void 0},a.prototype.noop=function(){},a.prototype.transform_types=function(a){var b,c=this;return b=a.value,b.forEach(function(a){return a.value.forEach(function(a){return c.transform_resource(a,!0)})})},a.prototype.transform_traits=function(a){var b,c=this;return b=a.value,b.forEach(function(a){return a.value.forEach(function(a){return c.transform_method(a[1],!0)})})},a.prototype.transform_named_params=function(a,c,e){var f=this;return null==e&&(e=!0),d.isNull(a[1])?void 0:a[1].value.forEach(function(a){return d.isNull(a[1])&&(a[1]=new b.MappingNode("tag:yaml.org,2002:map",[],a[1].start_mark,a[1].end_mark)),f.transform_common_parameter_properties(a[0].value,a[1],c,e)})},a.prototype.transform_common_parameter_properties=function(a,b,c,e){var f=this;return d.isSequence(b)?b.value.forEach(function(b){return f.transform_named_parameter(a,b,c,e)}):this.transform_named_parameter(a,b,c,e)},a.prototype.transform_named_parameter=function(a,b,c,d){var e,f,g,h=this;return e=!1,f=!1,g=!1,b.value.forEach(function(a){var b;if(!c||!h.isParameterKey(a))switch(b=h.canonicalizePropertyName(a[0].value,c)){case"pattern":return h.noop();case"default":return h.noop();case"enum":return h.noop();case"description":return h.noop();case"example":return h.noop();case"minLength":return h.noop();case"maxLength":return h.noop();case"minimum":return h.noop();case"maximum":return h.noop();case"repeat":return h.noop();case"displayName":return e=!0;case"type":return g=!0;case"required":return f=!0;default:return h.noop()}}),e||this.add_key_value_to_node(b,"displayName","tag:yaml.org,2002:str",this.canonicalizePropertyName(a,c)),f||d&&this.add_key_value_to_node(b,"required","tag:yaml.org,2002:bool","true"),g?void 0:this.add_key_value_to_node(b,"type","tag:yaml.org,2002:str","string")},a.prototype.add_key_value_to_node=function(a,c,d,e){var f,g;return f=new b.ScalarNode("tag:yaml.org,2002:str",c,a.start_mark,a.end_mark),g=new b.ScalarNode(d,e,a.start_mark,a.end_mark),a.value.push([f,g])},a.prototype.transform_document=function(a){var b=this;return(null!=a?a.value:void 0)?a.value.forEach(function(a){var c;switch(a[0].value){case"title":return b.noop();case"securitySchemes":return b.noop();case"schemas":return b.noop();case"version":return b.noop();case"documentation":return b.noop();case"mediaType":return b.noop();case"securedBy":return b.noop();case"baseUri":return b.noop();case"traits":return b.transform_traits(a[1]);case"baseUriParameters":return b.transform_named_params(a,!1);case"resourceTypes":return b.transform_types(a[1]);case"resources":return null!=(c=a[1])?c.value.forEach(function(a){return b.transform_resource(a)}):void 0;default:return b.noop()}}):void 0},a.prototype.transform_resource=function(a,b){var c=this;return null==b&&(b=!1),a.value?a.value.forEach(function(a){var d,e,f,g;if(e=c.transform_common_properties(a,b),!e){if(c.isHttpMethod(a[0].value,b))return c.transform_method(a[1],b);switch(d=c.canonicalizePropertyName(a[0].value,b)){case"type":return c.noop();case"usage":return c.noop();case"securedBy":return c.noop();case"uriParameters":return c.transform_named_params(a,b);case"baseUriParameters":return c.transform_named_params(a,b);case"resources":return null!=(f=a[1])?f.value.forEach(function(a){return c.transform_resource(a)}):void 0;case"methods":return null!=(g=a[1])?g.value.forEach(function(a){return c.transform_method(a,b)}):void 0;default:return c.noop()}}}):void 0},a.prototype.transform_method=function(a,b){var c=this;if(!d.isNull(a))return a.value.forEach(function(a){var d;if(!c.transform_common_properties(a,b))switch(d=c.canonicalizePropertyName(a[0].value,b)){case"securedBy":return c.noop();case"usage":return c.noop();case"headers":return c.transform_named_params(a,b,!1);case"queryParameters":return c.transform_named_params(a,b,!1);case"baseUriParameters":return c.transform_named_params(a,b);case"body":return c.transform_body(a,b);case"responses":return c.transform_responses(a,b);default:return c.noop()}})},a.prototype.transform_responses=function(a,b){var c=this;if(!d.isNull(a[1]))return a[1].value.forEach(function(a){return c.transform_response(a,b)})},a.prototype.transform_response=function(a,b){var c=this;return d.isMapping(a[1])?a[1].value.forEach(function(a){var d;switch(d=c.canonicalizePropertyName(a[0].value,b)){case"description":return c.noop();case"body":return c.transform_body(a,b);case"headers":return c.transform_named_params(a,b,!1);default:return c.noop()}}):void 0},a.prototype.isContentTypeString=function(a){return null!=a?a.match(/^[^\/]+\/[^\/]+$/):void 0},a.prototype.transform_body=function(a,b){var c,e=this;if(!d.isNull(a[1]))return null!=(c=a[1].value)?c.forEach(function(a){var c;if(e.isParameterKey(a))return e.noop();if(e.isContentTypeString(a[0].value))return e.transform_body(a,b);switch(c=e.canonicalizePropertyName(a[0].value,b)){case"example":return e.noop();case"schema":return e.noop();case"formParameters":return e.transform_named_params(a,b,!1);default:return e.noop()}}):void 0},a.prototype.transform_common_properties=function(a,b){var c;if(this.isParameterKey(a))return!0;switch(c=this.canonicalizePropertyName(a[0].value,b)){case"displayName":return!0;case"description":return!0;case"is":return!0;default:this.noop()}return!1},a}()}).call(this)},{"./nodes":7,"./util":20,uritemplate:52}],20:[function(){(function(){var a=[].slice,b={}.hasOwnProperty;this.extend=function(){var b,c,d,e,f,g,h;for(b=arguments[0],e=2<=arguments.length?a.call(arguments,1):[],g=0,h=e.length;h>g;g++){d=e[g];for(c in d)f=d[c],b[c]=f}return b},this.is_empty=function(a){var c;if(Array.isArray(a)||"string"==typeof a)return 0===a.length;for(c in a)if(b.call(a,c))return!1;return!0},this.isNoop=function(a){return a},this.isMapping=function(a){return"tag:yaml.org,2002:map"===(null!=a?a.tag:void 0)},this.isNull=function(a){return"tag:yaml.org,2002:null"===(null!=a?a.tag:void 0)},this.isSequence=function(a){return"tag:yaml.org,2002:seq"===(null!=a?a.tag:void 0)},this.isString=function(a){return"tag:yaml.org,2002:str"===(null!=a?a.tag:void 0) -},this.isInteger=function(a){return"tag:yaml.org,2002:int"===(null!=a?a.tag:void 0)},this.isNullableMapping=function(a){return this.isMapping(a)||this.isNull(a)},this.isNullableString=function(a){return this.isString(a)||this.isNull(a)},this.isNullableSequence=function(a){return this.isSequence(a)||this.isNull(a)},this.isNumber=function(a){return"tag:yaml.org,2002:int"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:float"===(null!=a?a.tag:void 0)},this.isScalar=function(a){return"tag:yaml.org,2002:null"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:bool"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:int"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:float"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:binary"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:timestamp"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:str"===(null!=a?a.tag:void 0)},this.isCollection=function(a){return"tag:yaml.org,2002:omap"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:pairs"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:set"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:seq"===(null!=a?a.tag:void 0)||"tag:yaml.org,2002:map"===(null!=a?a.tag:void 0)}}).call(this)},{}],21:[function(a,b,c){(function(){var b,d,e,f,g,h,i,j,k={}.hasOwnProperty,l=function(a,b){function c(){this.constructor=a}for(var d in b)k.call(b,d)&&(a[d]=b[d]);return c.prototype=b.prototype,a.prototype=new c,a.__super__=b.prototype,a},m=function(a,b){return function(){return a.apply(b,arguments)}},n=[].indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(b in this&&this[b]===a)return b;return-1};h=a("url"),g=a("uritemplate"),b=a("./errors").MarkedYAMLError,e=a("./nodes"),f=a("./traits"),i=a("./util"),d=a("json-lint"),this.ValidationError=function(a){function b(){return j=b.__super__.constructor.apply(this,arguments)}return l(b,a),b}(b),this.ValidationErrors=function(a){function b(a){this.validation_errors=a}return l(b,a),b.prototype.get_validation_errors=function(){return this.validation_errors},b}(b),this.Validator=function(){function a(){this.get_properties=m(this.get_properties,this),this.get_list_values=m(this.get_list_values,this),this.validations=[this.validate_root,this.validate_root_properties,this.validate_base_uri_parameters,this.valid_absolute_uris]}return a.prototype.validate_document=function(a){var b,c,d,e;for(e=this.validations,c=0,d=e.length;d>c;c++)b=e[c],b.call(this,a);return!0},a.prototype.validate_security_schemes=function(a){var b,d,e,f,g,h;if(!i.isSequence(a))throw new c.ValidationError("while validating securitySchemes",null,"invalid security schemes property, it must be an array",a.start_mark);for(g=a.value,h=[],e=0,f=g.length;f>e;e++){if(d=g[e],!i.isMapping(d))throw new c.ValidationError("while validating securitySchemes",null,"invalid security scheme property, it must be a map",d.start_mark);h.push(function(){var a,e,f,g;for(f=d.value,g=[],a=0,e=f.length;e>a;a++){if(b=f[a],!i.isMapping(b[1]))throw new c.ValidationError("while validating securitySchemes",null,"invalid security scheme property, it must be a map",b[0].start_mark);g.push(this.validate_security_scheme(b[1]))}return g}.call(this))}return h},a.prototype.trackRepeatedProperties=function(a,b,d,e,f){if(null==e&&(e="RAML"),null==f&&(f="a property with the same name already exists"),b in a)throw new c.ValidationError("while validating "+e,null,""+f+": '"+b+"'",d.start_mark);return a[b]=d},a.prototype.validate_security_scheme=function(a){var b,d,e,f,g,h,j;for(f=null,e=null,d={},j=a.value,g=0,h=j.length;h>g;g++)switch(b=j[g],this.trackRepeatedProperties(d,b[0].value,b[0],"while validating security scheme","property already used in security scheme"),b[0].value){case"description":if(!i.isScalar(b[1]))throw new c.ValidationError("while validating security scheme",null,"schemes description must be a string",b[1].start_mark);break;case"type":if(f=b[1].value,!i.isString(b[1])||!f.match(/^(OAuth 1.0|OAuth 2.0|Basic Authentication|Digest Authentication|x-.+)$/))throw new c.ValidationError("while validating security scheme",null,'schemes type must be any of: "OAuth 1.0", "OAuth 2.0", "Basic Authentication", "Digest Authentication", "x-{.+}"',b[1].start_mark);break;case"describedBy":this.validate_method(b,!0,"security scheme");break;case"settings":if(e=b,!i.isNullableMapping(b[1]))throw new c.ValidationError("while validating security scheme",null,"schemes settings must be a map",b[1].start_mark);break;default:throw new c.ValidationError("while validating security scheme",null,"property: '"+b[0].value+"' is invalid in a security scheme",b[0].start_mark)}if(!f)throw new c.ValidationError("while validating security scheme",null,'schemes type must be any of: "OAuth 1.0", "OAuth 2.0", "Basic Authentication", "Digest Authentication", "x-{.+}"',a.start_mark);if("OAuth 2.0"===f){if(!e)throw new c.ValidationError("while validating security scheme",null,"for OAuth 2.0 settings must be a map",a.start_mark);return this.validate_oauth2_settings(e)}if("OAuth 1.0"===f){if(!e)throw new c.ValidationError("while validating security scheme",null,"for OAuth 1.0 settings must be a map",a.start_mark);return this.validate_oauth1_settings(e)}},a.prototype.validate_oauth2_settings=function(a){var b,d,e,f,g,h,j,k,l,m;for(e={},k=a[1].value,f=0,h=k.length;h>f;f++)switch(b=k[f],this.trackRepeatedProperties(e,b[0].value,b[0],"while validating security scheme","setting with the same name already exists"),b[0].value){case"authorizationUri":if(!i.isString(b[1]))throw new c.ValidationError("while validating security scheme",null,"authorizationUri must be a URL",b[0].start_mark);break;case"accessTokenUri":if(!i.isString(b[1]))throw new c.ValidationError("while validating security scheme",null,"accessTokenUri must be a URL",b[0].start_mark)}for(l=["accessTokenUri","authorizationUri"],m=[],g=0,j=l.length;j>g;g++){if(d=l[g],!(d in e))throw new c.ValidationError("while validating security scheme",null,"OAuth 2.0 settings must have "+d+" property",a[0].start_mark);m.push(void 0)}return m},a.prototype.validate_oauth1_settings=function(a){var b,d,e,f,g,h,j,k,l,m;for(e={},k=a[1].value,f=0,h=k.length;h>f;f++)switch(b=k[f],this.trackRepeatedProperties(e,b[0].value,b[0],"while validating security scheme","setting with the same name already exists"),b[0].value){case"requestTokenUri":if(!i.isString(b[1]))throw new c.ValidationError("while validating security scheme",null,"requestTokenUri must be a URL",b[0].start_mark);break;case"authorizationUri":if(!i.isString(b[1]))throw new c.ValidationError("while validating security scheme",null,"authorizationUri must be a URL",b[0].start_mark);break;case"tokenCredentialsUri":if(!i.isString(b[1]))throw new c.ValidationError("while validating security scheme",null,"tokenCredentialsUri must be a URL",b[0].start_mark)}for(l=["requestTokenUri","authorizationUri","tokenCredentialsUri"],m=[],g=0,j=l.length;j>g;g++){if(d=l[g],!(d in e))throw new c.ValidationError("while validating security scheme",null,"OAuth 1.0 settings must have "+d+" property",a[0].start_mark);m.push(void 0)}return m},a.prototype.validate_root_schemas=function(a){var b,d,e,f;if(!i.isSequence(a))throw new c.ValidationError("while validating schemas",null,"schemas property must be an array",a.start_mark);d=this.get_all_schemas(),f=[];for(e in d){if(b=d[e],!b[1].tag||!i.isString(b[1]))throw new c.ValidationError("while validating schemas",null,"schema "+e+" must be a string",b[0].start_mark);f.push(this.validateSchema(b[1]))}return f},a.prototype.validate_root=function(a){if(!a&&!i.isNull(a))throw new c.ValidationError("while validating root",null,"empty document",null!=a?a.start_mark:void 0);if(!i.isMapping(a))throw new c.ValidationError("while validating root",null,"document must be a map",a.start_mark)},a.prototype.validate_base_uri_parameters=function(){if(this.baseUriParameters){if(!this.baseUri)throw new c.ValidationError("while validating uri parameters",null,"uri parameters defined when there is no baseUri",this.baseUriParameters.start_mark);if(!i.isNullableMapping(this.baseUriParameters))throw new c.ValidationError("while validating uri parameters",null,"base uri parameters must be a map",this.baseUriParameters.start_mark);return this.validate_uri_parameters(this.baseUri,this.baseUriParameters,!1,!1,["version"])}},a.prototype.validate_uri_parameters=function(a,b,d,e,f){var h,j,k,l,m,o,p,q,r,s,t;null==f&&(f=[]);try{l=g.parse(a)}catch(u){throw h=u,new c.ValidationError("while validating uri parameters",null,null!=h&&null!=(r=h.options)?r.message:void 0,b.start_mark)}if(j=l.expressions.filter(function(a){return"templateText"in a}).map(function(a){return a.templateText}),o={},"object"==typeof b.value){for(s=b.value,t=[],p=0,q=s.length;q>p;p++){if(m=s[p],k=this.canonicalizePropertyName(m[0].value,d),this.trackRepeatedProperties(o,k,b,"while validating URI parameters","URI parameter with the same name already exists"),n.call(f,k)>=0)throw new c.ValidationError("while validating baseUri",null,m[0].value+" parameter not allowed here",m[0].start_mark);if(!i.isNullableMapping(m[1],d)&&!i.isNullableSequence(m[1],d))throw new c.ValidationError("while validating baseUri",null,"URI parameter must be a map",m[0].start_mark);if(i.isNull(m[1])||this.valid_common_parameter_properties(m[1],d),!(e||this.isParameterKey(m)||n.call(j,k)>=0))throw new c.ValidationError("while validating baseUri",null,m[0].value+" uri parameter unused",m[0].start_mark);t.push(void 0)}return t}},a.prototype.validate_types=function(a){var b,d,e,f,g,h;if(e=a.value,!i.isSequence(a))throw new c.ValidationError("while validating resource types",null,"invalid resourceTypes definition, it must be an array",a.start_mark);for(h=[],f=0,g=e.length;g>f;f++){if(d=e[f],!i.isMapping(d))throw new c.ValidationError("while validating resource types",null,"invalid resourceType definition, it must be a map",d.start_mark);h.push(function(){var a,e,f,g;for(f=d.value,g=[],a=0,e=f.length;e>a;a++){if(b=f[a],this.isParameterKey(b))throw new c.ValidationError("while validating resource types",null,"parameter key cannot be used as a resource type name",b[0].start_mark);if(!i.isMapping(b[1]))throw new c.ValidationError("while validating resource types",null,"invalid resourceType definition, it must be a map",b[1].start_mark);g.push(this.validate_resource(b,!0,"resource type"))}return g}.call(this))}return h},a.prototype.validate_traits=function(a){var b,d,e,g,h;if(f=a.value,!Array.isArray(f))throw new c.ValidationError("while validating traits",null,"invalid traits definition, it must be an array",a.start_mark);for(h=[],e=0,g=f.length;g>e;e++){if(d=f[e],!Array.isArray(d.value))throw new c.ValidationError("while validating traits",null,"invalid traits definition, it must be an array",a.start_mark);h.push(function(){var a,e,f,g;for(f=d.value,g=[],a=0,e=f.length;e>a;a++){if(b=f[a],this.isParameterKey(b))throw new c.ValidationError("while validating traits",null,"parameter key cannot be used as a trait name",b[0].start_mark);if(!i.isMapping(b[1]))throw new c.ValidationError("while validating traits",null,"invalid trait definition, it must be a map",b[1].start_mark);g.push(this.valid_traits_properties(b))}return g}.call(this))}return h},a.prototype.valid_traits_properties=function(a){var b;if(a[1].value&&i.isMapping(a[1])){if(b=a[1].value.filter(function(a){return"is"===a[0].value||"type"===a[0].value}),b.length>0)throw new c.ValidationError("while validating trait properties",null,"property: '"+b[0][0].value+"' is invalid in a trait",b[0][0].start_mark);return this.validate_method(a,!0,"trait")}},a.prototype.canonicalizePropertyName=function(a,b){return b&&"?"===a.slice(-1)?a.slice(0,-1):a},a.prototype.valid_common_parameter_properties=function(a,b){var d,e,f,g,h;if(a.value){if(i.isSequence(a)){if(0===a.value.length)throw new c.ValidationError("while validating parameter properties",null,"named parameter needs at least one type",a.start_mark);if(!(a.value.length>1))throw new c.ValidationError("while validating parameter properties",null,"single type for variably typed parameter",a.start_mark);for(g=a.value,h=[],e=0,f=g.length;f>e;e++)d=g[e],h.push(this.validate_named_parameter(d,b));return h}return this.validate_named_parameter(a,b)}},a.prototype.validate_named_parameter=function(a,b){var d,e,f,g,h,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z;for(h={},j="string",w=a.value,q=0,t=w.length;t>q;q++)if(f=w[q],k=f[0].value,l=f[1].value,this.trackRepeatedProperties(h,this.canonicalizePropertyName(f[0].value,!0),f[0],"while validating parameter properties","parameter property already used"),d=["true","false"],!b||!this.isParameterKey(f)&&!this.isParameterValue(f)){switch(e=this.canonicalizePropertyName(k,b),o=!0,k){case"displayName":if(!i.isScalar(f[1]))throw new c.ValidationError("while validating parameter properties",null,"the value of displayName must be a scalar",f[1].start_mark);break;case"pattern":if(!i.isScalar(f[1]))throw new c.ValidationError("while validating parameter properties",null,"the value of pattern must be a scalar",f[1].start_mark);break;case"default":if(!i.isScalar(f[1]))throw new c.ValidationError("while validating parameter properties",null,"the value of default must be a scalar",f[1].start_mark);break;case"description":if(!i.isScalar(f[1]))throw new c.ValidationError("while validating parameter properties",null,"the value of description must be a scalar",f[1].start_mark);break;case"example":if(!i.isScalar(f[1]))throw new c.ValidationError("while validating parameter properties",null,"the value of example must be a scalar",f[1].start_mark);break;case"minLength":if(isNaN(l))throw new c.ValidationError("while validating parameter properties",null,"the value of minLength must be a number",f[1].start_mark);break;case"maxLength":if(isNaN(l))throw new c.ValidationError("while validating parameter properties",null,"the value of maxLength must be a number",f[1].start_mark);break;case"minimum":if(isNaN(l))throw new c.ValidationError("while validating parameter properties",null,"the value of minimum must be a number",f[1].start_mark);break;case"maximum":if(isNaN(l))throw new c.ValidationError("while validating parameter properties",null,"the value of maximum must be a number",f[1].start_mark);break;case"type":if(j=l,p=["string","number","integer","date","boolean","file"],n.call(p,l)<0)throw new c.ValidationError("while validating parameter properties",null,"type can be either of: string, number, integer, file, date or boolean ",f[1].start_mark);break;case"required":if(n.call(d,l)<0)throw new c.ValidationError("while validating parameter properties",null,"required can be any either true or false",f[1].start_mark);break;case"repeat":if(n.call(d,l)<0)throw new c.ValidationError("while validating parameter properties",null,"repeat can be any either true or false",f[1].start_mark);break;default:o=!1}switch(e){case"enum":if(!i.isNullableSequence(f[1]))throw new c.ValidationError("while validating parameter properties",null,"the value of enum must be an array",f[1].start_mark);if(!f[1].value.length)throw new c.ValidationError("while validating parameter properties",null,"enum is empty",f[1].start_mark);if(g=this.get_list_values(f[1].value),this.hasDuplicates(g))throw new c.ValidationError("while validating parameter properties",null,"enum contains duplicated values",f[1].start_mark);break;default:if(!o)throw new c.ValidationError("while validating parameter properties",null,"unknown property "+k,f[0].start_mark)}}if("string"!==j)for(x=["enum","pattern","minLength","maxLength"],r=0,u=x.length;u>r;r++)if(m=x[r],m in h)throw new c.ValidationError("while validating parameter properties",null,"property "+m+" can only be used if type is 'string'",h[m].start_mark);if("number"!==j&&"integer"!==j){for(y=["minimum","maximum"],z=[],s=0,v=y.length;v>s;s++){if(m=y[s],m in h)throw new c.ValidationError("while validating parameter properties",null,"property "+m+" can only be used if type is 'number' or 'integer'",h[m].start_mark);z.push(void 0)}return z}},a.prototype.get_list_values=function(a){return a.map(function(a){return a.value})},a.prototype.validate_root_properties=function(a){var b,d,e,f,g,h;if(b=!1,e={},null!=a?a.value:void 0)for(h=a.value,f=0,g=h.length;g>f;f++)switch(d=h[f],d[0].value.match(/^\//)?this.trackRepeatedProperties(e,this.canonicalizePropertyName(d[0].value,!0),d[0],"while validating root properties","resource already declared"):this.trackRepeatedProperties(e,d[0].value,d[0],"while validating root properties","root property already used"),d[0].value){case"title":if(!i.isScalar(d[1]))throw new c.ValidationError("while validating root properties",null,"title must be a string",d[0].start_mark);break;case"baseUri":if(!i.isScalar(d[1]))throw new c.ValidationError("while validating root properties",null,"baseUri must be a string",d[0].start_mark);this.baseUri=d[1].value,b=this.validate_base_uri(d[1]);break;case"securitySchemes":this.validate_security_schemes(d[1]);break;case"schemas":this.validate_root_schemas(d[1]);break;case"version":if(!i.isScalar(d[1]))throw new c.ValidationError("while validating root properties",null,"version must be a string",d[0].start_mark);i.isNull(d[1])||(d[1].tag="tag:yaml.org,2002:str");break;case"traits":this.validate_traits(d[1]);break;case"documentation":if(!i.isSequence(d[1]))throw new c.ValidationError("while validating root properties",null,"documentation must be an array",d[0].start_mark);this.validate_documentation(d[1]);break;case"mediaType":if(!i.isString(d[1]))throw new c.ValidationError("while validating root properties",null,"mediaType must be a scalar",d[0].start_mark);break;case"baseUriParameters":this.baseUriParameters=d[1],i.isNoop(d[1]);break;case"resourceTypes":this.validate_types(d[1]);break;case"securedBy":this.validate_secured_by(d);break;case"protocols":this.validate_protocols_property(d);break;default:if(!d[0].value.match(/^\//))throw new c.ValidationError("while validating root properties",null,"unknown property "+d[0].value,d[0].start_mark);this.validate_resource(d)}if(!("title"in e))throw new c.ValidationError("while validating root properties",null,"missing title",a.start_mark);if(b&&!("version"in e))throw new c.ValidationError("while validating version",null,"missing version",a.start_mark)},a.prototype.validate_documentation=function(a){var b,d,e,f,g;if(!a.value.length)throw new c.ValidationError("while validating documentation section",null,"there must be at least one document in the documentation section",a.start_mark);for(f=a.value,g=[],d=0,e=f.length;e>d;d++)b=f[d],g.push(this.validate_doc_section(b));return g},a.prototype.validate_doc_section=function(a){var b,d,e,f,g;if(!i.isMapping(a))throw new c.ValidationError("while validating documentation section",null,"each documentation section must be a map",a.start_mark);for(b={},g=a.value,e=0,f=g.length;f>e;e++)switch(d=g[e],this.trackRepeatedProperties(b,d[0].value,d[0],"while validating documentation section","property already used"),d[0].value){case"title":if(!i.isScalar(d[1])||i.isNull(d[1]))throw new c.ValidationError("while validating documentation section",null,"title must be a string",d[0].start_mark);break;case"content":if(!i.isScalar(d[1])||i.isNull(d[1]))throw new c.ValidationError("while validating documentation section",null,"content must be a string",d[0].start_mark);break;default:throw new c.ValidationError("while validating root properties",null,"unknown property "+d[0].value,d[0].start_mark)}if(!("content"in b))throw new c.ValidationError("while validating documentation section",null,"a documentation entry must have content property",a.start_mark);if(!("title"in b))throw new c.ValidationError("while validating documentation section",null,"a documentation entry must have title property",a.start_mark)},a.prototype.child_resources=function(a){return a&&i.isMapping(a)?a.value.filter(function(a){return a[0].value.match(/^\//)}):[]},a.prototype.validate_resource=function(a,b,d){var e,f,h,j,k,l,m,n,o,p,q,r;if(null==b&&(b=!1),null==d&&(d="resource"),!a[1]||!i.isNullableMapping(a[1]))throw new c.ValidationError("while validating resources",null,"resource is not a map",a[1].start_mark);if(a[0].value)try{l=g.parse(a[0].value)}catch(s){throw f=s,new c.ValidationError("while validating resource",null,"Resource name is invalid: "+(null!=f&&null!=(p=f.options)?p.message:void 0),a[0].start_mark)}if(!i.isNull(a[1])&&a[1].value){for(k={},q=a[1].value,r=[],n=0,o=q.length;o>n;n++)if(j=q[n],j[0].value.match(/^\//)?this.trackRepeatedProperties(k,this.canonicalizePropertyName(j[0].value,!0),j[0],"while validating resource","resource already declared"):this.isHttpMethod(j[0].value,b)?this.trackRepeatedProperties(k,this.canonicalizePropertyName(j[0].value,!0),j[0],"while validating resource","method already declared"):this.trackRepeatedProperties(k,this.canonicalizePropertyName(j[0].value,!0),j[0],"while validating resource","property already used"),this.validate_common_properties(j,b))r.push(void 0);else if(j[0].value.match(/^\//)){if(b)throw new c.ValidationError("while validating trait properties",null,"resource type cannot define child resources",j[0].start_mark);r.push(this.validate_resource(j,b))}else if(this.isHttpMethod(j[0].value,b))r.push(this.validate_method(j,b,"method"));else{switch(h=j[0].value,e=this.canonicalizePropertyName(h,b),m=!0,e){case"uriParameters":if(!i.isNullableMapping(j[1]))throw new c.ValidationError("while validating uri parameters",null,"uri parameters must be a map",j[0].start_mark);this.validate_uri_parameters(a[0].value,j[1],b,b);break;case"baseUriParameters":if(!this.baseUri)throw new c.ValidationError("while validating uri parameters",null,"base uri parameters defined when there is no baseUri",j[0].start_mark);if(!i.isNullableMapping(j[1]))throw new c.ValidationError("while validating uri parameters",null,"base uri parameters must be a map",j[0].start_mark);this.validate_uri_parameters(this.baseUri,j[1],b);break;default:m=!1}switch(h){case"type":r.push(this.validate_type_property(j,b));break;case"usage":if(!b)throw new c.ValidationError("while validating resources",null,"property: '"+j[0].value+"' is invalid in a resource",j[0].start_mark);r.push(void 0);break;case"securedBy":r.push(this.validate_secured_by(j));break;default:if(!m)throw new c.ValidationError("while validating resources",null,"property: '"+j[0].value+("' is invalid in a "+d),j[0].start_mark);r.push(void 0)}}return r}},a.prototype.validate_secured_by=function(a){var b,d,e,f,g,h,j;if(!i.isSequence(a[1]))throw new c.ValidationError("while validating securityScheme",null,"property 'securedBy' must be an array",a[0].start_mark);if(d=this.get_list_values(a[1].value),this.hasDuplicates(d))throw new c.ValidationError("while validating securityScheme consumption",null,"securitySchemes can only be referenced once in a securedBy property",a[0].start_mark);for(h=a[1].value,j=[],f=0,g=h.length;g>f;f++){if(b=h[f],i.isSequence(b))throw new c.ValidationError("while validating securityScheme consumption",null,"securityScheme reference cannot be an array",b.start_mark);if(i.isNull(b))j.push(void 0);else{if(e=this.key_or_value(b),!this.get_security_scheme(e))throw new c.ValidationError("while validating securityScheme consumption",null,"there is no securityScheme named "+e,b.start_mark);j.push(void 0)}}return j},a.prototype.validate_protocols_property=function(a){var b,d,e,f,g,h;if(!i.isSequence(a[1]))throw new c.ValidationError("while validating protocols",null,"property must be an array",a[0].start_mark);for(f=a[1].value,h=[],d=0,e=f.length;e>d;d++){if(b=f[d],!i.isString(b))throw new c.ValidationError("while validating protocols",null,"value must be a string",b.start_mark);if("HTTP"!==(g=b.value)&&"HTTPS"!==g)throw new c.ValidationError("while validating protocols",null,"only HTTP and HTTPS values are allowed",b.start_mark);h.push(void 0)}return h},a.prototype.validate_type_property=function(a){var b,d,e,f,g,h;if(!i.isMapping(a[1])&&!i.isString(a[1]))throw new c.ValidationError("while validating resource types",null,"property 'type' must be a string or a map",a[0].start_mark);if(i.isMapping(a[1])&&a[1].value.length>1)throw new c.ValidationError("while validating resource types",null,"a resource or resourceType can inherit from a single resourceType",a[0].start_mark);if(d=this.key_or_value(a[1]),!(null!=d?d.trim():void 0))throw new c.ValidationError("while validating resource type consumption",null,"resource type name must be provided",a[1].start_mark);if(!this.isParameterKeyValue(d)&&!this.get_type(d))throw new c.ValidationError("while validating resource type consumption",null,"there is no resource type named "+d,a[1].start_mark);if(i.isMapping(a[1])){for(g=a[1].value,h=[],e=0,f=g.length;f>e;e++){if(b=g[e],!i.isNull(b[1])&&!i.isMapping(b[1]))throw new c.ValidationError("while validating resource consumption",null,"resource type parameters must be in a map",b[1].start_mark);h.push(void 0)}return h}},a.prototype.validate_method=function(a,b,d){var e,f,g,h,j,k,l,m,n;if(null==d&&(d="method"),!i.isNull(a[1])){if(!i.isMapping(a[1]))throw new c.ValidationError("while validating methods",null,"method must be a map",a[0].start_mark);for(g={},m=a[1].value,n=[],k=0,l=m.length;l>k;k++)if(h=m[k],this.trackRepeatedProperties(g,this.canonicalizePropertyName(h[0].value,!0),h[0],"while validating method","property already used"),!this.validate_common_properties(h,b,d)){switch(f=h[0].value,e=this.canonicalizePropertyName(f,b),j=!0,e){case"headers":this.validate_headers(h,b);break;case"queryParameters":this.validate_query_params(h,b);break;case"body":this.validate_body(h,b,null,!1);break;case"responses":this.validate_responses(h,b);break;case"baseUriParameters":if(!this.baseUri)throw new c.ValidationError("while validating uri parameters",null,"base uri parameters defined when there is no baseUri",h[0].start_mark);if(!i.isNullableMapping(h[1]))throw new c.ValidationError("while validating uri parameters",null,"base uri parameters must be a map",h[0].start_mark);this.validate_uri_parameters(this.baseUri,h[1],b);break;case"protocols":this.validate_protocols_property(h);break;default:j=!1}switch(f){case"securedBy":n.push(this.validate_secured_by(h));break;case"usage":if(!b||"trait"!==d)throw new c.ValidationError("while validating resources",null,"property: 'usage' is invalid in a "+d,h[0].start_mark);n.push(void 0);break;default:if(!j)throw new c.ValidationError("while validating resources",null,"property: '"+h[0].value+"' is invalid in a "+d,h[0].start_mark);n.push(void 0)}}return n}},a.prototype.validate_responses=function(a,b){var d,e,f,g,h,j;if(!i.isNull(a[1])){if(!i.isMapping(a[1]))throw new c.ValidationError("while validating responses",null,"property: 'responses' must be a map",a[0].start_mark);for(e={},h=a[1].value,j=[],f=0,g=h.length;g>f;f++){if(d=h[f],!i.isNullableMapping(d[1]))throw new c.ValidationError("while validating responses",null,"each response must be a map",d[1].start_mark);this.trackRepeatedProperties(e,this.canonicalizePropertyName(d[0].value,!0),d[0],"while validating responses","response code already used"),j.push(this.validate_response(d,b))}return j}},a.prototype.validate_query_params=function(a,b){var d,e,f,g,h,j;if(!i.isNull(a[1])){if(!i.isMapping(a[1]))throw new c.ValidationError("while validating query parameters",null,"property: 'queryParameters' must be a map",a[0].start_mark);for(e={},h=a[1].value,j=[],f=0,g=h.length;g>f;f++){if(d=h[f],!i.isNullableMapping(d[1])&&!i.isNullableSequence(d[1]))throw new c.ValidationError("while validating query parameters",null,"each query parameter must be a map",d[1].start_mark);this.trackRepeatedProperties(e,this.canonicalizePropertyName(d[0].value,!0),d[0],"while validating query parameter","parameter name already used"),j.push(this.valid_common_parameter_properties(d[1],b))}return j}},a.prototype.validate_form_params=function(a,b){var d,e,f,g,h,j;if(!i.isNull(a[1])){if(!i.isMapping(a[1]))throw new c.ValidationError("while validating query parameters",null,"property: 'formParameters' must be a map",a[0].start_mark);for(d={},h=a[1].value,j=[],f=0,g=h.length;g>f;f++){if(e=h[f],!i.isNullableMapping(e[1])&&!i.isNullableSequence(e[1]))throw new c.ValidationError("while validating query parameters",null,"each form parameter must be a map",e[1].start_mark);this.trackRepeatedProperties(d,this.canonicalizePropertyName(e[0].value,!0),e[0],"while validating form parameter","parameter name already used"),j.push(this.valid_common_parameter_properties(e[1],b))}return j}},a.prototype.validate_headers=function(a,b){var d,e,f,g,h,j;if(!i.isNull(a[1])){if(!i.isMapping(a[1]))throw new c.ValidationError("while validating headers",null,"property: 'headers' must be a map",a[0].start_mark);for(d={},h=a[1].value,j=[],f=0,g=h.length;g>f;f++){if(e=h[f],!i.isNullableMapping(e[1])&&!i.isNullableSequence(e[1]))throw new c.ValidationError("while validating query parameters",null,"each header must be a map",e[1].start_mark);this.trackRepeatedProperties(d,this.canonicalizePropertyName(e[0].value,!0),e[0],"while validating headers","header name already used"),j.push(this.valid_common_parameter_properties(e[1],b))}return j}},a.prototype.validate_response=function(a,b){var d,e,f,g,h,j,k,l,m,n,o,p;if(i.isSequence(a[0])){if(!a[0].value.length)throw new c.ValidationError("while validating responses",null,"there must be at least one response code",a[0].start_mark);for(n=a[0].value,j=0,l=n.length;l>j;j++)if(f=n[j],!this.isParameterKey(f)&&!i.isInteger(f)&&isNaN(this.canonicalizePropertyName(f,b)))throw new c.ValidationError("while validating responses",null,"each response key must be an integer",f.start_mark)}else if(!this.isParameterKey(a)&&!i.isInteger(a[0])&&isNaN(this.canonicalizePropertyName(a[0].value,b)))throw new c.ValidationError("while validating responses",null,"each response key must be an integer",a[0].start_mark);if(!i.isNullableMapping(a[1]))throw new c.ValidationError("while validating responses",null,"each response property must be a map",a[0].start_mark);if(i.isMapping(a[1])){for(g={},o=a[1].value,p=[],k=0,m=o.length;m>k;k++)if(e=o[k],d=this.canonicalizePropertyName(e[0].value,b),this.trackRepeatedProperties(g,d,e[0],"while validating responses","property already used"),h=!0,this.isParameterKey(e))p.push(void 0);else{switch(e[0].value){case"description":if(!i.isScalar(e[1]))throw new c.ValidationError("while validating responses",null,"property description must be a string",a[0].start_mark);break;default:h=!1}switch(d){case"body":p.push(this.validate_body(e,b,null,!0));break;case"headers":if(!i.isNullableMapping(e[1]))throw new c.ValidationError("while validating resources",null,"property 'headers' must be a map",e[0].start_mark);p.push(this.validate_headers(e));break;default:if(!h)throw new c.ValidationError("while validating response",null,"property: '"+e[0].value+"' is invalid in a response",e[0].start_mark);p.push(void 0)}}return p}},a.prototype.isHttpMethod=function(a,b){var c;return null==b&&(b=!1),a?(a=this.canonicalizePropertyName(a,b),"options"===(c=a.toLowerCase())||"get"===c||"head"===c||"post"===c||"put"===c||"delete"===c||"trace"===c||"connect"===c||"patch"===c):!1},a.prototype.isParameterValue=function(a){return this.isParameterKey(a,!1)},a.prototype.isParameterKey=function(a,b){var d;if(null==b&&(b=!0),d=b?0:1,!b&&!i.isScalar(a[1]))return!1;if(this.isParameterKeyValue(a[d].value))return!0;if(a[d].value.match(/<<\s*([^\|\s>]+)\s*\|.*\s*>>/g))throw new c.ValidationError("while validating parameter",null,"unknown function applied to property name",a[0].start_mark);return!1},a.prototype.isParameterKeyValue=function(a){return a.match(/<<\s*([^\|\s>]+)\s*>>/g)||a.match(/<<\s*([^\|\s>]+)\s*(\|\s*\!\s*(singularize|pluralize))?\s*>>/g)?!0:!1},a.prototype.validate_body=function(a,b,d,e){var f,g,h,j,k,l,m,o,p,q;if(null==d&&(d=null),!i.isNull(a[1])){if(!i.isMapping(a[1]))throw new c.ValidationError("while validating body",null,"property: body specification must be a map",a[0].start_mark);for(j=["implicit","forcedImplicit"],f={},q=a[1].value,o=0,p=q.length;p>o;o++)if(g=q[o],this.trackRepeatedProperties(f,this.canonicalizePropertyName(g[0].value,!0),g[0],"while validating body","property already used"),this.isParameterKey(g)){if(!b)throw new c.ValidationError("while validating body",null,"property '"+g[0].value+"' is invalid in a resource",g[0].start_mark) -}else if(g[0].value.match(/^[^\/]+\/[^\/]+$/)){if(d&&"explicit"!==d)throw new c.ValidationError("while validating body",null,"not compatible with implicit default Media Type",g[0].start_mark);d="explicit",this.validate_body(g,b,"forcedImplicit",e)}else{switch(k=g[0].value,h=this.canonicalizePropertyName(k,b),m=!0,h){case"formParameters":if(d&&n.call(j,d)<0)throw new c.ValidationError("while validating body",null,"not compatible with explicit Media Type",g[0].start_mark);null==d&&(d="implicit"),this.validate_form_params(g,b);break;default:m=!1}switch(k){case"example":if(d&&n.call(j,d)<0)throw new c.ValidationError("while validating body",null,"not compatible with explicit Media Type",g[0].start_mark);if(null==d&&(d="implicit"),!i.isScalar(g[1]))throw new c.ValidationError("while validating body",null,"example must be a string",g[0].start_mark);break;case"schema":if(d&&n.call(j,d)<0)throw new c.ValidationError("while validating body",null,"not compatible with explicit Media Type",g[0].start_mark);if(null==d&&(d="implicit"),!i.isScalar(g[1]))throw new c.ValidationError("while validating body",null,"schema must be a string",g[0].start_mark);this.validateSchema(g[1]);break;default:if(!m)throw new c.ValidationError("while validating body",null,"property: '"+g[0].value+"' is invalid in a body",g[0].start_mark)}}if("formParameters"in f){if(l=f.formParameters.start_mark,e)throw new c.ValidationError("while validating body",null,"formParameters cannot be used to describe response bodies",l);if("schema"in f||"example"in f)throw new c.ValidationError("while validating body",null,"formParameters cannot be used together with the example or schema properties",l)}if("implicit"===d&&!this.get_media_type())throw new c.ValidationError("while validating body",null,"body tries to use default Media Type, but mediaType is null",a[0].start_mark)}},a.prototype.validateSchema=function(a){var b,e,f,g;if(this.isXmlSchema(a.value))return void 0;if(this.isJsonSchema(a.value)){if(e=d(a.value),e.error)throw f=this.create_mark(a.start_mark.line+e.line,0),a.end_mark.line===f.line&&0===a.end_mark.column&&f.line--,new c.ValidationError("while validating body",null,"schema is not valid JSON error: '"+e.error+"'",f);try{return g=JSON.parse(a.value)}catch(h){throw b=h,new c.ValidationError("while validating body",null,"schema is not valid JSON error: '"+b+"'",a.start_mark)}}},a.prototype.isJsonSchema=function(a){return null!=a?a.match(/^\s*\{/):void 0},a.prototype.isXmlSchema=function(a){return null!=a?a.match(/^\s*(<\?xml[^>]+>)?[\s\n]*f;f++)e=h[f],this.validate_trait_use(e);return!0}return!1},a.prototype.validate_trait_use=function(a){var b,d,e,f,g,h,j;if(!i.isScalar(a)&&!i.isMapping(a))throw new c.ValidationError("while validating trait consumption",null,"trait must be a string or a map",a.start_mark);if(d=this.key_or_value(a),!(null!=d?d.trim():void 0))throw new c.ValidationError("while validating trait consumption",null,"trait name must be provided",a.start_mark);if(!this.isParameterKeyValue(d)&&!this.get_trait(d))throw new c.ValidationError("while validating trait consumption",null,"there is no trait named "+d,a.start_mark);if(!i.isScalar(a)){if(e=a.value[0][1],!i.isNull(e)&&!i.isMapping(e))throw new c.ValidationError("while validating trait consumption",null,"trait must be a map",e.start_mark);if(!i.isNull(e)){for(h=e.value,j=[],f=0,g=h.length;g>f;f++){if(b=h[f],!i.isScalar(b[1]))throw new c.ValidationError("while validating trait consumption",null,"parameter value must be a scalar",b[1].start_mark);j.push(void 0)}return j}}},a.prototype.child_methods=function(a){var b=this;return a&&i.isMapping(a)?a.value.filter(function(a){return b.isHttpMethod(a[0].value)}):[]},a.prototype.has_property=function(a,b){return a&&i.isMapping(a)?a.value.some(function(a){return a[0].value&&"object"!=typeof a[0].value&&a[0].value===b}):!1},a.prototype.property_value=function(a,b){var c;return c=a.value.filter(function(a){return"object"!=typeof a[0].value&&a[0].value===b}),c.length?c[0][1].value:void 0},a.prototype.get_property=function(a,b){var c;return a&&i.isMapping(a)&&(c=a.value.filter(function(a){return i.isString(a[0])&&a[0].value===b}),c.length>0&&c[0].length>0)?c[0][1]:[]},a.prototype.get_properties=function(a,b){var c,d,e,f,g;if(d=[],a&&i.isMapping(a))for(g=a.value,e=0,f=g.length;f>e;e++)c=g[e],i.isString(c[0])&&c[0].value===b?d.push(c):d=d.concat(this.get_properties(c[1],b));return d},a.prototype.valid_absolute_uris=function(a){var b,d;if(d=this.get_absolute_uris(a),b=this.hasDuplicatesUris(d))throw new c.ValidationError("while validating trait consumption",null,"two resources share same URI "+b.uri,b.mark)},a.prototype.get_absolute_uris=function(a,b){var d,e,f,g,h,j;if(f=[],!i.isNullableMapping(a))throw new c.ValidationError("while validating resources",null,"resource is not a map",a.start_mark);for(e=this.child_resources(a),h=0,j=e.length;j>h;h++)d=e[h],g=null!=b?b+d[0].value:d[0].value,f.push({uri:g,mark:d[0].start_mark}),f=f.concat(this.get_absolute_uris(d[1],g));return f},a.prototype.key_or_value=function(a){var b,c,d,f;return a instanceof e.ScalarNode?a.value:a instanceof e.MappingNode&&(b=null!=a&&null!=(c=a.value)&&null!=(d=c[0])&&null!=(f=d[0])?f.value:void 0)?b:null},a.prototype.value_or_undefined=function(a){return a instanceof e.MappingNode?a.value:void 0},a.prototype.validate_base_uri=function(a){var b,d,e,f,i,j,k;if(b=null!=(j=a.value)?j.trim():void 0,!b)throw new c.ValidationError("while validating baseUri",null,"baseUri must have a value",a.start_mark);if(f=(h.parse(b).protocol||"http:").slice(0,-1).toUpperCase(),"HTTP"!==f&&"HTTPS"!==f)throw new c.ValidationError("while validating baseUri",null,"baseUri protocol must be either HTTP or HTTPS",a.start_mark);try{i=g.parse(b)}catch(l){throw d=l,new c.ValidationError("while validating baseUri",null,null!=d&&null!=(k=d.options)?k.message:void 0,a.start_mark)}return e=i.expressions.filter(function(a){return"templateText"in a}).map(function(a){return a.templateText}),n.call(e,"version")>=0?!0:void 0},a.prototype.get_validation_errors=function(){return this.validation_errors},a.prototype.is_valid=function(){return 0===this.validation_errors.length},a.prototype.hasDuplicatesUris=function(a){var b,c,d,e;for(c={},d=0,e=a.length;e>d;d++){if(b=a[d],b.uri in c)return b;c[b.uri]=b}return!1},a.prototype.hasDuplicates=function(a){var b,c,d,e;for(c={},d=0,e=a.length;e>d;d++){if(b=a[d],b in c)return!0;c[b]=!0}return!1},a}()}).call(this)},{"./errors":3,"./nodes":7,"./traits":18,"./util":20,"json-lint":50,uritemplate:52,url:46}],22:[function(){},{}],23:[function(a,b){function c(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function d(a){return"function"==typeof a}function e(a){return"number"==typeof a}function f(a){return"object"==typeof a&&null!==a}function g(a){return void 0===a}b.exports=c,c.EventEmitter=c,c.prototype._events=void 0,c.prototype._maxListeners=void 0,c.defaultMaxListeners=10,c.prototype.setMaxListeners=function(a){if(!e(a)||0>a||isNaN(a))throw TypeError("n must be a positive number");return this._maxListeners=a,this},c.prototype.emit=function(a){var b,c,e,h,i,j;if(this._events||(this._events={}),"error"===a&&(!this._events.error||f(this._events.error)&&!this._events.error.length))throw b=arguments[1],b instanceof Error?b:TypeError('Uncaught, unspecified "error" event.');if(c=this._events[a],g(c))return!1;if(d(c))switch(arguments.length){case 1:c.call(this);break;case 2:c.call(this,arguments[1]);break;case 3:c.call(this,arguments[1],arguments[2]);break;default:for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];c.apply(this,h)}else if(f(c)){for(e=arguments.length,h=new Array(e-1),i=1;e>i;i++)h[i-1]=arguments[i];for(j=c.slice(),e=j.length,i=0;e>i;i++)j[i].apply(this,h)}return!0},c.prototype.addListener=function(a,b){var e;if(!d(b))throw TypeError("listener must be a function");if(this._events||(this._events={}),this._events.newListener&&this.emit("newListener",a,d(b.listener)?b.listener:b),this._events[a]?f(this._events[a])?this._events[a].push(b):this._events[a]=[this._events[a],b]:this._events[a]=b,f(this._events[a])&&!this._events[a].warned){var e;e=g(this._maxListeners)?c.defaultMaxListeners:this._maxListeners,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}return this},c.prototype.on=c.prototype.addListener,c.prototype.once=function(a,b){function c(){this.removeListener(a,c),e||(e=!0,b.apply(this,arguments))}if(!d(b))throw TypeError("listener must be a function");var e=!1;return c.listener=b,this.on(a,c),this},c.prototype.removeListener=function(a,b){var c,e,g,h;if(!d(b))throw TypeError("listener must be a function");if(!this._events||!this._events[a])return this;if(c=this._events[a],g=c.length,e=-1,c===b||d(c.listener)&&c.listener===b)delete this._events[a],this._events.removeListener&&this.emit("removeListener",a,b);else if(f(c)){for(h=g;h-->0;)if(c[h]===b||c[h].listener&&c[h].listener===b){e=h;break}if(0>e)return this;1===c.length?(c.length=0,delete this._events[a]):c.splice(e,1),this._events.removeListener&&this.emit("removeListener",a,b)}return this},c.prototype.removeAllListeners=function(a){var b,c;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[a]&&delete this._events[a],this;if(0===arguments.length){for(b in this._events)"removeListener"!==b&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(c=this._events[a],d(c))this.removeListener(a,c);else for(;c.length;)this.removeListener(a,c[c.length-1]);return delete this._events[a],this},c.prototype.listeners=function(a){var b;return b=this._events&&this._events[a]?d(this._events[a])?[this._events[a]]:this._events[a].slice():[]},c.listenerCount=function(a,b){var c;return c=a._events&&a._events[b]?d(a._events[b])?1:a._events[b].length:0}},{}],24:[function(a,b){var c=b.exports,d=(a("events").EventEmitter,a("./lib/request")),e=a("url");c.request=function(a,b){"string"==typeof a&&(a=e.parse(a)),a||(a={}),a.host||a.port||(a.port=parseInt(window.location.port,10)),!a.host&&a.hostname&&(a.host=a.hostname),a.scheme||(a.scheme=window.location.protocol.split(":")[0]),a.host||(a.host=window.location.hostname||window.location.host),/:/.test(a.host)&&(a.port||(a.port=a.host.split(":")[1]),a.host=a.host.split(":")[0]),a.port||(a.port="https"==a.scheme?443:80);var c=new d(new f,a);return b&&c.on("response",b),c},c.get=function(a,b){a.method="GET";var d=c.request(a,b);return d.end(),d},c.Agent=function(){},c.Agent.defaultMaxSockets=4;var f=function(){if("undefined"==typeof window)throw new Error("no window object present");if(window.XMLHttpRequest)return window.XMLHttpRequest;if(window.ActiveXObject){for(var a=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.3.0","Microsoft.XMLHTTP"],b=0;bthis.offset&&(this.emit("data",b.slice(this.offset)),this.offset=b.length))};var h=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{stream:39,util:48}],27:[function(a,b,c){!function(){function a(a){this.message=a}var b="undefined"!=typeof c?c:this,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";a.prototype=new Error,a.prototype.name="InvalidCharacterError",b.btoa||(b.btoa=function(b){for(var c,e,f=0,g=d,h="";b.charAt(0|f)||(g="=",f%1);h+=g.charAt(63&c>>8-f%1*8)){if(e=b.charCodeAt(f+=.75),e>255)throw new a("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");c=c<<8|e}return h}),b.atob||(b.atob=function(b){if(b=b.replace(/=+$/,""),b.length%4==1)throw new a("'atob' failed: The string to be decoded is not correctly encoded.");for(var c,e,f=0,g=0,h="";e=b.charAt(g++);~e&&(c=f%4?64*c+e:e,f++%4)?h+=String.fromCharCode(255&c>>(-2*f&6)):0)e=d.indexOf(e);return h})}()},{}],28:[function(a,b){var c=a("http"),d=b.exports;for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e]);d.request=function(a,b){return a||(a={}),a.scheme="https",c.request.call(this,a,b)}},{http:24}],29:[function(a,b){b.exports="function"==typeof Object.create?function(a,b){a.super_=b,a.prototype=Object.create(b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}})}:function(a,b){a.super_=b;var c=function(){};c.prototype=b.prototype,a.prototype=new c,a.prototype.constructor=a}},{}],30:[function(a,b){var c=b.exports={};c.nextTick=function(){var a="undefined"!=typeof window&&window.setImmediate,b="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(a)return function(a){return window.setImmediate(a)};if(b){var c=[];return window.addEventListener("message",function(a){var b=a.source;if((b===window||null===b)&&"process-tick"===a.data&&(a.stopPropagation(),c.length>0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),c.title="browser",c.browser=!0,c.env={},c.argv=[],c.binding=function(){throw new Error("process.binding is not supported")},c.cwd=function(){return"/"},c.chdir=function(){throw new Error("process.chdir is not supported")}},{}],31:[function(a,b,c){function d(a,b,c){if(!(this instanceof d))return new d(a,b,c);var e=typeof a;if("base64"===b&&"string"===e)for(a=A(a);a.length%4!==0;)a+="=";var f;if("number"===e)f=D(a);else if("string"===e)f=d.byteLength(a,b);else{if("object"!==e)throw new Error("First argument needs to be a number, array or string.");f=D(a.length)}var g;d._useTypedArrays?g=B(new Uint8Array(f)):(g=this,g.length=f,g._isBuffer=!0);var h;if(d._useTypedArrays&&"function"==typeof Uint8Array&&a instanceof Uint8Array)g._set(a);else if(F(a))for(h=0;f>h;h++)g[h]=d.isBuffer(a)?a.readUInt8(h):a[h];else if("string"===e)g.write(a,0,b);else if("number"===e&&!d._useTypedArrays&&!c)for(h=0;f>h;h++)g[h]=0;return g}function e(a,b,c,e){c=Number(c)||0;var f=a.length-c;e?(e=Number(e),e>f&&(e=f)):e=f;var g=b.length;P(g%2===0,"Invalid hex string"),e>g/2&&(e=g/2);for(var h=0;e>h;h++){var i=parseInt(b.substr(2*h,2),16);P(!isNaN(i),"Invalid hex string"),a[c+h]=i}return d._charsWritten=2*h,h}function f(a,b,c,e){var f=d._charsWritten=K(H(b),a,c,e);return f}function g(a,b,c,e){var f=d._charsWritten=K(I(b),a,c,e);return f}function h(a,b,c,d){return g(a,b,c,d)}function i(a,b,c,e){var f=d._charsWritten=K(J(b),a,c,e);return f}function j(a,b,c){return Q.fromByteArray(0===b&&c===a.length?a:a.slice(b,c))}function k(a,b,c){var d="",e="";c=Math.min(a.length,c);for(var f=b;c>f;f++)a[f]<=127?(d+=L(e)+String.fromCharCode(a[f]),e=""):e+="%"+a[f].toString(16);return d+L(e)}function l(a,b,c){var d="";c=Math.min(a.length,c);for(var e=b;c>e;e++)d+=String.fromCharCode(a[e]);return d}function m(a,b,c){return l(a,b,c)}function n(a,b,c){var d=a.length;(!b||0>b)&&(b=0),(!c||0>c||c>d)&&(c=d);for(var e="",f=b;c>f;f++)e+=G(a[f]);return e}function o(a,b,c,d){d||(P("boolean"==typeof c,"missing or invalid endian"),P(void 0!==b&&null!==b,"missing offset"),P(b+1=e)){var f;return c?(f=a[b],e>b+1&&(f|=a[b+1]<<8)):(f=a[b]<<8,e>b+1&&(f|=a[b+1])),f}}function p(a,b,c,d){d||(P("boolean"==typeof c,"missing or invalid endian"),P(void 0!==b&&null!==b,"missing offset"),P(b+3=e)){var f;return c?(e>b+2&&(f=a[b+2]<<16),e>b+1&&(f|=a[b+1]<<8),f|=a[b],e>b+3&&(f+=a[b+3]<<24>>>0)):(e>b+1&&(f=a[b+1]<<16),e>b+2&&(f|=a[b+2]<<8),e>b+3&&(f|=a[b+3]),f+=a[b]<<24>>>0),f}}function q(a,b,c,d){d||(P("boolean"==typeof c,"missing or invalid endian"),P(void 0!==b&&null!==b,"missing offset"),P(b+1=e)){var f=o(a,b,c,!0),g=32768&f;return g?-1*(65535-f+1):f}}function r(a,b,c,d){d||(P("boolean"==typeof c,"missing or invalid endian"),P(void 0!==b&&null!==b,"missing offset"),P(b+3=e)){var f=p(a,b,c,!0),g=2147483648&f;return g?-1*(4294967295-f+1):f}}function s(a,b,c,d){return d||(P("boolean"==typeof c,"missing or invalid endian"),P(b+3=f))for(var g=0,h=Math.min(f-c,2);h>g;g++)a[c+g]=(b&255<<8*(d?g:1-g))>>>8*(d?g:1-g)}function v(a,b,c,d,e){e||(P(void 0!==b&&null!==b,"missing value"),P("boolean"==typeof d,"missing or invalid endian"),P(void 0!==c&&null!==c,"missing offset"),P(c+3=f))for(var g=0,h=Math.min(f-c,4);h>g;g++)a[c+g]=b>>>8*(d?g:3-g)&255}function w(a,b,c,d,e){e||(P(void 0!==b&&null!==b,"missing value"),P("boolean"==typeof d,"missing or invalid endian"),P(void 0!==c&&null!==c,"missing offset"),P(c+1=f||(b>=0?u(a,b,c,d,e):u(a,65535+b+1,c,d,e))}function x(a,b,c,d,e){e||(P(void 0!==b&&null!==b,"missing value"),P("boolean"==typeof d,"missing or invalid endian"),P(void 0!==c&&null!==c,"missing offset"),P(c+3=f||(b>=0?v(a,b,c,d,e):v(a,4294967295+b+1,c,d,e))}function y(a,b,c,d,e){e||(P(void 0!==b&&null!==b,"missing value"),P("boolean"==typeof d,"missing or invalid endian"),P(void 0!==c&&null!==c,"missing offset"),P(c+3=f||R.write(a,b,c,d,23,4)}function z(a,b,c,d,e){e||(P(void 0!==b&&null!==b,"missing value"),P("boolean"==typeof d,"missing or invalid endian"),P(void 0!==c&&null!==c,"missing offset"),P(c+7=f||R.write(a,b,c,d,52,8)}function A(a){return a.trim?a.trim():a.replace(/^\s+|\s+$/g,"")}function B(a){return a._isBuffer=!0,a._get=a.get,a._set=a.set,a.get=S.get,a.set=S.set,a.write=S.write,a.toString=S.toString,a.toLocaleString=S.toString,a.toJSON=S.toJSON,a.copy=S.copy,a.slice=S.slice,a.readUInt8=S.readUInt8,a.readUInt16LE=S.readUInt16LE,a.readUInt16BE=S.readUInt16BE,a.readUInt32LE=S.readUInt32LE,a.readUInt32BE=S.readUInt32BE,a.readInt8=S.readInt8,a.readInt16LE=S.readInt16LE,a.readInt16BE=S.readInt16BE,a.readInt32LE=S.readInt32LE,a.readInt32BE=S.readInt32BE,a.readFloatLE=S.readFloatLE,a.readFloatBE=S.readFloatBE,a.readDoubleLE=S.readDoubleLE,a.readDoubleBE=S.readDoubleBE,a.writeUInt8=S.writeUInt8,a.writeUInt16LE=S.writeUInt16LE,a.writeUInt16BE=S.writeUInt16BE,a.writeUInt32LE=S.writeUInt32LE,a.writeUInt32BE=S.writeUInt32BE,a.writeInt8=S.writeInt8,a.writeInt16LE=S.writeInt16LE,a.writeInt16BE=S.writeInt16BE,a.writeInt32LE=S.writeInt32LE,a.writeInt32BE=S.writeInt32BE,a.writeFloatLE=S.writeFloatLE,a.writeFloatBE=S.writeFloatBE,a.writeDoubleLE=S.writeDoubleLE,a.writeDoubleBE=S.writeDoubleBE,a.fill=S.fill,a.inspect=S.inspect,a.toArrayBuffer=S.toArrayBuffer,a}function C(a,b,c){return"number"!=typeof a?c:(a=~~a,a>=b?b:a>=0?a:(a+=b,a>=0?a:0))}function D(a){return a=~~Math.ceil(+a),0>a?0:a}function E(a){return(Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)})(a)}function F(a){return E(a)||d.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length}function G(a){return 16>a?"0"+a.toString(16):a.toString(16)}function H(a){for(var b=[],c=0;c=d)b.push(a.charCodeAt(c));else{var e=c;d>=55296&&57343>=d&&c++;for(var f=encodeURIComponent(a.slice(e,c+1)).substr(1).split("%"),g=0;ge&&!(e+c>=b.length||e>=a.length);e++)b[e+c]=a[e];return e}function L(a){try{return decodeURIComponent(a)}catch(b){return String.fromCharCode(65533)}}function M(a,b){P("number"==typeof a,"cannot write a non-number as a number"),P(a>=0,"specified a negative value for writing an unsigned value"),P(b>=a,"value is larger than maximum value for type"),P(Math.floor(a)===a,"value has a fractional component")}function N(a,b,c){P("number"==typeof a,"cannot write a non-number as a number"),P(b>=a,"value larger than maximum allowed value"),P(a>=c,"value smaller than minimum allowed value"),P(Math.floor(a)===a,"value has a fractional component")}function O(a,b,c){P("number"==typeof a,"cannot write a non-number as a number"),P(b>=a,"value larger than maximum allowed value"),P(a>=c,"value smaller than minimum allowed value")}function P(a,b){if(!a)throw new Error(b||"Failed assertion")}var Q=a("base64-js"),R=a("ieee754");c.Buffer=d,c.SlowBuffer=d,c.INSPECT_MAX_BYTES=50,d.poolSize=8192,d._useTypedArrays=function(){if("undefined"==typeof Uint8Array||"undefined"==typeof ArrayBuffer)return!1;try{var a=new Uint8Array(0);return a.foo=function(){return 42},42===a.foo()&&"function"==typeof a.subarray}catch(b){return!1}}(),d.isEncoding=function(a){switch(String(a).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},d.isBuffer=function(a){return!(null===a||void 0===a||!a._isBuffer)},d.byteLength=function(a,b){var c;switch(a+="",b||"utf8"){case"hex":c=a.length/2;break;case"utf8":case"utf-8":c=H(a).length;break;case"ascii":case"binary":case"raw":c=a.length;break;case"base64":c=J(a).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":c=2*a.length;break;default:throw new Error("Unknown encoding")}return c},d.concat=function(a,b){if(P(E(a),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===a.length)return new d(0);if(1===a.length)return a[0];var c;if("number"!=typeof b)for(b=0,c=0;ck&&(c=k)):c=k,d=String(d||"utf8").toLowerCase()){case"hex":return e(this,a,b,c);case"utf8":case"utf-8":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return f(this,a,b,c);case"ascii":return g(this,a,b,c);case"binary":return h(this,a,b,c);case"base64":return i(this,a,b,c);default:throw new Error("Unknown encoding")}},d.prototype.toString=function(a,b,c){var d=this;if(a=String(a||"utf8").toLowerCase(),b=Number(b)||0,c=void 0!==c?Number(c):c=d.length,c===b)return"";switch(a){case"hex":return n(d,b,c);case"utf8":case"utf-8":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(d,b,c);case"ascii":return l(d,b,c);case"binary":return m(d,b,c);case"base64":return j(d,b,c);default:throw new Error("Unknown encoding")}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},d.prototype.copy=function(a,b,c,d){var e=this;if(c||(c=0),d||0===d||(d=this.length),b||(b=0),d!==c&&0!==a.length&&0!==e.length){P(d>=c,"sourceEnd < sourceStart"),P(b>=0&&b=0&&c=0&&d<=e.length,"sourceEnd out of bounds"),d>this.length&&(d=this.length),a.length-bf;f++)a[f+b]=this[f+c]}},d.prototype.slice=function(a,b){var c=this.length;if(a=C(a,c,0),b=C(b,c,c),d._useTypedArrays)return B(this.subarray(a,b));for(var e=b-a,f=new d(e,void 0,!0),g=0;e>g;g++)f[g]=this[g+a];return f},d.prototype.get=function(a){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(a)},d.prototype.set=function(a,b){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(a,b)},d.prototype.readUInt8=function(a,b){return b||(P(void 0!==a&&null!==a,"missing offset"),P(a=this.length?void 0:this[a]},d.prototype.readUInt16LE=function(a,b){return o(this,a,!0,b)},d.prototype.readUInt16BE=function(a,b){return o(this,a,!1,b)},d.prototype.readUInt32LE=function(a,b){return p(this,a,!0,b)},d.prototype.readUInt32BE=function(a,b){return p(this,a,!1,b)},d.prototype.readInt8=function(a,b){if(b||(P(void 0!==a&&null!==a,"missing offset"),P(a=this.length)){var c=128&this[a];return c?-1*(255-this[a]+1):this[a]}},d.prototype.readInt16LE=function(a,b){return q(this,a,!0,b)},d.prototype.readInt16BE=function(a,b){return q(this,a,!1,b)},d.prototype.readInt32LE=function(a,b){return r(this,a,!0,b)},d.prototype.readInt32BE=function(a,b){return r(this,a,!1,b)},d.prototype.readFloatLE=function(a,b){return s(this,a,!0,b)},d.prototype.readFloatBE=function(a,b){return s(this,a,!1,b)},d.prototype.readDoubleLE=function(a,b){return t(this,a,!0,b)},d.prototype.readDoubleBE=function(a,b){return t(this,a,!1,b)},d.prototype.writeUInt8=function(a,b,c){c||(P(void 0!==a&&null!==a,"missing value"),P(void 0!==b&&null!==b,"missing offset"),P(b=this.length||(this[b]=a)},d.prototype.writeUInt16LE=function(a,b,c){u(this,a,b,!0,c)},d.prototype.writeUInt16BE=function(a,b,c){u(this,a,b,!1,c)},d.prototype.writeUInt32LE=function(a,b,c){v(this,a,b,!0,c)},d.prototype.writeUInt32BE=function(a,b,c){v(this,a,b,!1,c)},d.prototype.writeInt8=function(a,b,c){c||(P(void 0!==a&&null!==a,"missing value"),P(void 0!==b&&null!==b,"missing offset"),P(b=this.length||(a>=0?this.writeUInt8(a,b,c):this.writeUInt8(255+a+1,b,c))},d.prototype.writeInt16LE=function(a,b,c){w(this,a,b,!0,c)},d.prototype.writeInt16BE=function(a,b,c){w(this,a,b,!1,c)},d.prototype.writeInt32LE=function(a,b,c){x(this,a,b,!0,c)},d.prototype.writeInt32BE=function(a,b,c){x(this,a,b,!1,c)},d.prototype.writeFloatLE=function(a,b,c){y(this,a,b,!0,c)},d.prototype.writeFloatBE=function(a,b,c){y(this,a,b,!1,c)},d.prototype.writeDoubleLE=function(a,b,c){z(this,a,b,!0,c)},d.prototype.writeDoubleBE=function(a,b,c){z(this,a,b,!1,c)},d.prototype.fill=function(a,b,c){if(a||(a=0),b||(b=0),c||(c=this.length),"string"==typeof a&&(a=a.charCodeAt(0)),P("number"==typeof a&&!isNaN(a),"value is not a number"),P(c>=b,"end < start"),c!==b&&0!==this.length){P(b>=0&&b=0&&c<=this.length,"end out of bounds");for(var d=b;c>d;d++)this[d]=a}},d.prototype.inspect=function(){for(var a=[],b=this.length,d=0;b>d;d++)if(a[d]=G(this[d]),d===c.INSPECT_MAX_BYTES){a[d+1]="...";break}return""},d.prototype.toArrayBuffer=function(){if("function"==typeof Uint8Array){if(d._useTypedArrays)return new d(this).buffer; -for(var a=new Uint8Array(this.length),b=0,c=a.length;c>b;b+=1)a[b]=this[b];return a.buffer}throw new Error("Buffer.toArrayBuffer not supported in this browser")};var S=d.prototype},{"base64-js":32,ieee754:33}],32:[function(a,b){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(){"use strict";function a(a){var b=a.charCodeAt(0);return b===g?62:b===h?63:i>b?-1:i+10>b?b-i+26+26:k+26>b?b-k:j+26>b?b-j+26:void 0}function d(b){function c(a){j[l++]=a}var d,e,g,h,i,j;if(b.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var k=b.length;i="="===b.charAt(k-2)?2:"="===b.charAt(k-1)?1:0,j=new f(3*b.length/4-i),g=i>0?b.length-4:b.length;var l=0;for(d=0,e=0;g>d;d+=4,e+=3)h=a(b.charAt(d))<<18|a(b.charAt(d+1))<<12|a(b.charAt(d+2))<<6|a(b.charAt(d+3)),c((16711680&h)>>16),c((65280&h)>>8),c(255&h);return 2===i?(h=a(b.charAt(d))<<2|a(b.charAt(d+1))>>4,c(255&h)):1===i&&(h=a(b.charAt(d))<<10|a(b.charAt(d+1))<<4|a(b.charAt(d+2))>>2,c(h>>8&255),c(255&h)),j}function e(a){function b(a){return c.charAt(a)}function d(a){return b(a>>18&63)+b(a>>12&63)+b(a>>6&63)+b(63&a)}var e,f,g,h=a.length%3,i="";for(e=0,g=a.length-h;g>e;e+=3)f=(a[e]<<16)+(a[e+1]<<8)+a[e+2],i+=d(f);switch(h){case 1:f=a[a.length-1],i+=b(f>>2),i+=b(f<<4&63),i+="==";break;case 2:f=(a[a.length-2]<<8)+a[a.length-1],i+=b(f>>10),i+=b(f>>4&63),i+=b(f<<2&63),i+="="}return i}var f="undefined"!=typeof Uint8Array?Uint8Array:Array,g=("0".charCodeAt(0),"+".charCodeAt(0)),h="/".charCodeAt(0),i="0".charCodeAt(0),j="a".charCodeAt(0),k="A".charCodeAt(0);b.exports.toByteArray=d,b.exports.fromByteArray=e}()},{}],33:[function(a,b,c){c.read=function(a,b,c,d,e){var f,g,h=8*e-d-1,i=(1<>1,k=-7,l=c?e-1:0,m=c?-1:1,n=a[b+l];for(l+=m,f=n&(1<<-k)-1,n>>=-k,k+=h;k>0;f=256*f+a[b+l],l+=m,k-=8);for(g=f&(1<<-k)-1,f>>=-k,k+=d;k>0;g=256*g+a[b+l],l+=m,k-=8);if(0===f)f=1-j;else{if(f===i)return g?0/0:1/0*(n?-1:1);g+=Math.pow(2,d),f-=j}return(n?-1:1)*g*Math.pow(2,f-d)},c.write=function(a,b,c,d,e,f){var g,h,i,j=8*f-e-1,k=(1<>1,m=23===e?Math.pow(2,-24)-Math.pow(2,-77):0,n=d?0:f-1,o=d?1:-1,p=0>b||0===b&&0>1/b?1:0;for(b=Math.abs(b),isNaN(b)||1/0===b?(h=isNaN(b)?1:0,g=k):(g=Math.floor(Math.log(b)/Math.LN2),b*(i=Math.pow(2,-g))<1&&(g--,i*=2),b+=g+l>=1?m/i:m*Math.pow(2,1-l),b*i>=2&&(g++,i/=2),g+l>=k?(h=0,g=k):g+l>=1?(h=(b*i-1)*Math.pow(2,e),g+=l):(h=b*Math.pow(2,l-1)*Math.pow(2,e),g=0));e>=8;a[c+n]=255&h,n+=o,h/=256,e-=8);for(g=g<0;a[c+n]=255&g,n+=o,g/=256,j-=8);a[c+n-o]|=128*p}},{}],34:[function(b,c,d){(function(b){!function(e){function f(a){throw RangeError(I[a])}function g(a,b){for(var c=a.length;c--;)a[c]=b(a[c]);return a}function h(a,b){return g(a.split(H),b).join(".")}function i(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function j(a){return g(a,function(a){var b="";return a>65535&&(a-=65536,b+=L(a>>>10&1023|55296),a=56320|1023&a),b+=L(a)}).join("")}function k(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:x}function l(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function m(a,b,c){var d=0;for(a=c?K(a/B):a>>1,a+=K(a/b);a>J*z>>1;d+=x)a=K(a/J);return K(d+(J+1)*a/(a+A))}function n(a){var b,c,d,e,g,h,i,l,n,o,p=[],q=a.length,r=0,s=D,t=C;for(c=a.lastIndexOf(E),0>c&&(c=0),d=0;c>d;++d)a.charCodeAt(d)>=128&&f("not-basic"),p.push(a.charCodeAt(d));for(e=c>0?c+1:0;q>e;){for(g=r,h=1,i=x;e>=q&&f("invalid-input"),l=k(a.charCodeAt(e++)),(l>=x||l>K((w-r)/h))&&f("overflow"),r+=l*h,n=t>=i?y:i>=t+z?z:i-t,!(n>l);i+=x)o=x-n,h>K(w/o)&&f("overflow"),h*=o;b=p.length+1,t=m(r-g,b,0==g),K(r/b)>w-s&&f("overflow"),s+=K(r/b),r%=b,p.splice(r++,0,s)}return j(p)}function o(a){var b,c,d,e,g,h,j,k,n,o,p,q,r,s,t,u=[];for(a=i(a),q=a.length,b=D,c=0,g=C,h=0;q>h;++h)p=a[h],128>p&&u.push(L(p));for(d=e=u.length,e&&u.push(E);q>d;){for(j=w,h=0;q>h;++h)p=a[h],p>=b&&j>p&&(j=p);for(r=d+1,j-b>K((w-c)/r)&&f("overflow"),c+=(j-b)*r,b=j,h=0;q>h;++h)if(p=a[h],b>p&&++c>w&&f("overflow"),p==b){for(k=c,n=x;o=g>=n?y:n>=g+z?z:n-g,!(o>k);n+=x)t=k-o,s=x-o,u.push(L(l(o+t%s,0))),k=K(t/s);u.push(L(l(k,0))),g=m(c,r,d==e),c=0,++d}++c,++b}return u.join("")}function p(a){return h(a,function(a){return F.test(a)?n(a.slice(4).toLowerCase()):a})}function q(a){return h(a,function(a){return G.test(a)?"xn--"+o(a):a})}var r="object"==typeof d&&d,s="object"==typeof c&&c&&c.exports==r&&c,t="object"==typeof b&&b;(t.global===t||t.window===t)&&(e=t);var u,v,w=2147483647,x=36,y=1,z=26,A=38,B=700,C=72,D=128,E="-",F=/^xn--/,G=/[^ -~]/,H=/\x2E|\u3002|\uFF0E|\uFF61/g,I={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},J=x-y,K=Math.floor,L=String.fromCharCode;if(u={version:"1.2.4",ucs2:{decode:i,encode:j},decode:n,encode:o,toASCII:q,toUnicode:p},"function"==typeof a&&"object"==typeof a.amd&&a.amd)a("punycode",function(){return u});else if(r&&!r.nodeType)if(s)s.exports=u;else for(v in u)u.hasOwnProperty(v)&&(r[v]=u[v]);else e.punycode=u}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(a,b){"use strict";function c(a,b){return Object.prototype.hasOwnProperty.call(a,b)}b.exports=function(a,b,e,f){b=b||"&",e=e||"=";var g={};if("string"!=typeof a||0===a.length)return g;var h=/\+/g;a=a.split(b);var i=1e3;f&&"number"==typeof f.maxKeys&&(i=f.maxKeys);var j=a.length;i>0&&j>i&&(j=i);for(var k=0;j>k;++k){var l,m,n,o,p=a[k].replace(h,"%20"),q=p.indexOf(e);q>=0?(l=p.substr(0,q),m=p.substr(q+1)):(l=p,m=""),n=decodeURIComponent(l),o=decodeURIComponent(m),c(g,n)?d(g[n])?g[n].push(o):g[n]=[g[n],o]:g[n]=o}return g};var d=Array.isArray||function(a){return"[object Array]"===Object.prototype.toString.call(a)}},{}],36:[function(a,b){"use strict";function c(a,b){if(a.map)return a.map(b);for(var c=[],d=0;d0)if(b.ended&&!e){var h=new Error("stream.push() after EOF");a.emit("error",h)}else if(b.endEmitted&&e){var h=new Error("stream.unshift() after end event");a.emit("error",h)}else!b.decoder||e||d||(c=b.decoder.write(c)),b.length+=b.objectMode?1:c.length,e?b.buffer.unshift(c):(b.reading=!1,b.buffer.push(c)),b.needReadable&&l(a),n(a,b);else e||(b.reading=!1);return g(b)}function g(a){return!a.ended&&(a.needReadable||a.length=D)a=D;else{a--;for(var b=1;32>b;b<<=1)a|=a>>b;a++}return a}function i(a,b){return 0===b.length&&b.ended?0:b.objectMode?0===a?0:1:isNaN(a)||null===a?b.flowing&&b.buffer.length?b.buffer[0].length:b.length:0>=a?0:(a>b.highWaterMark&&(b.highWaterMark=h(a)),a>b.length?b.ended?b.length:(b.needReadable=!0,0):a)}function j(a,b){var c=null;return A.isBuffer(b)||"string"==typeof b||null===b||void 0===b||a.objectMode||c||(c=new TypeError("Invalid non-string/buffer chunk")),c}function k(a,b){if(b.decoder&&!b.ended){var c=b.decoder.end();c&&c.length&&(b.buffer.push(c),b.length+=b.objectMode?1:c.length)}b.ended=!0,b.length>0?l(a):u(a)}function l(a){var b=a._readableState;b.needReadable=!1,b.emittedReadable||(b.emittedReadable=!0,b.sync?B(function(){m(a)}):m(a))}function m(a){a.emit("readable")}function n(a,b){b.readingMore||(b.readingMore=!0,B(function(){o(a,b)}))}function o(a,b){for(var c=b.length;!b.reading&&!b.flowing&&!b.ended&&b.length0)return;return 0===d.pipesCount?(d.flowing=!1,void(y.listenerCount(a,"data")>0&&s(a))):void(d.ranOut=!0)}function r(){this._readableState.ranOut&&(this._readableState.ranOut=!1,q(this))}function s(a,b){var c=a._readableState;if(c.flowing)throw new Error("Cannot switch to old mode now.");var d=b||!1,e=!1;a.readable=!0,a.pipe=z.prototype.pipe,a.on=a.addListener=z.prototype.on,a.on("readable",function(){e=!0;for(var b;!d&&null!==(b=a.read());)a.emit("data",b);null===b&&(e=!1,a._readableState.needReadable=!0)}),a.pause=function(){d=!0,this.emit("pause")},a.resume=function(){d=!1,e?B(function(){a.emit("readable")}):this.read(0),this.emit("resume")},a.emit("readable")}function t(a,b){var c,d=b.buffer,e=b.length,f=!!b.decoder,g=!!b.objectMode;if(0===d.length)return null;if(0===e)c=null;else if(g)c=d.shift();else if(!a||a>=e)c=f?d.join(""):A.concat(d,e),d.length=0;else if(aj&&a>i;j++){var h=d[0],l=Math.min(a-i,h.length);f?c+=h.slice(0,l):h.copy(c,i,0,l),l0)throw new Error("endReadable called on non-empty stream");!b.endEmitted&&b.calledRead&&(b.ended=!0,B(function(){b.endEmitted||0!==b.length||(b.endEmitted=!0,a.readable=!1,a.emit("end"))}))}function v(a,b){for(var c=0,d=a.length;d>c;c++)b(a[c],c)}function w(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1}b.exports=e,e.ReadableState=d;var x,y=a("events").EventEmitter,z=a("./index.js"),A=a("buffer").Buffer,B=a("process/browser.js").nextTick,C=a("inherits");C(e,z),e.prototype.push=function(a,b){var c=this._readableState;return"string"!=typeof a||c.objectMode||(b=b||c.defaultEncoding,b!==c.encoding&&(a=new A(a,b),b="")),f(this,c,a,b,!1)},e.prototype.unshift=function(a){var b=this._readableState;return f(this,b,a,"",!0)},e.prototype.setEncoding=function(b){x||(x=a("string_decoder").StringDecoder),this._readableState.decoder=new x(b),this._readableState.encoding=b};var D=8388608;e.prototype.read=function(a){var b=this._readableState;b.calledRead=!0;var c=a;if(("number"!=typeof a||a>0)&&(b.emittedReadable=!1),0===a&&b.needReadable&&(b.length>=b.highWaterMark||b.ended))return l(this),null;if(a=i(a,b),0===a&&b.ended)return 0===b.length&&u(this),null;var d=b.needReadable;b.length-a<=b.highWaterMark&&(d=!0),(b.ended||b.reading)&&(d=!1),d&&(b.reading=!0,b.sync=!0,0===b.length&&(b.needReadable=!0),this._read(b.highWaterMark),b.sync=!1),d&&!b.reading&&(a=i(c,b));var e;return e=a>0?t(a,b):null,null===e&&(b.needReadable=!0,a=0),b.length-=a,0!==b.length||b.ended||(b.needReadable=!0),b.ended&&!b.endEmitted&&0===b.length&&u(this),e},e.prototype._read=function(){this.emit("error",new Error("not implemented"))},e.prototype.pipe=function(a,b){function d(a){a===k&&f()}function e(){a.end()}function f(){a.removeListener("close",h),a.removeListener("finish",i),a.removeListener("drain",o),a.removeListener("error",g),a.removeListener("unpipe",d),k.removeListener("end",e),k.removeListener("end",f),(!a._writableState||a._writableState.needDrain)&&o()}function g(b){j(),0===s&&0===y.listenerCount(a,"error")&&a.emit("error",b)}function h(){a.removeListener("finish",i),j()}function i(){a.removeListener("close",h),j()}function j(){k.unpipe(a)}var k=this,l=this._readableState;switch(l.pipesCount){case 0:l.pipes=a;break;case 1:l.pipes=[l.pipes,a];break;default:l.pipes.push(a)}l.pipesCount+=1;var m=(!b||b.end!==!1)&&a!==c.stdout&&a!==c.stderr,n=m?e:f;l.endEmitted?B(n):k.once("end",n),a.on("unpipe",d);var o=p(k);a.on("drain",o);var s=y.listenerCount(a,"error");return a.once("error",g),a.once("close",h),a.once("finish",i),a.emit("pipe",k),l.flowing||(this.on("readable",r),l.flowing=!0,B(function(){q(k)})),a},e.prototype.unpipe=function(a){var b=this._readableState;if(0===b.pipesCount)return this;if(1===b.pipesCount)return a&&a!==b.pipes?this:(a||(a=b.pipes),b.pipes=null,b.pipesCount=0,this.removeListener("readable",r),b.flowing=!1,a&&a.emit("unpipe",this),this);if(!a){var c=b.pipes,d=b.pipesCount;b.pipes=null,b.pipesCount=0,this.removeListener("readable",r),b.flowing=!1;for(var e=0;d>e;e++)c[e].emit("unpipe",this);return this}var e=w(b.pipes,a);return-1===e?this:(b.pipes.splice(e,1),b.pipesCount-=1,1===b.pipesCount&&(b.pipes=b.pipes[0]),a.emit("unpipe",this),this)},e.prototype.on=function(a,b){var c=z.prototype.on.call(this,a,b);if("data"!==a||this._readableState.flowing||s(this),"readable"===a&&this.readable){var d=this._readableState;d.readableListening||(d.readableListening=!0,d.emittedReadable=!1,d.needReadable=!0,d.reading?d.length&&l(this,d):this.read(0))}return c},e.prototype.addListener=e.prototype.on,e.prototype.resume=function(){s(this),this.read(0),this.emit("resume")},e.prototype.pause=function(){s(this,!0),this.emit("pause")},e.prototype.wrap=function(a){var b=this._readableState,c=!1,d=this;a.on("end",function(){if(b.decoder&&!b.ended){var a=b.decoder.end();a&&a.length&&d.push(a)}d.push(null)}),a.on("data",function(e){if(b.decoder&&(e=b.decoder.write(e)),e&&(b.objectMode||e.length)){var f=d.push(e);f||(c=!0,a.pause())}});for(var e in a)"function"==typeof a[e]&&"undefined"==typeof this[e]&&(this[e]=function(b){return function(){return a[b].apply(a,arguments)}}(e));var f=["error","close","destroy","pause","resume"];return v(f,function(b){a.on(b,function(a){return d.emit.apply(d,b,a)})}),d._read=function(){c&&(c=!1,a.resume())},d},e._fromList=t}).call(this,a("/Users/damian/projects/raml-js-parser/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"))},{"./index.js":39,"/Users/damian/projects/raml-js-parser/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":30,buffer:31,events:23,inherits:29,"process/browser.js":40,string_decoder:45}],43:[function(a,b){function c(a,b){this.afterTransform=function(a,c){return d(b,a,c)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function d(a,b,c){var d=a._transformState;d.transforming=!1;var e=d.writecb;if(!e)return a.emit("error",new Error("no writecb in Transform class"));d.writechunk=null,d.writecb=null,null!==c&&void 0!==c&&a.push(c),e&&e(b);var f=a._readableState;f.reading=!1,(f.needReadable||f.length=this.charLength-this.charReceived?this.charLength-this.charReceived:a.length;if(a.copy(this.charBuffer,this.charReceived,c,d),this.charReceived+=d-c,c=d,this.charReceived=55296&&56319>=e)){if(this.charReceived=this.charLength=0,d==a.length)return b;a=a.slice(d,a.length);break}this.charLength+=this.surrogateSize,b=""}var f=this.detectIncompleteChar(a),g=a.length;this.charLength&&(a.copy(this.charBuffer,0,a.length-f,g),this.charReceived=f,g-=f),b+=a.toString(this.encoding,0,g);var g=b.length-1,e=b.charCodeAt(g);if(e>=55296&&56319>=e){var h=this.surrogateSize;return this.charLength+=h,this.charReceived+=h,this.charBuffer.copy(this.charBuffer,h,0,h),this.charBuffer.write(b.charAt(b.length-1),this.encoding),b.substring(0,g)}return b},i.prototype.detectIncompleteChar=function(a){for(var b=a.length>=3?3:a.length;b>0;b--){var c=a[a.length-b];if(1==b&&c>>5==6){this.charLength=2;break}if(2>=b&&c>>4==14){this.charLength=3;break}if(3>=b&&c>>3==30){this.charLength=4;break}}return b},i.prototype.end=function(a){var b="";if(a&&a.length&&(b=this.write(a)),this.charReceived){var c=this.charReceived,d=this.charBuffer,e=this.encoding;b+=d.slice(0,c).toString(e)}return b}},{buffer:31}],46:[function(a,b,c){!function(){"use strict";function b(a,b,c){if(a&&"object"==typeof a&&a.href)return a;if("string"!=typeof a)throw new TypeError("Parameter 'url' must be a string, not "+typeof a);var e={},f=a;f=f.trim();var j=i.exec(f);if(j){j=j[0];var k=j.toLowerCase();e.protocol=k,f=f.substr(j.length)}if(c||j||f.match(/^\/\/[^@\/]+@[^@\/]+/)){var l="//"===f.substr(0,2);!l||j&&t[j]||(f=f.substr(2),e.slashes=!0)}if(!t[j]&&(l||j&&!u[j])){var w=f.indexOf("@");if(-1!==w){for(var x=f.slice(0,w),y=!0,z=0,A=o.length;A>z;z++)if(-1!==x.indexOf(o[z])){y=!1;break}y&&(e.auth=decodeURIComponent(x),f=f.substr(w+1))}for(var B=-1,z=0,A=n.length;A>z;z++){var C=f.indexOf(n[z]);-1!==C&&(0>B||B>C)&&(B=C)}-1!==B?(e.host=f.substr(0,B),f=f.substr(B)):(e.host=f,f="");for(var D=g(e.host),E=Object.keys(D),z=0,A=E.length;A>z;z++){var F=E[z];e[F]=D[F]}e.hostname=e.hostname||"";var G="["===e.hostname[0]&&"]"===e.hostname[e.hostname.length-1];if(e.hostname.length>p)e.hostname="";else if(!G)for(var H=e.hostname.split(/\./),z=0,A=H.length;A>z;z++){var I=H[z];if(I&&!I.match(q)){for(var J="",K=0,L=I.length;L>K;K++)J+=I.charCodeAt(K)>127?"x":I[K];if(!J.match(q)){var M=H.slice(0,z),N=H.slice(z+1),O=I.match(r);O&&(M.push(O[1]),N.unshift(O[2])),N.length&&(f="/"+N.join(".")+f),e.hostname=M.join(".");break}}}if(e.hostname=e.hostname.toLowerCase(),!G){for(var P=e.hostname.split("."),Q=[],z=0;zz;z++){var S=m[z],T=encodeURIComponent(S);T===S&&(T=escape(S)),f=f.split(S).join(T)}var U=f.indexOf("#");-1!==U&&(e.hash=f.substr(U),f=f.slice(0,U));var V=f.indexOf("?");return-1!==V?(e.search=f.substr(V),e.query=f.substr(V+1),b&&(e.query=v.parse(e.query)),f=f.slice(0,V)):b&&(e.search="",e.query={}),f&&(e.pathname=f),u[j]&&e.hostname&&!e.pathname&&(e.pathname="/"),(e.pathname||e.search)&&(e.path=(e.pathname?e.pathname:"")+(e.search?e.search:"")),e.href=d(e),e}function d(a){"string"==typeof a&&(a=b(a));var c=a.auth||"";c&&(c=encodeURIComponent(c),c=c.replace(/%3A/i,":"),c+="@");var d=a.protocol||"",e=a.pathname||"",f=a.hash||"",g=!1,h="";void 0!==a.host?g=c+a.host:void 0!==a.hostname&&(g=c+(-1===a.hostname.indexOf(":")?a.hostname:"["+a.hostname+"]"),a.port&&(g+=":"+a.port)),a.query&&"object"==typeof a.query&&Object.keys(a.query).length&&(h=v.stringify(a.query));var i=a.search||h&&"?"+h||"";return d&&":"!==d.substr(-1)&&(d+=":"),a.slashes||(!d||u[d])&&g!==!1?(g="//"+(g||""),e&&"/"!==e.charAt(0)&&(e="/"+e)):g||(g=""),f&&"#"!==f.charAt(0)&&(f="#"+f),i&&"?"!==i.charAt(0)&&(i="?"+i),d+g+e+i+f}function e(a,b){return d(f(a,b))}function f(a,c){if(!a)return c;if(a=b(d(a),!1,!0),c=b(d(c),!1,!0),a.hash=c.hash,""===c.href)return a.href=d(a),a;if(c.slashes&&!c.protocol)return c.protocol=a.protocol,u[c.protocol]&&c.hostname&&!c.pathname&&(c.path=c.pathname="/"),c.href=d(c),c;if(c.protocol&&c.protocol!==a.protocol){if(!u[c.protocol])return c.href=d(c),c;if(a.protocol=c.protocol,!c.host&&!t[c.protocol]){for(var e=(c.pathname||"").split("/");e.length&&!(c.host=e.shift()););c.host||(c.host=""),c.hostname||(c.hostname=""),""!==e[0]&&e.unshift(""),e.length<2&&e.unshift(""),c.pathname=e.join("/")}return a.pathname=c.pathname,a.search=c.search,a.query=c.query,a.host=c.host||"",a.auth=c.auth,a.hostname=c.hostname||c.host,a.port=c.port,(void 0!==a.pathname||void 0!==a.search)&&(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.slashes=a.slashes||c.slashes,a.href=d(a),a}var f=a.pathname&&"/"===a.pathname.charAt(0),g=void 0!==c.host||c.pathname&&"/"===c.pathname.charAt(0),h=g||f||a.host&&c.pathname,i=h,j=a.pathname&&a.pathname.split("/")||[],e=c.pathname&&c.pathname.split("/")||[],k=a.protocol&&!u[a.protocol];if(k&&(delete a.hostname,delete a.port,a.host&&(""===j[0]?j[0]=a.host:j.unshift(a.host)),delete a.host,c.protocol&&(delete c.hostname,delete c.port,c.host&&(""===e[0]?e[0]=c.host:e.unshift(c.host)),delete c.host),h=h&&(""===e[0]||""===j[0])),g)a.host=c.host||""===c.host?c.host:a.host,a.hostname=c.hostname||""===c.hostname?c.hostname:a.hostname,a.search=c.search,a.query=c.query,j=e;else if(e.length)j||(j=[]),j.pop(),j=j.concat(e),a.search=c.search,a.query=c.query;else if("search"in c){if(k){a.hostname=a.host=j.shift();var l=a.host&&a.host.indexOf("@")>0?a.host.split("@"):!1;l&&(a.auth=l.shift(),a.host=a.hostname=l.shift())}return a.search=c.search,a.query=c.query,(void 0!==a.pathname||void 0!==a.search)&&(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.href=d(a),a}if(!j.length)return delete a.pathname,a.search?delete a.path:a.path="/"+a.search,a.href=d(a),a;for(var m=j.slice(-1)[0],n=(a.host||c.host)&&("."===m||".."===m)||""===m,o=0,p=j.length;p>=0;p--)m=j[p],"."==m?j.splice(p,1):".."===m?(j.splice(p,1),o++):o&&(j.splice(p,1),o--);if(!h&&!i)for(;o--;o)j.unshift("..");!h||""===j[0]||j[0]&&"/"===j[0].charAt(0)||j.unshift(""),n&&"/"!==j.join("/").substr(-1)&&j.push("");var q=""===j[0]||j[0]&&"/"===j[0].charAt(0);if(k){a.hostname=a.host=q?"":j.length?j.shift():"";var l=a.host&&a.host.indexOf("@")>0?a.host.split("@"):!1;l&&(a.auth=l.shift(),a.host=a.hostname=l.shift())}return h=h||a.host&&j.length,h&&!q&&j.unshift(""),a.pathname=j.join("/"),(void 0!==a.pathname||void 0!==a.search)&&(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.auth=c.auth||a.auth,a.slashes=a.slashes||c.slashes,a.href=d(a),a}function g(a){var b={},c=j.exec(a);return c&&(c=c[0],":"!==c&&(b.port=c.substr(1)),a=a.substr(0,a.length-c.length)),a&&(b.hostname=a),b}var h=a("punycode");c.parse=b,c.resolve=e,c.resolveObject=f,c.format=d;var i=/^([a-z0-9.+-]+:)/i,j=/:[0-9]*$/,k=["<",">",'"',"`"," ","\r","\n"," "],l=["{","}","|","\\","^","~","`"].concat(k),m=["'"].concat(k),n=["%","/","?",";","#"].concat(l).concat(m),o=["/","@","?","#"].concat(k),p=255,q=/^[a-zA-Z0-9][a-z0-9A-Z_-]{0,62}$/,r=/^([a-zA-Z0-9][a-z0-9A-Z_-]{0,62})(.*)$/,s={javascript:!0,"javascript:":!0},t={javascript:!0,"javascript:":!0},u={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=a("querystring")}()},{punycode:34,querystring:37}],47:[function(a,b){b.exports=function(a){return a&&"object"==typeof a&&"function"==typeof a.copy&&"function"==typeof a.fill&&"function"==typeof a.readUInt8}},{}],48:[function(a,b,c){(function(b,d){function e(a,b){var d={seen:[],stylize:g};return arguments.length>=3&&(d.depth=arguments[2]),arguments.length>=4&&(d.colors=arguments[3]),p(b)?d.showHidden=b:b&&c._extend(d,b),v(d.showHidden)&&(d.showHidden=!1),v(d.depth)&&(d.depth=2),v(d.colors)&&(d.colors=!1),v(d.customInspect)&&(d.customInspect=!0),d.colors&&(d.stylize=f),i(d,a,d.depth)}function f(a,b){var c=e.styles[b];return c?"["+e.colors[c][0]+"m"+a+"["+e.colors[c][1]+"m":a}function g(a){return a}function h(a){var b={};return a.forEach(function(a){b[a]=!0}),b}function i(a,b,d){if(a.customInspect&&b&&A(b.inspect)&&b.inspect!==c.inspect&&(!b.constructor||b.constructor.prototype!==b)){var e=b.inspect(d,a); -return t(e)||(e=i(a,e,d)),e}var f=j(a,b);if(f)return f;var g=Object.keys(b),p=h(g);if(a.showHidden&&(g=Object.getOwnPropertyNames(b)),z(b)&&(g.indexOf("message")>=0||g.indexOf("description")>=0))return k(b);if(0===g.length){if(A(b)){var q=b.name?": "+b.name:"";return a.stylize("[Function"+q+"]","special")}if(w(b))return a.stylize(RegExp.prototype.toString.call(b),"regexp");if(y(b))return a.stylize(Date.prototype.toString.call(b),"date");if(z(b))return k(b)}var r="",s=!1,u=["{","}"];if(o(b)&&(s=!0,u=["[","]"]),A(b)){var v=b.name?": "+b.name:"";r=" [Function"+v+"]"}if(w(b)&&(r=" "+RegExp.prototype.toString.call(b)),y(b)&&(r=" "+Date.prototype.toUTCString.call(b)),z(b)&&(r=" "+k(b)),0===g.length&&(!s||0==b.length))return u[0]+r+u[1];if(0>d)return w(b)?a.stylize(RegExp.prototype.toString.call(b),"regexp"):a.stylize("[Object]","special");a.seen.push(b);var x;return x=s?l(a,b,d,p,g):g.map(function(c){return m(a,b,d,p,c,s)}),a.seen.pop(),n(x,r,u)}function j(a,b){if(v(b))return a.stylize("undefined","undefined");if(t(b)){var c="'"+JSON.stringify(b).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return a.stylize(c,"string")}return s(b)?a.stylize(""+b,"number"):p(b)?a.stylize(""+b,"boolean"):q(b)?a.stylize("null","null"):void 0}function k(a){return"["+Error.prototype.toString.call(a)+"]"}function l(a,b,c,d,e){for(var f=[],g=0,h=b.length;h>g;++g)f.push(F(b,String(g))?m(a,b,c,d,String(g),!0):"");return e.forEach(function(e){e.match(/^\d+$/)||f.push(m(a,b,c,d,e,!0))}),f}function m(a,b,c,d,e,f){var g,h,j;if(j=Object.getOwnPropertyDescriptor(b,e)||{value:b[e]},j.get?h=j.set?a.stylize("[Getter/Setter]","special"):a.stylize("[Getter]","special"):j.set&&(h=a.stylize("[Setter]","special")),F(d,e)||(g="["+e+"]"),h||(a.seen.indexOf(j.value)<0?(h=q(c)?i(a,j.value,null):i(a,j.value,c-1),h.indexOf("\n")>-1&&(h=f?h.split("\n").map(function(a){return" "+a}).join("\n").substr(2):"\n"+h.split("\n").map(function(a){return" "+a}).join("\n"))):h=a.stylize("[Circular]","special")),v(g)){if(f&&e.match(/^\d+$/))return h;g=JSON.stringify(""+e),g.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(g=g.substr(1,g.length-2),g=a.stylize(g,"name")):(g=g.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),g=a.stylize(g,"string"))}return g+": "+h}function n(a,b,c){var d=0,e=a.reduce(function(a,b){return d++,b.indexOf("\n")>=0&&d++,a+b.replace(/\u001b\[\d\d?m/g,"").length+1},0);return e>60?c[0]+(""===b?"":b+"\n ")+" "+a.join(",\n ")+" "+c[1]:c[0]+b+" "+a.join(", ")+" "+c[1]}function o(a){return Array.isArray(a)}function p(a){return"boolean"==typeof a}function q(a){return null===a}function r(a){return null==a}function s(a){return"number"==typeof a}function t(a){return"string"==typeof a}function u(a){return"symbol"==typeof a}function v(a){return void 0===a}function w(a){return x(a)&&"[object RegExp]"===C(a)}function x(a){return"object"==typeof a&&null!==a}function y(a){return x(a)&&"[object Date]"===C(a)}function z(a){return x(a)&&("[object Error]"===C(a)||a instanceof Error)}function A(a){return"function"==typeof a}function B(a){return null===a||"boolean"==typeof a||"number"==typeof a||"string"==typeof a||"symbol"==typeof a||"undefined"==typeof a}function C(a){return Object.prototype.toString.call(a)}function D(a){return 10>a?"0"+a.toString(10):a.toString(10)}function E(){var a=new Date,b=[D(a.getHours()),D(a.getMinutes()),D(a.getSeconds())].join(":");return[a.getDate(),J[a.getMonth()],b].join(" ")}function F(a,b){return Object.prototype.hasOwnProperty.call(a,b)}var G=/%[sdj%]/g;c.format=function(a){if(!t(a)){for(var b=[],c=0;c=f)return a;switch(a){case"%s":return String(d[c++]);case"%d":return Number(d[c++]);case"%j":try{return JSON.stringify(d[c++])}catch(b){return"[Circular]"}default:return a}}),h=d[c];f>c;h=d[++c])g+=q(h)||!x(h)?" "+h:" "+e(h);return g},c.deprecate=function(a,e){function f(){if(!g){if(b.throwDeprecation)throw new Error(e);b.traceDeprecation?console.trace(e):console.error(e),g=!0}return a.apply(this,arguments)}if(v(d.process))return function(){return c.deprecate(a,e).apply(this,arguments)};if(b.noDeprecation===!0)return a;var g=!1;return f};var H,I={};c.debuglog=function(a){if(v(H)&&(H=b.env.NODE_DEBUG||""),a=a.toUpperCase(),!I[a])if(new RegExp("\\b"+a+"\\b","i").test(H)){var d=b.pid;I[a]=function(){var b=c.format.apply(c,arguments);console.error("%s %d: %s",a,d,b)}}else I[a]=function(){};return I[a]},c.inspect=e,e.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]},e.styles={special:"cyan",number:"yellow","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"},c.isArray=o,c.isBoolean=p,c.isNull=q,c.isNullOrUndefined=r,c.isNumber=s,c.isString=t,c.isSymbol=u,c.isUndefined=v,c.isRegExp=w,c.isObject=x,c.isDate=y,c.isError=z,c.isFunction=A,c.isPrimitive=B,c.isBuffer=a("./support/isBuffer");var J=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];c.log=function(){console.log("%s - %s",E(),c.format.apply(c,arguments))},c.inherits=a("inherits"),c._extend=function(a,b){if(!b||!x(b))return a;for(var c=Object.keys(b),d=c.length;d--;)a[c[d]]=b[c[d]];return a}}).call(this,a("/Users/damian/projects/raml-js-parser/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":47,"/Users/damian/projects/raml-js-parser/node_modules/browserify/node_modules/insert-module-globals/node_modules/process/browser.js":30,inherits:29}],49:[function(a,b,c){!function(a){var d=["equipment","information","rice","money","species","series","fish","sheep","moose","deer","news"],e=[[new RegExp("(m)en$","gi")],[new RegExp("(pe)ople$","gi")],[new RegExp("(child)ren$","gi")],[new RegExp("([ti])a$","gi")],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi")],[new RegExp("(hive)s$","gi")],[new RegExp("(tive)s$","gi")],[new RegExp("(curve)s$","gi")],[new RegExp("([lr])ves$","gi")],[new RegExp("([^fo])ves$","gi")],[new RegExp("([^aeiouy]|qu)ies$","gi")],[new RegExp("(s)eries$","gi")],[new RegExp("(m)ovies$","gi")],[new RegExp("(x|ch|ss|sh)es$","gi")],[new RegExp("([m|l])ice$","gi")],[new RegExp("(bus)es$","gi")],[new RegExp("(o)es$","gi")],[new RegExp("(shoe)s$","gi")],[new RegExp("(cris|ax|test)es$","gi")],[new RegExp("(octop|vir)i$","gi")],[new RegExp("(alias|status)es$","gi")],[new RegExp("^(ox)en","gi")],[new RegExp("(vert|ind)ices$","gi")],[new RegExp("(matr)ices$","gi")],[new RegExp("(quiz)zes$","gi")],[new RegExp("(m)an$","gi"),"$1en"],[new RegExp("(pe)rson$","gi"),"$1ople"],[new RegExp("(child)$","gi"),"$1ren"],[new RegExp("^(ox)$","gi"),"$1en"],[new RegExp("(ax|test)is$","gi"),"$1es"],[new RegExp("(octop|vir)us$","gi"),"$1i"],[new RegExp("(alias|status)$","gi"),"$1es"],[new RegExp("(bu)s$","gi"),"$1ses"],[new RegExp("(buffal|tomat|potat)o$","gi"),"$1oes"],[new RegExp("([ti])um$","gi"),"$1a"],[new RegExp("sis$","gi"),"ses"],[new RegExp("(?:([^f])fe|([lr])f)$","gi"),"$1$2ves"],[new RegExp("(hive)$","gi"),"$1s"],[new RegExp("([^aeiouy]|qu)y$","gi"),"$1ies"],[new RegExp("(x|ch|ss|sh)$","gi"),"$1es"],[new RegExp("(matr|vert|ind)ix|ex$","gi"),"$1ices"],[new RegExp("([m|l])ouse$","gi"),"$1ice"],[new RegExp("(quiz)$","gi"),"$1zes"],[new RegExp("s$","gi"),"s"],[new RegExp("$","gi"),"s"]],f=[[new RegExp("(m)an$","gi")],[new RegExp("(pe)rson$","gi")],[new RegExp("(child)$","gi")],[new RegExp("^(ox)$","gi")],[new RegExp("(ax|test)is$","gi")],[new RegExp("(octop|vir)us$","gi")],[new RegExp("(alias|status)$","gi")],[new RegExp("(bu)s$","gi")],[new RegExp("(buffal|tomat|potat)o$","gi")],[new RegExp("([ti])um$","gi")],[new RegExp("sis$","gi")],[new RegExp("(?:([^f])fe|([lr])f)$","gi")],[new RegExp("(hive)$","gi")],[new RegExp("([^aeiouy]|qu)y$","gi")],[new RegExp("(x|ch|ss|sh)$","gi")],[new RegExp("(matr|vert|ind)ix|ex$","gi")],[new RegExp("([m|l])ouse$","gi")],[new RegExp("(quiz)$","gi")],[new RegExp("(m)en$","gi"),"$1an"],[new RegExp("(pe)ople$","gi"),"$1rson"],[new RegExp("(child)ren$","gi"),"$1"],[new RegExp("([ti])a$","gi"),"$1um"],[new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),"$1$2sis"],[new RegExp("(hive)s$","gi"),"$1"],[new RegExp("(tive)s$","gi"),"$1"],[new RegExp("(curve)s$","gi"),"$1"],[new RegExp("([lr])ves$","gi"),"$1f"],[new RegExp("([^fo])ves$","gi"),"$1fe"],[new RegExp("([^aeiouy]|qu)ies$","gi"),"$1y"],[new RegExp("(s)eries$","gi"),"$1eries"],[new RegExp("(m)ovies$","gi"),"$1ovie"],[new RegExp("(x|ch|ss|sh)es$","gi"),"$1"],[new RegExp("([m|l])ice$","gi"),"$1ouse"],[new RegExp("(bus)es$","gi"),"$1"],[new RegExp("(o)es$","gi"),"$1"],[new RegExp("(shoe)s$","gi"),"$1"],[new RegExp("(cris|ax|test)es$","gi"),"$1is"],[new RegExp("(octop|vir)i$","gi"),"$1us"],[new RegExp("(alias|status)es$","gi"),"$1"],[new RegExp("^(ox)en","gi"),"$1"],[new RegExp("(vert|ind)ices$","gi"),"$1ex"],[new RegExp("(matr)ices$","gi"),"$1ix"],[new RegExp("(quiz)zes$","gi"),"$1"],[new RegExp("ss$","gi"),"ss"],[new RegExp("s$","gi"),""]],g=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],h=new RegExp("(_ids|_id)$","g"),i=new RegExp("_","g"),j=new RegExp("[ _]","g"),k=new RegExp("([A-Z])","g"),l=new RegExp("^_"),m={_apply_rules:function(a,b,c,d){if(d)a=d;else{var e=m.indexOf(c,a.toLowerCase())>-1;if(!e)for(var f=0,g=b.length;g>f;f++)if(a.match(b[f][0])){void 0!==b[f][1]&&(a=a.replace(b[f][0],b[f][1]));break}}return a},indexOf:function(a,b,c,d){c||(c=-1);for(var e=-1,f=c,g=a.length;g>f;f++)if(a[f]===b||d&&d(a[f],b)){e=f;break}return e},pluralize:function(a,b){return m._apply_rules(a,e,d,b)},singularize:function(a,b){return m._apply_rules(a,f,d,b)},camelize:function(a,b){for(var c=a.toLowerCase().split("/"),d=0,e=c.length;e>d;d++){for(var f=c[d].split("_"),g=b&&d+1===e?1:0,h=g,i=f.length;i>h;h++)f[h]=f[h].charAt(0).toUpperCase()+f[h].substring(1);c[d]=f.join("")}return c.join("::")},underscore:function(a,b){if(b&&a===a.toUpperCase())return a;for(var c=a.split("::"),d=0,e=c.length;e>d;d++)c[d]=c[d].replace(k,"_$1"),c[d]=c[d].replace(l,"");return c.join("/").toLowerCase()},humanize:function(a,b){return a=a.toLowerCase(),a=a.replace(h,""),a=a.replace(i," "),b||(a=m.capitalize(a)),a},capitalize:function(a){return a=a.toLowerCase(),a.substring(0,1).toUpperCase()+a.substring(1)},dasherize:function(a){return a.replace(j,"-")},titleize:function(a){a=a.toLowerCase().replace(i," ");for(var b=a.split(" "),c=0,d=b.length;d>c;c++){for(var e=b[c].split("-"),f=0,h=e.length;h>f;f++)m.indexOf(g,e[f].toLowerCase())<0&&(e[f]=m.capitalize(e[f]));b[c]=e.join("-")}return a=b.join(" "),a=a.substring(0,1).toUpperCase()+a.substring(1)},demodulize:function(a){var b=a.split("::");return b[b.length-1]},tableize:function(a){return a=m.underscore(a),a=m.pluralize(a)},classify:function(a){return a=m.camelize(a),a=m.singularize(a)},foreign_key:function(a,b){return a=m.demodulize(a),a=m.underscore(a)+(b?"":"_")+"id"},ordinalize:function(a){for(var b=a.split(" "),c=0,d=b.length;d>c;c++){var e=parseInt(b[c],10);if(!isNaN(e)){var f=b[c].substring(b[c].length-2),g=b[c].substring(b[c].length-1),h="th";"11"!=f&&"12"!=f&&"13"!=f&&("1"===g?h="st":"2"===g?h="nd":"3"===g&&(h="rd")),b[c]+=h}}return b.join(" ")}};return"undefined"==typeof c?a.inflection=m:(m.version="1.2.5",void(b.exports=m))}(this)},{}],50:[function(a,b,c){!function(a){function d(a,b){var c=this;if(!(c instanceof d))return new d(a,b);c.json=a||"",c.options=b||{},c.lower=c.json.toLowerCase(),c.options.hasOwnProperty("comments")||(c.options.comments=!0),c.c="",c.i=-1,c.length=c.json.length,c.line=1,c.character=0,c._evidence=c.json.split(g),c.endblock="",c.commabreak=!1;try{c.render()}catch(e){if("string"!=typeof e)throw e;c.error=e,c.setEvidence()}}var e=/[0-9]/,f=/(\r\n|\r|\n)/,g=/\r\n|\r|\n/,h=/(\s|\t)/,i=/\\("|\\|\/|b|f|n|r|t|u[0-9]{4})/,j=/^(\-|\+)?[0-9]/;d.contact="Corey Hart (corey@codenothing.com)",d.version="[VERSION]",d.date="[DATE]",d.prototype={render:function(){for(var a=this,b="",c=!1;++a.ib&&(b=0,c=8),c>=a._evidence.length&&(c=a._evidence.length);c>b;b++)d+=(b===a.line-1?"-> ":" ")+(b+1)+"| "+a._evidence[b]+"\n";a.evidence=d}},"object"==typeof c&&"object"==typeof b?b.exports=d:a.JSONLint=d}(this)},{}],51:[function(b,c,d){!function(b){if("function"==typeof bootstrap)bootstrap("promise",b);else if("object"==typeof d)c.exports=b();else if("function"==typeof a&&a.amd)a(b);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeQ=b}else Q=b()}(function(){"use strict";function a(a){return function(){return X.apply(a,arguments)}}function b(a){return a===Object(a)}function c(a){return"[object StopIteration]"===db(a)||a instanceof T}function d(a,b){if(Q&&b.stack&&"object"==typeof a&&null!==a&&a.stack&&-1===a.stack.indexOf(fb)){for(var c=[],d=b;d;d=d.source)d.stack&&c.unshift(d.stack);c.unshift(a.stack);var f=c.join("\n"+fb+"\n");a.stack=e(f)}}function e(a){for(var b=a.split("\n"),c=[],d=0;d=U&&kb>=d}function i(){if(Q)try{throw new Error}catch(a){var b=a.stack.split("\n"),c=b[0].indexOf("@")>0?b[1]:b[2],d=g(c);if(!d)return;return S=d[0],d[1]}}function j(a,b,c){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(b+" is deprecated, use "+c+" instead.",new Error("").stack),a.apply(a,arguments)}}function k(a){return r(a)?a:s(a)?D(a):C(a)}function l(){function a(a){b=a,f.source=a,Z(c,function(b,c){W(function(){a.promiseDispatch.apply(a,c)})},void 0),c=void 0,d=void 0}var b,c=[],d=[],e=ab(l.prototype),f=ab(o.prototype);if(f.promiseDispatch=function(a,e,f){var g=Y(arguments);c?(c.push(g),"when"===e&&f[1]&&d.push(f[1])):W(function(){b.promiseDispatch.apply(b,g)})},f.valueOf=j(function(){if(c)return f;var a=q(b);return r(a)&&(b=a),a},"valueOf","inspect"),f.inspect=function(){return b?b.inspect():{state:"pending"}},k.longStackSupport&&Q)try{throw new Error}catch(g){f.stack=g.stack.substring(g.stack.indexOf("\n")+1)}return e.promise=f,e.resolve=function(c){b||a(k(c))},e.fulfill=function(c){b||a(C(c))},e.reject=function(c){b||a(B(c))},e.notify=function(a){b||Z(d,function(b,c){W(function(){c(a)})},void 0)},e}function m(a){if("function"!=typeof a)throw new TypeError("resolver must be a function.");var b=l();try{a(b.resolve,b.reject,b.notify)}catch(c){b.reject(c)}return b.promise}function n(a){return m(function(b,c){for(var d=0,e=a.length;e>d;d++)k(a[d]).then(b,c)})}function o(a,b,c){void 0===b&&(b=function(a){return B(new Error("Promise does not support operation: "+a))}),void 0===c&&(c=function(){return{state:"unknown"}});var d=ab(o.prototype);if(d.promiseDispatch=function(c,e,f){var g;try{g=a[e]?a[e].apply(d,f):b.call(d,e,f)}catch(h){g=B(h)}c&&c(g)},d.inspect=c,c){var e=c();"rejected"===e.state&&(d.exception=e.reason),d.valueOf=j(function(){var a=c();return"pending"===a.state||"rejected"===a.state?d:a.value})}return d}function p(a,b,c,d){return k(a).then(b,c,d)}function q(a){if(r(a)){var b=a.inspect();if("fulfilled"===b.state)return b.value}return a}function r(a){return b(a)&&"function"==typeof a.promiseDispatch&&"function"==typeof a.inspect}function s(a){return b(a)&&"function"==typeof a.then}function t(a){return r(a)&&"pending"===a.inspect().state}function u(a){return!r(a)||"fulfilled"===a.inspect().state}function v(a){return r(a)&&"rejected"===a.inspect().state}function w(){ib||"undefined"==typeof window||window.Touch||!window.console||console.warn("[Q] Unhandled rejection reasons (should be empty):",gb),ib=!0}function x(){for(var a=0;a=d)throw new TypeError}for(;d>c;c++)c in this&&(b=a(b,this[c],c));return b}),$=a(Array.prototype.indexOf||function(a){for(var b=0;b2?Y(arguments,1):c)}},k.promise=m,k.passByCopy=function(a){return a},o.prototype.passByCopy=function(){return this},k.join=function(a,b){return k(a).join(b)},o.prototype.join=function(a){return k([this,a]).spread(function(a,b){if(a===b)return a;throw new Error("Can't join: not the same: "+a+" "+b)})},k.race=n,o.prototype.race=function(){return this.then(k.race)},k.makePromise=o,o.prototype.toString=function(){return"[object Promise]"},o.prototype.then=function(a,b,c){function e(b){try{return"function"==typeof a?a(b):b}catch(c){return B(c)}}function f(a){if("function"==typeof b){d(a,h);try{return b(a)}catch(c){return B(c)}}return B(a)}function g(a){return"function"==typeof c?c(a):a}var h=this,i=l(),j=!1;return W(function(){h.promiseDispatch(function(a){j||(j=!0,i.resolve(e(a)))},"when",[function(a){j||(j=!0,i.resolve(f(a)))}])}),h.promiseDispatch(void 0,"when",[void 0,function(a){var b,c=!1;try{b=g(a)}catch(d){if(c=!0,!k.onerror)throw d;k.onerror(d)}c||i.notify(b)}]),i.promise},k.when=p,o.prototype.thenResolve=function(a){return this.then(function(){return a})},k.thenResolve=function(a,b){return k(a).thenResolve(b)},o.prototype.thenReject=function(a){return this.then(function(){throw a})},k.thenReject=function(a,b){return k(a).thenReject(b)},k.nearer=q,k.isPromise=r,k.isPromiseAlike=s,k.isPending=t,o.prototype.isPending=function(){return"pending"===this.inspect().state},k.isFulfilled=u,o.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},k.isRejected=v,o.prototype.isRejected=function(){return"rejected"===this.inspect().state};var gb=[],hb=[],ib=!1,jb=!0;k.resetUnhandledRejections=y,k.getUnhandledReasons=function(){return gb.slice()},k.stopUnhandledRejectionTracking=function(){y(),"undefined"!=typeof process&&process.on&&process.removeListener("exit",x),jb=!1},y(),k.reject=B,k.fulfill=C,k.master=E,k.spread=F,o.prototype.spread=function(a,b){return this.all().then(function(b){return a.apply(void 0,b)},b)},k.async=G,k.spawn=H,k["return"]=I,k.promised=J,k.dispatch=K,o.prototype.dispatch=function(a,b){var c=this,d=l();return W(function(){c.promiseDispatch(d.resolve,a,b)}),d.promise},k.get=function(a,b){return k(a).dispatch("get",[b])},o.prototype.get=function(a){return this.dispatch("get",[a])},k.set=function(a,b,c){return k(a).dispatch("set",[b,c])},o.prototype.set=function(a,b){return this.dispatch("set",[a,b])},k.del=k["delete"]=function(a,b){return k(a).dispatch("delete",[b])},o.prototype.del=o.prototype["delete"]=function(a){return this.dispatch("delete",[a])},k.mapply=k.post=function(a,b,c){return k(a).dispatch("post",[b,c])},o.prototype.mapply=o.prototype.post=function(a,b){return this.dispatch("post",[a,b])},k.send=k.mcall=k.invoke=function(a,b){return k(a).dispatch("post",[b,Y(arguments,2)])},o.prototype.send=o.prototype.mcall=o.prototype.invoke=function(a){return this.dispatch("post",[a,Y(arguments,1)])},k.fapply=function(a,b){return k(a).dispatch("apply",[void 0,b])},o.prototype.fapply=function(a){return this.dispatch("apply",[void 0,a])},k["try"]=k.fcall=function(a){return k(a).dispatch("apply",[void 0,Y(arguments,1)])},o.prototype.fcall=function(){return this.dispatch("apply",[void 0,Y(arguments)])},k.fbind=function(a){var b=k(a),c=Y(arguments,1);return function(){return b.dispatch("apply",[this,c.concat(Y(arguments))])}},o.prototype.fbind=function(){var a=this,b=Y(arguments);return function(){return a.dispatch("apply",[this,b.concat(Y(arguments))])}},k.keys=function(a){return k(a).dispatch("keys",[])},o.prototype.keys=function(){return this.dispatch("keys",[])},k.all=L,o.prototype.all=function(){return L(this)},k.allResolved=j(M,"allResolved","allSettled"),o.prototype.allResolved=function(){return M(this)},k.allSettled=N,o.prototype.allSettled=function(){return this.then(function(a){return L(_(a,function(a){function b(){return a.inspect()}return a=k(a),a.then(b,b)}))})},k.fail=k["catch"]=function(a,b){return k(a).then(void 0,b)},o.prototype.fail=o.prototype["catch"]=function(a){return this.then(void 0,a)},k.progress=O,o.prototype.progress=function(a){return this.then(void 0,void 0,a)},k.fin=k["finally"]=function(a,b){return k(a)["finally"](b)},o.prototype.fin=o.prototype["finally"]=function(a){return a=k(a),this.then(function(b){return a.fcall().then(function(){return b})},function(b){return a.fcall().then(function(){throw b})})},k.done=function(a,b,c,d){return k(a).done(b,c,d)},o.prototype.done=function(a,b,c){var e=function(a){W(function(){if(d(a,f),!k.onerror)throw a;k.onerror(a)})},f=a||b||c?this.then(a,b,c):this;"object"==typeof process&&process&&process.domain&&(e=process.domain.bind(e)),f.then(void 0,e)},k.timeout=function(a,b,c){return k(a).timeout(b,c)},o.prototype.timeout=function(a,b){var c=l(),d=setTimeout(function(){c.reject(new Error(b||"Timed out after "+a+" ms"))},a);return this.then(function(a){clearTimeout(d),c.resolve(a)},function(a){clearTimeout(d),c.reject(a)},c.notify),c.promise},k.delay=function(a,b){return void 0===b&&(b=a,a=void 0),k(a).delay(b)},o.prototype.delay=function(a){return this.then(function(b){var c=l();return setTimeout(function(){c.resolve(b)},a),c.promise})},k.nfapply=function(a,b){return k(a).nfapply(b)},o.prototype.nfapply=function(a){var b=l(),c=Y(a);return c.push(b.makeNodeResolver()),this.fapply(c).fail(b.reject),b.promise},k.nfcall=function(a){var b=Y(arguments,1);return k(a).nfapply(b)},o.prototype.nfcall=function(){var a=Y(arguments),b=l();return a.push(b.makeNodeResolver()),this.fapply(a).fail(b.reject),b.promise},k.nfbind=k.denodeify=function(a){var b=Y(arguments,1);return function(){var c=b.concat(Y(arguments)),d=l();return c.push(d.makeNodeResolver()),k(a).fapply(c).fail(d.reject),d.promise}},o.prototype.nfbind=o.prototype.denodeify=function(){var a=Y(arguments);return a.unshift(this),k.denodeify.apply(void 0,a)},k.nbind=function(a,b){var c=Y(arguments,2);return function(){function d(){return a.apply(b,arguments)}var e=c.concat(Y(arguments)),f=l();return e.push(f.makeNodeResolver()),k(d).fapply(e).fail(f.reject),f.promise}},o.prototype.nbind=function(){var a=Y(arguments,0);return a.unshift(this),k.nbind.apply(void 0,a)},k.nmapply=k.npost=function(a,b,c){return k(a).npost(b,c)},o.prototype.nmapply=o.prototype.npost=function(a,b){var c=Y(b||[]),d=l();return c.push(d.makeNodeResolver()),this.dispatch("post",[a,c]).fail(d.reject),d.promise},k.nsend=k.nmcall=k.ninvoke=function(a,b){var c=Y(arguments,2),d=l();return c.push(d.makeNodeResolver()),k(a).dispatch("post",[b,c]).fail(d.reject),d.promise},o.prototype.nsend=o.prototype.nmcall=o.prototype.ninvoke=function(a){var b=Y(arguments,1),c=l();return b.push(c.makeNodeResolver()),this.dispatch("post",[a,b]).fail(c.reject),c.promise},k.nodeify=P,o.prototype.nodeify=function(a){return a?void this.then(function(b){W(function(){a(null,b)})},function(b){W(function(){a(b)})}):this};var kb=i();return k})},{}],52:[function(b,c){(function(b){!function(a){"use strict";function b(a){var c;if(null===a||void 0===a)return!1;if(d.isArray(a))return a.length>0;if("string"==typeof a||"number"==typeof a||"boolean"==typeof a)return!0;for(c in a)if(a.hasOwnProperty(c)&&b(a[c]))return!0;return!1}var c=function(){function a(a){this.options=a}return a.prototype.toString=function(){return JSON&&JSON.stringify?JSON.stringify(this.options):this.options -},a}(),d=function(){function a(a){return"[object Array]"===Object.prototype.toString.apply(a)}function b(a){return"[object String]"===Object.prototype.toString.apply(a)}function c(a){return"[object Number]"===Object.prototype.toString.apply(a)}function d(a){return"[object Boolean]"===Object.prototype.toString.apply(a)}function e(a,b){var c,d="",e=!0;for(c=0;c="a"&&"z">=a||a>="A"&&"Z">=a}function b(a){return a>="0"&&"9">=a}function c(a){return b(a)||a>="a"&&"f">=a||a>="A"&&"F">=a}return{isAlpha:a,isDigit:b,isHexDigit:c}}(),f=function(){function a(a){var b,c,d="",e=g.encode(a);for(c=0;cb?"0":"")+b.toString(16).toUpperCase();return d}function b(a,b){return"%"===a.charAt(b)&&e.isHexDigit(a.charAt(b+1))&&e.isHexDigit(a.charAt(b+2))}function c(a,b){return parseInt(a.substr(b,2),16)}function d(a){if(!b(a,0))return!1;var d=c(a,1),e=g.numBytes(d);if(0===e)return!1;for(var f=1;e>f;f+=1)if(!b(a,3*f)||!g.isValidFollowingCharCode(c(a,3*f+1)))return!1;return!0}function f(a,d){var e=a.charAt(d);if(!b(a,d))return e;var f=c(a,d+1),h=g.numBytes(f);if(0===h)return e;for(var i=1;h>i;i+=1)if(!b(a,d+3*i)||!g.isValidFollowingCharCode(c(a,d+3*i+1)))return e;return a.substr(d,3*h)}var g={encode:function(a){return unescape(encodeURIComponent(a))},numBytes:function(a){return 127>=a?1:a>=194&&223>=a?2:a>=224&&239>=a?3:a>=240&&244>=a?4:0},isValidFollowingCharCode:function(a){return a>=128&&191>=a}};return{encodeCharacter:a,isPctEncoded:d,pctCharAt:f}}(),g=function(){function a(a){return e.isAlpha(a)||e.isDigit(a)||"_"===a||f.isPctEncoded(a)}function b(a){return e.isAlpha(a)||e.isDigit(a)||"-"===a||"."===a||"_"===a||"~"===a}function c(a){return":"===a||"/"===a||"?"===a||"#"===a||"["===a||"]"===a||"@"===a||"!"===a||"$"===a||"&"===a||"("===a||")"===a||"*"===a||"+"===a||","===a||";"===a||"="===a||"'"===a}return{isVarchar:a,isUnreserved:b,isReserved:c}}(),h=function(){function a(a,b){var c,d="",e="";for(("number"==typeof a||"boolean"==typeof a)&&(a=a.toString()),c=0;c1?c:g.isReserved(c)||g.isUnreserved(c)?c:f.encodeCharacter(c)}function d(a){var b,c="",d="";for(b=0;b1?d:g.isReserved(d)||g.isUnreserved(d)?d:f.encodeCharacter(d);return c}return{encode:a,encodePassReserved:b,encodeLiteral:d,encodeLiteralCharacter:c}}(),i=function(){function a(a){b[a]={symbol:a,separator:"?"===a?"&":""===a||"+"===a||"#"===a?",":a,named:";"===a||"&"===a||"?"===a,ifEmpty:"&"===a||"?"===a?"=":"",first:"+"===a?"":a,encode:"+"===a||"#"===a?h.encodePassReserved:h.encode,toString:function(){return this.symbol}}}var b={};return a(""),a("+"),a("#"),a("."),a("/"),a(";"),a("?"),a("&"),{valueOf:function(a){return b[a]?b[a]:"=,!@|".indexOf(a)>=0?null:b[""]}}}(),j=function(){function a(a){this.literal=h.encodeLiteral(a)}return a.prototype.expand=function(){return this.literal},a.prototype.toString=a.prototype.expand,a}(),k=function(){function a(a){function b(){var b=a.substring(n,j);if(0===b.length)throw new c({expressionText:a,message:"a varname must be specified",position:j});m={varname:b,exploded:!1,maxLength:null},n=null}function d(){if(o===j)throw new c({expressionText:a,message:"after a ':' you have to specify the length",position:j});m.maxLength=parseInt(a.substring(o,j),10),o=null}var h,j,k=[],m=null,n=null,o=null,p="";for(h=function(b){var d=i.valueOf(b);if(null===d)throw new c({expressionText:a,message:"illegal use of reserved operator",position:j,operator:b});return d}(a.charAt(0)),j=h.symbol.length,n=j;j=4)throw new c({expressionText:a,message:"A :prefix must have max 4 digits",position:j});continue}d()}if(":"!==p)if("*"!==p){if(","!==p)throw new c({expressionText:a,message:"illegal character",character:p,position:j});k.push(m),m=null,n=j+1}else{if(null===m)throw new c({expressionText:a,message:"exploded without varspec",position:j});if(m.exploded)throw new c({expressionText:a,message:"exploded twice",position:j});if(m.maxLength)throw new c({expressionText:a,message:"an explode (*) MUST NOT follow to a prefix",position:j});m.exploded=!0}else{if(null!==m.maxLength)throw new c({expressionText:a,message:"only one :maxLength is allowed per varspec",position:j});if(m.exploded)throw new c({expressionText:a,message:"an exploeded varspec MUST NOT be varspeced",position:j});o=j+1}}return null!==n&&b(),null!==o&&d(),k.push(m),new l(a,h,k)}function b(b){var d,e,f=[],g=null,h=0;for(d=0;dh&&f.push(new j(b.substring(h,d))),h=null,g=d)}if(null!==g)throw new c({templateText:b,message:"unclosed brace",position:g});return hthis.OPENED&&h.headers[a.toLowerCase()]&&!s?h.headers[a.toLowerCase()]:null},this.getAllResponseHeaders=function(){if(this.readyStateb;b++)t[a][b].call(i)};var w=function(a){i.readyState!==a&&(i.readyState=a,(l.async||i.readyState0&&b-1 in a)}function d(a){var b=fb[a]={};return Y.each(a.match($)||[],function(a,c){b[c]=!0}),b}function e(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=Y.expando+Math.random()}function f(a,c,d){var e;if(d===b&&1===a.nodeType)if(e="data-"+c.replace(jb,"-$1").toLowerCase(),d=a.getAttribute(e),"string"==typeof d){try{d="true"===d?!0:"false"===d?!1:"null"===d?null:+d+""===d?+d:ib.test(d)?JSON.parse(d):d}catch(f){}gb.set(a,c,d)}else d=b;return d}function g(){return!0}function h(){return!1}function i(){try{return L.activeElement}catch(a){}}function j(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function k(a,b,c){if(Y.isFunction(b))return Y.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return Y.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(tb.test(b))return Y.filter(b,a,c);b=Y.filter(b,a)}return Y.grep(a,function(a){return U.call(b,a)>=0!==c})}function l(a,b){return Y.nodeName(a,"table")&&Y.nodeName(1===b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function m(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function n(a){var b=Eb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function o(a,b){for(var c=a.length,d=0;c>d;d++)hb.set(a[d],"globalEval",!b||hb.get(b[d],"globalEval"))}function p(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(hb.hasData(a)&&(f=hb.access(a),g=hb.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++)Y.event.add(b,e,j[e][c])}gb.hasData(a)&&(h=gb.access(a),i=Y.extend({},h),gb.set(b,i))}}function q(a,c){var d=a.getElementsByTagName?a.getElementsByTagName(c||"*"):a.querySelectorAll?a.querySelectorAll(c||"*"):[];return c===b||c&&Y.nodeName(a,c)?Y.merge([a],d):d}function r(a,b){var c=b.nodeName.toLowerCase();"input"===c&&Bb.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}function s(a,b){if(b in a)return b;for(var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Sb.length;e--;)if(b=Sb[e]+c,b in a)return b;return d}function t(a,b){return a=b||a,"none"===Y.css(a,"display")||!Y.contains(a.ownerDocument,a)}function u(b){return a.getComputedStyle(b,null)}function v(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=hb.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&t(d)&&(f[g]=hb.access(d,"olddisplay",z(d.nodeName)))):f[g]||(e=t(d),(c&&"none"!==c||!e)&&hb.set(d,"olddisplay",e?c:Y.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}function w(a,b,c){var d=Lb.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function x(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+=Y.css(a,c+Rb[f],!0,e)),d?("content"===c&&(g-=Y.css(a,"padding"+Rb[f],!0,e)),"margin"!==c&&(g-=Y.css(a,"border"+Rb[f]+"Width",!0,e))):(g+=Y.css(a,"padding"+Rb[f],!0,e),"padding"!==c&&(g+=Y.css(a,"border"+Rb[f]+"Width",!0,e)));return g}function y(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=u(a),g=Y.support.boxSizing&&"border-box"===Y.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Hb(a,b,f),(0>e||null==e)&&(e=a.style[b]),Mb.test(e))return e;d=g&&(Y.support.boxSizingReliable||e===a.style[b]),e=parseFloat(e)||0}return e+x(a,b,c||(g?"border":"content"),d,f)+"px"}function z(a){var b=L,c=Ob[a];return c||(c=A(a,b),"none"!==c&&c||(Ib=(Ib||Y("