diff --git a/quickblox.min.js b/quickblox.min.js index d2f045443..7564152da 100644 --- a/quickblox.min.js +++ b/quickblox.min.js @@ -1,46 +1,44 @@ -!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.QB=e()}}(function(){var define,module,exports;return function e(t,r,n){function i(o,s){if(!r[o]){if(!t[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){var r=t[o][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[o].exports}for(var a="function"==typeof require&&require,o=0;o|@/g);return r!==-1},t.exports.escape=function(e){return null===e?null:e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/"/g,"\\22").replace(/&/g,"\\26").replace(/'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(//g,"\\3e").replace(/@/g,"\\40").replace(/\3a/g,"c3a")},t.exports.unescape=function(e){return null===e?null:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")}},{}],4:[function(e,t,r){"use strict";var n=e("./JID");t.exports=function(){for(var e=arguments[0],t=Array.prototype.slice.call(arguments,1),r="",i=0;i");if(t>=0&&r>=0&&tthis.bytesParsedOnStanzaBegin+this.maxStanzaSize)return void this.error("policy-violation","Maximum stanza size exceeded");this.bytesParsed+=e.length,this.parser.write(e)}},n.prototype.end=function(e){e&&this.write(e),delete this.parser,this.emit("end")},n.prototype.error=function(e,t){var r=new Error(t);r.condition=e,this.emit("error",r)},t.exports=n},{"@xmpp/xml":6,events:171,inherits:215,"ltx/lib/parsers/ltx":384}],6:[function(e,t,r){"use strict";var n=e("ltx"),i=e("./lib/tag");r=t.exports=function(){return i.apply(null,arguments)},Object.assign(r,n),r.IQ=e("./lib/IQ"),r.Message=e("./lib/Message"),r.Presence=e("./lib/Presence"),r.Stanza=e("./lib/Stanza"),r.createStanza=e("./lib/createStanza"),r.parse=e("./lib/parse"),r.Parser=e("./lib/Parser"),r.tag=e("./lib/tag"),r.ltx=n},{"./lib/IQ":7,"./lib/Message":8,"./lib/Parser":9,"./lib/Presence":10,"./lib/Stanza":11,"./lib/createStanza":12,"./lib/parse":13,"./lib/tag":14,ltx:375}],7:[function(e,t,r){"use strict";function n(e){i.call(this,"iq",e)}var i=e("./Stanza"),a=e("inherits");a(n,i),t.exports=n},{"./Stanza":11,inherits:215}],8:[function(e,t,r){"use strict";function n(e){i.call(this,"message",e)}var i=e("./Stanza"),a=e("inherits");a(n,i),t.exports=n},{"./Stanza":11,inherits:215}],9:[function(e,t,r){"use strict";function n(e){o.call(this,e)}var i=e("inherits"),a=e("./createStanza"),o=e("ltx").Parser;i(n,o),n.prototype.DefaultElement=a,t.exports=n},{"./createStanza":12,inherits:215,ltx:375}],10:[function(e,t,r){"use strict";function n(e){i.call(this,"presence",e)}var i=e("./Stanza"),a=e("inherits");a(n,i),t.exports=n},{"./Stanza":11,inherits:215}],11:[function(e,t,r){"use strict";function n(e,t){a.call(this,e,t)}var i=e("inherits"),a=e("ltx").Element;i(n,a),Object.defineProperty(n.prototype,"from",{get:function(){return this.attrs.from},set:function(e){this.attrs.from=e}}),Object.defineProperty(n.prototype,"to",{get:function(){return this.attrs.to},set:function(e){this.attrs.to=e}}),Object.defineProperty(n.prototype,"id",{get:function(){return this.attrs.id},set:function(e){this.attrs.id=e}}),Object.defineProperty(n.prototype,"type",{get:function(){return this.attrs.type},set:function(e){this.attrs.type=e}}),t.exports=n},{inherits:215,ltx:375}],12:[function(e,t,r){"use strict";var n=e("./Stanza"),i=e("ltx").Element;t.exports=function(e,t){var r;switch(e){case"presence":case"message":case"iq":r=new n(e,t);break;default:r=new i(e,t)}var a=Array.prototype.slice.call(arguments,2);return a.forEach(function(e){r.cnode(e)}),r}},{"./Stanza":11,ltx:375}],13:[function(e,t,r){"use strict";var n=e("./Parser"),i=e("ltx").parse;t.exports=function(e){return i(e,n)}},{"./Parser":9,ltx:375}],14:[function(e,t,r){"use strict";var n=e("ltx").tagString,i=e("./parse");t.exports=function(){return i(n.apply(null,arguments))}},{"./parse":13,ltx:375}],15:[function(e,t,r){"use strict";function n(e){return b.test(e)}function i(t){function r(e,t){var r;if("string"==typeof e){if(r=j(e),!r)throw new Error('no schema with key or ref "'+e+'"')}else{var n=T(e);r=n.validate||I(n)}var i=r(t);return r.$async===!0?"*"==B._opts.async?m(i):i:(B.errors=r.errors,i)}function g(e,t){var r=T(e,void 0,t);return r.validate||I(r)}function w(e,t,r,n){if(Array.isArray(e))for(var i=0;i=1&&r<=12&&n>=1&&n<=m[r]}function a(e,t){var r=e.match(g);if(!r)return!1;var n=r[1],i=r[2],a=r[3],o=r[5];return n<=23&&i<=59&&a<=59&&(!t||o)}function o(e){var t=e.split(k);return 2==t.length&&i(t[0])&&a(t[1],!0)}function s(e){return e.length<=255&&v.test(e)}function c(e){return _.test(e)&&b.test(e)}function u(e){try{return new RegExp(e),!0}catch(e){return!1}}function l(e,t){if(e&&t)return e>t?1:et?1:e=0?{index:n,compiling:!0}:(n=this._compilations.length,this._compilations[n]={schema:e,root:t,baseId:r},{index:n,compiling:!1})}function o(e,t,r){var n=s.call(this,e,t,r);n>=0&&this._compilations.splice(n,1)}function s(e,t,r){for(var n=0;n=55296&&t<=56319&&i=t)throw new Error("Cannot access property/index "+n+" levels up, current level is "+t);return r[t-n]}if(n>t)throw new Error("Cannot access data "+n+" levels up, current level is "+t);if(a="data"+(t-n||""),!i)return a}for(var s=a,u=i.split("/"),l=0;l",j="result"+i,S=e.opts.v5&&o&&o.$data;if(S?(n+=" var schema"+i+" = "+e.util.getData(o.$data,a,e.dataPathArr)+"; ",b="schema"+i):b=o,k){var E=e.util.getData(x.$data,a,e.dataPathArr),A="exclusive"+i,C="op"+i,T="' + "+C+" + '";n+=" var schemaExcl"+i+" = "+E+"; ",E="schemaExcl"+i,n+=" if (typeof "+E+" != 'boolean' && "+E+" !== undefined) { "+p+" = false; ";var r=w,I=I||[];I.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(r||"_formatExclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",e.opts.messages!==!1&&(n+=" , message: '"+w+" should be boolean' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var P=n;n=I.pop(),n+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+P+"]); ":" validate.errors = ["+P+"]; return false; ":" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",u&&(d+="}",n+=" else { "),S&&(n+=" if ("+b+" === undefined) "+p+" = true; else if (typeof "+b+" != 'string') "+p+" = false; else { ",d+="}"),h&&(n+=" if (!"+v+") "+p+" = true; else { ",d+="}"),n+=" var "+j+" = "+v+"("+l+", ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" ); if ("+j+" === undefined) "+p+" = false; var "+A+" = "+E+" === true; if ("+p+" === undefined) { "+p+" = "+A+" ? "+j+" "+_+" 0 : "+j+" "+_+"= 0; } if (!"+p+") var op"+i+" = "+A+" ? '"+_+"' : '"+_+"=';"}else{var A=x===!0,T=_;A||(T+="=");var C="'"+T+"'";S&&(n+=" if ("+b+" === undefined) "+p+" = true; else if (typeof "+b+" != 'string') "+p+" = false; else { ",d+="}"),h&&(n+=" if (!"+v+") "+p+" = true; else { ",d+="}"),n+=" var "+j+" = "+v+"("+l+", ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" ); if ("+j+" === undefined) "+p+" = false; if ("+p+" === undefined) "+p+" = "+j+" "+_,A||(n+="="),n+=" 0;"}n+=""+d+"if (!"+p+") { ";var r=t,I=I||[];I.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(r||"_formatLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { comparison: "+C+", limit: ",n+=S?""+b:""+e.util.toQuotedString(o),n+=" , exclusive: "+A+" } ",e.opts.messages!==!1&&(n+=" , message: 'should be "+T+' "',n+=S?"' + "+b+" + '":""+e.util.escapeQuotes(o),n+="\"' "),e.opts.verbose&&(n+=" , schema: ",n+=S?"validate.schema"+s:""+e.util.toQuotedString(o),n+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var P=n;return n=I.pop(),n+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+P+"]); ":" validate.errors = ["+P+"]; return false; ":" var err = "+P+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+="}"}},{}],29:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),f=e.opts.v5&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var h="maximum"==t,d=h?"exclusiveMaximum":"exclusiveMinimum",m=e.schema[d],g=e.opts.v5&&m&&m.$data,v=h?"<":">",b=h?">":"<";if(g){var y=e.util.getData(m.$data,o,e.dataPathArr),w="exclusive"+a,x="op"+a,k="' + "+x+" + '";i+=" var schemaExcl"+a+" = "+y+"; ",y="schemaExcl"+a,i+=" var exclusive"+a+"; if (typeof "+y+" != 'boolean' && typeof "+y+" != 'undefined') { ";var r=d,_=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: {} ",e.opts.messages!==!1&&(i+=" , message: '"+d+" should be boolean' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var j=i;i=_.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else if( ",f&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" ((exclusive"+a+" = "+y+" === true) ? "+p+" "+b+"= "+n+" : "+p+" "+b+" "+n+") || "+p+" !== "+p+") { var op"+a+" = exclusive"+a+" ? '"+v+"' : '"+v+"=';"}else{var w=m===!0,k=v;w||(k+="=");var x="'"+k+"'";i+=" if ( ",f&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+" "+b,w&&(i+="="),i+=" "+n+" || "+p+" !== "+p+") {"}var r=t,_=_||[];_.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { comparison: "+x+", limit: "+n+", exclusive: "+w+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be "+k+" ",i+=f?"' + "+n:""+s+"'"),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var j=i;return i=_.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+j+"]); ":" validate.errors = ["+j+"]; return false; ":" var err = "+j+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { "),i}},{}],30:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),f=e.opts.v5&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var h="maxItems"==t?">":"<";i+="if ( ",f&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" "+p+".length "+h+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",i+="maxItems"==t?"more":"less",i+=" than ",i+=f?"' + "+n+" + '":""+s,i+=" items' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],31:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),f=e.opts.v5&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var h="maxLength"==t?">":"<";i+="if ( ",f&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=e.opts.unicode===!1?" "+p+".length ":" ucs2length("+p+") ",i+=" "+h+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT be ",i+="maxLength"==t?"longer":"shorter",i+=" than ",i+=f?"' + "+n+" + '":""+s,i+=" characters' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],32:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),f=e.opts.v5&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var h="maxProperties"==t?">":"<";i+="if ( ",f&&(i+=" ("+n+" !== undefined && typeof "+n+" != 'number') || "),i+=" Object.keys("+p+").length "+h+" "+n+") { ";var r=t,d=d||[];d.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { limit: "+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have ",i+="maxProperties"==t?"more":"less",i+=" than ",i+=f?"' + "+n+" + '":""+s,i+=" properties' "),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;return i=d.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],33:[function(e,t,r){"use strict";t.exports=function(e,t){var r=" ",n=e.schema[t],i=e.schemaPath+e.util.getProperty(t),a=e.errSchemaPath+"/"+t,o=!e.opts.allErrors,s=e.util.copy(e),c="";s.level++;var u="valid"+s.level,l=s.baseId,p=!0,f=n;if(f)for(var h,d=-1,m=f.length-1;d "+E+") { ";var C=l+"["+E+"]";h.schema=S,h.schemaPath=s+"["+E+"]",h.errSchemaPath=c+"/"+E,h.errorPath=e.util.getPathExpr(e.errorPath,E,e.opts.jsonPointers,!0),h.dataPathArr[v]=E;var T=e.validate(h);h.baseId=y,n+=e.util.varOccurences(T,b)<2?" "+e.util.varReplace(T,b,C)+" ":" var "+b+" = "+C+"; "+T+" ",n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}if("object"==typeof w&&e.util.schemaHasRules(w,e.RULES.all)){h.schema=w,h.schemaPath=e.schemaPath+".additionalItems",h.errSchemaPath=e.errSchemaPath+"/additionalItems",n+=" "+m+" = true; if ("+l+".length > "+o.length+") { for (var "+g+" = "+o.length+"; "+g+" < "+l+".length; "+g+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);var C=l+"["+g+"]";h.dataPathArr[v]=g;var T=e.validate(h);h.baseId=y,n+=e.util.varOccurences(T,b)<2?" "+e.util.varReplace(T,b,C)+" ":" var "+b+" = "+C+"; "+T+" ",u&&(n+=" if (!"+m+") break; "), -n+=" } } ",u&&(n+=" if ("+m+") { ",d+="}")}}else if(e.util.schemaHasRules(o,e.RULES.all)){h.schema=o,h.schemaPath=s,h.errSchemaPath=c,n+=" for (var "+g+" = 0; "+g+" < "+l+".length; "+g+"++) { ",h.errorPath=e.util.getPathExpr(e.errorPath,g,e.opts.jsonPointers,!0);var C=l+"["+g+"]";h.dataPathArr[v]=g;var T=e.validate(h);h.baseId=y,n+=e.util.varOccurences(T,b)<2?" "+e.util.varReplace(T,b,C)+" ":" var "+b+" = "+C+"; "+T+" ",u&&(n+=" if (!"+m+") break; "),n+=" } ",u&&(n+=" if ("+m+") { ",d+="}")}return u&&(n+=" "+d+" if ("+f+" == errors) {"),n=e.util.cleanUpCode(n)}},{}],41:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),f=e.opts.v5&&s&&s.$data;f?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s,i+="var division"+a+";if (",f&&(i+=" "+n+" !== undefined && ( typeof "+n+" != 'number' || "),i+=" (division"+a+" = "+p+" / "+n+", ",i+=e.opts.multipleOfPrecision?" Math.abs(Math.round(division"+a+") - division"+a+") > 1e-"+e.opts.multipleOfPrecision+" ":" division"+a+" !== parseInt(division"+a+") ",i+=" ) ",f&&(i+=" ) "),i+=" ) { ";var h=h||[];h.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"multipleOf")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { multipleOf: "+n+" } ",e.opts.messages!==!1&&(i+=" , message: 'should be multiple of ",i+=f?"' + "+n:""+s+"'"),e.opts.verbose&&(i+=" , schema: ",i+=f?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var d=i;return i=h.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+d+"]); ":" validate.errors = ["+d+"]; return false; ":" var err = "+d+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",l&&(i+=" else { "),i}},{}],42:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),p="errs__"+i,f=e.util.copy(e);f.level++;var h="valid"+f.level;if(e.util.schemaHasRules(o,e.RULES.all)){f.schema=o,f.schemaPath=s,f.errSchemaPath=c,n+=" var "+p+" = errors; ";var d=e.compositeRule;e.compositeRule=f.compositeRule=!0,f.createErrors=!1;var m;f.opts.allErrors&&(m=f.opts.allErrors,f.opts.allErrors=!1),n+=" "+e.validate(f)+" ",f.createErrors=!0,m&&(f.opts.allErrors=m),e.compositeRule=f.compositeRule=d,n+=" if ("+h+") { ";var g=g||[];g.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(r||"not")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",e.opts.messages!==!1&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var v=n;n=g.pop(),n+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+v+"]); ":" validate.errors = ["+v+"]; return false; ":" var err = "+v+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } else { errors = "+p+"; if (vErrors !== null) { if ("+p+") vErrors.length = "+p+"; else vErrors = null; } ",e.opts.allErrors&&(n+=" } ")}else n+=" var err = ",e.createErrors!==!1?(n+=" { keyword: '"+(r||"not")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: {} ",e.opts.messages!==!1&&(n+=" , message: 'should NOT be valid' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ",n+="; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",u&&(n+=" if (false) { ");return n}},{}],43:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n=" ",i=e.level,a=e.dataLevel,o=e.schema[t],s=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,u=!e.opts.allErrors,l="data"+(a||""),p="valid"+i,f="errs__"+i,h=e.util.copy(e),d="";h.level++;var m="valid"+h.level;n+="var "+f+" = errors;var prevValid"+i+" = false;var "+p+" = false;";var g=h.baseId,v=e.compositeRule;e.compositeRule=h.compositeRule=!0;var b=o;if(b)for(var y,w=-1,x=b.length-1;w5)n+=" || validate.schema"+s+"["+g+"] ";else{var M=y;if(M)for(var q,R=-1,z=M.length-1;R= "+me+"; ",c=e.errSchemaPath+"/patternGroups/minimum",n+=" if (!"+p+") { ";var X=X||[];X.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(r||"patternGroups")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { reason: '"+be+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(H)+"' } ",e.opts.messages!==!1&&(n+=" , message: 'should NOT have "+ye+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(H)+"\"' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var Q=n;n=X.pop(),n+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+Q+"]); ":" validate.errors = ["+Q+"]; return false; ":" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } ",void 0!==ge&&(n+=" else ")}if(void 0!==ge){var ve=ge,be="maximum",ye="more";n+=" "+p+" = pgPropCount"+i+" <= "+ge+"; ",c=e.errSchemaPath+"/patternGroups/maximum",n+=" if (!"+p+") { ";var X=X||[];X.push(n),n="",e.createErrors!==!1?(n+=" { keyword: '"+(r||"patternGroups")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { reason: '"+be+"', limit: "+ve+", pattern: '"+e.util.escapeQuotes(H)+"' } ",e.opts.messages!==!1&&(n+=" , message: 'should NOT have "+ye+" than "+ve+' properties matching pattern "'+e.util.escapeQuotes(H)+"\"' "),e.opts.verbose&&(n+=" , schema: validate.schema"+s+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+l+" "),n+=" } "):n+=" {} ";var Q=n;n=X.pop(),n+=!e.compositeRule&&u?e.async?" throw new ValidationError(["+Q+"]); ":" validate.errors = ["+Q+"]; return false; ":" var err = "+Q+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",n+=" } "}c=G,u&&(n+=" if ("+p+") { ",d+="}")}}}}return u&&(n+=" "+d+" if ("+f+" == errors) {"),n=e.util.cleanUpCode(n)}},{}],47:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i,a=" ",o=e.level,s=e.dataLevel,c=e.schema[t],u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(s||""),f="valid"+o;if("#"==c||"#/"==c)e.isRoot?(n=e.async,i="validate"):(n=e.root.schema.$async===!0,i="root.refVal[0]");else{var h=e.resolveRef(e.baseId,c,e.isRoot);if(void 0===h){var d="can't resolve reference "+c+" from id "+e.baseId;if("fail"==e.opts.missingRefs){console.log(d);var m=m||[];m.push(a),a="",e.createErrors!==!1?(a+=" { keyword: '"+(r||"$ref")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { ref: '"+e.util.escapeQuotes(c)+"' } ",e.opts.messages!==!1&&(a+=" , message: 'can\\'t resolve reference "+e.util.escapeQuotes(c)+"' "),e.opts.verbose&&(a+=" , schema: "+e.util.toQuotedString(c)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),a+=" } "):a+=" {} ";var g=a;a=m.pop(),a+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+g+"]); ":" validate.errors = ["+g+"]; return false; ":" var err = "+g+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l&&(a+=" if (false) { ")}else{if("ignore"!=e.opts.missingRefs){var v=new Error(d);throw v.missingRef=e.resolve.url(e.baseId,c),v.missingSchema=e.resolve.normalizeId(e.resolve.fullPath(v.missingRef)),v}console.log(d),l&&(a+=" if (true) { ")}}else if(h.inline){var b=e.util.copy(e);b.level++;var y="valid"+b.level;b.schema=h.schema,b.schemaPath="",b.errSchemaPath=c;var w=e.validate(b).replace(/validate\.schema/g,h.code);a+=" "+w+" ",l&&(a+=" if ("+y+") { ")}else n=h.$async===!0,i=h.code}if(i){var m=m||[];m.push(a),a="",a+=e.opts.passContext?" "+i+".call(this, ":" "+i+"( ",a+=" "+p+", (dataPath || '')",'""'!=e.errorPath&&(a+=" + "+e.errorPath);var x=s?"data"+(s-1||""):"parentData",k=s?e.dataPathArr[s]:"parentDataProperty";a+=" , "+x+" , "+k+", rootData) ";var _=a;if(a=m.pop(),n){if(!e.async)throw new Error("async schema referenced by sync schema");a+=" try { ",l&&(a+="var "+f+" ="),a+=" "+e.yieldAwait+" "+_+"; } catch (e) { if (!(e instanceof ValidationError)) throw e; if (vErrors === null) vErrors = e.errors; else vErrors = vErrors.concat(e.errors); errors = vErrors.length; } ",l&&(a+=" if ("+f+") { ")}else a+=" if (!"+_+") { if (vErrors === null) vErrors = "+i+".errors; else vErrors = vErrors.concat("+i+".errors); errors = vErrors.length; } ",l&&(a+=" else { ")}return a}},{}],48:[function(e,t,r){"use strict";t.exports=function(e,t){var r,n,i=" ",a=e.level,o=e.dataLevel,s=e.schema[t],c=e.schemaPath+e.util.getProperty(t),u=e.errSchemaPath+"/"+t,l=!e.opts.allErrors,p="data"+(o||""),f="valid"+a,h=e.opts.v5&&s&&s.$data;h?(i+=" var schema"+a+" = "+e.util.getData(s.$data,o,e.dataPathArr)+"; ",n="schema"+a):n=s;var d="schema"+a;if(!h)if(s.length=e.opts.loopRequired;if(l)if(i+=" var missing"+a+"; ",k){h||(i+=" var "+d+" = validate.schema"+c+"; ");var _="i"+a,j="schema"+a+"["+_+"]",S="' + "+j+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(x,j,e.opts.jsonPointers)),i+=" var "+f+" = true; ",h&&(i+=" if (schema"+a+" === undefined) "+f+" = true; else if (!Array.isArray(schema"+a+")) "+f+" = false; else {"),i+=" for (var "+_+" = 0; "+_+" < "+d+".length; "+_+"++) { "+f+" = "+p+"["+d+"["+_+"]] !== undefined; if (!"+f+") break; } ",h&&(i+=" } "),i+=" if (!"+f+") { ";var E=E||[];E.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"required")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { missingProperty: '"+S+"' } ",e.opts.messages!==!1&&(i+=" , message: '",i+=e.opts._errorDataPathProperty?"is a required property":"should have required property \\'"+S+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+c+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var A=i;i=E.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+A+"]); ":" validate.errors = ["+A+"]; return false; ":" var err = "+A+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } else { "}else{i+=" if ( ";var C=m;if(C)for(var T,_=-1,I=C.length-1;_ 1) { var i = "+p+".length, j; outer: for (;i--;) { for (j = i; j--;) { if (equal("+p+"[i], "+p+"[j])) { "+f+" = false; break outer; } } } } ",h&&(i+=" } "),i+=" if (!"+f+") { ";var d=d||[];d.push(i),i="",e.createErrors!==!1?(i+=" { keyword: '"+(r||"uniqueItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(u)+" , params: { i: i, j: j } ",e.opts.messages!==!1&&(i+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(i+=" , schema: ",i+=h?"validate.schema"+c:""+s,i+=" , parentSchema: validate.schema"+e.schemaPath+" , data: "+p+" "),i+=" } "):i+=" {} ";var m=i;i=d.pop(),i+=!e.compositeRule&&l?e.async?" throw new ValidationError(["+m+"]); ":" validate.errors = ["+m+"]; return false; ":" var err = "+m+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+=" } ",l&&(i+=" else { ")}else l&&(i+=" if (true) { ");return i}},{}],51:[function(e,t,r){"use strict";t.exports=function(e,t){function r(e){for(var t=0;t>6],i=0===(32&r);if(31===(31&r)){var a=r;for(r=0;128===(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;r<<=7,r|=127&a}}else r&=31;var o=p.tag[r];return{cls:n,primitive:i,tag:r,tagStr:o}}function o(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(0===(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var a=0;a=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=p.tagClassByName[r||"universal"]<<6)}var s=e("inherits"),c=e("buffer").Buffer,u=e("../../asn1"),l=u.base,p=u.constants.der;t.exports=n,n.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(i,l.Node),i.prototype._encodeComposite=function(e,t,r,n){var i=o(e,t,r,this.reporter);if(n.length<128){var a=new c(2);return a[0]=i,a[1]=n.length,this._createEncoderBuffer([a,n])}for(var s=1,u=n.length;u>=256;u>>=8)s++;var a=new c(2+s);a[0]=i,a[1]=128|s;for(var u=1+s,l=n.length;l>0;u--,l>>=8)a[u]=255&l;return this._createEncoderBuffer([a,n])},i.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new c(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var i=0,n=0;n=128;a>>=7)i++}for(var o=new c(i),s=o.length-1,n=e.length-1;n>=0;n--){var a=e[n];for(o[s--]=127&a;(a>>=7)>0;)o[s--]=128|127&a}return this._createEncoderBuffer(o)},i.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[a(n.getFullYear()),a(n.getUTCMonth()+1),a(n.getUTCDate()),a(n.getUTCHours()),a(n.getUTCMinutes()),a(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[a(n.getFullYear()%100),a(n.getUTCMonth()+1),a(n.getUTCDate()),a(n.getUTCHours()),a(n.getUTCMinutes()),a(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},i.prototype._encodeNull=function(){return this._createEncoderBuffer("")},i.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new c(r)}if(c.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new c(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,a=e;a>=256;a>>=8)n++;for(var i=new Array(n),a=i.length-1;a>=0;a--)i[a]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new c(i))},i.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},i.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},i.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var a=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),a.length!==i.defaultBuffer.length)return!1;for(n=0;n=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(t&=127,0==t)throw s("Indefinite length not supported");if(t>4)throw s("encoding too long");if(this._size-ethis._size-i)return null;if(this._offset=i,0===this.length)return t?new r(0):"";var o=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?o:o.toString("utf8")},n.prototype.readOID=function(e){e||(e=a.OID);var t=this.readString(e,!0);if(null===t)return null;for(var r=[],n=0,i=0;i>0),r.join(".")},n.prototype._readTag=function(e){i.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw s("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw s("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var n=this._buf[this._offset],a=0,o=0;o>0},t.exports=n}).call(this,e("buffer").Buffer)},{"./errors":70,"./types":73,assert:77,buffer:122}],73:[function(e,t,r){t.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},{}],74:[function(e,t,r){(function(r){function n(e,t){a.ok(e),a.equal(typeof e,"object"),a.ok(t),a.equal(typeof t,"object");var r=Object.getOwnPropertyNames(e);return r.forEach(function(r){if(!t[r]){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n)}}),t}function i(e){e=n(c,e||{}),this._buf=new r(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}var a=e("assert"),o=e("./types"),s=e("./errors"),c=(s.newInvalidAsn1Error,{size:1024,growthFactor:8});Object.defineProperty(i.prototype,"buffer",{get:function(){if(this._seq.length)throw new InvalidAsn1Error(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),i.prototype.writeByte=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},i.prototype.writeInt=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");"number"!=typeof t&&(t=o.Integer);for(var r=4;(0===(4286578688&e)||(4286578688&e)===-8388608)&&r>1;)r--,e<<=8;if(r>4)throw new InvalidAsn1Error("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=t,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(4278190080&e)>>>24,e<<=8},i.prototype.writeNull=function(){this.writeByte(o.Null),this.writeByte(0)},i.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");return"number"!=typeof t&&(t=o.Enumeration),this.writeInt(e,t)},i.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw new TypeError("argument must be a Boolean");"number"!=typeof t&&(t=o.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0},i.prototype.writeString=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=o.OctetString);var n=r.byteLength(e);this.writeByte(t),this.writeLength(n),n&&(this._ensure(n),this._buf.write(e,this._offset),this._offset+=n)},i.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw new TypeError("tag must be a number");if(!r.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},i.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach(function(e){t.writeString(e)})},i.prototype.writeOID=function(e,t){function r(e,t){t<128?e.push(t):t<16384?(e.push(t>>>7|128),e.push(127&t)):t<2097152?(e.push(t>>>14|128),e.push(255&(t>>>7|128)),e.push(127&t)):t<268435456?(e.push(t>>>21|128),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t)):(e.push(255&(t>>>28|128)),e.push(255&(t>>>21|128)),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t))}if("string"!=typeof e)throw new TypeError("argument must be a string");if("number"!=typeof t&&(t=o.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");var n=e.split("."),i=[];i.push(40*parseInt(n[0],10)+parseInt(n[1],10)),n.slice(2).forEach(function(e){r(i,parseInt(e,10))});var a=this;this._ensure(2+i.length),this.writeByte(t),this.writeLength(i.length),i.forEach(function(e){a.writeByte(e)})},i.prototype.writeLength=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else{if(!(e<=16777215))throw new InvalidAsn1ERror("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e}},i.prototype.startSequence=function(e){"number"!=typeof e&&(e=o.Sequence|o.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},i.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,r=this._offset-t;if(r<=127)this._shift(t,r,-2),this._buf[e]=r;else if(r<=255)this._shift(t,r,-1),this._buf[e]=129,this._buf[e+1]=r;else if(r<=65535)this._buf[e]=130,this._buf[e+1]=r>>8,this._buf[e+2]=r;else{if(!(r<=16777215))throw new InvalidAsn1Error("Sequence too long");this._shift(t,r,1),this._buf[e]=131,this._buf[e+1]=r>>16,this._buf[e+2]=r>>8,this._buf[e+3]=r}},i.prototype._shift=function(e,t,r){a.ok(void 0!==e),a.ok(void 0!==t),a.ok(r),this._buf.copy(this._buf,e+r,e,e+t),this._offset+=r},i.prototype._ensure=function(e){if(a.ok(e),this._size-this._offset=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(o=c[s],!h(e[o],t[o],r,n))return!1;return!0}function g(e,t,r){h(e,t,!0)&&p(e,t,r,"notDeepStrictEqual",g)}function v(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&t.call({},e)===!0}function b(e){var t;try{e()}catch(e){t=e}return t}function y(e,t,r,n){var i;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),i=b(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!i&&p(i,r,"Missing expected exception"+n);var a="string"==typeof n,o=!e&&w.isError(i),s=!e&&i&&!r;if((o&&a&&v(i,r)||s)&&p(i,r,"Got unwanted exception"+n),e&&i&&r&&!v(i,r)||!e&&i)throw i}var w=e("util/"),x=Object.prototype.hasOwnProperty,k=Array.prototype.slice,_=function(){return"foo"===function(){}.name}(),j=t.exports=f,S=/\s*function\s+([^\(\s]*)\s*/;j.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=l(this),this.generatedMessage=!0);var t=e.stackStartFunction||p;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var r=new Error;if(r.stack){var n=r.stack,i=s(t),a=n.indexOf("\n"+i);if(a>=0){var o=n.indexOf("\n",a+1);n=n.substring(o+1)}this.stack=n}}},w.inherits(j.AssertionError,Error),j.fail=p,j.ok=f,j.equal=function(e,t,r){e!=t&&p(e,t,r,"==",j.equal)},j.notEqual=function(e,t,r){e==t&&p(e,t,r,"!=",j.notEqual)},j.deepEqual=function(e,t,r){h(e,t,!1)||p(e,t,r,"deepEqual",j.deepEqual)},j.deepStrictEqual=function(e,t,r){h(e,t,!0)||p(e,t,r,"deepStrictEqual",j.deepStrictEqual)},j.notDeepEqual=function(e,t,r){h(e,t,!1)&&p(e,t,r,"notDeepEqual",j.notDeepEqual)},j.notDeepStrictEqual=g,j.strictEqual=function(e,t,r){e!==t&&p(e,t,r,"===",j.strictEqual)},j.notStrictEqual=function(e,t,r){e===t&&p(e,t,r,"!==",j.notStrictEqual)},j.throws=function(e,t,r){y(!0,e,t,r)},j.doesNotThrow=function(e,t,r){y(!1,e,t,r)},j.ifError=function(e){if(e)throw e};var E=Object.keys||function(e){var t=[];for(var r in e)x.call(e,r)&&t.push(r);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":531}],78:[function(e,t,r){function n(e){return"AWS "+e.key+":"+a(e)}function i(e){return p.createHmac("sha1",e.secret).update(e.message).digest("base64")}function a(e){return e.message=s(e),i(e)}function o(e){return e.message=c(e),i(e)}function s(e){var t=e.amazonHeaders||"";t&&(t+="\n");var r=[e.verb,e.md5,e.contentType,e.date?e.date.toUTCString():"",t+e.resource];return r.join("\n")}function c(e){return"GET\n\n\n"+e.date+"\n"+e.resource}function u(e){for(var t=[],r=Object.keys(e),n=0,i=r.length;n=0&&"us-east-1"===this.region||["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0},s.prototype.createHost=function(){var e=this.isSingleRegion()?"":("s3"===this.service&&"us-east-1"!==this.region?"-":".")+this.region,t="ses"===this.service?"email":this.service;return t+e+".amazonaws.com"},s.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,r=t.headers;t.signQuery?(this.parsedPath.query=e=this.parsedPath.query||{},this.credentials.sessionToken&&(e["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||e["X-Amz-Expires"]||(e["X-Amz-Expires"]=86400),e["X-Amz-Date"]?this.datetime=e["X-Amz-Date"]:e["X-Amz-Date"]=this.getDateTime(),e["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",e["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),e["X-Amz-SignedHeaders"]=this.signedHeaders()):(t.doNotModifyHeaders||this.isCodeCommitGit||(!t.body||r["Content-Type"]||r["content-type"]||(r["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8"),!t.body||r["Content-Length"]||r["content-length"]||(r["Content-Length"]=n.byteLength(t.body)),!this.credentials.sessionToken||r["X-Amz-Security-Token"]||r["x-amz-security-token"]||(r["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||r["X-Amz-Content-Sha256"]||r["x-amz-content-sha256"]||(r["X-Amz-Content-Sha256"]=a(this.request.body||"","hex")),r["X-Amz-Date"]||r["x-amz-date"]?this.datetime=r["X-Amz-Date"]||r["x-amz-date"]:r["X-Amz-Date"]=this.getDateTime()),delete r.Authorization,delete r.authorization)},s.prototype.sign=function(){return this.parsedPath||this.prepareRequest(),this.request.signQuery?this.parsedPath.query["X-Amz-Signature"]=this.signature():this.request.headers.Authorization=this.authHeader(),this.request.path=this.formatPath(),this.request},s.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit&&(this.datetime=this.datetime.slice(0,-1))}return this.datetime},s.prototype.getDate=function(){return this.getDateTime().substr(0,8)},s.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")},s.prototype.signature=function(){var e,t,r,n=this.getDate(),a=[this.credentials.secretAccessKey,n,this.region,this.service].join(),o=h.get(a);return o||(e=i("AWS4"+this.credentials.secretAccessKey,n),t=i(e,this.region),r=i(t,this.service),o=i(r,"aws4_request"),h.set(a,o)),i(o,this.stringToSign(),"hex")},s.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),a(this.canonicalString(),"hex")].join("\n")},s.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e,t=this.parsedPath.path,r=this.parsedPath.query,n=this.request.headers,i="",s="s3"!==this.service,c="s3"===this.service||this.request.doNotEncodePath,u="s3"===this.service,p="s3"===this.service;return e="s3"===this.service&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":n["X-Amz-Content-Sha256"]||n["x-amz-content-sha256"]||a(this.request.body||"","hex"),r&&(i=o(l.stringify(Object.keys(r).sort().reduce(function(e,t){return t?(e[t]=Array.isArray(r[t])?p?r[t][0]:r[t].slice().sort():r[t],e):e},{})))),"/"!==t&&(s&&(t=t.replace(/\/{2,}/g,"/")),t=t.split("/").reduce(function(e,t){return s&&".."===t?e.pop():s&&"."===t||(c&&(t=l.unescape(t)),e.push(o(l.escape(t)))),e},[]).join("/"),"/"!==t[0]&&(t="/"+t),u&&(t=t.replace(/%2F/g,"/"))),[this.request.method||"GET",t,i,this.canonicalHeaders()+"\n",this.signedHeaders(),e].join("\n")},s.prototype.canonicalHeaders=function(){function e(e){return e.toString().trim().replace(/\s+/g," ")}var t=this.request.headers;return Object.keys(t).sort(function(e,t){return e.toLowerCase()=0&&(r=l.parse(e.slice(t+1)),e=e.slice(0,t)),/[^0-9A-Za-z!'()*\-._~%\/]/.test(e)&&(e=e.split("/").map(function(e){return l.escape(l.unescape(e))}).join("/")),this.parsedPath={path:e,query:r}},s.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+o(l.stringify(t))):e},c.RequestSigner=s,c.sign=function(e,t){return new s(e,t).sign()}}).call(this,e("_process"),e("buffer").Buffer)},{"./lru":80,_process:431,buffer:122,crypto:134,querystring:446,url:526}],80:[function(e,t,r){function n(e){this.capacity=0|e,this.map=Object.create(null),this.list=new i}function i(){this.firstNode=null,this.lastNode=null}function a(e,t){this.key=e,this.val=t,this.prev=null,this.next=null}t.exports=function(e){return new n(e)},n.prototype.get=function(e){var t=this.map[e];if(null!=t)return this.used(t),t.val},n.prototype.set=function(e,t){var r=this.map[e];if(null!=r)r.val=t;else{if(this.capacity||this.prune(),!this.capacity)return!1;r=new a(e,t),this.map[e]=r,this.capacity--}return this.used(r),!0},n.prototype.used=function(e){this.list.moveToFront(e)},n.prototype.prune=function(){var e=this.list.pop();null!=e&&(delete this.map[e.key],this.capacity++)},i.prototype.moveToFront=function(e){this.firstNode!=e&&(this.remove(e),null==this.firstNode?(this.firstNode=e,this.lastNode=e,e.prev=null,e.next=null):(e.prev=null,e.next=this.firstNode,e.next.prev=e,this.firstNode=e))},i.prototype.pop=function(){var e=this.lastNode;return null!=e&&this.remove(e),e},i.prototype.remove=function(e){this.firstNode==e?this.firstNode=e.next:null!=e.prev&&(e.prev.next=e.next),this.lastNode==e?this.lastNode=e.prev:null!=e.next&&(e.next.prev=e.prev)}},{}],81:[function(e,t,r){var n=e("./lib/backoff"),i=e("./lib/strategy/exponential"),a=e("./lib/strategy/fibonacci"),o=e("./lib/function_call.js");t.exports.Backoff=n,t.exports.FunctionCall=o,t.exports.FibonacciStrategy=a,t.exports.ExponentialStrategy=i,t.exports.fibonacci=function(e){return new n(new a(e))},t.exports.exponential=function(e){return new n(new i(e))},t.exports.call=function(e,t,r){var n=Array.prototype.slice.call(arguments);return e=n[0],t=n.slice(1,n.length-1),r=n[n.length-1],new o(e,t,r)}},{"./lib/backoff":82,"./lib/function_call.js":83,"./lib/strategy/exponential":84,"./lib/strategy/fibonacci":85}],82:[function(e,t,r){function n(e){i.EventEmitter.call(this),this.backoffStrategy_=e,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var i=e("events"),a=e("util");a.inherits(n,i.EventEmitter),n.prototype.failAfter=function(e){if(e<1)throw new Error("Maximum number of retry must be greater than 0. Actual: "+e);this.maxNumberOfRetry_=e},n.prototype.backoff=function(e){if(this.timeoutID_!==-1)throw new Error("Backoff in progress.");this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e))},n.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},n.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=n},{events:171,util:531}],83:[function(e,t,r){ -function n(e){return"function"==typeof e}function i(e,t,r){if(a.EventEmitter.call(this),!n(e))throw new Error("fn should be a function.Actual: "+typeof e);if(!n(r))throw new Error("callback should be a function.Actual: "+typeof e);this.function_=e,this.arguments_=t,this.callback_=r,this.results_=[],this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.state_=i.State_.PENDING}var a=e("events"),o=e("util"),s=e("./backoff"),c=e("./strategy/fibonacci");o.inherits(i,a.EventEmitter),i.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},i.prototype.isPending=function(){return this.state_==i.State_.PENDING},i.prototype.isRunning=function(){return this.state_==i.State_.RUNNING},i.prototype.isCompleted=function(){return this.state_==i.State_.COMPLETED},i.prototype.isAborted=function(){return this.state_==i.State_.ABORTED},i.prototype.setStrategy=function(e){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.strategy_=e,this},i.prototype.getResults=function(){return this.results_.concat()},i.prototype.failAfter=function(e){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.failAfter_=e,this},i.prototype.abort=function(){if(this.isCompleted())throw new Error("FunctionCall already completed.");this.isRunning()&&this.backoff_.reset(),this.state_=i.State_.ABORTED},i.prototype.start=function(e){if(this.isAborted())throw new Error("FunctionCall aborted.");if(!this.isPending())throw new Error("FunctionCall already started.");var t=this.strategy_||new c;this.backoff_=e?e(t):new s(t),this.backoff_.on("ready",this.doCall_.bind(this)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=i.State_.RUNNING,this.doCall_()},i.prototype.doCall_=function(){var e=["call"].concat(this.arguments_);a.EventEmitter.prototype.emit.apply(this,e);var t=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(t))},i.prototype.doCallback_=function(){var e=this.results_[this.results_.length-1];this.callback_.apply(null,e)},i.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.results_.push(e),a.EventEmitter.prototype.emit.apply(this,["callback"].concat(e)),e[0]?this.backoff_.backoff(e[0]):(this.state_=i.State_.COMPLETED,this.doCallback_())}},i.prototype.handleBackoff_=function(e,t,r){this.emit("backoff",e,t,r)},t.exports=i},{"./backoff":82,"./strategy/fibonacci":85,events:171,util:531}],84:[function(e,t,r){function n(e){a.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var i=e("util"),a=e("./strategy");i.inherits(n,a),n.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=2*this.backoffDelay_,this.backoffDelay_},n.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=n},{"./strategy":86,util:531}],85:[function(e,t,r){function n(e){a.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var i=e("util"),a=e("./strategy");i.inherits(n,a),n.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},n.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=n},{"./strategy":86,util:531}],86:[function(e,t,r){function n(e){return void 0!==e&&null!==e}function i(e){if(e=e||{},n(e.initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(n(e.maxDelay)&&e.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(n(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}e("events"),e("util");i.prototype.getMaxDelay=function(){return this.maxDelay_},i.prototype.getInitialDelay=function(){return this.initialDelay_},i.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_,r=Math.round(e*t);return r},i.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},i.prototype.reset=function(){this.reset_()},i.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=i},{events:171,util:531}],87:[function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function i(e){return 3*e.length/4-n(e)}function a(e){var t,r,i,a,o,s,c=e.length;o=n(e),s=new p(3*c/4-o),i=o>0?c-4:c;var u=0;for(t=0,r=0;t>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,s[u++]=255&a):1===o&&(a=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,r){for(var n,i=[],a=t;al?l:c+o));return 1===n?(t=e[r-1],i+=u[t>>2],i+=u[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=u[t>>10],i+=u[t>>4&63],i+=u[t<<2&63],i+="="),a.push(i),a.join("")}r.byteLength=i,r.toByteArray=a,r.fromByteArray=c;for(var u=[],l=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,d=f.length;h=t&&(c=0),n=n<<8|e[c];return n}function a(e,t,r){var n,a=new u,o=new Uint32Array(l),s=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(a.expandstate(t,64,e,64),n=0;n<64;n++)a.expand0state(t,64),a.expand0state(e,64);for(n=0;n>>24,r[4*n+2]=o[n]>>>16,r[4*n+1]=o[n]>>>8,r[4*n+0]=o[n]}function o(e,t,r,n,i,o,c){var u,l,f,h,d,m,g=new Uint8Array(64),v=new Uint8Array(64),b=new Uint8Array(p),y=new Uint8Array(p),w=new Uint8Array(n+4),x=o;if(c<1)return-1;if(0===t||0===n||0===o||o>b.byteLength*b.byteLength||n>1<<20)return-1;for(h=Math.floor((o+b.byteLength-1)/b.byteLength),f=Math.floor((o+h-1)/h),u=0;u0;m++){for(w[n+0]=m>>>24,w[n+1]=m>>>16,w[n+2]=m>>>8,w[n+3]=m,s(v,w,n+4),a(g,v,y),u=b.byteLength;u--;)b[u]=y[u];for(u=1;u=x));u++)i[d]=b[u];o-=u}return 0}var s=e("tweetnacl").lowlevel.crypto_hash,c=0,u=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};u.prototype.encipher=function(e,t){void 0===t&&(t=new Uint8Array(e.buffer),0!==e.byteOffset&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var r=1;r<16;r+=2)e[1]^=n(this.S,t,0)^this.P[r],e[0]^=n(this.S,t,4)^this.P[r+1];var i=e[0];e[0]=e[1]^this.P[17],e[1]=i},u.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);0!==e.byteOffset&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var r=16;r>0;r-=2)e[1]^=n(this.S,t,0)^this.P[r],e[0]^=n(this.S,t,4)^this.P[r-1];var i=e[0];e[0]=e[1]^this.P[0],e[1]=i},u.prototype.expand0state=function(e,t){var r,n,a=new Uint32Array(2),o=new Uint8Array(a.buffer);for(r=0,c=0;r<18;r++)this.P[r]^=i(e,t);for(c=0,r=0;r<18;r+=2)this.encipher(a,o),this.P[r]=a[0],this.P[r+1]=a[1];for(r=0;r<4;r++)for(n=0;n<256;n+=2)this.encipher(a,o),this.S[r][n]=a[0],this.S[r][n+1]=a[1]},u.prototype.expandstate=function(e,t,r,n){var a,o,s=new Uint32Array(2);for(a=0,c=0;a<18;a++)this.P[a]^=i(r,n);for(a=0,c=0;a<18;a+=2)s[0]^=i(e,t),s[1]^=i(e,t),this.encipher(s),this.P[a]=s[0],this.P[a+1]=s[1];for(a=0;a<4;a++)for(o=0;o<256;o+=2)s[0]^=i(e,t),s[1]^=i(e,t),this.encipher(s),this.S[a][o]=s[0],this.S[a][o+1]=s[1];c=0},u.prototype.enc=function(e,t){for(var r=0;r=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return n}function s(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?s-49+10:s>=17?s-17+10:s}return i}function c(e){for(var t=new Array(e.bitLength()),r=0;r>>i}return t}function u(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=67108863&o,c=o/67108864|0;r.words[0]=s;for(var u=1;u>>26,p=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var d=u-h|0;i=0|e.words[d],a=0|t.words[h],o=i*a+p,l+=o/67108864|0,p=67108863&o}r.words[u]=0|p,c=0|l}return 0!==c?r.words[u]=0|c:r.length--,r.strip()}function l(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0,i+=o>>>26,o&=67108863}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}function p(e,t,r){var n=new f;return n.mulp(e,t,r)}function f(e,t){this.x=e,this.y=t}function h(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function d(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function v(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function b(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function y(e){b.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=a:r.BN=a,a.BN=a,a.wordSize=26;var w;try{w=e("buffer").Buffer}catch(e){}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var i=0;"-"===e[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},a.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var r=0;r=t;r-=6)i=o(e,r,r+6),this.words[n]|=i<>>26-a&4194303,a+=24,a>=26&&(a-=26,n++);r+6!==t&&(i=o(e,t,r+6),this.words[n]|=i<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var a=e.length-r,o=a%n,c=Math.min(a,a-o)+r,u=0,l=r;l1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){e=e||10,t=0|t||1;var r;if(16===e||"hex"===e){r="";for(var i=0,a=0,o=0;o>>24-i&16777215,r=0!==a||o!==this.length-1?x[6-c.length]+c+r:c+r,i+=2,i>=26&&(i-=26,o--)}for(0!==a&&(r=a.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var u=k[e],l=_[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var f=p.modn(l).toString(e);p=p.idivn(l),r=p.isZero()?f+r:x[u-f.length]+f+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("undefined"!=typeof w),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),a=r||Math.max(1,i);n(i<=a,"byte array longer than desired length"),n(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,u=new e(a),l=this.clone();if(c){for(s=0;!l.isZero();s++)o=l.andln(255),l.iushrn(8),u[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 0===(8191&t)&&(r+=13,t>>>=13),0===(127&t)&&(r+=7,t>>>=7),0===(15&t)&&(r+=4,t>>>=4),0===(3&t)&&(r+=2,t>>>=2),0===(1&t)&&r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>>26;for(;0!==i&&a>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;var n,i;r>0?(n=this,i=e):(n=e,i=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],d=8191&h,m=h>>>13,g=0|o[2],v=8191&g,b=g>>>13,y=0|o[3],w=8191&y,x=y>>>13,k=0|o[4],_=8191&k,j=k>>>13,S=0|o[5],E=8191&S,A=S>>>13,C=0|o[6],T=8191&C,I=C>>>13,P=0|o[7],O=8191&P,D=P>>>13,M=0|o[8],q=8191&M,R=M>>>13,z=0|o[9],B=8191&z,F=z>>>13,N=0|s[0],L=8191&N,U=N>>>13,H=0|s[1],K=8191&H,$=H>>>13,V=0|s[2],G=8191&V,X=V>>>13,Q=0|s[3],W=8191&Q,J=Q>>>13,Z=0|s[4],Y=8191&Z,ee=Z>>>13,te=0|s[5],re=8191&te,ne=te>>>13,ie=0|s[6],ae=8191&ie,oe=ie>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,le=0|s[8],pe=8191&le,fe=le>>>13,he=0|s[9],de=8191&he,me=he>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(p,L),i=Math.imul(p,U),i=i+Math.imul(f,L)|0,a=Math.imul(f,U);var ge=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(d,L),i=Math.imul(d,U),i=i+Math.imul(m,L)|0,a=Math.imul(m,U),n=n+Math.imul(p,K)|0,i=i+Math.imul(p,$)|0,i=i+Math.imul(f,K)|0,a=a+Math.imul(f,$)|0;var ve=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(v,L),i=Math.imul(v,U),i=i+Math.imul(b,L)|0,a=Math.imul(b,U),n=n+Math.imul(d,K)|0,i=i+Math.imul(d,$)|0,i=i+Math.imul(m,K)|0,a=a+Math.imul(m,$)|0,n=n+Math.imul(p,G)|0,i=i+Math.imul(p,X)|0,i=i+Math.imul(f,G)|0,a=a+Math.imul(f,X)|0;var be=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(w,L),i=Math.imul(w,U),i=i+Math.imul(x,L)|0,a=Math.imul(x,U),n=n+Math.imul(v,K)|0,i=i+Math.imul(v,$)|0,i=i+Math.imul(b,K)|0,a=a+Math.imul(b,$)|0,n=n+Math.imul(d,G)|0,i=i+Math.imul(d,X)|0,i=i+Math.imul(m,G)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(p,W)|0,i=i+Math.imul(p,J)|0,i=i+Math.imul(f,W)|0,a=a+Math.imul(f,J)|0;var ye=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(_,L),i=Math.imul(_,U),i=i+Math.imul(j,L)|0,a=Math.imul(j,U),n=n+Math.imul(w,K)|0,i=i+Math.imul(w,$)|0,i=i+Math.imul(x,K)|0,a=a+Math.imul(x,$)|0,n=n+Math.imul(v,G)|0,i=i+Math.imul(v,X)|0,i=i+Math.imul(b,G)|0,a=a+Math.imul(b,X)|0,n=n+Math.imul(d,W)|0,i=i+Math.imul(d,J)|0,i=i+Math.imul(m,W)|0,a=a+Math.imul(m,J)|0,n=n+Math.imul(p,Y)|0,i=i+Math.imul(p,ee)|0,i=i+Math.imul(f,Y)|0,a=a+Math.imul(f,ee)|0;var we=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(E,L),i=Math.imul(E,U),i=i+Math.imul(A,L)|0,a=Math.imul(A,U),n=n+Math.imul(_,K)|0,i=i+Math.imul(_,$)|0,i=i+Math.imul(j,K)|0,a=a+Math.imul(j,$)|0,n=n+Math.imul(w,G)|0,i=i+Math.imul(w,X)|0,i=i+Math.imul(x,G)|0,a=a+Math.imul(x,X)|0,n=n+Math.imul(v,W)|0,i=i+Math.imul(v,J)|0,i=i+Math.imul(b,W)|0,a=a+Math.imul(b,J)|0,n=n+Math.imul(d,Y)|0,i=i+Math.imul(d,ee)|0,i=i+Math.imul(m,Y)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=i+Math.imul(p,ne)|0,i=i+Math.imul(f,re)|0,a=a+Math.imul(f,ne)|0;var xe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(T,L),i=Math.imul(T,U),i=i+Math.imul(I,L)|0,a=Math.imul(I,U),n=n+Math.imul(E,K)|0,i=i+Math.imul(E,$)|0,i=i+Math.imul(A,K)|0,a=a+Math.imul(A,$)|0,n=n+Math.imul(_,G)|0,i=i+Math.imul(_,X)|0,i=i+Math.imul(j,G)|0,a=a+Math.imul(j,X)|0,n=n+Math.imul(w,W)|0,i=i+Math.imul(w,J)|0,i=i+Math.imul(x,W)|0,a=a+Math.imul(x,J)|0,n=n+Math.imul(v,Y)|0,i=i+Math.imul(v,ee)|0,i=i+Math.imul(b,Y)|0,a=a+Math.imul(b,ee)|0,n=n+Math.imul(d,re)|0,i=i+Math.imul(d,ne)|0,i=i+Math.imul(m,re)|0,a=a+Math.imul(m,ne)|0,n=n+Math.imul(p,ae)|0,i=i+Math.imul(p,oe)|0,i=i+Math.imul(f,ae)|0,a=a+Math.imul(f,oe)|0;var ke=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(O,L),i=Math.imul(O,U),i=i+Math.imul(D,L)|0,a=Math.imul(D,U),n=n+Math.imul(T,K)|0,i=i+Math.imul(T,$)|0,i=i+Math.imul(I,K)|0,a=a+Math.imul(I,$)|0,n=n+Math.imul(E,G)|0,i=i+Math.imul(E,X)|0,i=i+Math.imul(A,G)|0,a=a+Math.imul(A,X)|0,n=n+Math.imul(_,W)|0,i=i+Math.imul(_,J)|0,i=i+Math.imul(j,W)|0,a=a+Math.imul(j,J)|0,n=n+Math.imul(w,Y)|0,i=i+Math.imul(w,ee)|0,i=i+Math.imul(x,Y)|0,a=a+Math.imul(x,ee)|0,n=n+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,i=i+Math.imul(b,re)|0,a=a+Math.imul(b,ne)|0,n=n+Math.imul(d,ae)|0,i=i+Math.imul(d,oe)|0,i=i+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,n=n+Math.imul(p,ce)|0,i=i+Math.imul(p,ue)|0,i=i+Math.imul(f,ce)|0,a=a+Math.imul(f,ue)|0;var _e=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(q,L),i=Math.imul(q,U),i=i+Math.imul(R,L)|0,a=Math.imul(R,U),n=n+Math.imul(O,K)|0,i=i+Math.imul(O,$)|0,i=i+Math.imul(D,K)|0,a=a+Math.imul(D,$)|0,n=n+Math.imul(T,G)|0,i=i+Math.imul(T,X)|0,i=i+Math.imul(I,G)|0,a=a+Math.imul(I,X)|0,n=n+Math.imul(E,W)|0,i=i+Math.imul(E,J)|0,i=i+Math.imul(A,W)|0,a=a+Math.imul(A,J)|0,n=n+Math.imul(_,Y)|0,i=i+Math.imul(_,ee)|0,i=i+Math.imul(j,Y)|0,a=a+Math.imul(j,ee)|0,n=n+Math.imul(w,re)|0,i=i+Math.imul(w,ne)|0,i=i+Math.imul(x,re)|0,a=a+Math.imul(x,ne)|0,n=n+Math.imul(v,ae)|0,i=i+Math.imul(v,oe)|0,i=i+Math.imul(b,ae)|0,a=a+Math.imul(b,oe)|0,n=n+Math.imul(d,ce)|0,i=i+Math.imul(d,ue)|0,i=i+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0,n=n+Math.imul(p,pe)|0,i=i+Math.imul(p,fe)|0,i=i+Math.imul(f,pe)|0,a=a+Math.imul(f,fe)|0;var je=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(je>>>26)|0,je&=67108863,n=Math.imul(B,L),i=Math.imul(B,U),i=i+Math.imul(F,L)|0,a=Math.imul(F,U),n=n+Math.imul(q,K)|0,i=i+Math.imul(q,$)|0,i=i+Math.imul(R,K)|0,a=a+Math.imul(R,$)|0,n=n+Math.imul(O,G)|0,i=i+Math.imul(O,X)|0,i=i+Math.imul(D,G)|0,a=a+Math.imul(D,X)|0,n=n+Math.imul(T,W)|0,i=i+Math.imul(T,J)|0,i=i+Math.imul(I,W)|0,a=a+Math.imul(I,J)|0,n=n+Math.imul(E,Y)|0,i=i+Math.imul(E,ee)|0,i=i+Math.imul(A,Y)|0,a=a+Math.imul(A,ee)|0,n=n+Math.imul(_,re)|0,i=i+Math.imul(_,ne)|0,i=i+Math.imul(j,re)|0,a=a+Math.imul(j,ne)|0,n=n+Math.imul(w,ae)|0,i=i+Math.imul(w,oe)|0,i=i+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,n=n+Math.imul(v,ce)|0,i=i+Math.imul(v,ue)|0,i=i+Math.imul(b,ce)|0,a=a+Math.imul(b,ue)|0,n=n+Math.imul(d,pe)|0,i=i+Math.imul(d,fe)|0,i=i+Math.imul(m,pe)|0,a=a+Math.imul(m,fe)|0,n=n+Math.imul(p,de)|0,i=i+Math.imul(p,me)|0,i=i+Math.imul(f,de)|0,a=a+Math.imul(f,me)|0;var Se=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(B,K),i=Math.imul(B,$),i=i+Math.imul(F,K)|0,a=Math.imul(F,$),n=n+Math.imul(q,G)|0,i=i+Math.imul(q,X)|0,i=i+Math.imul(R,G)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(O,W)|0,i=i+Math.imul(O,J)|0,i=i+Math.imul(D,W)|0,a=a+Math.imul(D,J)|0,n=n+Math.imul(T,Y)|0,i=i+Math.imul(T,ee)|0,i=i+Math.imul(I,Y)|0,a=a+Math.imul(I,ee)|0,n=n+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,i=i+Math.imul(A,re)|0,a=a+Math.imul(A,ne)|0,n=n+Math.imul(_,ae)|0,i=i+Math.imul(_,oe)|0,i=i+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,n=n+Math.imul(w,ce)|0,i=i+Math.imul(w,ue)|0,i=i+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,n=n+Math.imul(v,pe)|0,i=i+Math.imul(v,fe)|0,i=i+Math.imul(b,pe)|0,a=a+Math.imul(b,fe)|0,n=n+Math.imul(d,de)|0,i=i+Math.imul(d,me)|0,i=i+Math.imul(m,de)|0,a=a+Math.imul(m,me)|0;var Ee=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(B,G),i=Math.imul(B,X),i=i+Math.imul(F,G)|0,a=Math.imul(F,X),n=n+Math.imul(q,W)|0,i=i+Math.imul(q,J)|0,i=i+Math.imul(R,W)|0,a=a+Math.imul(R,J)|0,n=n+Math.imul(O,Y)|0,i=i+Math.imul(O,ee)|0,i=i+Math.imul(D,Y)|0,a=a+Math.imul(D,ee)|0,n=n+Math.imul(T,re)|0,i=i+Math.imul(T,ne)|0,i=i+Math.imul(I,re)|0,a=a+Math.imul(I,ne)|0,n=n+Math.imul(E,ae)|0,i=i+Math.imul(E,oe)|0,i=i+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,n=n+Math.imul(_,ce)|0,i=i+Math.imul(_,ue)|0,i=i+Math.imul(j,ce)|0,a=a+Math.imul(j,ue)|0,n=n+Math.imul(w,pe)|0,i=i+Math.imul(w,fe)|0,i=i+Math.imul(x,pe)|0,a=a+Math.imul(x,fe)|0,n=n+Math.imul(v,de)|0,i=i+Math.imul(v,me)|0,i=i+Math.imul(b,de)|0,a=a+Math.imul(b,me)|0;var Ae=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,W),i=Math.imul(B,J),i=i+Math.imul(F,W)|0,a=Math.imul(F,J),n=n+Math.imul(q,Y)|0,i=i+Math.imul(q,ee)|0,i=i+Math.imul(R,Y)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(O,re)|0,i=i+Math.imul(O,ne)|0,i=i+Math.imul(D,re)|0,a=a+Math.imul(D,ne)|0,n=n+Math.imul(T,ae)|0,i=i+Math.imul(T,oe)|0,i=i+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,n=n+Math.imul(E,ce)|0,i=i+Math.imul(E,ue)|0,i=i+Math.imul(A,ce)|0,a=a+Math.imul(A,ue)|0,n=n+Math.imul(_,pe)|0,i=i+Math.imul(_,fe)|0,i=i+Math.imul(j,pe)|0,a=a+Math.imul(j,fe)|0,n=n+Math.imul(w,de)|0,i=i+Math.imul(w,me)|0,i=i+Math.imul(x,de)|0,a=a+Math.imul(x,me)|0;var Ce=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,Y),i=Math.imul(B,ee),i=i+Math.imul(F,Y)|0,a=Math.imul(F,ee),n=n+Math.imul(q,re)|0,i=i+Math.imul(q,ne)|0,i=i+Math.imul(R,re)|0,a=a+Math.imul(R,ne)|0,n=n+Math.imul(O,ae)|0,i=i+Math.imul(O,oe)|0,i=i+Math.imul(D,ae)|0,a=a+Math.imul(D,oe)|0,n=n+Math.imul(T,ce)|0,i=i+Math.imul(T,ue)|0,i=i+Math.imul(I,ce)|0,a=a+Math.imul(I,ue)|0,n=n+Math.imul(E,pe)|0,i=i+Math.imul(E,fe)|0,i=i+Math.imul(A,pe)|0,a=a+Math.imul(A,fe)|0,n=n+Math.imul(_,de)|0,i=i+Math.imul(_,me)|0,i=i+Math.imul(j,de)|0,a=a+Math.imul(j,me)|0;var Te=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,re),i=Math.imul(B,ne),i=i+Math.imul(F,re)|0,a=Math.imul(F,ne),n=n+Math.imul(q,ae)|0,i=i+Math.imul(q,oe)|0,i=i+Math.imul(R,ae)|0,a=a+Math.imul(R,oe)|0,n=n+Math.imul(O,ce)|0,i=i+Math.imul(O,ue)|0,i=i+Math.imul(D,ce)|0,a=a+Math.imul(D,ue)|0,n=n+Math.imul(T,pe)|0,i=i+Math.imul(T,fe)|0,i=i+Math.imul(I,pe)|0,a=a+Math.imul(I,fe)|0,n=n+Math.imul(E,de)|0,i=i+Math.imul(E,me)|0,i=i+Math.imul(A,de)|0,a=a+Math.imul(A,me)|0;var Ie=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,ae),i=Math.imul(B,oe),i=i+Math.imul(F,ae)|0,a=Math.imul(F,oe),n=n+Math.imul(q,ce)|0,i=i+Math.imul(q,ue)|0,i=i+Math.imul(R,ce)|0,a=a+Math.imul(R,ue)|0,n=n+Math.imul(O,pe)|0,i=i+Math.imul(O,fe)|0,i=i+Math.imul(D,pe)|0,a=a+Math.imul(D,fe)|0,n=n+Math.imul(T,de)|0,i=i+Math.imul(T,me)|0,i=i+Math.imul(I,de)|0,a=a+Math.imul(I,me)|0;var Pe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(B,ce),i=Math.imul(B,ue),i=i+Math.imul(F,ce)|0,a=Math.imul(F,ue),n=n+Math.imul(q,pe)|0,i=i+Math.imul(q,fe)|0,i=i+Math.imul(R,pe)|0,a=a+Math.imul(R,fe)|0,n=n+Math.imul(O,de)|0,i=i+Math.imul(O,me)|0,i=i+Math.imul(D,de)|0,a=a+Math.imul(D,me)|0;var Oe=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,pe),i=Math.imul(B,fe),i=i+Math.imul(F,pe)|0,a=Math.imul(F,fe),n=n+Math.imul(q,de)|0,i=i+Math.imul(q,me)|0,i=i+Math.imul(R,de)|0,a=a+Math.imul(R,me)|0;var De=(u+n|0)+((8191&i)<<13)|0;u=(a+(i>>>13)|0)+(De>>>26)|0,De&=67108863,n=Math.imul(B,de),i=Math.imul(B,me),i=i+Math.imul(F,de)|0,a=Math.imul(F,me);var Me=(u+n|0)+((8191&i)<<13)|0;return u=(a+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,c[0]=ge,c[1]=ve,c[2]=be,c[3]=ye,c[4]=we,c[5]=xe,c[6]=ke,c[7]=_e,c[8]=je,c[9]=Se,c[10]=Ee,c[11]=Ae,c[12]=Ce,c[13]=Te,c[14]=Ie,c[15]=Pe,c[16]=Oe,c[17]=De,c[18]=Me,0!==u&&(c[19]=u,r.length++),r};Math.imul||(j=u),a.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?j(this,e,t):n<63?u(this,e,t):n<1024?l(this,e,t):p(this,e,t)},f.prototype.makeRBT=function(e){for(var t=new Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},f.prototype.permute=function(e,t,r,n,i,a){for(var o=0;o>>=1)i++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=i/67108864|0,t+=a>>>26,this.words[r]=67108863&a}return 0!==t&&(this.words[r]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=c(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=67108863>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0);var i;i=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==l||u>=i);u--){var p=0|this.words[u];this.words[u]=l<<26-a|p>>>a,l=p&s}return c&&0!==l&&(c.words[c.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[i+r]=67108863&o}for(;i>26,this.words[i+r]=67108863&o;if(0===s)return this.strip();for(n(s===-1),s=0,i=0;i>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1],s=this._countBits(o);r=26-s,0!==r&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var c,u=n.length-i.length;if("mod"!==t){c=new a(null),c.length=u+1,c.words=new Array(c.length);for(var l=0;l=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/o|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);c&&(c.words[f]=h)}return c&&c.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:c||null,mod:n}},a.prototype.divmod=function(e,t,r){if(n(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var i,o,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),c=new a(1),u=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++u;for(var l=r.clone(),p=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(l),o.isub(p)),i.iushrn(1),o.iushrn(1);for(var d=0,m=1;0===(r.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(l),c.isub(p)),s.iushrn(1),c.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(c)):(r.isub(t),s.isub(i),c.isub(o))}return{a:s,b:c,gcd:r.iushln(u)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)i.isOdd()&&i.iadd(s),i.iushrn(1);for(var l=0,p=1;0===(r.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(r.iushrn(l);l-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(o)):(r.isub(t),o.isub(i))}var f;return f=0===t.cmpn(1)?i:o,f.cmpn(0)<0&&f.iadd(e),f},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var r;if(this.length>1)r=1;else{t&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];r=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new b(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};h.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},h.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),r=this.imulK(r),r=r.iadd(this.tmp),t=r.bitLength();while(t>this.n);var n=t0?r.isub(this.p):r.strip(),r},h.prototype.split=function(e,t){e.iushrn(this.n,0,t)},h.prototype.imulK=function(e){return e.imul(this.k)},i(d,h),d.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i>>22,a=o}a>>>=22,e.words[i-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},d.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function e(t){if(S[t])return S[t];var e;if("k256"===t)e=new d;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new v}return S[t]=e,e},b.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},b.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},b.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},b.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},b.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},b.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},b.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},b.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},b.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},b.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},b.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},b.prototype.isqr=function(e){return this.imul(e,e.clone())},b.prototype.sqr=function(e){return this.mul(e,e)},b.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2===1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),o=0;!i.isZero()&&0===i.andln(1);)o++,i.iushrn(1);n(!i.isZero());var s=new a(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new a(2*l*l).toRed(this);0!==this.pow(l,u).cmp(c);)l.redIAdd(c);for(var p=this.pow(l,i),f=this.pow(e,i.addn(1).iushrn(1)),h=this.pow(e,i),d=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;i--){for(var l=t.words[i],p=u-1;p>=0;p--){var f=l>>p&1;o!==n[0]&&(o=this.sqr(o)),0!==f||0!==s?(s<<=1,s|=f,c++,(c===r||0===i&&0===p)&&(o=this.mul(o,n[s]),c=0,s=0)):c=0}u=26}return o},b.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},b.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new y(e)},i(y,b),y.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},y.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},y.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):i.cmpn(0)<0&&(a=i.iadd(this.m)),a._forceRed(this)},y.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},y.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof t||t,this)},{}],90:[function(e,t,r){function n(e){this.rand=e}var i;if(t.exports=function(e){return i||(i=new n(null)),i.generate(e)},t.exports.Rand=n,n.prototype.generate=function(e){return this._rand(e)},n.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r>18&63,a=c>>12&63,o=c>>6&63,s=63&c,h[p++]=u.charAt(i)+u.charAt(a)+u.charAt(o)+u.charAt(s);while(l299)&&r.error){e=new Error("CouchDB error: "+(r.error.reason||r.error.error));for(var i in r)e[i]=r[i];return n(e,t,r)}return n(e,t,r)}"string"==typeof t&&(t={uri:t}),t.json=!0,t.body&&(t.json=t.body),delete t.body,n=n||r;var a=e(t,i);return a},e})},{}],92:[function(e,t,r){},{}],93:[function(e,t,r){(function(e){function t(e){var t,r;return t=e>s||e<0?(r=Math.abs(e)%s,e<0?s-r:r):e}function n(e){for(var t=0;t>>8^255&r^99,this.SBOX[i]=r,this.INV_SBOX[r]=i,a=e[i],o=e[a],s=e[o],n=257*e[r]^16843008*r,this.SUB_MIX[0][i]=n<<24|n>>>8,this.SUB_MIX[1][i]=n<<16|n>>>16,this.SUB_MIX[2][i]=n<<8|n>>>24,this.SUB_MIX[3][i]=n,n=16843009*s^65537*o^257*a^16843008*i,this.INV_SUB_MIX[0][r]=n<<24|n>>>8,this.INV_SUB_MIX[1][r]=n<<16|n>>>16,this.INV_SUB_MIX[2][r]=n<<8|n>>>24,this.INV_SUB_MIX[3][r]=n,0===i?i=c=1:(i=a^e[e[e[s^a]]],c^=e[e[c]]);return!0};var c=new i;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var e,t,r,n,i,a;for(r=this._key,t=r.length,this._nRounds=t+6,i=4*(this._nRounds+1),this._keySchedule=[],n=0;n>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=c.RCON[n/t|0]<<24):t>6&&n%t===4?a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]:void 0,this._keySchedule[n-t]^a);for(this._invKeySchedule=[],e=0;e>>24]]^c.INV_SUB_MIX[1][c.SBOX[a>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[a>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&a]];return!0},o.prototype.encryptBlock=function(t){t=a(new e(t));var r=this._doCryptBlock(t,this._keySchedule,c.SUB_MIX,c.SBOX),n=new e(16);return n.writeUInt32BE(r[0],0),n.writeUInt32BE(r[1],4),n.writeUInt32BE(r[2],8),n.writeUInt32BE(r[3],12),n},o.prototype.decryptBlock=function(t){t=a(new e(t));var r=[t[3],t[1]];t[1]=r[0],t[3]=r[1];var n=this._doCryptBlock(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX),i=new e(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[3],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[1],12),i},o.prototype.scrub=function(){n(this._keySchedule),n(this._invKeySchedule),n(this._key)},o.prototype._doCryptBlock=function(e,r,n,i){var a,o,s,c,u,l,p,f,h;o=e[0]^r[0],s=e[1]^r[1],c=e[2]^r[2],u=e[3]^r[3],a=4;for(var d=1;d>>24]^n[1][s>>>16&255]^n[2][c>>>8&255]^n[3][255&u]^r[a++],p=n[0][s>>>24]^n[1][c>>>16&255]^n[2][u>>>8&255]^n[3][255&o]^r[a++],f=n[0][c>>>24]^n[1][u>>>16&255]^n[2][o>>>8&255]^n[3][255&s]^r[a++],h=n[0][u>>>24]^n[1][o>>>16&255]^n[2][s>>>8&255]^n[3][255&c]^r[a++],o=l,s=p,c=f,u=h;return l=(i[o>>>24]<<24|i[s>>>16&255]<<16|i[c>>>8&255]<<8|i[255&u])^r[a++],p=(i[s>>>24]<<24|i[c>>>16&255]<<16|i[u>>>8&255]<<8|i[255&o])^r[a++],f=(i[c>>>24]<<24|i[u>>>16&255]<<16|i[o>>>8&255]<<8|i[255&s])^r[a++],h=(i[u>>>24]<<24|i[o>>>16&255]<<16|i[s>>>8&255]<<8|i[255&c])^r[a++],[t(l),t(p),t(f),t(h)]},r.AES=o}).call(this,e("buffer").Buffer)},{buffer:122}],94:[function(e,t,r){(function(r){function n(e,t,i,s){if(!(this instanceof n))return new n(e,t,i);o.call(this),this._finID=r.concat([i,new r([0,0,0,1])]),i=r.concat([i,new r([0,0,0,2])]),this._cipher=new a.AES(t),this._prev=new r(i.length),this._cache=new r(""),this._secCache=new r(""),this._decrypt=s,this._alen=0,this._len=0,i.copy(this._prev),this._mode=e;var u=new r(4);u.fill(0),this._ghash=new c(this._cipher.encryptBlock(u)),this._authTag=null,this._called=!1}function i(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=-1;++i16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},i.prototype.flush=function(){if(this.cache.length)return this.cache};var m={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};r.createDecipher=s,r.createDecipheriv=o}).call(this,e("buffer").Buffer)},{"./aes":93,"./authCipher":94,"./modes":99,"./modes/cbc":100,"./modes/cfb":101,"./modes/cfb1":102,"./modes/cfb8":103,"./modes/ctr":104,"./modes/ecb":105,"./modes/ofb":106,"./streamCipher":107,buffer:122,"cipher-base":125,evp_bytestokey:172,inherits:215}],97:[function(e,t,r){(function(t){function n(e,r,a){return this instanceof n?(c.call(this),this._cache=new i,this._cipher=new s.AES(r),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,void(this._autopadding=!0)):new n(e,r,a)}function i(){return this instanceof i?void(this.cache=new t("")):new i}function a(e,r,i){var a=l[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof i&&(i=new t(i)),"string"==typeof r&&(r=new t(r)),r.length!==a.key/8)throw new TypeError("invalid key length "+r.length);if(i.length!==a.iv)throw new TypeError("invalid iv length "+i.length);return"stream"===a.type?new f(d[a.mode],r,i):"auth"===a.type?new h(d[a.mode],r,i):new n(d[a.mode],r,i)}function o(e,t){var r=l[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=p(t,!1,r.key,r.iv);return a(e,n.key,n.iv)}var s=e("./aes"),c=e("cipher-base"),u=e("inherits"),l=e("./modes"),p=e("evp_bytestokey"),f=e("./streamCipher"),h=e("./authCipher");u(n,c),n.prototype._update=function(e){this._cache.add(e);for(var r,n,i=[];r=this._cache.get();)n=this._mode.encrypt(this,r),i.push(n);return t.concat(i)},n.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},n.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},i.prototype.add=function(e){this.cache=t.concat([this.cache,e])},i.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},i.prototype.flush=function(){for(var e=16-this.cache.length,r=new t(e),n=-1;++nc||e<0?(r=Math.abs(e)%c,e<0?c-r:r):e}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var s=new e(16);s.fill(0),t.exports=r,r.prototype.ghash=function(e){for(var t=-1;++t0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,r&&(a[0]=a[0]^225<<24)}this.state=i(s)},r.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var r;this.cache.length>=16;)r=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(r)},r.prototype.final=function(t,r){return this.cache.length&&this.ghash(e.concat([this.cache,s],16)),this.ghash(i([0,t,0,r])),this.state};var c=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:122}],99:[function(e,t,r){r["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},r["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},r["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},r["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},r["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},r["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},r.aes128=r["aes-128-cbc"],r.aes192=r["aes-192-cbc"],r.aes256=r["aes-256-cbc"],r["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},r["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},r["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},r["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},r["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},r["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},r["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},r["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},r["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},r["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},r["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},r["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},r["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},r["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},r["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},r["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},r["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},r["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],100:[function(e,t,r){var n=e("buffer-xor");r.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},r.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},{"buffer-xor":121}],101:[function(e,t,r){(function(t){function n(e,r,n){var a=r.length,o=i(r,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,n?r:o]),o}var i=e("buffer-xor");r.encrypt=function(e,r,i){for(var a,o=new t("");r.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=r.length)){o=t.concat([o,n(e,r,i)]);break}a=e._cache.length,o=t.concat([o,n(e,r.slice(0,a),i)]),r=r.slice(a)}return o}}).call(this,e("buffer").Buffer)},{buffer:122,"buffer-xor":121}],102:[function(e,t,r){(function(e){function t(e,t,r){for(var i,a,o,s=-1,c=8,u=0;++s>s%8,e._prev=n(e._prev,r?a:o);return u}function n(t,r){var n=t.length,i=-1,a=new e(t.length);for(t=e.concat([t,new e([r])]);++i>7;return a}r.encrypt=function(r,n,i){for(var a=n.length,o=new e(a),s=-1;++s=0||!r.umod(e.prime1)||!r.umod(e.prime2);)r=new o(s(t));return r}var o=e("bn.js"),s=e("randombytes");t.exports=i,i.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":89,buffer:122,randombytes:447}],112:[function(e,t,r){(function(e){"use strict";r["RSA-SHA224"]=r.sha224WithRSAEncryption={sign:"rsa",hash:"sha224",id:new e("302d300d06096086480165030402040500041c","hex")},r["RSA-SHA256"]=r.sha256WithRSAEncryption={sign:"rsa",hash:"sha256",id:new e("3031300d060960864801650304020105000420","hex")},r["RSA-SHA384"]=r.sha384WithRSAEncryption={sign:"rsa",hash:"sha384",id:new e("3041300d060960864801650304020205000430","hex")},r["RSA-SHA512"]=r.sha512WithRSAEncryption={sign:"rsa",hash:"sha512",id:new e("3051300d060960864801650304020305000440","hex")},r["RSA-SHA1"]={sign:"rsa",hash:"sha1",id:new e("3021300906052b0e03021a05000414","hex")},r["ecdsa-with-SHA1"]={sign:"ecdsa",hash:"sha1",id:new e("","hex")},r.DSA=r["DSA-SHA1"]=r["DSA-SHA"]={sign:"dsa",hash:"sha1",id:new e("","hex")},r["DSA-SHA224"]=r["DSA-WITH-SHA224"]={sign:"dsa",hash:"sha224",id:new e("","hex")},r["DSA-SHA256"]=r["DSA-WITH-SHA256"]={sign:"dsa",hash:"sha256",id:new e("","hex")},r["DSA-SHA384"]=r["DSA-WITH-SHA384"]={sign:"dsa",hash:"sha384",id:new e("","hex")},r["DSA-SHA512"]=r["DSA-WITH-SHA512"]={sign:"dsa",hash:"sha512",id:new e("","hex")},r["DSA-RIPEMD160"]={sign:"dsa",hash:"rmd160",id:new e("","hex")},r["RSA-RIPEMD160"]=r.ripemd160WithRSA={sign:"rsa",hash:"rmd160",id:new e("3021300906052b2403020105000414","hex")},r["RSA-MD5"]=r.md5WithRSAEncryption={sign:"rsa",hash:"md5",id:new e("3020300c06082a864886f70d020505000410","hex")}}).call(this,e("buffer").Buffer)},{buffer:122}],113:[function(e,t,r){(function(r){function n(e){p.Writable.call(this);var t=h[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=c(t.hash),this._tag=t.id,this._signType=t.sign}function i(e){p.Writable.call(this);var t=h[e];if(!t)throw new Error("Unknown message digest");this._hash=c(t.hash),this._tag=t.id,this._signType=t.sign}function a(e){return new n(e)}function o(e){return new i(e)}var s=e("./algos"),c=e("create-hash"),u=e("inherits"),l=e("./sign"),p=e("stream"),f=e("./verify"),h={};Object.keys(s).forEach(function(e){h[e]=h[e.toLowerCase()]=s[e]}),u(n,p.Writable),n.prototype._write=function(e,t,r){this._hash.update(e),r()},n.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},n.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),i=l(r.concat([this._tag,n]),e,this._hashType,this._signType);return t?i.toString(t):i},u(i,p.Writable),i.prototype._write=function(e,t,r){this._hash.update(e),r()},i.prototype.update=function(e,t){return"string"==typeof e&&(e=new r(e,t)),this._hash.update(e),this},i.prototype.verify=function(e,t,n){"string"==typeof t&&(t=new r(t,n)),this.end();var i=this._hash.digest();return f(t,r.concat([this._tag,i]),e,this._signType)},t.exports={Sign:a,Verify:o,createSign:a,createVerify:o}}).call(this,e("buffer").Buffer)},{"./algos":112,"./sign":115,"./verify":116,buffer:122,"create-hash":130,inherits:215,stream:507}],114:[function(e,t,r){"use strict";r["1.3.132.0.10"]="secp256k1",r["1.3.132.0.33"]="p224",r["1.2.840.10045.3.1.1"]="p192",r["1.2.840.10045.3.1.7"]="p256",r["1.3.132.0.34"]="p384",r["1.3.132.0.35"]="p521"},{}],115:[function(e,t,r){(function(r){function n(e,t,r,n){var o=g(t);if(o.curve){if("ecdsa"!==n)throw new Error("wrong private key type");return i(e,o)}if("dsa"===o.type){if("dsa"!==n)throw new Error("wrong private key type");return a(e,o,r)}if("rsa"!==n)throw new Error("wrong private key type");for(var s=o.modulus.byteLength(),c=[0,1];e.length+c.length+10&&r.ishrn(n),r}function u(e,t){e=c(e,t),e=e.mod(t);var n=new r(e.toArray());if(n.length=t)throw new Error("invalid sig")}var s=e("./curves"),c=e("elliptic"),u=e("parse-asn1"),l=e("bn.js"),p=c.ec;t.exports=n}).call(this,e("buffer").Buffer)},{"./curves":114,"bn.js":89,buffer:122,elliptic:155,"parse-asn1":425}],117:[function(e,t,r){(function(t,n){function i(e){if(er.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function a(e,t){for(var r=0;rr.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsr.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.levelr.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLevelr.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=r.Z_FILTERED&&e.strategy!=r.Z_HUFFMAN_ONLY&&e.strategy!=r.Z_RLE&&e.strategy!=r.Z_FIXED&&e.strategy!=r.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!n.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new m.Zlib(t);var i=this;this._hadError=!1,this._binding.onerror=function(e,t){i._binding=null,i._hadError=!0;var n=new Error(e);n.errno=t,n.code=r.codes[t],i.emit("error",n)};var a=r.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(a=e.level);var o=r.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(o=e.strategy),this._binding.init(e.windowBits||r.Z_DEFAULT_WINDOWBITS,a,e.memLevel||r.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new n(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=o,this.once("end",this.close)}var d=e("_stream_transform"),m=e("./binding"),g=e("util"),v=e("assert").ok;m.Z_MIN_WINDOWBITS=8,m.Z_MAX_WINDOWBITS=15,m.Z_DEFAULT_WINDOWBITS=15,m.Z_MIN_CHUNK=64,m.Z_MAX_CHUNK=1/0,m.Z_DEFAULT_CHUNK=16384,m.Z_MIN_MEMLEVEL=1,m.Z_MAX_MEMLEVEL=9,m.Z_DEFAULT_MEMLEVEL=8,m.Z_MIN_LEVEL=-1,m.Z_MAX_LEVEL=9,m.Z_DEFAULT_LEVEL=m.Z_DEFAULT_COMPRESSION,Object.keys(m).forEach(function(e){e.match(/^Z/)&&(r[e]=m[e])}),r.codes={Z_OK:m.Z_OK,Z_STREAM_END:m.Z_STREAM_END,Z_NEED_DICT:m.Z_NEED_DICT,Z_ERRNO:m.Z_ERRNO,Z_STREAM_ERROR:m.Z_STREAM_ERROR,Z_DATA_ERROR:m.Z_DATA_ERROR,Z_MEM_ERROR:m.Z_MEM_ERROR,Z_BUF_ERROR:m.Z_BUF_ERROR,Z_VERSION_ERROR:m.Z_VERSION_ERROR},Object.keys(r.codes).forEach(function(e){r.codes[r.codes[e]]=e}),r.Deflate=o,r.Inflate=s,r.Gzip=c,r.Gunzip=u,r.DeflateRaw=l,r.InflateRaw=p,r.Unzip=f,r.createDeflate=function(e){return new o(e)},r.createInflate=function(e){return new s(e)},r.createDeflateRaw=function(e){return new l(e)},r.createInflateRaw=function(e){return new p(e)},r.createGzip=function(e){return new c(e)},r.createGunzip=function(e){return new u(e)},r.createUnzip=function(e){return new f(e)},r.deflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new o(t),e,r)},r.deflateSync=function(e,t){return a(new o(t),e)},r.gzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new c(t),e,r)},r.gzipSync=function(e,t){return a(new c(t),e)},r.deflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new l(t),e,r)},r.deflateRawSync=function(e,t){return a(new l(t),e)},r.unzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new f(t),e,r)},r.unzipSync=function(e,t){return a(new f(t),e)},r.inflate=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new s(t),e,r)},r.inflateSync=function(e,t){return a(new s(t),e)},r.gunzip=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new u(t),e,r)},r.gunzipSync=function(e,t){return a(new u(t),e)},r.inflateRaw=function(e,t,r){return"function"==typeof t&&(r=t,t={}),i(new p(t),e,r)},r.inflateRawSync=function(e,t){return a(new p(t),e)},g.inherits(h,d),h.prototype.params=function(e,n,i){if(er.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(n!=r.Z_FILTERED&&n!=r.Z_HUFFMAN_ONLY&&n!=r.Z_RLE&&n!=r.Z_FIXED&&n!=r.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+n);if(this._level!==e||this._strategy!==n){var a=this;this.flush(m.Z_SYNC_FLUSH,function(){a._binding.params(e,n),a._hadError||(a._level=e,a._strategy=n,i&&i())})}else t.nextTick(i)},h.prototype.reset=function(){return this._binding.reset()},h.prototype._flush=function(e){this._transform(new n(0),"",e)},h.prototype.flush=function(e,r){var i=this._writableState;if(("function"==typeof e||void 0===e&&!r)&&(r=e,e=m.Z_FULL_FLUSH),i.ended)r&&t.nextTick(r);else if(i.ending)r&&this.once("end",r);else if(i.needDrain){var a=this;this.once("drain",function(){a.flush(r)})}else this._flushFlag=e,this.write(new n(0),"",r)},h.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var r=this;t.nextTick(function(){r.emit("close")})}},h.prototype._transform=function(e,t,r){var i,a=this._writableState,o=a.ending||a.ended,s=o&&(!e||a.length===e.length);if(null===!e&&!n.isBuffer(e))return r(new Error("invalid input"));s?i=m.Z_FINISH:(i=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||m.Z_NO_FLUSH));this._processChunk(e,i,r)},h.prototype._processChunk=function(e,t,r){function i(l,h){if(!c._hadError){var d=o-h;if(v(d>=0,"have should not go down"),d>0){var m=c._buffer.slice(c._offset,c._offset+d);c._offset+=d,u?c.push(m):(p.push(m),f+=m.length)}if((0===h||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=new n(c._chunkSize)),0===h){if(s+=a-l,a=l,!u)return!0;var g=c._binding.write(t,e,s,a,c._buffer,c._offset,c._chunkSize);return g.callback=i,void(g.buffer=e)}return!!u&&void r()}}var a=e&&e.length,o=this._chunkSize-this._offset,s=0,c=this,u="function"==typeof r;if(!u){var l,p=[],f=0;this.on("error",function(e){l=e});do var h=this._binding.writeSync(t,e,s,a,this._buffer,this._offset,o);while(!this._hadError&&i(h[0],h[1]));if(this._hadError)throw l;var d=n.concat(p,f);return this.close(),d}var m=this._binding.write(t,e,s,a,this._buffer,this._offset,o);m.buffer=e,m.callback=i},g.inherits(o,h),g.inherits(s,h),g.inherits(c,h),g.inherits(u,h),g.inherits(l,h),g.inherits(p,h),g.inherits(f,h)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":117,_process:431,_stream_transform:457,assert:77,buffer:122,util:531}],119:[function(e,t,r){arguments[4][92][0].apply(r,arguments)},{dup:92}],120:[function(e,t,r){(function(t){"use strict";var n=e("buffer"),i=n.Buffer,a=n.SlowBuffer,o=n.kMaxLength||2147483647;r.alloc=function(e,t,r){if("function"==typeof i.alloc)return i.alloc(e,t,r);if("number"==typeof r)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var n=r,a=t;void 0===a&&(n=void 0,a=0);var s=new i(e);if("string"==typeof a)for(var c=new i(a,n),u=c.length,l=-1;++lo)throw new RangeError("size is too large");return new i(e)},r.from=function(e,r,n){if("function"==typeof i.from&&(!t.Uint8Array||Uint8Array.from!==i.from))return i.from(e,r,n);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new i(e,r);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=r;if(1===arguments.length)return new i(e);"undefined"==typeof a&&(a=0);var o=n;if("undefined"==typeof o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new i(e.slice(a,a+o))}if(i.isBuffer(e)){var s=new i(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new i(e);if("Buffer"===e.type&&Array.isArray(e.data))return new i(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},r.allocUnsafeSlow=function(e){if("function"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:122}],121:[function(e,t,r){(function(e){t.exports=function(t,r){for(var n=Math.min(t.length,r.length),i=new e(n),a=0;a=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),o.alloc(+e)}function v(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return $(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return X(e).length;default:if(n)return $(e).length;t=(""+t).toLowerCase(),n=!0}}function b(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return D(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return P(this,t,r);case"latin1":case"binary":return O(this,t,r);case"base64":return C(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function w(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=o.from(t,n)),o.isBuffer(t))return 0===t.length?-1:x(e,t,r,n,i);if("number"==typeof t)return t&=255,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):x(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function x(e,t,r,n,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,c=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,r/=2}var u;if(i){var l=-1;for(u=r;us&&(r=s-c),u=r;u>=0;u--){for(var p=!0,f=0;fi&&(n=i)):n=i;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(i+s<=r){var c,u,l,p;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[i+1],128===(192&c)&&(p=(31&a)<<6|63&c,p>127&&(o=p));break;case 3:c=e[i+1],u=e[i+2],128===(192&c)&&128===(192&u)&&(p=(15&a)<<12|(63&c)<<6|63&u,p>2047&&(p<55296||p>57343)&&(o=p));break;case 4:c=e[i+1],u=e[i+2],l=e[i+3],128===(192&c)&&128===(192&u)&&128===(192&l)&&(p=(15&a)<<18|(63&c)<<12|(63&u)<<6|63&l,p>65535&&p<1114112&&(o=p))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return I(n)}function I(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;nn)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,r,n,i,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function z(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function B(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function F(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(e,t,r,n,i){return i||F(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,i){return i||F(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function U(e){if(e=H(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function H(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function $(e,t){t=t||1/0;for(var r,n=e.length,i=null,a=[],o=0;o55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function V(e){for(var t=[],r=0;r>8,i=r%256,a.push(i),a.push(n);return a}function X(e){return J.toByteArray(U(e))}function Q(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function W(e){return e!==e}var J=e("base64-js"),Z=e("ieee754"),Y=e("isarray");r.Buffer=o,r.SlowBuffer=g,r.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:n(),r.kMaxLength=i(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,r){return s(null,e,t,r)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,r){return u(null,e,t,r)},o.allocUnsafe=function(e){return l(null,e)},o.allocUnsafeSlow=function(e){return l(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},o.prototype.compare=function(e,t,r,n,i){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,s=r-t,c=Math.min(a,s),u=this.slice(n,i),l=e.slice(t,r),p=0;pi)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return k(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return j(this,e,t,r);case"latin1":case"binary":return S(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t0&&(i*=256);)n+=this[e+--t]*i;return n},o.prototype.readUInt8=function(e,t){return t||q(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||q(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||q(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||q(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||q(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||q(e,t,this.length);for(var n=this[e],i=1,a=0;++a=i&&(n-=Math.pow(2,8*t)),n},o.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||q(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return t||q(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||q(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt16BE=function(e,t){t||q(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},o.prototype.readInt32LE=function(e,t){return t||q(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||q(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||q(e,4,this.length),Z.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||q(e,4,this.length),Z.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||q(e,8,this.length),Z.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||q(e,8,this.length),Z.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t|=0,r|=0,!n){var i=Math.pow(2,8*r)-1;R(this,e,t,r,i,0)}var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+r},o.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):B(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},o.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);R(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},o.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):z(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):z(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):B(this,e,t,!0), -t+4},o.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):B(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,r){return N(this,e,t,!0,r)},o.prototype.writeFloatBE=function(e,t,r){return N(this,e,t,!1,r)},o.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},o.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},o.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a2&&(t=f.call(arguments,1)),void r(t))})})}function o(e){return Promise.all(e.map(i,this))}function s(e){function t(e,t){r[t]=void 0,a.push(e.then(function(e){r[t]=e}))}for(var r=new e.constructor,n=Object.keys(e),a=[],o=0;o>5]|=128<>>9<<4)+14]=t;for(var r=1732584193,n=-271733879,i=-1732584194,l=271733878,p=0;p>16)+(t>>16)+(r>>16);return n<<16|65535&r}function l(e,t){return e<>>32-t}var p=e("./helpers");t.exports=function(e){return p.hash(e,n,16)}},{"./helpers":131}],133:[function(e,t,r){(function(r){"use strict";function n(e,t){o.call(this),e=e.toLowerCase(),"string"==typeof t&&(t=new r(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>n?t=i(e).update(t).digest():t.lengtha;a++){var o=255&r[a>>>2]>>>24-8*(a%4);t[n+a>>>2]|=o<<24-8*((n+a)%4)}else if(r.length>65535)for(var a=0;i>a;a+=4)t[n+a>>>2]=r[a>>>2];else t.push.apply(t,r);return this.sigBytes+=i,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-8*(r%4),t.length=e.ceil(r/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;t>n;n+=4)r.push(0|4294967296*e.random());return new a.init(r,t)}}),o=r.enc={},s=o.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;r>i;i++){var a=255&t[i>>>2]>>>24-8*(i%4);n.push((a>>>4).toString(16)),n.push((15&a).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-4*(n%8);return new a.init(r,t/2)}},c=o.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],i=0;r>i;i++){var a=255&t[i>>>2]>>>24-8*(i%4);n.push(String.fromCharCode(a))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;t>n;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-8*(n%4);return new a.init(r,t)}},u=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},l=n.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,o=this.blockSize,s=4*o,c=i/s;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var u=c*o,l=e.min(4*u,i);if(u){for(var p=0;u>p;p+=o)this._doProcessBlock(n,p);var f=n.splice(0,u);r.sigBytes-=l}return new a.init(f,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});n.Hasher=l.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){l.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new p.HMAC.init(e,r).finalize(t)}}});var p=r.algo={};return r}(Math);return e})},{}],136:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core"),e("./sha1"),e("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],i):i(n.CryptoJS)}(this,function(e){return e.HmacSHA1})},{"./core":135,"./hmac":137,"./sha1":138}],137:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(e){!function(){var t=e,r=t.lib,n=r.Base,i=t.enc,a=i.Utf8,o=t.algo;o.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var r=e.blockSize,n=4*r;t.sigBytes>n&&(t=e.finalize(t)),t.clamp();for(var i=this._oKey=t.clone(),o=this._iKey=t.clone(),s=i.words,c=o.words,u=0;r>u;u++)s[u]^=1549556828,c[u]^=909522486;i.sigBytes=o.sigBytes=n,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,r=t.finalize(e);t.reset();var n=t.finalize(this._oKey.clone().concat(r));return n}})}()})},{"./core":135}],138:[function(e,t,r){!function(n,i){"object"==typeof r?t.exports=r=i(e("./core")):"function"==typeof define&&define.amd?define(["./core"],i):i(n.CryptoJS)}(this,function(e){return function(){var t=e,r=t.lib,n=r.WordArray,i=r.Hasher,a=t.algo,o=[],s=a.SHA1=i.extend({_doReset:function(){this._hash=new n.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],s=r[3],c=r[4],u=0;80>u;u++){if(16>u)o[u]=0|e[t+u];else{var l=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=l<<1|l>>>31}var p=(n<<5|n>>>27)+c+o[u];p+=20>u?(i&a|~i&s)+1518500249:40>u?(i^a^s)+1859775393:60>u?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,c=s,s=a,a=i<<30|i>>>2,i=n,n=p}r[0]=0|r[0]+n,r[1]=0|r[1]+i,r[2]=0|r[2]+a,r[3]=0|r[3]+s,r[4]=0|r[4]+c},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=Math.floor(r/4294967296),t[(n+64>>>9<<4)+15]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=i._createHelper(s),t.HmacSHA1=i._createHmacHelper(s)}(),e.SHA1})},{"./core":135}],139:[function(e,t,r){(function(n){function i(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function a(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+r.humanize(this.diff),t){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))}),e.splice(a,0,n)}}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?r.storage.removeItem("debug"):r.storage.debug=e}catch(e){}}function c(){try{return r.storage.debug}catch(e){}if("undefined"!=typeof n&&"env"in n)return n.env.DEBUG}function u(){try{return window.localStorage}catch(e){}}r=t.exports=e("./debug"),r.log=o,r.formatArgs=a,r.save=s,r.load=c,r.useColors=i,r.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),r.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],r.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},r.enable(c())}).call(this,e("_process"))},{"./debug":140,_process:431}],140:[function(e,t,r){function n(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return r.colors[Math.abs(n)%r.colors.length]}function i(e){function t(){if(t.enabled){var e=t,n=+new Date,i=n-(u||n);e.diff=i,e.prev=u,e.curr=n,u=n;for(var a=new Array(arguments.length),o=0;o0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},n.prototype.final=function(e){var t;e&&(t=this.update(e));var r;return r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},n.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];r=c.r28shl(r,o),n=c.r28shl(n,o),c.pc2(r,n,e.keys,i)}},i.prototype._update=function(e,t,r,n){var i=this._desState,a=c.readUInt32BE(e,t),o=c.readUInt32BE(e,t+4);c.ip(a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,o,i.tmp,0):this._decrypt(i,a,o,i.tmp,0),a=i.tmp[0],o=i.tmp[1],c.writeUInt32BE(r,a,n),c.writeUInt32BE(r,o,n+4)},i.prototype._pad=function(e,t){for(var r=e.length-t,n=t;n>>0,a=h}c.rip(o,a,n,i)},i.prototype._decrypt=function(e,t,r,n,i){for(var a=r,o=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],l=e.keys[s+1];c.expand(a,e.tmp,0),u^=e.tmp[0],l^=e.tmp[1];var p=c.substitute(u,l),f=c.permute(p),h=a;a=(o^f)>>>0,o=h}c.rip(a,o,n,i)}},{"../des":142,inherits:215,"minimalistic-assert":393}],146:[function(e,t,r){"use strict";function n(e,t){a.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),n=t.slice(8,16),i=t.slice(16,24);"encrypt"===e?this.ciphers=[u.create({type:"encrypt",key:r}),u.create({type:"decrypt",key:n}),u.create({type:"encrypt",key:i})]:this.ciphers=[u.create({type:"decrypt",key:i}),u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:r})]}function i(e){c.call(this,e);var t=new n(this.type,this.options.key);this._edeState=t}var a=e("minimalistic-assert"),o=e("inherits"),s=e("../des"),c=s.Cipher,u=s.DES;o(i,c),t.exports=i,i.create=function(e){return new i(e)},i.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},i.prototype._pad=u.prototype._pad,i.prototype._unpad=u.prototype._unpad},{"../des":142,inherits:215,"minimalistic-assert":393}],147:[function(e,t,r){"use strict";r.readUInt32BE=function(e,t){var r=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return r>>>0},r.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},r.ip=function(e,t,r,n){for(var i=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}r[n+0]=i>>>0,r[n+1]=a>>>0},r.rip=function(e,t,r,n){for(var i=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)i<<=1,i|=t>>>s+o&1,i<<=1,i|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},r.pc1=function(e,t,r,n){for(var i=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var s=0;s<=24;s+=8)i<<=1,i|=e>>s+o&1}for(var s=0;s<=24;s+=8)i<<=1,i|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;r[n+0]=i>>>0,r[n+1]=a>>>0},r.r28shl=function(e,t){return e<>>28-t};var n=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];r.pc2=function(e,t,r,i){for(var a=0,o=0,s=n.length>>>1,c=0;c>>n[c]&1;for(var c=s;c>>n[c]&1;r[i+0]=a>>>0,r[i+1]=o>>>0},r.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)n<<=6,n|=e>>>a&63;for(var a=11;a>=3;a-=4)i|=e>>>a&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var i=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];r.substitute=function(e,t){for(var r=0,n=0;n<4;n++){var a=e>>>18-6*n&63,o=i[64*n+a];r<<=4,r|=o}for(var n=0;n<4;n++){var a=t>>>18-6*n&63,o=i[256+64*n+a];r<<=4,r|=o}return r>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];r.permute=function(e){for(var t=0,r=0;r>>a[r]&1;return t>>>0},r.padSplit=function(e,t,r){for(var n=e.toString(2);n.lengthe;)r.ishrn(1);if(r.isEven()&&r.iadd(f),r.testn(1)||r.iadd(h),t.cmp(h)){if(!t.cmp(d))for(;r.mod(m).cmp(g);)r.iadd(b)}else for(;r.mod(u).cmp(v);)r.iadd(b);if(n=r.shrn(1),i(n)&&i(r)&&a(n)&&a(r)&&p.test(n)&&p.test(r))return r}}var s=e("randombytes");t.exports=o,o.simpleSieve=i,o.fermatTest=a;var c=e("bn.js"),u=new c(24),l=e("miller-rabin"),p=new l,f=new c(1),h=new c(2),d=new c(5),m=(new c(16),new c(8),new c(10)),g=new c(3),v=(new c(7),new c(11)),b=new c(4),y=(new c(12),null)},{"bn.js":89,"miller-rabin":389,randombytes:447}],151:[function(e,t,r){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],152:[function(e,t,r){(function(t){function n(e,t){return e.length>=t?e:n("0"+e,t)}var i=e("crypto"),a=e("jsbn").BigInteger;e("./lib/ec.js").ECPointFp;r.ECCurves=e("./lib/sec.js"),r.ECKey=function(e,r,o){var s,c=e(),u=c.getN(),l=Math.floor(u.bitLength()/8);if(r)if(o){var e=c.getCurve();this.P=e.decodePointHex(r.toString("hex"))}else{if(r.length!=l)return!1;s=new a(r.toString("hex"),16)}else{var p=u.subtract(a.ONE),f=new a(i.randomBytes(u.bitLength()));s=f.mod(p).add(a.ONE),this.P=c.getG().multiply(s)}this.P&&(this.PublicKey=new t(c.getCurve().encodeCompressedPointHex(this.P),"hex")),s&&(this.PrivateKey=new t(n(s.toString(16),2*l),"hex"),this.deriveSharedSecret=function(e){if(!e||!e.P)return!1;var r=e.P.multiply(s);return new t(n(r.getX().toBigInteger().toString(16),2*l),"hex")})}}).call(this,e("buffer").Buffer)},{"./lib/ec.js":153,"./lib/sec.js":154,buffer:122,crypto:134,jsbn:226}],153:[function(e,t,r){function n(e,t){this.x=t,this.q=e}function i(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)}function a(){return this.x}function o(){return new n(this.q,this.x.negate().mod(this.q))}function s(e){return new n(this.q,this.x.add(e.toBigInteger()).mod(this.q))}function c(e){return new n(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))}function u(e){return new n(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))}function l(){return new n(this.q,this.x.square().mod(this.q))}function p(e){return new n(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))}function f(e,t,r,n){this.curve=e,this.x=t,this.y=r,null==n?this.z=P.ONE:this.z=n,this.zinv=null}function h(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function d(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function m(e){if(e==this)return!0;if(this.isInfinity())return e.isInfinity();if(e.isInfinity())return this.isInfinity();var t,r;return t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),!!t.equals(P.ZERO)&&(r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q),r.equals(P.ZERO))}function g(){return null==this.x&&null==this.y||this.z.equals(P.ZERO)&&!this.y.toBigInteger().equals(P.ZERO)}function v(){return new f(this.curve,this.x,this.y.negate(),this.z)}function b(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),r=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(P.ZERO.equals(r))return P.ZERO.equals(t)?this.twice():this.curve.getInfinity();var n=new P("3"),i=this.x.toBigInteger(),a=this.y.toBigInteger(),o=(e.x.toBigInteger(),e.y.toBigInteger(),r.square()),s=o.multiply(r),c=i.multiply(o),u=t.square().multiply(this.z),l=u.subtract(c.shiftLeft(1)).multiply(e.z).subtract(s).multiply(r).mod(this.curve.q),p=c.multiply(n).multiply(t).subtract(a.multiply(s)).subtract(u.multiply(t)).multiply(e.z).add(t.multiply(s)).mod(this.curve.q),h=s.multiply(this.z).multiply(e.z).mod(this.curve.q);return new f(this.curve,this.curve.fromBigInteger(l),this.curve.fromBigInteger(p),h)}function y(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new P("3"),t=this.x.toBigInteger(),r=this.y.toBigInteger(),n=r.multiply(this.z),i=n.multiply(r).mod(this.curve.q),a=this.curve.a.toBigInteger(),o=t.square().multiply(e);P.ZERO.equals(a)||(o=o.add(this.z.square().multiply(a))),o=o.mod(this.curve.q);var s=o.square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(n).mod(this.curve.q),c=o.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(o.square().multiply(o)).mod(this.curve.q),u=n.square().multiply(n).shiftLeft(3).mod(this.curve.q);return new f(this.curve,this.curve.fromBigInteger(s),this.curve.fromBigInteger(c),u)}function w(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,r=e,n=r.multiply(new P("3")),i=this.negate(),a=this;for(t=n.bitLength()-2;t>0;--t){a=a.twice();var o=n.testBit(t),s=r.testBit(t);o!=s&&(a=a.add(o?this:i))}return a}function x(e,t,r){var n;n=e.bitLength()>r.bitLength()?e.bitLength()-1:r.bitLength()-1;for(var i=this.curve.getInfinity(),a=this.add(t);n>=0;)i=i.twice(),e.testBit(n)?i=r.testBit(n)?i.add(a):i.add(this):r.testBit(n)&&(i=i.add(t)),--n;return i}function k(e,t,r){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(r),this.infinity=new f(this,null,null),this.reducer=new O(this.q)}function _(){return this.q}function j(){return this.a}function S(){return this.b}function E(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)}function A(){return this.infinity}function C(e){return new n(this.q,e)}function T(e){this.reducer.reduce(e)}function I(e){if(e.isInfinity())return"00";var t=e.getX().toBigInteger().toString(16),r=e.getY().toBigInteger().toString(16),n=this.getQ().toString(16).length;for(n%2!=0&&n++;t.length128){var t=this.q.shiftRight(e-64);t.intValue()==-1&&(this.r=P.ONE.shiftLeft(e).subtract(this.q))}return this.r},n.prototype.modMult=function(e,t){return this.modReduce(e.multiply(t))},n.prototype.modReduce=function(e){if(null!=this.getR()){for(var t=q.bitLength();e.bitLength()>t+1;){var r=e.shiftRight(t),n=e.subtract(r.shiftLeft(t));this.getR().equals(P.ONE)||(r=r.multiply(this.getR())),e=r.add(n)}for(;e.compareTo(q)>=0;)e=e.subtract(q)}else e=e.mod(q);return e},n.prototype.sqrt=function(){if(!this.q.testBit(0))throw"unsupported";if(this.q.testBit(1)){var e=new n(this.q,this.x.modPow(this.q.shiftRight(2).add(P.ONE),this.q));return e.square().equals(this)?e:null}var t=this.q.subtract(P.ONE),r=t.shiftRight(1);if(!this.x.modPow(r,this.q).equals(P.ONE))return null;var i,a,o=t.shiftRight(2),s=o.shiftLeft(1).add(P.ONE),c=this.x,u=modDouble(modDouble(c));do{var l;do l=new P(this.q.bitLength(),new SecureRandom);while(l.compareTo(this.q)>=0||!l.multiply(l).subtract(u).modPow(r,this.q).equals(t));var p=this.lucasSequence(l,c,s);if(i=p[0],a=p[1],this.modMult(a,a).equals(u))return a.testBit(0)&&(a=a.add(q)),a=a.shiftRight(1),new n(q,a)}while(i.equals(P.ONE)||i.equals(t));return null},n.prototype.lucasSequence=function(e,t,r){for(var n=r.bitLength(),i=r.getLowestSetBit(),a=P.ONE,o=P.TWO,s=e,c=P.ONE,u=P.ONE,l=n-1;l>=i+1;--l)c=this.modMult(c,u),r.testBit(l)?(u=this.modMult(c,t),a=this.modMult(a,s),o=this.modReduce(s.multiply(o).subtract(e.multiply(c))),s=this.modReduce(s.multiply(s).subtract(u.shiftLeft(1)))):(u=c,a=this.modReduce(a.multiply(o).subtract(c)),s=this.modReduce(s.multiply(o).subtract(e.multiply(c))),o=this.modReduce(o.multiply(o).subtract(c.shiftLeft(1))));c=this.modMult(c,u),u=this.modMult(c,t),a=this.modReduce(a.multiply(o).subtract(c)),o=this.modReduce(s.multiply(o).subtract(e.multiply(c))),c=this.modMult(c,u);for(var l=1;l<=i;++l)a=this.modMult(a,o),o=this.modReduce(o.multiply(o).subtract(c.shiftLeft(1))),c=this.modMult(c,c);return[a,o]};var r={ECCurveFp:k,ECPointFp:f,ECFieldElementFp:n};t.exports=r},{jsbn:226}],154:[function(e,t,r){function n(e,t,r,n){this.curve=e,this.g=t,this.n=r,this.h=n}function i(){return this.curve}function a(){return this.g}function o(){return this.n}function s(){return this.h}function c(e){return new g(e,16)}function u(){var e=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"),r=c("E87579C11079F43DD824993C2CEE5ED3"),i=c("FFFFFFFE0000000075A30D1B9038A115"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83");return new n(o,s,i,a)}function l(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"),t=g.ZERO,r=c("7"),i=c("0100000000000000000001B8FA16DFAB9ACA16B6B3"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE");return new n(o,s,i,a)}function p(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"),r=c("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"),i=c("0100000000000000000001F4C8F927AED3CA752257"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32");return new n(o,s,i,a)}function f(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"),t=g.ZERO,r=c("3"),i=c("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");return new n(o,s,i,a)}function h(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"),r=c("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"),i=c("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811");return new n(o,s,i,a)}function d(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"),r=c("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"),i=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");return new n(o,s,i,a)}function m(){var e=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),r=c("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),i=c("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),a=g.ONE,o=new v(e,t,r),s=o.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");return new n(o,s,i,a)}var g=e("jsbn").BigInteger,v=e("./ec.js").ECCurveFp;n.prototype.getCurve=i,n.prototype.getG=a,n.prototype.getN=o,n.prototype.getH=s,t.exports={secp128r1:u,secp160k1:l,secp160r1:p,secp192k1:f,secp192r1:h,secp224r1:d,secp256r1:m}},{"./ec.js":153,jsbn:226}],155:[function(e,t,r){"use strict";var n=r;n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":170,"./elliptic/curve":158,"./elliptic/curves":161,"./elliptic/ec":162,"./elliptic/eddsa":165,"./elliptic/utils":169,brorand:90}],156:[function(e,t,r){"use strict";function n(e,t){this.type=e,this.p=new a(t.p,16),this.red=t.prime?a.red(t.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=t.n&&new a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function i(e,t){this.curve=e,this.type=t,this.precomputed=null}var a=e("bn.js"),o=e("../../elliptic"),s=o.utils,c=s.getNAF,u=s.getJSF,l=s.assert;t.exports=n,n.prototype.point=function(){throw new Error("Not implemented")},n.prototype.validate=function(){throw new Error("Not implemented")},n.prototype._fixedNafMul=function(e,t){l(e.precomputed);var r=e._getDoubles(),n=c(t,1),i=(1<=o;t--)s=(s<<1)+n[t];a.push(s)}for(var u=this.jpoint(null,null,null),p=this.jpoint(null,null,null),f=i;f>0;f--){for(var o=0;o=0;s--){for(var t=0;s>=0&&0===a[s];s--)t++;if(s>=0&&t++,o=o.dblp(t),s<0)break;var u=a[s];l(0!==u),o="affine"===e.type?u>0?o.mixedAdd(i[u-1>>1]):o.mixedAdd(i[-u-1>>1].neg()):u>0?o.add(i[u-1>>1]):o.add(i[-u-1>>1].neg()); -}return"affine"===e.type?o.toP():o},n.prototype._wnafMulAdd=function(e,t,r,n,i){for(var a=this._wnafT1,o=this._wnafT2,s=this._wnafT3,l=0,p=0;p=1;p-=2){var d=p-1,m=p;if(1===a[d]&&1===a[m]){var g=[t[d],null,null,t[m]];0===t[d].y.cmp(t[m].y)?(g[1]=t[d].add(t[m]),g[2]=t[d].toJ().mixedAdd(t[m].neg())):0===t[d].y.cmp(t[m].y.redNeg())?(g[1]=t[d].toJ().mixedAdd(t[m]),g[2]=t[d].add(t[m].neg())):(g[1]=t[d].toJ().mixedAdd(t[m]),g[2]=t[d].toJ().mixedAdd(t[m].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],b=u(r[d],r[m]);l=Math.max(b[0].length,l),s[d]=new Array(l),s[m]=new Array(l);for(var y=0;y=0;p--){for(var j=0;p>=0;){for(var S=!0,y=0;y=0&&j++,k=k.dblp(j),p<0)break;for(var y=0;y0?f=o[y][E-1>>1]:E<0&&(f=o[y][-E-1>>1].neg()),k="affine"===f.type?k.mixedAdd(f):k.add(f))}}for(var p=0;p=Math.ceil((e.bitLength()+1)/t.step)},i.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i":""},i.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},i.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=n.redAdd(t),o=a.redSub(r),s=n.redSub(t),c=i.redMul(o),u=a.redMul(s),l=i.redMul(s),p=o.redMul(a);return this.curve.point(c,u,p,l)},i.prototype._projDbl=function(){var e,t,r,n=this.x.redAdd(this.y).redSqr(),i=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(i),s=o.redAdd(a);if(this.zOne)e=n.redSub(i).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(o.redSub(a)),r=s.redSqr().redSub(s).redSub(s);else{var c=this.z.redSqr(),u=s.redSub(c).redISub(c);e=n.redSub(i).redISub(a).redMul(u),t=s.redMul(o.redSub(a)),r=s.redMul(u)}}else{var o=i.redAdd(a),c=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=o.redSub(c).redSub(c);e=this.curve._mulC(n.redISub(o)).redMul(u),t=this.curve._mulC(o).redMul(i.redISub(a)),r=o.redMul(u)}return this.curve.point(e,t,r)},i.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},i.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),a=r.redSub(t),o=i.redSub(n),s=i.redAdd(n),c=r.redAdd(t),u=a.redMul(o),l=s.redMul(c),p=a.redMul(c),f=o.redMul(s);return this.curve.point(u,l,f,p)},i.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=i.redSub(s),u=i.redAdd(s),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),p=n.redMul(c).redMul(l);return this.curve.twisted?(t=n.redMul(u).redMul(o.redSub(this.curve._mulA(a))),r=c.redMul(u)):(t=n.redMul(u).redMul(o.redSub(a)),r=this.curve._mulC(c).redMul(u)),this.curve.point(p,t,r)},i.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},i.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},i.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},i.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},i.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()},i.prototype.getY=function(){return this.normalize(),this.y.fromRed()},i.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},i.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}return!1},i.prototype.toP=i.prototype.normalize,i.prototype.mixedAdd=i.prototype.add},{"../../elliptic":155,"../curve":158,"bn.js":89,inherits:215}],158:[function(e,t,r){"use strict";var n=r;n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":156,"./edwards":157,"./mont":159,"./short":160}],159:[function(e,t,r){"use strict";function n(e){c.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function i(e,t,r){c.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var a=e("../curve"),o=e("bn.js"),s=e("inherits"),c=a.base,u=e("../../elliptic"),l=u.utils;s(n,c),t.exports=n,n.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t),i=n.redSqrt();return 0===i.redSqr().cmp(n)},s(i,c.BasePoint),n.prototype.decodePoint=function(e,t){return this.point(l.toArray(e,t),1)},n.prototype.point=function(e,t){return new i(this,e,t)},n.prototype.pointFromJSON=function(e){return i.fromJSON(this,e)},i.prototype.precompute=function(){},i.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},i.fromJSON=function(e,t){return new i(e,t[0],t[1]||e.one)},i.prototype.inspect=function(){return this.isInfinity()?"":""},i.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},i.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),r=this.x.redSub(this.z),n=r.redSqr(),i=t.redSub(n),a=t.redMul(n),o=i.redMul(n.redAdd(this.curve.a24.redMul(i)));return this.curve.point(a,o)},i.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(r),s=i.redMul(n),c=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(c,u)},i.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=this,a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(r=r.diffAdd(n,i),n=n.dbl()):(n=r.diffAdd(n,i),r=r.dbl());return n},i.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},i.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},i.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},i.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":155,"../curve":158,"bn.js":89,inherits:215}],160:[function(e,t,r){"use strict";function n(e){l.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function i(e,t,r,n){l.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(e,t,r,n){l.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(r,16),this.z=new c(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=e("../curve"),s=e("../../elliptic"),c=e("bn.js"),u=e("inherits"),l=o.base,p=s.utils.assert;u(n,l),t.exports=n,n.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=n[0].cmp(n[1])<0?n[0]:n[1],t=t.toRed(this.red)}if(e.lambda)r=new c(e.lambda,16);else{var i=this._getEndoRoots(this.n);0===this.g.mul(i[0]).x.cmp(this.g.x.redMul(t))?r=i[0]:(r=i[1],p(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}var a;return a=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(r),{beta:t,lambda:r,basis:a}}},n.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),r=new c(2).toRed(t).redInvm(),n=r.redNeg(),i=new c(3).toRed(t).redNeg().redSqrt().redMul(r),a=n.redAdd(i).fromRed(),o=n.redSub(i).fromRed();return[a,o]},n.prototype._getEndoBasis=function(e){for(var t,r,n,i,a,o,s,u,l,p=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),d=new c(1),m=new c(0),g=new c(0),v=new c(1),b=0;0!==f.cmpn(0);){var y=h.div(f);u=h.sub(y.mul(f)),l=g.sub(y.mul(d));var w=v.sub(y.mul(m));if(!n&&u.cmp(p)<0)t=s.neg(),r=d,n=u.neg(),i=l;else if(n&&2===++b)break;s=u,h=f,f=u,g=d,d=l,v=m,m=w}a=u.neg(),o=l;var x=n.sqr().add(i.sqr()),k=a.sqr().add(o.sqr());return k.cmp(x)>=0&&(a=t,o=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:n,b:i},{a:a,b:o}]},n.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),a=r.b.neg().mul(e).divRound(this.n),o=i.mul(r.a),s=a.mul(n.a),c=i.mul(r.b),u=a.mul(n.b),l=e.sub(o).sub(s),p=c.add(u).neg();return{k1:l,k2:p}},n.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},n.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},n.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,a=0;a":""},i.prototype.isInfinity=function(){return this.inf},i.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},i.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),a=i.redSqr().redISub(this.x.redAdd(this.x)),o=i.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},i.prototype.getX=function(){return this.x.fromRed()},i.prototype.getY=function(){return this.y.fromRed()},i.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},i.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},i.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},i.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},i.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},i.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},u(a,l.BasePoint),n.prototype.jpoint=function(e,t,r){return new a(this,e,t,r)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(r.redMul(this.z)),s=n.redSub(i),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),l=u.redMul(s),p=n.redMul(u),f=c.redSqr().redIAdd(l).redISub(p).redISub(p),h=c.redMul(p.redISub(f)).redISub(a.redMul(l)),d=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,d)},a.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,a=e.y.redMul(t).redMul(this.z),o=r.redSub(n),s=i.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),l=r.redMul(c),p=s.redSqr().redIAdd(u).redISub(l).redISub(l),f=s.redMul(l.redISub(p)).redISub(i.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(p,f,h)},a.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,r=0;r=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}return!1},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":155,"../curve":158,"bn.js":89,inherits:215}],161:[function(e,t,r){"use strict";function n(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function i(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var r=new n(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:r}),r}})}var a=r,o=e("hash.js"),s=e("../elliptic"),c=s.utils.assert;a.PresetCurve=n,i("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),i("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),i("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),i("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),i("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),i("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),i("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=e("./precomputed/secp256k1")}catch(e){u=void 0}i("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},{"../elliptic":155,"./precomputed/secp256k1":168,"hash.js":199}],162:[function(e,t,r){"use strict";function n(e){return this instanceof n?("string"==typeof e&&(c(o.curves.hasOwnProperty(e),"Unknown curve "+e),e=o.curves[e]),e instanceof o.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),void(this.hash=e.hash||e.curve.hash)):new n(e)}var i=e("bn.js"),a=e("hmac-drbg"),o=e("../../elliptic"),s=o.utils,c=s.assert,u=e("./key"),l=e("./signature");t.exports=n,n.prototype.keyPair=function(e){return new u(this,e)},n.prototype.keyFromPrivate=function(e,t){return u.fromPrivate(this,e,t)},n.prototype.keyFromPublic=function(e,t){return u.fromPublic(this,e,t)},n.prototype.genKeyPair=function(e){e||(e={});for(var t=new a({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||o.rand(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new i(2));;){var s=new i(t.generate(r));if(!(s.cmp(n)>0))return s.iaddn(1),this.keyFromPrivate(s)}},n.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},n.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new i(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),u=new a({hash:this.hash,entropy:s,nonce:c,pers:n.pers,persEnc:n.persEnc||"utf8"}),p=this.n.sub(new i(1)),f=0;!0;f++){var h=n.k?n.k(f):new i(u.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(p)>=0)){var d=this.g.mul(h);if(!d.isInfinity()){var m=d.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var v=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(v=v.umod(this.n),0!==v.cmpn(0)){var b=(d.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return n.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v), -b^=1),new l({r:g,s:v,recoveryParam:b})}}}}}},n.prototype.verify=function(e,t,r,n){e=this._truncateToN(new i(e,16)),r=this.keyFromPublic(r,n),t=new l(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),c=s.mul(e).umod(this.n),u=s.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var p=this.g.mulAdd(c,r.getPublic(),u);return!p.isInfinity()&&0===p.getX().umod(this.n).cmp(a)}var p=this.g.jmulAdd(c,r.getPublic(),u);return!p.isInfinity()&&p.eqXToP(a)},n.prototype.recoverPubKey=function(e,t,r,n){c((3&r)===r,"The recovery param is more than two bits"),t=new l(t,n);var a=this.n,o=new i(e),s=t.r,u=t.s,p=1&r,f=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");s=f?this.curve.pointFromX(s.add(this.curve.n),p):this.curve.pointFromX(s,p);var h=t.r.invm(a),d=a.sub(o).mul(h).umod(a),m=u.mul(h).umod(a);return this.g.mulAdd(d,s,m)},n.prototype.getKeyRecoveryParam=function(e,t,r,n){if(t=new l(t,n),null!==t.recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var a;try{a=this.recoverPubKey(e,t,i)}catch(e){continue}if(a.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":155,"./key":163,"./signature":164,"bn.js":89,"hmac-drbg":206}],163:[function(e,t,r){"use strict";function n(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var i=e("bn.js"),a=e("../../elliptic"),o=a.utils,s=o.assert;t.exports=n,n.fromPublic=function(e,t,r){return t instanceof n?t:new n(e,{pub:t,pubEnc:r})},n.fromPrivate=function(e,t,r){return t instanceof n?t:new n(e,{priv:t,privEnc:r})},n.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},n.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},n.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},n.prototype._importPrivate=function(e,t){this.priv=new i(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},n.prototype._importPublic=function(e,t){return e.x||e.y?("mont"===this.ec.curve.type?s(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||s(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y))):void(this.pub=this.ec.curve.decodePoint(e,t))},n.prototype.derive=function(e){return e.mul(this.priv).getX()},n.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},n.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},n.prototype.inspect=function(){return""}},{"../../elliptic":155,"bn.js":89}],164:[function(e,t,r){"use strict";function n(e,t){return e instanceof n?e:void(this._importDER(e,t)||(p(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam))}function i(){this.place=0}function a(e,t){var r=e[t.place++];if(!(128&r))return r;for(var n=15&r,i=0,a=0,o=t.place;a>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}var c=e("bn.js"),u=e("../../elliptic"),l=u.utils,p=l.assert;t.exports=n,n.prototype._importDER=function(e,t){e=l.toArray(e,t);var r=new i;if(48!==e[r.place++])return!1;var n=a(e,r);if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var o=a(e,r),s=e.slice(r.place,o+r.place);if(r.place+=o,2!==e[r.place++])return!1;var u=a(e,r);if(e.length!==u+r.place)return!1;var p=e.slice(r.place,u+r.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===p[0]&&128&p[1]&&(p=p.slice(1)),this.r=new c(s),this.s=new c(p),this.recoveryParam=null,!0},n.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=o(t),r=o(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];s(n,t.length),n=n.concat(t),n.push(2),s(n,r.length);var i=n.concat(r),a=[48];return s(a,i.length),a=a.concat(i),l.encode(a,e)}},{"../../elliptic":155,"bn.js":89}],165:[function(e,t,r){"use strict";function n(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof n))return new n(e);var e=a.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=i.sha512}var i=e("hash.js"),a=e("../../elliptic"),o=a.utils,s=o.assert,c=o.parseBytes,u=e("./key"),l=e("./signature");t.exports=n,n.prototype.sign=function(e,t){e=c(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),a=this.encodePoint(i),o=this.hashInt(a,r.pubBytes(),e).mul(r.priv()),s=n.add(o).umod(this.curve.n);return this.makeSignature({R:i,S:s,Rencoded:a})},n.prototype.verify=function(e,t,r){e=c(e),t=this.makeSignature(t);var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),a=this.g.mul(t.S()),o=t.R().add(n.pub().mul(i));return o.eq(a)},n.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=0;){var a;if(i.isOdd()){var o=i.andln(n-1);a=o>(n>>1)-1?(n>>1)-o:o,i.isubn(a)}else a=0;r.push(a);for(var s=0!==i.cmpn(0)&&0===i.andln(n-1)?t+1:1,c=1;c0||t.cmpn(-i)>0;){var a=e.andln(3)+n&3,o=t.andln(3)+i&3;3===a&&(a=-1),3===o&&(o=-1);var s;if(0===(1&a))s=0;else{var c=e.andln(7)+n&7;s=3!==c&&5!==c||2!==o?a:-a}r[0].push(s);var u;if(0===(1&o))u=0;else{var c=t.andln(7)+i&7;u=3!==c&&5!==c||2!==a?o:-o}r[1].push(u),2*n===s+1&&(n=1-n),2*i===u+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r}function a(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}}function o(e){return"string"==typeof e?c.toArray(e,"hex"):e}function s(e){return new u(e,"hex","le")}var c=r,u=e("bn.js"),l=e("minimalistic-assert"),p=e("minimalistic-crypto-utils");c.assert=l,c.toArray=p.toArray,c.zero2=p.zero2,c.toHex=p.toHex,c.encode=p.encode,c.getNAF=n,c.getJSF=i,c.cachedProperty=a,c.parseBytes=o,c.intFromLE=s},{"bn.js":89,"minimalistic-assert":393,"minimalistic-crypto-utils":394}],170:[function(e,t,r){t.exports={_args:[["elliptic@^6.0.0","/home/iegor/QuickBlox/quickblox-javascript-sdk/node_modules/browserify-sign"]],_from:"elliptic@>=6.0.0 <7.0.0",_id:"elliptic@6.4.0",_inCache:!0,_installable:!0,_location:"/elliptic",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-18-east.internal.npmjs.com",tmp:"tmp/elliptic-6.4.0.tgz_1487798866428_0.30510620190761983"},_npmUser:{email:"fedor@indutny.com",name:"indutny"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{name:"elliptic",raw:"elliptic@^6.0.0",rawSpec:"^6.0.0",scope:null,spec:">=6.0.0 <7.0.0",type:"range"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz",_shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",_shrinkwrap:null,_spec:"elliptic@^6.0.0",_where:"/home/iegor/QuickBlox/quickblox-javascript-sdk/node_modules/browserify-sign",author:{email:"fedor@indutny.com",name:"Fedor Indutny"},bugs:{url:"https://github.com/indutny/elliptic/issues"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},directories:{},dist:{shasum:"cac9af8762c85836187003c8dfe193e5e2eae5df",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz"},files:["lib"],gitHead:"6b0d2b76caae91471649c8e21f0b1d3ba0f96090",homepage:"https://github.com/indutny/elliptic",keywords:["Cryptography","EC","Elliptic","curve"],license:"MIT",main:"lib/elliptic.js",maintainers:[{name:"indutny",email:"fedor@indutny.com"}],name:"elliptic",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.4.0"}},{}],171:[function(e,t,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,r,n,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(r=this._events[e],s(r))return!1;if(i(r))switch(arguments.length){case 1:r.call(this);break;case 2:r.call(this,arguments[1]);break;case 3:r.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),r.apply(this,a)}else if(o(r))for(a=Array.prototype.slice.call(arguments,1),u=r.slice(),n=u.length,c=0;c0&&this._events[e].length>r&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}if(!i(t))throw TypeError("listener must be a function");var n=!1;return r.listener=t,this.on(e,r),this},n.prototype.removeListener=function(e,t){var r,n,a,s;if(!i(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(r=this._events[e],a=r.length,n=-1,r===t||i(r.listener)&&r.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(r)){for(s=a;s-- >0;)if(r[s]===t||r[s].listener&&r[s].listener===t){n=s;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[e]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(r=this._events[e],i(r))this.removeListener(e,r);else if(r)for(;r.length;)this.removeListener(e,r[r.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?i(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(i(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},{}],172:[function(e,t,r){(function(r){function n(e,t,n,a){r.isBuffer(e)||(e=new r(e,"binary")),t&&!r.isBuffer(t)&&(t=new r(t,"binary")),n/=8,a=a||0;for(var o,s,c=0,u=0,l=new r(n),p=new r(a),f=0,h=[];;){if(f++>0&&h.push(o),h.push(e),t&&h.push(t),o=i(r.concat(h)),h=[],s=0,n>0)for(;;){if(0===n)break;if(s===o.length)break;l[c++]=o[s],n--,s++}if(a>0&&s!==o.length)for(;;){if(0===a)break;if(s===o.length)break;p[u++]=o[s],a--,s++}if(0===n&&0===a)break}for(s=0;s0)throw new Error("non-zero precision not supported");switch(t.match(/-/)&&(u=!0),t.match(/0/)&&(l="0"),t.match(/\+/)&&(p=!0),c){case"s":if(void 0===f||null===f)throw new Error("argument "+b+": attempted to print undefined or null as a string");v+=i(l,r,u,f.toString());break;case"d":f=Math.floor(f);case"f":p=p&&f>0?"+":"",v+=p+i(l,r,u,f.toString());break;case"j":0===r&&(r=10),v+=s.inspect(f,!1,r);break;case"r":v+=a(f);break;default:throw new Error("unsupported conversion: "+c)}}else v+="%";return v+=e}function i(e,t,r,n){for(var i=n;i.length0&&!e.useChunkedEncodingByDefault){var o=this.freeSockets[i].pop();o.removeListener("error",o._onIdleError),delete o._onIdleError,e._reusedSocket=!0,e.onSocket(o)}else this.addRequestNoreuse(e,t,r)},i.prototype.removeSocket=function(e,t,r,n){if(this.sockets[t]){var i=this.sockets[t].indexOf(e);i!==-1&&this.sockets[t].splice(i,1)}else this.sockets[t]&&0===this.sockets[t].length&&(delete this.sockets[t],delete this.requests[t]);if(this.freeSockets[t]){var i=this.freeSockets[t].indexOf(e);i!==-1&&(this.freeSockets[t].splice(i,1),0===this.freeSockets[t].length&&delete this.freeSockets[t])}this.requests[t]&&this.requests[t].length&&this.createSocket(t,r,n).emit("free")},s.inherits(a,i),a.prototype.createConnection=o,a.prototype.addRequestNoreuse=p.prototype.addRequest},{http:508,https:212,net:119,tls:119,util:531}],176:[function(e,t,r){t.exports="object"==typeof self?self.FormData:window.FormData},{}],177:[function(e,t,r){t.exports={id:"afterRequest.json#",type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},lastAccess:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}}},{}],178:[function(e,t,r){t.exports={id:"beforeRequest.json#",type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},lastAccess:{type:"string",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))?"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}}},{}],179:[function(e,t,r){t.exports={id:"browser.json#",type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},{}],180:[function(e,t,r){t.exports={id:"cache.json#",properties:{beforeRequest:{oneOf:[{type:"null"},{$ref:"beforeRequest.json#"}]},afterRequest:{oneOf:[{type:"null"},{$ref:"afterRequest.json#"}]},comment:{type:"string"}}}},{}],181:[function(e,t,r){t.exports={id:"content.json#",type:"object",required:["size","mimeType"],properties:{size:{type:"integer"},compression:{type:"integer"},mimeType:{type:"string"},text:{type:"string"},encoding:{type:"string"},comment:{type:"string"}}}},{}],182:[function(e,t,r){t.exports={id:"cookie.json#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},path:{type:"string"},domain:{type:"string"},expires:{type:["string","null"],format:"date-time"},httpOnly:{type:"boolean"},secure:{type:"boolean"},comment:{type:"string"}}}},{}],183:[function(e,t,r){t.exports={id:"creator.json#",type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},{}],184:[function(e,t,r){t.exports={id:"entry.json#",type:"object",optional:!0,required:["startedDateTime","time","request","response","cache","timings"],properties:{pageref:{type:"string"},startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},time:{type:"number",min:0},request:{$ref:"request.json#"},response:{$ref:"response.json#"},cache:{$ref:"cache.json#"},timings:{$ref:"timings.json#"},serverIPAddress:{type:"string",oneOf:[{format:"ipv4"},{format:"ipv6"}]},connection:{type:"string"},comment:{type:"string"}}}},{}],185:[function(e,t,r){t.exports={id:"har.json#",type:"object",required:["log"],properties:{log:{$ref:"log.json#"}}}},{}],186:[function(e,t,r){t.exports={id:"header.json#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},{}],187:[function(e,t,r){"use strict";t.exports={afterRequest:e("./afterRequest.json"),beforeRequest:e("./beforeRequest.json"),browser:e("./browser.json"),cache:e("./cache.json"),content:e("./content.json"),cookie:e("./cookie.json"),creator:e("./creator.json"),entry:e("./entry.json"),har:e("./har.json"),header:e("./header.json"),log:e("./log.json"),page:e("./page.json"),pageTimings:e("./pageTimings.json"),postData:e("./postData.json"),query:e("./query.json"),request:e("./request.json"),response:e("./response.json"),timings:e("./timings.json")}},{"./afterRequest.json":177,"./beforeRequest.json":178,"./browser.json":179,"./cache.json":180,"./content.json":181,"./cookie.json":182,"./creator.json":183,"./entry.json":184,"./har.json":185,"./header.json":186,"./log.json":188,"./page.json":189,"./pageTimings.json":190,"./postData.json":191,"./query.json":192,"./request.json":193,"./response.json":194,"./timings.json":195}],188:[function(e,t,r){t.exports={id:"log.json#",type:"object",required:["version","creator","entries"],properties:{version:{type:"string"},creator:{$ref:"creator.json#"},browser:{$ref:"browser.json#"},pages:{type:"array",items:{$ref:"page.json#"}},entries:{type:"array",items:{$ref:"entry.json#"}},comment:{type:"string"}}}},{}],189:[function(e,t,r){t.exports={id:"page.json#",type:"object",optional:!0,required:["startedDateTime","id","title","pageTimings"],properties:{startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},id:{type:"string",unique:!0},title:{type:"string"},pageTimings:{$ref:"pageTimings.json#"},comment:{type:"string"}}}},{}],190:[function(e,t,r){t.exports={id:"pageTimings.json#",type:"object",properties:{onContentLoad:{type:"number",min:-1},onLoad:{type:"number",min:-1},comment:{type:"string"}}}},{}],191:[function(e,t,r){t.exports={id:"postData.json#",type:"object",optional:!0,required:["mimeType"],properties:{mimeType:{type:"string"},text:{type:"string"},params:{type:"array",required:["name"],properties:{name:{type:"string"},value:{type:"string"},fileName:{type:"string"},contentType:{type:"string"},comment:{type:"string"}}},comment:{type:"string"}}}},{}],192:[function(e,t,r){t.exports={id:"query.json#",type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},{}],193:[function(e,t,r){t.exports={id:"request.json#",type:"object",required:["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],properties:{method:{type:"string"},url:{type:"string",format:"uri"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookie.json#"}},headers:{type:"array",items:{$ref:"header.json#"}},queryString:{type:"array",items:{$ref:"query.json#"}},postData:{$ref:"postData.json#"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},{}],194:[function(e,t,r){t.exports={id:"response.json#",type:"object",required:["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"cookie.json#"}},headers:{type:"array",items:{$ref:"header.json#"}},content:{$ref:"content.json#"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},{}],195:[function(e,t,r){t.exports={id:"timings.json#",required:["send","wait","receive"],properties:{dns:{type:"number",min:-1},connect:{type:"number",min:-1},blocked:{type:"number",min:-1},send:{type:"number",min:-1},wait:{type:"number",min:-1},receive:{type:"number",min:-1},ssl:{type:"number",min:-1},comment:{type:"string"}}}},{}],196:[function(e,t,r){"use strict";function n(e){var t="validation failed";this.name="HARError",this.message=t,this.errors=e,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}Object.defineProperty(r,"__esModule",{value:!0}),r.default=n,n.prototype=Error.prototype,t.exports=r.default},{}],197:[function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}function i(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};I=I||new A.default({allErrors:!0,schemas:S});var r=I.getSchema(e+".json");return new Promise(function(e,n){var i=r(t);i?e(t):n(new T.default(r.errors))})}function o(e){return a("afterRequest",e)}function s(e){return a("beforeRequest",e)}function c(e){return a("browser",e)}function u(e){return a("cache",e)}function l(e){return a("content",e)}function p(e){return a("cookie",e)}function f(e){return a("creator",e)}function h(e){return a("entry",e)}function d(e){return a("har",e)}function m(e){return a("header",e)}function g(e){return a("log",e)}function v(e){return a("page",e)}function b(e){return a("pageTimings",e)}function y(e){return a("postData",e)}function w(e){return a("query",e)}function x(e){return a("request",e)}function k(e){return a("response",e)}function _(e){return a("timings",e)}Object.defineProperty(r,"__esModule",{value:!0}),r.validate=a,r.afterRequest=o,r.beforeRequest=s,r.browser=c,r.cache=u,r.content=l,r.cookie=p,r.creator=f,r.entry=h,r.har=d,r.header=m,r.log=g,r.page=v,r.pageTimings=b,r.postData=y,r.query=w,r.request=x,r.response=k,r.timings=_;var j=e("har-schema"),S=i(j),E=e("ajv"),A=n(E),C=e("./error"),T=n(C),I=void 0},{"./error":196,ajv:15,"har-schema":187}],198:[function(e,t,r){(function(r){"use strict";function n(e){i.call(this),this._block=new r(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var i=e("stream").Transform,a=e("inherits");a(n,i),n.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},n.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},n.prototype.update=function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=new r(e,t));for(var n=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,s=this._length[o]/4294967296|0,s>0&&(this._length[o]-=4294967296*s);return this},n.prototype._update=function(e){throw new Error("_update is not implemented")},n.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},n.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:122,inherits:215,stream:507}],199:[function(e,t,r){var n=r;n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":200,"./hash/hmac":201,"./hash/ripemd":202,"./hash/sha":203,"./hash/utils":204}],200:[function(e,t,r){function n(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}var i=e("../hash"),a=i.utils,o=a.assert;r.BlockHash=n,n.prototype.update=function(e,t){if(e=a.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){e=this.pending;var r=e.length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=a.join32(e,0,e.length-r,this.endian);for(var n=0;n>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else{n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0;for(var a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t>>3}function d(e){return P(e,17)^P(e,19)^e>>>10}function m(e,t,r,n){return 0===e?c(t,r,n):1===e||3===e?l(t,r,n):2===e?u(t,r,n):void 0}function g(e,t,r,n,i,a){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function v(e,t,r,n,i,a){var o=t&n^~t&a;return o<0&&(o+=4294967296),o}function b(e,t,r,n,i,a){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function y(e,t,r,n,i,a){var o=t&n^t&a^n&a;return o<0&&(o+=4294967296),o}function w(e,t){var r=R(e,t,28),n=R(t,e,2),i=R(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function x(e,t){var r=z(e,t,28),n=z(t,e,2),i=z(t,e,7),a=r^n^i;return a<0&&(a+=4294967296),a}function k(e,t){var r=R(e,t,14),n=R(e,t,18),i=R(t,e,9),a=r^n^i;return a<0&&(a+=4294967296),a}function _(e,t){var r=z(e,t,14),n=z(e,t,18),i=z(t,e,9),a=r^n^i;return a<0&&(a+=4294967296),a}function j(e,t){var r=R(e,t,1),n=R(e,t,8),i=B(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function S(e,t){var r=z(e,t,1),n=z(e,t,8),i=F(e,t,7),a=r^n^i;return a<0&&(a+=4294967296),a}function E(e,t){var r=R(e,t,19),n=R(t,e,29),i=B(e,t,6),a=r^n^i;return a<0&&(a+=4294967296),a}function A(e,t){var r=z(e,t,19),n=z(t,e,29),i=F(e,t,6),a=r^n^i;return a<0&&(a+=4294967296),a}var C=e("../hash"),T=C.utils,I=T.assert,P=T.rotr32,O=T.rotl32,D=T.sum32,M=T.sum32_4,q=T.sum32_5,R=T.rotr64_hi,z=T.rotr64_lo,B=T.shr64_hi,F=T.shr64_lo,N=T.sum64,L=T.sum64_hi,U=T.sum64_lo,H=T.sum64_4_hi,K=T.sum64_4_lo,$=T.sum64_5_hi,V=T.sum64_5_lo,G=C.common.BlockHash,X=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],Q=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],W=[1518500249,1859775393,2400959708,3395469782]; -T.inherits(n,G),r.sha256=n,n.blockSize=512,n.outSize=256,n.hmacStrength=192,n.padLength=64,n.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n>8,o=255&i;a?r.push(a,o):r.push(o)}else for(var n=0;n>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function o(e,t){for(var r="",n=0;n>>0}return a}function l(e,t){for(var r=new Array(4*e.length),n=0,i=0;n>>24,r[i+1]=a>>>16&255,r[i+2]=a>>>8&255,r[i+3]=255&a):(r[i+3]=a>>>24,r[i+2]=a>>>16&255,r[i+1]=a>>>8&255,r[i]=255&a)}return r}function p(e,t){return e>>>t|e<<32-t}function f(e,t){return e<>>32-t}function h(e,t){return e+t>>>0}function d(e,t,r){return e+t+r>>>0}function m(e,t,r,n){return e+t+r+n>>>0}function g(e,t,r,n,i){return e+t+r+n+i>>>0}function v(e,t){if(!e)throw new Error(t||"Assertion failed")}function b(e,t,r,n){var i=e[t],a=e[t+1],o=n+a>>>0,s=(o>>0,e[t+1]=o}function y(e,t,r,n){var i=t+n>>>0,a=(i>>0}function w(e,t,r,n){var i=t+n;return i>>>0}function x(e,t,r,n,i,a,o,s){var c=0,u=t;u=u+n>>>0,c+=u>>0,c+=u>>0,c+=u>>0}function k(e,t,r,n,i,a,o,s){var c=t+n+a+s;return c>>>0}function _(e,t,r,n,i,a,o,s,c,u){var l=0,p=t;p=p+n>>>0,l+=p>>0,l+=p>>0,l+=p>>0,l+=p>>0}function j(e,t,r,n,i,a,o,s,c,u){var l=t+n+a+s+u;return l>>>0}function S(e,t,r){var n=t<<32-r|e>>>r;return n>>>0}function E(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}function A(e,t,r){return e>>>r}function C(e,t,r){var n=e<<32-r|t>>>r;return n>>>0}var T=r,I=e("inherits");T.toArray=n,T.toHex=i,T.htonl=a,T.toHex32=o,T.zero2=s,T.zero8=c,T.join32=u,T.split32=l,T.rotr32=p,T.rotl32=f,T.sum32=h,T.sum32_3=d,T.sum32_4=m,T.sum32_5=g,T.assert=v,T.inherits=I,r.sum64=b,r.sum64_hi=y,r.sum64_lo=w,r.sum64_4_hi=x,r.sum64_4_lo=k,r.sum64_5_hi=_,r.sum64_5_lo=j,r.rotr64_hi=S,r.rotr64_lo=E,r.shr64_hi=A,r.shr64_lo=C},{inherits:215}],205:[function(e,t,r){var n={internals:{}};n.client={header:function(e,t,r){var i={field:"",artifacts:{}};if(!e||"string"!=typeof e&&"object"!=typeof e||!t||"string"!=typeof t||!r||"object"!=typeof r)return i.err="Invalid argument type",i;var a=r.timestamp||n.utils.now(r.localtimeOffsetMsec),o=r.credentials;if(!(o&&o.id&&o.key&&o.algorithm))return i.err="Invalid credentials object",i;if(n.crypto.algorithms.indexOf(o.algorithm)===-1)return i.err="Unknown algorithm",i;"string"==typeof e&&(e=n.utils.parseUri(e));var s={ts:a,nonce:r.nonce||n.utils.randomString(6),method:t,resource:e.resource,host:e.host,port:e.port,hash:r.hash,ext:r.ext,app:r.app,dlg:r.dlg};i.artifacts=s,s.hash||!r.payload&&""!==r.payload||(s.hash=n.crypto.calculatePayloadHash(r.payload,o.algorithm,r.contentType));var c=n.crypto.calculateMac("header",o,s),u=null!==s.ext&&void 0!==s.ext&&""!==s.ext,l='Hawk id="'+o.id+'", ts="'+s.ts+'", nonce="'+s.nonce+(s.hash?'", hash="'+s.hash:"")+(u?'", ext="'+n.utils.escapeHeaderAttribute(s.ext):"")+'", mac="'+c+'"';return s.app&&(l+=', app="'+s.app+(s.dlg?'", dlg="'+s.dlg:"")+'"'),i.field=l,i},bewit:function(e,t){if(!e||"string"!=typeof e||!t||"object"!=typeof t||!t.ttlSec)return"";t.ext=null===t.ext||void 0===t.ext?"":t.ext;var r=n.utils.now(t.localtimeOffsetMsec),i=t.credentials;if(!(i&&i.id&&i.key&&i.algorithm))return"";if(n.crypto.algorithms.indexOf(i.algorithm)===-1)return"";e=n.utils.parseUri(e);var a=r+t.ttlSec,o=n.crypto.calculateMac("bewit",i,{ts:a,nonce:"",method:"GET",resource:e.resource,host:e.host,port:e.port,ext:t.ext}),s=i.id+"\\"+a+"\\"+o+"\\"+t.ext;return n.utils.base64urlEncode(s)},authenticate:function(e,t,r,i){i=i||{};var a=function(t){return e.getResponseHeader?e.getResponseHeader(t):e.getHeader(t)},o=a("www-authenticate");if(o){var s=n.utils.parseAuthorizationHeader(o,["ts","tsm","error"]);if(!s)return!1;if(s.ts){var c=n.crypto.calculateTsMac(s.ts,t);if(c!==s.tsm)return!1;n.utils.setNtpOffset(s.ts-Math.floor((new Date).getTime()/1e3))}}var u=a("server-authorization");if(!u&&!i.required)return!0;var l=n.utils.parseAuthorizationHeader(u,["mac","ext","hash"]);if(!l)return!1;var p={ts:r.ts,nonce:r.nonce,method:r.method,resource:r.resource,host:r.host,port:r.port,hash:l.hash,ext:l.ext,app:r.app,dlg:r.dlg},f=n.crypto.calculateMac("response",t,p);if(f!==l.mac)return!1;if(!i.payload&&""!==i.payload)return!0;if(!l.hash)return!1;var h=n.crypto.calculatePayloadHash(i.payload,t.algorithm,a("content-type"));return h===l.hash},message:function(e,t,r,i){if(!e||"string"!=typeof e||!t||"number"!=typeof t||null===r||void 0===r||"string"!=typeof r||!i||"object"!=typeof i)return null;var a=i.timestamp||n.utils.now(i.localtimeOffsetMsec),o=i.credentials;if(!(o&&o.id&&o.key&&o.algorithm))return null;if(n.crypto.algorithms.indexOf(o.algorithm)===-1)return null;var s={ts:a,nonce:i.nonce||n.utils.randomString(6),host:e,port:t,hash:n.crypto.calculatePayloadHash(r,o.algorithm)},c={id:o.id,ts:s.ts,nonce:s.nonce,hash:s.hash,mac:n.crypto.calculateMac("message",o,s)};return c},authenticateTimestamp:function(e,t,r){var i=n.crypto.calculateTsMac(e.ts,t);return i===e.tsm&&(r!==!1&&n.utils.setNtpOffset(e.ts-Math.floor((new Date).getTime()/1e3)),!0)}},n.crypto={headerVersion:"1",algorithms:["sha1","sha256"],calculateMac:function(e,t,r){var a=n.crypto.generateNormalizedString(e,r),o=i["Hmac"+t.algorithm.toUpperCase()](a,t.key);return o.toString(i.enc.Base64)},generateNormalizedString:function(e,t){var r="hawk."+n.crypto.headerVersion+"."+e+"\n"+t.ts+"\n"+t.nonce+"\n"+(t.method||"").toUpperCase()+"\n"+(t.resource||"")+"\n"+t.host.toLowerCase()+"\n"+t.port+"\n"+(t.hash||"")+"\n";return t.ext&&(r+=t.ext.replace("\\","\\\\").replace("\n","\\n")),r+="\n",t.app&&(r+=t.app+"\n"+(t.dlg||"")+"\n"),r},calculatePayloadHash:function(e,t,r){var a=i.algo[t.toUpperCase()].create();return a.update("hawk."+n.crypto.headerVersion+".payload\n"),a.update(n.utils.parseContentType(r)+"\n"),a.update(e),a.update("\n"),a.finalize().toString(i.enc.Base64)},calculateTsMac:function(e,t){var r=i["Hmac"+t.algorithm.toUpperCase()]("hawk."+n.crypto.headerVersion+".ts\n"+e+"\n",t.key);return r.toString(i.enc.Base64)}},n.internals.LocalStorage=function(){this._cache={},this.length=0,this.getItem=function(e){return this._cache.hasOwnProperty(e)?String(this._cache[e]):null},this.setItem=function(e,t){this._cache[e]=String(t),this.length=Object.keys(this._cache).length},this.removeItem=function(e){delete this._cache[e],this.length=Object.keys(this._cache).length},this.clear=function(){this._cache={},this.length=0},this.key=function(e){return Object.keys(this._cache)[e||0]}},n.utils={storage:new n.internals.LocalStorage,setStorage:function(e){var t=n.utils.storage.getItem("hawk_ntp_offset");n.utils.storage=e,t&&n.utils.setNtpOffset(t)},setNtpOffset:function(e){try{n.utils.storage.setItem("hawk_ntp_offset",e)}catch(e){console.error("[hawk] could not write to storage."),console.error(e)}},getNtpOffset:function(){var e=n.utils.storage.getItem("hawk_ntp_offset");return e?parseInt(e,10):0},now:function(e){return Math.floor(((new Date).getTime()+(e||0))/1e3)+n.utils.getNtpOffset()},escapeHeaderAttribute:function(e){return e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')},parseContentType:function(e){return e?e.split(";")[0].replace(/^\s+|\s+$/g,"").toLowerCase():""},parseAuthorizationHeader:function(e,t){if(!e)return null;var r=e.match(/^(\w+)(?:\s+(.*))?$/);if(!r)return null;var n=r[1];if("hawk"!==n.toLowerCase())return null;var i=r[2];if(!i)return null;var a={},o=i.replace(/(\w+)="([^"\\]*)"\s*(?:,\s*|$)/g,function(e,r,n){if(t.indexOf(r)!==-1&&null!==n.match(/^[ \w\!#\$%&'\(\)\*\+,\-\.\/\:;<\=>\?@\[\]\^`\{\|\}~]+$/)&&!a.hasOwnProperty(r))return a[r]=n,""});return""!==o?null:a},randomString:function(e){for(var t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",r=t.length,n=[],i=0;i>>2]|=(r[i>>>2]>>>24-8*(i%4)&255)<<24-8*((n+i)%4);else if(65535>>2]=r[i>>>2];else t.push.apply(t,r);return this.sigBytes+=e,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-8*(r%4),t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var r=[],n=0;n>>2]>>>24-8*(n%4)&255;r.push((i>>>4).toString(16)),r.push((15&i).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>3]|=parseInt(e.substr(n,2),16)<<24-4*(n%8);return new o.init(r,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var r=[],n=0;n>>2]>>>24-8*(n%4)&255));return r.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n>>2]|=(255&e.charCodeAt(n))<<24-8*(n%4);return new o.init(r,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},p=n.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r=this._data,n=r.words,i=r.sigBytes,a=this.blockSize,s=i/(4*a),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*a,i=e.min(4*t,i),t){for(var c=0;cu;u++){if(16>u)a[u]=0|e[t+u];else{var l=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=l<<1|l>>>31}l=(n<<5|n>>>27)+c+a[u],l=20>u?l+((i&o|~i&s)+1518500249):40>u?l+((i^o^s)+1859775393):60>u?l+((i&o|i&s|o&s)-1894007588):l+((i^o^s)-899497514),c=s,s=o,o=i<<30|i>>>2,i=n,n=l}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+o|0,r[3]=r[3]+s|0,r[4]=r[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,r=8*this._nDataBytes,n=8*e.sigBytes;return t[n>>>5]|=128<<24-n%32,t[(n+64>>>9<<4)+14]=Math.floor(r/4294967296),t[(n+64>>>9<<4)+15]=r,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=n._createHelper(t),e.HmacSHA1=n._createHmacHelper(t)}(),function(e){for(var t=i,r=t.lib,n=r.WordArray,a=r.Hasher,r=t.algo,o=[],s=[],c=function(e){return 4294967296*(e-(0|e))|0},u=2,l=0;64>l;){var p;e:{p=u;for(var f=e.sqrt(p),h=2;h<=f;h++)if(!(p%h)){p=!1;break e}p=!0}p&&(8>l&&(o[l]=c(e.pow(u,.5))),s[l]=c(e.pow(u,1/3)),l++),u++}var d=[],r=r.SHA256=a.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(e,t){for(var r=this._hash.words,n=r[0],i=r[1],a=r[2],o=r[3],c=r[4],u=r[5],l=r[6],p=r[7],f=0;64>f;f++){if(16>f)d[f]=0|e[t+f];else{var h=d[f-15],m=d[f-2];d[f]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+d[f-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+d[f-16]}h=p+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&u^~c&l)+s[f]+d[f],m=((n<<30|n>>>2)^(n<<19|n>>>13)^(n<<10|n>>>22))+(n&i^n&a^i&a),p=l,l=u,u=c,c=o+h|0,o=a,a=i,i=n,n=h+m|0}r[0]=r[0]+n|0,r[1]=r[1]+i|0,r[2]=r[2]+a|0,r[3]=r[3]+o|0,r[4]=r[4]+c|0,r[5]=r[5]+u|0,r[6]=r[6]+l|0,r[7]=r[7]+p|0},_doFinalize:function(){var t=this._data,r=t.words,n=8*this._nDataBytes,i=8*t.sigBytes;return r[i>>>5]|=128<<24-i%32,r[(i+64>>>9<<4)+14]=e.floor(n/4294967296),r[(i+64>>>9<<4)+15]=n,t.sigBytes=4*r.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(r),t.HmacSHA256=a._createHmacHelper(r)}(Math),function(){var e=i,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,r){e=this._hasher=new e.init,"string"==typeof r&&(r=t.parse(r));var n=e.blockSize,i=4*n;r.sigBytes>i&&(r=e.finalize(r)),r.clamp();for(var a=this._oKey=r.clone(),o=this._iKey=r.clone(),s=a.words,c=o.words,u=0;u>>2]>>>24-8*(i%4)&255)<<16|(t[i+1>>>2]>>>24-8*((i+1)%4)&255)<<8|t[i+2>>>2]>>>24-8*((i+2)%4)&255,o=0;4>o&&i+.75*o>>6*(3-o)&63));if(t=n.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var r=e.length,n=this._map,i=n.charAt(64);i&&(i=e.indexOf(i),-1!=i&&(r=i));for(var i=[],a=0,o=0;o>>6-2*(o%4);i[a>>>2]|=(s|c)<<24-8*(a%4),a++}return t.create(i,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),n.crypto.internals=i,"undefined"!=typeof t&&t.exports&&(t.exports=n)},{}],206:[function(e,t,r){"use strict";function n(e){if(!(this instanceof n))return new n(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this.reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=a.toArray(e.entropy,e.entropyEnc||"hex"),r=a.toArray(e.nonce,e.nonceEnc||"hex"),i=a.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,i)}var i=e("hash.js"),a=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");t.exports=n,n.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this.reseed=1},n.prototype.generate=function(e,t,r,n){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=a.toArray(r,n||"hex"),this._update(r));for(var i=[];i.length=65&&w<=90||w>=97&&w<=122)p+=y;else{if("="!==y)throw new i("bad param format");if(0===p.length)throw new i("bad param format");l=m.Quote}break;case m.Quote:if('"'!==y)throw new i("bad param format");g="",l=m.Value;break;case m.Value:'"'===y?(v.params[p]=g,l=m.Comma):g+=y;break;case m.Comma:if(","!==y)throw new i("bad param format");p="",l=m.Name;break;default:throw new Error("Invalid substate")}break;default:throw new Error("Invalid substate")}}if(v.params.headers&&""!==v.params.headers?v.params.headers=v.params.headers.split(" "):e.headers["x-date"]?v.params.headers=["x-date"]:v.params.headers=["date"],!v.scheme||"Signature"!==v.scheme)throw new i('scheme was not "Signature"');if(!v.params.keyId)throw new i("keyId was not specified");if(!v.params.algorithm)throw new i("algorithm was not specified");if(!v.params.signature)throw new i("signature was not specified");v.params.algorithm=v.params.algorithm.toLowerCase();try{h(v.params.algorithm)}catch(e){throw e instanceof f?new a(v.params.algorithm+" is not supported"):e}for(r=0;r1e3*t.clockSkew)throw new n("clock skew of "+S/1e3+"s was greater than "+t.clockSkew+"s")}if(t.headers.forEach(function(e){if(v.params.headers.indexOf(e)<0)throw new o(e+" was not a signed header")}),t.algorithms&&t.algorithms.indexOf(v.params.algorithm)===-1)throw new a(v.params.algorithm+" is not a supported algorithm");return v}}},{"./utils":210,"assert-plus":76,util:531}],209:[function(e,t,r){(function(r){function n(e){g.call(this,e,n)}function i(e){g.call(this,e,i)}function a(e){o.object(e,"options");var t=[];if(void 0!==e.algorithm&&(o.string(e.algorithm,"options.algorithm"),t=v(e.algorithm)),this.rs_alg=t,void 0!==e.sign)o.func(e.sign,"options.sign"),this.rs_signFunc=e.sign;else if("hmac"===t[0]&&void 0!==e.key){if(o.string(e.keyId,"options.keyId"),this.rs_keyId=e.keyId,"string"!=typeof e.key&&!r.isBuffer(e.key))throw new TypeError("options.key for HMAC must be a string or Buffer");this.rs_signer=s.createHmac(t[1].toUpperCase(),e.key),this.rs_signer.sign=function(){var e=this.digest("base64");return{hashAlgorithm:t[1],toString:function(){return e}}}}else{if(void 0===e.key)throw new TypeError("options.sign (func) or options.key is required");var n=e.key;if(("string"==typeof n||r.isBuffer(n))&&(n=u.parsePrivateKey(n)),o.ok(u.PrivateKey.isPrivateKey(n,[1,2]),"options.key must be a sshpk.PrivateKey"),this.rs_key=n,o.string(e.keyId,"options.keyId"),this.rs_keyId=e.keyId,!d[n.type])throw new m(n.type.toUpperCase()+" type keys are not supported");if(void 0!==t[0]&&n.type!==t[0])throw new m("options.key must be a "+t[0].toUpperCase()+" key, was given a "+n.type.toUpperCase()+" key instead");this.rs_signer=n.createSign(t[1])}this.rs_headers=[],this.rs_lines=[]}var o=e("assert-plus"),s=e("crypto"),c=(e("http"),e("util")),u=e("sshpk"),l=e("jsprim"),p=e("./utils"),f=e("util").format,h=p.HASH_ALGOS,d=p.PK_ALGOS,m=p.InvalidAlgorithmError,g=p.HttpSignatureError,v=p.validateAlgorithm,b='Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';c.inherits(n,g),c.inherits(i,g),a.prototype.writeHeader=function(e,t){if(o.string(e,"header"),e=e.toLowerCase(),o.string(t,"value"),this.rs_headers.push(e),this.rs_signFunc)this.rs_lines.push(e+": "+t);else{var r=e+": "+t;this.rs_headers.length>0&&(r="\n"+r),this.rs_signer.update(r)}return t},a.prototype.writeDateHeader=function(){return this.writeHeader("date",l.rfc1123(new Date))},a.prototype.writeTarget=function(e,t){o.string(e,"method"),o.string(t,"path"),e=e.toLowerCase(),this.writeHeader("(request-target)",e+" "+t)},a.prototype.sign=function(e){if(o.func(e,"callback"),this.rs_headers.length<1)throw new Error("At least one header must be signed");var t,r;if(this.rs_signFunc){var n=this.rs_lines.join("\n"),i=this;this.rs_signFunc(n,function(n,a){if(n)return void e(n);try{o.object(a,"signature"),o.string(a.keyId,"signature.keyId"),o.string(a.algorithm,"signature.algorithm"),o.string(a.signature,"signature.signature"),t=v(a.algorithm),r=f(b,a.keyId,a.algorithm,i.rs_headers.join(" "),a.signature)}catch(t){return void e(t)}e(null,r)})}else{try{var a=this.rs_signer.sign()}catch(t){return void e(t)}t=(this.rs_alg[0]||this.rs_key.type)+"-"+a.hashAlgorithm;var s=a.toString();r=f(b,this.rs_keyId,t,this.rs_headers.join(" "),s),e(null,r)}},t.exports={isSigner:function(e){return"object"==typeof e&&e instanceof a},createSigner:function(e){return new a(e)},signRequest:function(e,t){o.object(e,"request"),o.object(t,"options"),o.optionalString(t.algorithm,"options.algorithm"),o.string(t.keyId,"options.keyId"),o.optionalArrayOfString(t.headers,"options.headers"),o.optionalString(t.httpVersion,"options.httpVersion"),e.getHeader("Date")||e.setHeader("Date",l.rfc1123(new Date)),t.headers||(t.headers=["date"]),t.httpVersion||(t.httpVersion="1.1");var a=[];t.algorithm&&(t.algorithm=t.algorithm.toLowerCase(),a=v(t.algorithm));var c,p="";for(c=0;c>1,l=-7,p=r?i-1:0,f=r?-1:1,h=e[t+p];for(p+=f,a=h&(1<<-l)-1,h>>=-l,l+=s;l>0;a=256*a+e[t+p],p+=f,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=n;l>0;o=256*o+e[t+p],p+=f,l-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:(h?-1:1)*(1/0);o+=Math.pow(2,n),a-=u}return(h?-1:1)*o*Math.pow(2,a-n)},r.write=function(e,t,r,n,i,a){var o,s,c,u=8*a-i-1,l=(1<>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),t+=o+p>=1?f/c:f*Math.pow(2,1-p),t*c>=2&&(o++,c/=2),o+p>=l?(s=0,o=l):o+p>=1?(s=(t*c-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[r+h]=255&s,h+=d,s/=256,i-=8);for(o=o<0;e[r+h]=255&o,h+=d,o/=256,u-=8);e[r+h-d]|=128*m}},{}],214:[function(e,t,r){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r>4,i=e[n];i+=(1<<(15&t))*r,e[n]=i}function i(e,t){return e[t>>4]>>(15&t)&1}function a(){return[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function o(){return[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function s(){return[9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function c(e,t){var r,n,i,a=0;for(r=15;r>=0;r--){var o=e[r],s=t[r];a+=(o-s)*(1-a*a),i=a>>31,n=a+i^i,a=~~((a<<1)/(n+1))}return a}function u(e,t){var r,n=[];return n[0]=65535&(r=e[0]+t[0]),n[1]=65535&(r=(r>>>16)+e[1]+t[1]),n[2]=65535&(r=(r>>>16)+e[2]+t[2]),n[3]=65535&(r=(r>>>16)+e[3]+t[3]),n[4]=65535&(r=(r>>>16)+e[4]+t[4]),n[5]=65535&(r=(r>>>16)+e[5]+t[5]),n[6]=65535&(r=(r>>>16)+e[6]+t[6]),n[7]=65535&(r=(r>>>16)+e[7]+t[7]),n[8]=65535&(r=(r>>>16)+e[8]+t[8]),n[9]=65535&(r=(r>>>16)+e[9]+t[9]),n[10]=65535&(r=(r>>>16)+e[10]+t[10]),n[11]=65535&(r=(r>>>16)+e[11]+t[11]),n[12]=65535&(r=(r>>>16)+e[12]+t[12]),n[13]=65535&(r=(r>>>16)+e[13]+t[13]),n[14]=65535&(r=(r>>>16)+e[14]+t[14]),n[15]=(r>>>16)+e[15]+t[15],n}function l(e,t){var r,n=[];return n[0]=65535&(r=524288+e[0]-t[0]),n[1]=65535&(r=(r>>>16)+524280+e[1]-t[1]),n[2]=65535&(r=(r>>>16)+524280+e[2]-t[2]),n[3]=65535&(r=(r>>>16)+524280+e[3]-t[3]),n[4]=65535&(r=(r>>>16)+524280+e[4]-t[4]),n[5]=65535&(r=(r>>>16)+524280+e[5]-t[5]),n[6]=65535&(r=(r>>>16)+524280+e[6]-t[6]),n[7]=65535&(r=(r>>>16)+524280+e[7]-t[7]),n[8]=65535&(r=(r>>>16)+524280+e[8]-t[8]),n[9]=65535&(r=(r>>>16)+524280+e[9]-t[9]),n[10]=65535&(r=(r>>>16)+524280+e[10]-t[10]),n[11]=65535&(r=(r>>>16)+524280+e[11]-t[11]),n[12]=65535&(r=(r>>>16)+524280+e[12]-t[12]),n[13]=65535&(r=(r>>>16)+524280+e[13]-t[13]),n[14]=65535&(r=(r>>>16)+524280+e[14]-t[14]),n[15]=(r>>>16)-8+e[15]-t[15],n}function p(e,t,r,n,i,a,o,s){var c,u=[];return u[0]=65535&(c=s*s),u[1]=65535&(c=(0|c/65536)+2*s*o),u[2]=65535&(c=(0|c/65536)+2*s*a+o*o),u[3]=65535&(c=(0|c/65536)+2*s*i+2*o*a),u[4]=65535&(c=(0|c/65536)+2*s*n+2*o*i+a*a),u[5]=65535&(c=(0|c/65536)+2*s*r+2*o*n+2*a*i),u[6]=65535&(c=(0|c/65536)+2*s*t+2*o*r+2*a*n+i*i),u[7]=65535&(c=(0|c/65536)+2*s*e+2*o*t+2*a*r+2*i*n),u[8]=65535&(c=(0|c/65536)+2*o*e+2*a*t+2*i*r+n*n),u[9]=65535&(c=(0|c/65536)+2*a*e+2*i*t+2*n*r),u[10]=65535&(c=(0|c/65536)+2*i*e+2*n*t+r*r),u[11]=65535&(c=(0|c/65536)+2*n*e+2*r*t),u[12]=65535&(c=(0|c/65536)+2*r*e+t*t),u[13]=65535&(c=(0|c/65536)+2*t*e),u[14]=65535&(c=(0|c/65536)+e*e),u[15]=0|c/65536,u}function f(e){var t,r=p(e[15],e[14],e[13],e[12],e[11],e[10],e[9],e[8]),n=p(e[7],e[6],e[5],e[4],e[3],e[2],e[1],e[0]),i=p(e[15]+e[7],e[14]+e[6],e[13]+e[5],e[12]+e[4],e[11]+e[3],e[10]+e[2],e[9]+e[1],e[8]+e[0]),a=[];return a[0]=65535&(t=8388608+n[0]+38*(i[8]-r[8]-n[8]+r[0]-128)),a[1]=65535&(t=8388480+(t>>>16)+n[1]+38*(i[9]-r[9]-n[9]+r[1])),a[2]=65535&(t=8388480+(t>>>16)+n[2]+38*(i[10]-r[10]-n[10]+r[2])),a[3]=65535&(t=8388480+(t>>>16)+n[3]+38*(i[11]-r[11]-n[11]+r[3])),a[4]=65535&(t=8388480+(t>>>16)+n[4]+38*(i[12]-r[12]-n[12]+r[4])),a[5]=65535&(t=8388480+(t>>>16)+n[5]+38*(i[13]-r[13]-n[13]+r[5])),a[6]=65535&(t=8388480+(t>>>16)+n[6]+38*(i[14]-r[14]-n[14]+r[6])),a[7]=65535&(t=8388480+(t>>>16)+n[7]+38*(i[15]-r[15]-n[15]+r[7])),a[8]=65535&(t=8388480+(t>>>16)+n[8]+i[0]-r[0]-n[0]+38*r[8]),a[9]=65535&(t=8388480+(t>>>16)+n[9]+i[1]-r[1]-n[1]+38*r[9]),a[10]=65535&(t=8388480+(t>>>16)+n[10]+i[2]-r[2]-n[2]+38*r[10]),a[11]=65535&(t=8388480+(t>>>16)+n[11]+i[3]-r[3]-n[3]+38*r[11]),a[12]=65535&(t=8388480+(t>>>16)+n[12]+i[4]-r[4]-n[4]+38*r[12]),a[13]=65535&(t=8388480+(t>>>16)+n[13]+i[5]-r[5]-n[5]+38*r[13]),a[14]=65535&(t=8388480+(t>>>16)+n[14]+i[6]-r[6]-n[6]+38*r[14]),a[15]=8388480+(t>>>16)+n[15]+i[7]-r[7]-n[7]+38*r[15],m(a),a}function h(e,t,r,n,i,a,o,s,c,u,l,p,f,h,d,m){var g,v=[];return v[0]=65535&(g=s*m),v[1]=65535&(g=(0|g/65536)+s*d+o*m),v[2]=65535&(g=(0|g/65536)+s*h+o*d+a*m),v[3]=65535&(g=(0|g/65536)+s*f+o*h+a*d+i*m),v[4]=65535&(g=(0|g/65536)+s*p+o*f+a*h+i*d+n*m),v[5]=65535&(g=(0|g/65536)+s*l+o*p+a*f+i*h+n*d+r*m),v[6]=65535&(g=(0|g/65536)+s*u+o*l+a*p+i*f+n*h+r*d+t*m),v[7]=65535&(g=(0|g/65536)+s*c+o*u+a*l+i*p+n*f+r*h+t*d+e*m),v[8]=65535&(g=(0|g/65536)+o*c+a*u+i*l+n*p+r*f+t*h+e*d),v[9]=65535&(g=(0|g/65536)+a*c+i*u+n*l+r*p+t*f+e*h),v[10]=65535&(g=(0|g/65536)+i*c+n*u+r*l+t*p+e*f),v[11]=65535&(g=(0|g/65536)+n*c+r*u+t*l+e*p),v[12]=65535&(g=(0|g/65536)+r*c+t*u+e*l),v[13]=65535&(g=(0|g/65536)+t*c+e*u),v[14]=65535&(g=(0|g/65536)+e*c),v[15]=0|g/65536,v}function d(e,t){var r,n=h(e[15],e[14],e[13],e[12],e[11],e[10],e[9],e[8],t[15],t[14],t[13],t[12],t[11],t[10],t[9],t[8]),i=h(e[7],e[6],e[5],e[4],e[3],e[2],e[1],e[0],t[7],t[6],t[5],t[4],t[3],t[2],t[1],t[0]),a=h(e[15]+e[7],e[14]+e[6],e[13]+e[5],e[12]+e[4],e[11]+e[3],e[10]+e[2],e[9]+e[1],e[8]+e[0],t[15]+t[7],t[14]+t[6],t[13]+t[5],t[12]+t[4],t[11]+t[3],t[10]+t[2],t[9]+t[1],t[8]+t[0]),o=[];return o[0]=65535&(r=8388608+i[0]+38*(a[8]-n[8]-i[8]+n[0]-128)),o[1]=65535&(r=8388480+(r>>>16)+i[1]+38*(a[9]-n[9]-i[9]+n[1])),o[2]=65535&(r=8388480+(r>>>16)+i[2]+38*(a[10]-n[10]-i[10]+n[2])),o[3]=65535&(r=8388480+(r>>>16)+i[3]+38*(a[11]-n[11]-i[11]+n[3])),o[4]=65535&(r=8388480+(r>>>16)+i[4]+38*(a[12]-n[12]-i[12]+n[4])),o[5]=65535&(r=8388480+(r>>>16)+i[5]+38*(a[13]-n[13]-i[13]+n[5])),o[6]=65535&(r=8388480+(r>>>16)+i[6]+38*(a[14]-n[14]-i[14]+n[6])),o[7]=65535&(r=8388480+(r>>>16)+i[7]+38*(a[15]-n[15]-i[15]+n[7])),o[8]=65535&(r=8388480+(r>>>16)+i[8]+a[0]-n[0]-i[0]+38*n[8]),o[9]=65535&(r=8388480+(r>>>16)+i[9]+a[1]-n[1]-i[1]+38*n[9]),o[10]=65535&(r=8388480+(r>>>16)+i[10]+a[2]-n[2]-i[2]+38*n[10]),o[11]=65535&(r=8388480+(r>>>16)+i[11]+a[3]-n[3]-i[3]+38*n[11]),o[12]=65535&(r=8388480+(r>>>16)+i[12]+a[4]-n[4]-i[4]+38*n[12]),o[13]=65535&(r=8388480+(r>>>16)+i[13]+a[5]-n[5]-i[5]+38*n[13]),o[14]=65535&(r=8388480+(r>>>16)+i[14]+a[6]-n[6]-i[6]+38*n[14]),o[15]=8388480+(r>>>16)+i[15]+a[7]-n[7]-i[7]+38*n[15],m(o),o}function m(e){var t=e.slice(0),r=[e,t],n=e[15],i=r[n<32768&1];i[15]=32767&n,n=19*(0|n/32768),i[0]=65535&(n+=i[0]),n>>>=16,i[1]=65535&(n+=i[1]),n>>>=16,i[2]=65535&(n+=i[2]),n>>>=16,i[3]=65535&(n+=i[3]),n>>>=16,i[4]=65535&(n+=i[4]),n>>>=16,i[5]=65535&(n+=i[5]),n>>>=16,i[6]=65535&(n+=i[6]),n>>>=16,i[7]=65535&(n+=i[7]),n>>>=16,i[8]=65535&(n+=i[8]),n>>>=16,i[9]=65535&(n+=i[9]),n>>>=16,i[10]=65535&(n+=i[10]),n>>>=16,i[11]=65535&(n+=i[11]),n>>>=16,i[12]=65535&(n+=i[12]),n>>>=16,i[13]=65535&(n+=i[13]),n>>>=16,i[14]=65535&(n+=i[14]),n>>>=16,i[15]+=n}function g(e,t){var r,n=[];return n[0]=65535&(r=19*((0|e[15]>>>15)+(0|t[15]>>>15))+e[0]+t[0]),n[1]=65535&(r=(r>>>16)+e[1]+t[1]),n[2]=65535&(r=(r>>>16)+e[2]+t[2]),n[3]=65535&(r=(r>>>16)+e[3]+t[3]),n[4]=65535&(r=(r>>>16)+e[4]+t[4]),n[5]=65535&(r=(r>>>16)+e[5]+t[5]),n[6]=65535&(r=(r>>>16)+e[6]+t[6]),n[7]=65535&(r=(r>>>16)+e[7]+t[7]),n[8]=65535&(r=(r>>>16)+e[8]+t[8]),n[9]=65535&(r=(r>>>16)+e[9]+t[9]),n[10]=65535&(r=(r>>>16)+e[10]+t[10]),n[11]=65535&(r=(r>>>16)+e[11]+t[11]),n[12]=65535&(r=(r>>>16)+e[12]+t[12]),n[13]=65535&(r=(r>>>16)+e[13]+t[13]),n[14]=65535&(r=(r>>>16)+e[14]+t[14]),n[15]=(r>>>16)+(32767&e[15])+(32767&t[15]),n}function v(e,t){var r,n=[];return n[0]=65535&(r=524288+19*((0|e[15]>>>15)-(0|t[15]>>>15)-1)+e[0]-t[0]),n[1]=65535&(r=(r>>>16)+524280+e[1]-t[1]),n[2]=65535&(r=(r>>>16)+524280+e[2]-t[2]),n[3]=65535&(r=(r>>>16)+524280+e[3]-t[3]),n[4]=65535&(r=(r>>>16)+524280+e[4]-t[4]),n[5]=65535&(r=(r>>>16)+524280+e[5]-t[5]),n[6]=65535&(r=(r>>>16)+524280+e[6]-t[6]),n[7]=65535&(r=(r>>>16)+524280+e[7]-t[7]),n[8]=65535&(r=(r>>>16)+524280+e[8]-t[8]),n[9]=65535&(r=(r>>>16)+524280+e[9]-t[9]),n[10]=65535&(r=(r>>>16)+524280+e[10]-t[10]),n[11]=65535&(r=(r>>>16)+524280+e[11]-t[11]),n[12]=65535&(r=(r>>>16)+524280+e[12]-t[12]),n[13]=65535&(r=(r>>>16)+524280+e[13]-t[13]),n[14]=65535&(r=(r>>>16)+524280+e[14]-t[14]),n[15]=(r>>>16)+32760+(32767&e[15])-(32767&t[15]),n}function b(e){for(var t=e,r=250;--r;)e=f(e),e=d(e,t);return e=f(e),e=f(e),e=d(e,t),e=f(e),e=f(e),e=d(e,t),e=f(e),e=d(e,t)}function y(e){var t,r=121665,n=[];return n[0]=65535&(t=e[0]*r),n[1]=65535&(t=(0|t/65536)+e[1]*r),n[2]=65535&(t=(0|t/65536)+e[2]*r),n[3]=65535&(t=(0|t/65536)+e[3]*r),n[4]=65535&(t=(0|t/65536)+e[4]*r),n[5]=65535&(t=(0|t/65536)+e[5]*r),n[6]=65535&(t=(0|t/65536)+e[6]*r),n[7]=65535&(t=(0|t/65536)+e[7]*r),n[8]=65535&(t=(0|t/65536)+e[8]*r),n[9]=65535&(t=(0|t/65536)+e[9]*r),n[10]=65535&(t=(0|t/65536)+e[10]*r),n[11]=65535&(t=(0|t/65536)+e[11]*r),n[12]=65535&(t=(0|t/65536)+e[12]*r),n[13]=65535&(t=(0|t/65536)+e[13]*r),n[14]=65535&(t=(0|t/65536)+e[14]*r),n[15]=(0|t/65536)+e[15]*r,m(n),n}function w(e,t){var r,n,i,a,o;return i=f(g(e,t)),a=f(v(e,t)),o=v(i,a),r=d(a,i),n=d(g(y(o),i),o),[r,n]}function x(e,t,r,n,i){var a,o,s,c;return s=d(v(e,t),g(r,n)),c=d(g(e,t),v(r,n)),a=f(g(s,c)),o=d(f(v(s,c)),i),[a,o]}function k(e){var t=_.randomBytes(32);e===!0&&(t[0]&=248,t[31]=127&t[31]|64);for(var r=[],n=0;n=0;){var c,u,l=s.getbit(e,a);c=s.sum(o[0][0],o[0][1],o[1][0],o[1][1],n),u=s.dbl(o[1-l][0],o[1-l][1]),o[1-l]=u,o[l]=c,a--}return i=o[1],i[1]=s.invmodp(i[1]),i[0]=s.mulmodp(i[0],i[1]),s.reduce(i[0]),i[0]}function i(e,t){return t||(t=s.BASE()),e[0]&=65528,e[15]=32767&e[15]|16384,n(e,t)}function a(e){var t=c.hexEncode(e);return t=new Array(65-t.length).join("0")+t,t.split(/(..)/).reverse().join("")}function o(e){var t=e.split(/(..)/).reverse().join("");return c.hexDecode(t)}var s=e("./core"),c=e("./utils"),u={};u.curve25519=i,u.curve25519_raw=n,u.hexEncodeVector=a,u.hexDecodeVector=o,u.hexencode=c.hexEncode,u.hexdecode=c.hexDecode,u.base32encode=c.base32encode,u.base32decode=c.base32decode,t.exports=u},{"./core":221,"./utils":225}],223:[function(e,t,r){(function(r){"use strict";function n(e){var t=new Uint16Array(e);return new r(new Uint8Array(t.buffer))}function i(e){if(r.isBuffer(e)){var t=new Uint8Array(e);return new Uint16Array(t.buffer)}for(var n=new Array(16),i=0,a=0;i>16,0,0,0,0,0,0,0,0,0,0,0,0,0,0];else{if(!(e instanceof n))throw"Bad argument for bignum: "+e;this.n=e.n.slice(0)}else this.n=e}function i(e,t){for(var r=0,n=0;n<16;n++){var i=e[n]>>16-t;e[n]=e[n]<=0;n--){var i=e[n]<<16-t&65535;e[n]=e[n]>>t|r,r=i}return e}function o(e){e=n(e);for(var t=new Array(32),r=31;r>=0;r--)t[r]=255&e.n[0],e.shiftRight(8);return t}function s(e){for(var t=U,r=0;r<32;r++)t.shiftLeft(8),t=t.plus(n(e[r]));return t}function c(e,t){for(var r=z.ONE(),n=0;n<256;n++)1===z.getbit(t,n)&&(r=z.mulmodp(r,e)),e=z.sqrmodp(e);return r}function u(e){return z.reduce(e.n),e.cmp($)>=0?u(e.minus($)):e.cmp(U)===-1?u(e.plus($)):e}function l(e){var t=e[0],r=e[1],n=t.sqr(),i=r.sqr(),a=G.times(n).times(i);return i.minus(n).minus(H).minus(a).modq().equals(U)}function p(e){var t=e.sqr(),r=t.minus(H).divide(H.plus(G.times(t))),n=r.pow(V);return n.times(n).minus(r).equals(U)||(n=n.times(X)),n.isOdd()&&(n=$.minus(n)),n}function f(e,t){var r=e[0],n=e[1],i=e[2],a=e[3],o=t[0],s=t[1],c=t[2],u=t[3],l=n.minus(r).times(s.plus(o)),p=n.plus(r).times(s.minus(o)),f=i.times(K).times(u),h=a.times(K).times(c),d=h.plus(f),m=p.minus(l),g=p.plus(l),v=h.minus(f);return[d.times(m),g.times(v),m.times(g),d.times(v)]}function h(e){var t=e[0],r=e[1],n=e[2],i=t.times(t),a=r.times(r),o=K.times(n).times(n),s=$.minus(i),c=t.plus(r),u=c.times(c).minus(i).minus(a),l=s.plus(a),p=l.minus(o),f=s.minus(a);return[u.times(p),l.times(f),p.times(l),u.times(f)]}function d(e,t){if(t.equals(U))return[U,H,H,U];var r=t.isOdd();t.shiftRight(1);var n=h(d(e,t));return r?f(n,e):n}function m(e){var t=e[0],r=e[1];return[t,r,H,t.times(r)]}function g(e){var t=e[0],r=e[1],n=e[2],i=n.inv();return[t.times(i),r.times(i)]}function v(e,t){return g(d(m(e),t))}function b(e,t){return e[e.length-(t>>>3)-1]>>(7&t)&1}function y(e,t){for(var r=[U,H,H,U],n=(t.length<<3)-1;n>=0;n--)r=h(r),1===b(t,n)&&(r=f(r,e));return r}function w(e,t){return g(y(m(e),t))}function x(e){return e.bytes(32).reverse()}function k(e){return n(e.slice(0).reverse())}function _(e){var t=x(e[1]);return e[0].isOdd()&&(t[31]|=128),t}function j(e){e=e.slice(0);var t=e[31]>>7;e[31]&=127;var r=k(e),n=p(r);(1&n.n[0])!==t&&(n=$.minus(n));var i=[n,r];if(!l(i))throw"Point is not on curve";return i}function S(e,t){if(void 0!==t)return 256===t?S(B.string2bytes(e)):new F(e,t);if("string"==typeof e)return new F(e,10);if(e instanceof Array||e instanceof Uint8Array||r.isBuffer(e))return new F(e);if("number"==typeof e)return new F(e.toString(),10);throw"Can't convert "+e+" to BigInteger"}function E(e,t){void 0===t&&(t=e.bitLength()+7>>>3);for(var r=new Array(t),n=t-1;n>=0;n--)r[n]=255&e[0],e=e.shiftRight(8);return r}function A(e){var t=N.createHash("sha512").update(e).digest();return E(S(t),64).reverse()}function C(e){var t=N.createHash("sha512").update(e).digest();return M(q,E(S(t),64)).join("")}function T(e){return S([0].concat(A(e)))}function I(e){return n(A(e).slice(32,64))}function P(e){return T(e).mod(Q)}function O(e){var t=I(e);return t.n[0]&=65528,t.n[15]&=16383,t.n[15]|=16384,t}function D(e){return _(v(Z,O(e)))}function M(e,t){for(var r=new Array(t.length),n=0;n=0;r--){var n=e[r];t.push(d.substr(n>>>12&15,1)),t.push(d.substr(n>>>8&15,1)),t.push(d.substr(n>>>4&15,1)),t.push(d.substr(15&n,1))}return t.join("")}function i(e){for(var t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],r=e.length-1,n=0;r>=0;r-=4)t[n]=d.indexOf(e.charAt(r))|d.indexOf(e.charAt(r-1))<<4|d.indexOf(e.charAt(r-2))<<8|d.indexOf(e.charAt(r-3))<<12,n++;return t}function a(e){var t,r="";for(t=0;t<255;t+=5)r=m.substr(f.getbit(e,t)+(f.getbit(e,t+1)<<1)+(f.getbit(e,t+2)<<2)+(f.getbit(e,t+3)<<3)+(f.getbit(e,t+4)<<4),1)+r;return r}function o(e){var t=0,r=f.ZERO(),n=e.length;for(t=0;n>0&&t<255;t+=5){n--;var i=g[e.substr(n,1)];f.setbit(r,t,1&i),i>>=1,f.setbit(r,t+1,1&i),i>>=1,f.setbit(r,t+2,1&i),i>>=1,f.setbit(r,t+3,1&i),i>>=1,f.setbit(r,t+4,1&i)}return r}function s(e,t){for(var r=new Array(t.length),n=0;n=0;){var o=t*this[e++]+r[n]+i;i=Math.floor(o/67108864),r[n++]=67108863&o}return i}function a(e,t,r,n,i,a){for(var o=32767&t,s=t>>15;--a>=0;){var c=32767&this[e],u=this[e++]>>15,l=s*c+u*o;c=o*c+((32767&l)<<15)+r[n]+(1073741823&i),i=(c>>>30)+(l>>>15)+s*u+(i>>>30),r[n++]=1073741823&c}return i}function o(e,t,r,n,i,a){for(var o=16383&t,s=t>>14;--a>=0;){var c=16383&this[e],u=this[e++]>>14,l=s*c+u*o;c=o*c+((16383&l)<<14)+r[n]+i,i=(c>>28)+(l>>14)+s*u,r[n++]=268435455&c}return i}function s(e){return gt.charAt(e)}function c(e,t){var r=vt[e.charCodeAt(t)];return null==r?-1:r}function u(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function l(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function p(e){var t=n();return t.fromInt(e),t}function f(t,r){var n;if(16==r)n=4;else if(8==r)n=3;else if(256==r)n=8;else if(2==r)n=1;else if(32==r)n=5;else{if(4!=r)return void this.fromRadix(t,r);n=2}this.t=0,this.s=0;for(var i=t.length,a=!1,o=0;--i>=0;){var s=8==n?255&t[i]:c(t,i);s<0?"-"==t.charAt(i)&&(a=!0):(a=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==n&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t}function d(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var r,n=(1<0)for(c>c)>0&&(i=!0,a=s(r));o>=0;)c>(c+=this.DB-t)):(r=this[o]>>(c-=t)&n,c<=0&&(c+=this.DB,--o)),r>0&&(i=!0),i&&(a+=s(r));return i?a:"0"}function m(){var t=n();return e.ZERO.subTo(this,t),t}function g(){return this.s<0?this.negate():this}function v(e){var t=this.s-e.s;if(0!=t)return t;var r=this.t;if(t=r-e.t,0!=t)return this.s<0?-t:t;for(;--r>=0;)if(0!=(t=this[r]-e[r]))return t;return 0}function b(e){var t,r=1;return 0!=(t=e>>>16)&&(e=t,r+=16),0!=(t=e>>8)&&(e=t,r+=8),0!=(t=e>>4)&&(e=t,r+=4),0!=(t=e>>2)&&(e=t,r+=2),0!=(t=e>>1)&&(e=t,r+=1),r}function y(){return this.t<=0?0:this.DB*(this.t-1)+b(this[this.t-1]^this.s&this.DM)}function w(e,t){var r;for(r=this.t-1;r>=0;--r)t[r+e]=this[r];for(r=e-1;r>=0;--r)t[r]=0;t.t=this.t+e,t.s=this.s}function x(e,t){for(var r=e;r=0;--r)t[r+o+1]=this[r]>>i|s,s=(this[r]&a)<=0;--r)t[r]=0;t[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()}function _(e,t){t.s=this.s;var r=Math.floor(e/this.DB);if(r>=this.t)return void(t.t=0);var n=e%this.DB,i=this.DB-n,a=(1<>n;for(var o=r+1;o>n;n>0&&(t[this.t-r-1]|=(this.s&a)<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n-=e.s}t.s=n<0?-1:0,n<-1?t[r++]=this.DV+n:n>0&&(t[r++]=n),t.t=r,t.clamp()}function S(t,r){var n=this.abs(),i=t.abs(),a=n.t;for(r.t=a+i.t;--a>=0;)r[a]=0;for(a=0;a=0;)e[r]=0;for(r=0;r=t.DV&&(e[r+t.t]-=t.DV,e[r+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(r,t[r],e,2*r,0,1)),e.s=0,e.clamp()}function A(t,r,i){var a=t.abs();if(!(a.t<=0)){var o=this.abs();if(o.t0?(a.lShiftTo(l,s),o.lShiftTo(l,i)):(a.copyTo(s),o.copyTo(i));var p=s.t,f=s[p-1];if(0!=f){var h=f*(1<1?s[p-2]>>this.F2:0),d=this.FV/h,m=(1<=0&&(i[i.t++]=1,i.subTo(w,i)),e.ONE.dlShiftTo(p,w),w.subTo(s,s);s.t=0;){var x=i[--v]==f?this.DM:Math.floor(i[v]*d+(i[v-1]+g)*m);if((i[v]+=s.am(0,x,i,y,0,p))0&&i.rShiftTo(l,i),c<0&&e.ZERO.subTo(i,i)}}}function C(t){var r=n();return this.abs().divRemTo(t,null,r),this.s<0&&r.compareTo(e.ZERO)>0&&t.subTo(r,r),r}function T(e){this.m=e}function I(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function P(e){return e}function O(e){e.divRemTo(this.m,null,e)}function D(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function M(e,t){e.squareTo(t),this.reduce(t)}function q(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function R(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(r,r),r}function B(e){var t=n();return e.copyTo(t),this.reduce(t),t}function F(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(r=t+this.m.t,e[r]+=this.m.am(0,n,e,t,0,this.m.t);e[r]>=e.DV;)e[r]-=e.DV,e[++r]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function N(e,t){e.squareTo(t),this.reduce(t)}function L(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function U(){return 0==(this.t>0?1&this[0]:this.s)}function H(t,r){if(t>4294967295||t<1)return e.ONE;var i=n(),a=n(),o=r.convert(this),s=b(t)-1;for(o.copyTo(i);--s>=0;)if(r.sqrTo(i,a),(t&1<0)r.mulTo(a,o,i);else{var c=i;i=a,a=c}return r.revert(i)}function K(e,t){var r;return r=e<256||t.isEven()?new T(t):new R(t),this.exp(e,r)}function $(){var e=n();return this.copyTo(e),e}function V(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function X(){return 0==this.t?this.s:this[0]<<16>>16}function Q(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function W(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function J(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),r=Math.pow(e,t),i=p(r),a=n(),o=n(),s="";for(this.divRemTo(i,a,o);a.signum()>0;)s=(r+o.intValue()).toString(e).substr(1)+s,a.divRemTo(i,a,o);return o.intValue().toString(e)+s}function Z(t,r){this.fromInt(0),null==r&&(r=10);for(var n=this.chunkSize(r),i=Math.pow(r,n),a=!1,o=0,s=0,u=0;u=n&&(this.dMultiply(i),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(r,o)),this.dAddOffset(s,0)),a&&e.ZERO.subTo(this,this)}function Y(t,r,n){if("number"==typeof r)if(t<2)this.fromInt(1);else for(this.fromNumber(t,n),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),se,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(r);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var i=new Array,a=7&t;i.length=(t>>3)+1,r.nextBytes(i),a>0?i[0]&=(1<0)for(n>n)!=(this.s&this.DM)>>n&&(t[i++]=r|this.s<=0;)n<8?(r=(this[e]&(1<>(n+=this.DB-8)):(r=this[e]>>(n-=8)&255,n<=0&&(n+=this.DB,--e)),0!=(128&r)&&(r|=-256),0==i&&(128&this.s)!=(128&r)&&++i,(i>0||r!=this.s)&&(t[i++]=r);return t}function te(e){return 0==this.compareTo(e)}function re(e){return this.compareTo(e)<0?this:e}function ne(e){return this.compareTo(e)>0?this:e}function ie(e,t,r){var n,i,a=Math.min(e.t,this.t);for(n=0;n>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function ve(){for(var e=0;e=this.t?0!=this.s:0!=(this[t]&1<>=this.DB;if(e.t>=this.DB;n+=this.s}else{for(n+=this.s;r>=this.DB;n+=e.s}t.s=n<0?-1:0,n>0?t[r++]=n:n<-1&&(t[r++]=this.DV+n),t.t=r,t.clamp()}function Ee(e){var t=n();return this.addTo(e,t),t}function Ae(e){var t=n();return this.subTo(e,t),t}function Ce(e){var t=n();return this.multiplyTo(e,t),t}function Te(){var e=n();return this.squareTo(e),e}function Ie(e){var t=n();return this.divRemTo(e,t,null),t}function Pe(e){var t=n();return this.divRemTo(e,null,t),t}function Oe(e){var t=n(),r=n();return this.divRemTo(e,t,r),new Array(t,r)}function De(e){this[this.t]=this.am(0,e-1,this,0,0,this.t), -++this.t,this.clamp()}function Me(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function qe(){}function Re(e){return e}function ze(e,t,r){e.multiplyTo(t,r)}function Be(e,t){e.squareTo(t)}function Fe(e){return this.exp(e,new qe)}function Ne(e,t,r){var n=Math.min(this.t+e.t,t);for(r.s=0,r.t=n;n>0;)r[--n]=0;var i;for(i=r.t-this.t;n=0;)r[n]=0;for(n=Math.max(t-this.t,0);n2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=n();return e.copyTo(t),this.reduce(t),t}function Ke(e){return e}function $e(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Ve(e,t){e.squareTo(t),this.reduce(t)}function Ge(e,t,r){e.multiplyTo(t,r),this.reduce(r)}function Xe(e,t){var r,i,a=e.bitLength(),o=p(1);if(a<=0)return o;r=a<18?1:a<48?3:a<144?4:a<768?5:6,i=a<8?new T(t):t.isEven()?new Ue(t):new R(t);var s=new Array,c=3,u=r-1,l=(1<1){var f=n();for(i.sqrTo(s[1],f);c<=l;)s[c]=n(),i.mulTo(f,s[c-2],s[c]),c+=2}var h,d,m=e.t-1,g=!0,v=n();for(a=b(e[m])-1;m>=0;){for(a>=u?h=e[m]>>a-u&l:(h=(e[m]&(1<0&&(h|=e[m-1]>>this.DB+a-u)),c=r;0==(1&h);)h>>=1,--c;if((a-=c)<0&&(a+=this.DB,--m),g)s[h].copyTo(o),g=!1;else{for(;c>1;)i.sqrTo(o,v),i.sqrTo(v,o),c-=2;c>0?i.sqrTo(o,v):(d=o,o=v,v=d),i.mulTo(v,s[h],o)}for(;m>=0&&0==(e[m]&1<0&&(t.rShiftTo(a,t),r.rShiftTo(a,r));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),t.compareTo(r)>=0?(t.subTo(r,t),t.rShiftTo(1,t)):(r.subTo(t,r),r.rShiftTo(1,r));return a>0&&r.lShiftTo(a,r),r}function We(e){if(e<=0)return 0;var t=this.DV%e,r=this.s<0?e-1:0;if(this.t>0)if(0==t)r=this[0]%e;else for(var n=this.t-1;n>=0;--n)r=(t*r+this[n])%e;return r}function Je(t){var r=t.isEven();if(this.isEven()&&r||0==t.signum())return e.ZERO;for(var n=t.clone(),i=this.clone(),a=p(1),o=p(0),s=p(0),c=p(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),r?(a.isEven()&&o.isEven()||(a.addTo(this,a),o.subTo(t,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;i.isEven();)i.rShiftTo(1,i),r?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(t,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);n.compareTo(i)>=0?(n.subTo(i,n),r&&a.subTo(s,a),o.subTo(c,o)):(i.subTo(n,i),r&&s.subTo(a,s),c.subTo(o,c))}return 0!=i.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c}function Ze(e){var t,r=this.abs();if(1==r.t&&r[0]<=bt[bt.length-1]){for(t=0;t>1,t>bt.length&&(t=bt.length);for(var o=n(),s=0;s>8&255,xt[kt++]^=e>>16&255,xt[kt++]^=e>>24&255,kt>=Et&&(kt-=Et)}function tt(){et((new Date).getTime())}function rt(){if(null==wt){for(tt(),wt=ct(),wt.init(xt),kt=0;kt>>8,xt[kt++]=255&_t;kt=0,tt()}it.prototype.nextBytes=nt,at.prototype.init=ot,at.prototype.next=st;var Et=256;e.SecureRandom=it,e.BigInteger=e,"undefined"!=typeof r?r=t.exports=e:(this.BigInteger=e,this.SecureRandom=it)}).call(this)},{}],227:[function(e,t,r){!function(e,r){"function"==typeof define&&define.amd?define([],function(){return r()}):"object"==typeof t&&t.exports?t.exports=r():e.jsonSchema=r()}(this,function(){function e(t,r){return e(t,r,{changing:!1})}var t=e;t.Integer={type:"integer"};var r={String:String,Boolean:Boolean,Number:Number,Object:Object,Array:Array,Date:Date};t.validate=e,t.checkPropertyChange=function(t,r,n){return e(t,r,{changing:n||"property"})};var e=t._validate=function(e,t,n){function i(e){return e.type||r[e.name]==e&&e.name.toLowerCase()}function a(e,t,r,u){function l(e){c.push({property:r,message:e})}function p(e,t){if(e){if(!("string"!=typeof e||"any"==e||("null"==e?null===t:typeof t==e)||t instanceof Array&&"array"==e||t instanceof Date&&"date"==e||"integer"==e&&t%1===0))return[{property:r,message:typeof t+" value found, but a "+e+" is required"}];if(e instanceof Array){for(var n=[],i=0;it.maxItems&&l("There must be a maximum of "+t.maxItems+" in the array")}else(t.properties||t.additionalProperties)&&c.concat(o(e,t.properties,r,t.additionalProperties));if(t.pattern&&"string"==typeof e&&!e.match(t.pattern)&&l("does not match the regex pattern "+t.pattern),t.maxLength&&"string"==typeof e&&e.length>t.maxLength&&l("may only be "+t.maxLength+" characters long"),t.minLength&&"string"==typeof e&&e.lengthe&&l("must have a minimum value of "+t.minimum),void 0!==typeof t.maximum&&typeof e==typeof t.maximum&&t.maximum0){var o=r.indexOf(this);~o?r.splice(o+1):r.push(this),~o?n.splice(o,1/0,i):n.push(i),~r.indexOf(a)&&(a=t.call(this,i,a))}else r.push(a);return null==e?a:e.call(this,i,a)}}r=t.exports=n,r.getSerialize=i},{}],230:[function(e,t,r){r.parse=e("./lib/parse"),r.stringify=e("./lib/stringify")},{"./lib/parse":231,"./lib/stringify":232}],231:[function(e,t,r){var n,i,a,o,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},c=function(e){throw{name:"SyntaxError",message:e,at:n,text:a}},u=function(e){return e&&e!==i&&c("Expected '"+e+"' instead of '"+i+"'"),i=a.charAt(n),n+=1,i},l=function(){var e,t="";for("-"===i&&(t="-",u("-"));i>="0"&&i<="9";)t+=i,u();if("."===i)for(t+=".";u()&&i>="0"&&i<="9";)t+=i;if("e"===i||"E"===i)for(t+=i,u(),"-"!==i&&"+"!==i||(t+=i,u());i>="0"&&i<="9";)t+=i,u();return e=+t,isFinite(e)?e:void c("Bad number")},p=function(){var e,t,r,n="";if('"'===i)for(;u();){if('"'===i)return u(),n;if("\\"===i)if(u(),"u"===i){for(r=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof s[i])break;n+=s[i]}else n+=i}c("Bad string")},f=function(){for(;i&&i<=" ";)u()},h=function(){switch(i){case"t":return u("t"),u("r"),u("u"),u("e"),!0;case"f":return u("f"),u("a"),u("l"),u("s"),u("e"),!1;case"n":return u("n"),u("u"),u("l"),u("l"),null}c("Unexpected '"+i+"'")},d=function(){var e=[];if("["===i){if(u("["),f(),"]"===i)return u("]"),e;for(;i;){if(e.push(o()),f(),"]"===i)return u("]"),e;u(","),f()}}c("Bad array")},m=function(){var e,t={};if("{"===i){if(u("{"),f(),"}"===i)return u("}"),t;for(;i;){if(e=p(),f(),u(":"),Object.hasOwnProperty.call(t,e)&&c('Duplicate key "'+e+'"'),t[e]=o(),f(),"}"===i)return u("}"),t;u(","),f()}}c("Bad object")};o=function(){switch(f(),i){case"{":return m();case"[":return d();case'"':return p();case"-":return l();default:return i>="0"&&i<="9"?l():h()}},t.exports=function(e,t){var r;return a=e,n=0,i=" ",r=o(),f(),i&&c("Syntax error"),"function"==typeof t?function e(r,n){var i,a,o=r[n];if(o&&"object"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),void 0!==a?o[i]=a:delete o[i]);return t.call(r,n,o)}({"":r},""):r}},{}],232:[function(e,t,r){function n(e){return c.lastIndex=0,c.test(e)?'"'+e.replace(c,function(e){var t=u[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}function i(e,t){var r,c,u,l,p,f=a,h=t[e];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(e)),"function"==typeof s&&(h=s.call(t,e,h)),typeof h){case"string":return n(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(a+=o,p=[],"[object Array]"===Object.prototype.toString.apply(h)){for(l=h.length,r=0;r=0);for(a in e)i=r.slice(0),i.push(a),p(e[a],t-1,i,n)}function f(e,t){if(0===t)return[e];T.ok(null!==e),T.equal(typeof e,"object"),T.equal(typeof t,"number"),T.ok(t>=0);var r,n=[];for(r in e)f(e[r],t-1).forEach(function(e){n.push([r].concat(e))});return n}function h(e,t){return e.substr(0,t.length)==t}function d(e,t){return e.substr(e.length-t.length,t.length)==t}function m(e){return"number"==typeof e&&(e=new Date(e)),T.ok(e.constructor===Date),I.sprintf("%4d-%02d-%02dT%02d:%02d:%02d.%03dZ",e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function g(e){return I.sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",M[e.getUTCDay()],e.getUTCDate(),D[e.getUTCMonth()],e.getUTCFullYear(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())}function v(e){var t=+e;return isNaN(t)?new Date(e):new Date(t)}function b(e,t){var r=O.validate(t,e);if(0===r.errors.length)return null;var n,i,a=r.errors[0],o=a.property,s=a.message.toLowerCase();(n=s.indexOf("the property "))!=-1&&(i=s.indexOf(" is not defined in the schema and the schema does not allow additional properties"))!=-1&&(n+="the property ".length,o=""===o?s.substr(n,i-n):o+"."+s.substr(n,i-n),s="unsupported property");var c=new P.VError('property "%s": %s',o,s);return c.jsv_details=a,c}function y(e){return T.ok(Array.isArray(e)&&e.length>0,"randElt argument must be a non-empty array"),e[Math.floor(Math.random()*e.length)]}function w(e){T.ok(e[0]>=0&&e[1]>=0,"negative numbers not allowed in hrtimes"),T.ok(e[1]<1e9,"nanoseconds column overflow")}function x(e,t){w(e),w(t),T.ok(e[0]>t[0]||e[0]==t[0]&&e[1]>=t[1],"negative differences not allowed");var r=[e[0]-t[0],0];return e[1]>=t[1]?r[1]=e[1]-t[1]:(r[0]--,r[1]=1e9-(t[1]-e[1])),r}function k(e){return w(e),Math.floor(1e9*e[0]+e[1])}function _(e){return w(e),Math.floor(1e6*e[0]+e[1]/1e3)}function j(e){return w(e),Math.floor(1e3*e[0]+e[1]/1e6)}function S(e,t){return w(e),w(t),e[1]+=t[1],e[1]>=1e9&&(e[0]++,e[1]-=1e9),e[0]+=t[0],e}function E(e,t){w(e);var r=[e[0],e[1]];return S(r,t)}function A(e,t){T.ok("object"==typeof e&&null!==e,"obj argument must be a non-null object"),T.ok(Array.isArray(t),"allowed argument must be an array of strings");for(var r=0;r1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,o&&h(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n-1&&e%1==0&&e-1&&e%1==0&&e<=j}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){return!!e&&"object"==typeof e}function _(e){return v(e)?o(e):c(e)}var j=9007199254740991,S="[object Arguments]",E="[object Function]",A="[object GeneratorFunction]",C=/^(?:0|[1-9]\d*)$/,T=Object.prototype,I=T.hasOwnProperty,P=T.toString,O=T.propertyIsEnumerable,D=a(Object.keys,Object),M=Math.max,q=!O.call({valueOf:1},"valueOf"),R=Array.isArray,z=p(function(e,t){if(q||d(t)||v(t))return void l(t,_(t),e);for(var r in t)I.call(t,r)&&s(e,r,t[r])});t.exports=z},{}],235:[function(e,t,r){var n=e("./_getNative"),i=e("./_root"),a=n(i,"DataView");t.exports=a},{"./_getNative":299,"./_root":336}],236:[function(e,t,r){function n(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&a(r[0],r[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++nf))return!1;var d=l.get(e);if(d&&l.get(t))return d==t;var m=-1,g=!0,v=r&c?new i:void 0;for(l.set(e,t),l.set(t,e);++m-1&&e%1==0&&e-1}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":255}],321:[function(e,t,r){function n(e,t){var r=this.__data__,n=i(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var i=e("./_assocIndexOf");t.exports=n},{"./_assocIndexOf":255}],322:[function(e,t,r){function n(){this.size=0,this.__data__={hash:new i,map:new(o||a),string:new i}}var i=e("./_Hash"),a=e("./_ListCache"),o=e("./_Map");t.exports=n},{"./_Hash":236,"./_ListCache":237,"./_Map":238}],323:[function(e,t,r){function n(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=e("./_getMapData");t.exports=n},{"./_getMapData":297}],324:[function(e,t,r){function n(e){return i(this,e).get(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":297}],325:[function(e,t,r){function n(e){return i(this,e).has(e)}var i=e("./_getMapData");t.exports=n},{"./_getMapData":297}],326:[function(e,t,r){function n(e,t){var r=i(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var i=e("./_getMapData");t.exports=n},{"./_getMapData":297}],327:[function(e,t,r){function n(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}t.exports=n},{}],328:[function(e,t,r){function n(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}t.exports=n},{}],329:[function(e,t,r){function n(e){var t=i(e,function(e){return r.size===a&&r.clear(),e}),r=t.cache;return t}var i=e("./memoize"),a=500;t.exports=n},{"./memoize":370}],330:[function(e,t,r){var n=e("./_getNative"),i=n(Object,"create");t.exports=i},{"./_getNative":299}],331:[function(e,t,r){var n=e("./_overArg"),i=n(Object.keys,Object);t.exports=i},{"./_overArg":334}],332:[function(e,t,r){var n=e("./_freeGlobal"),i="object"==typeof r&&r&&!r.nodeType&&r,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i,s=o&&n.process,c=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();t.exports=c},{"./_freeGlobal":295}],333:[function(e,t,r){function n(e){return a.call(e)}var i=Object.prototype,a=i.toString;t.exports=n},{}],334:[function(e,t,r){function n(e,t){return function(r){return e(t(r))}}t.exports=n},{}],335:[function(e,t,r){function n(e,t,r){return t=a(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,s=a(n.length-t,0),c=Array(s);++o0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var i=800,a=16,o=Date.now;t.exports=n},{}],342:[function(e,t,r){function n(){this.__data__=new i,this.size=0}var i=e("./_ListCache");t.exports=n},{"./_ListCache":237}],343:[function(e,t,r){function n(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}t.exports=n},{}],344:[function(e,t,r){function n(e){return this.__data__.get(e)}t.exports=n},{}],345:[function(e,t,r){function n(e){return this.__data__.has(e)}t.exports=n},{}],346:[function(e,t,r){function n(e,t){var r=this.__data__;if(r instanceof i){var n=r.__data__;if(!a||n.length-1&&e%1==0&&e<=i}var i=9007199254740991;t.exports=n},{}],365:[function(e,t,r){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}t.exports=n},{}],366:[function(e,t,r){function n(e){return null!=e&&"object"==typeof e}t.exports=n},{}],367:[function(e,t,r){function n(e){return"symbol"==typeof e||a(e)&&i(e)==o}var i=e("./_baseGetTag"),a=e("./isObjectLike"),o="[object Symbol]";t.exports=n},{"./_baseGetTag":265,"./isObjectLike":366}],368:[function(e,t,r){var n=e("./_baseIsTypedArray"),i=e("./_baseUnary"),a=e("./_nodeUtil"),o=a&&a.isTypedArray,s=o?i(o):n;t.exports=s},{"./_baseIsTypedArray":272,"./_baseUnary":283,"./_nodeUtil":332}],369:[function(e,t,r){function n(e){return o(e)?i(e):a(e)}var i=e("./_arrayLikeKeys"),a=e("./_baseKeys"),o=e("./isArrayLike");t.exports=n},{"./_arrayLikeKeys":250,"./_baseKeys":274,"./isArrayLike":360}],370:[function(e,t,r){function n(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(n.Cache||i),r}var i=e("./_MapCache"),a="Expected a function";n.Cache=i,t.exports=n},{"./_MapCache":239}],371:[function(e,t,r){function n(e){return o(e)?i(s(e)):a(e)}var i=e("./_baseProperty"),a=e("./_basePropertyDeep"),o=e("./_isKey"),s=e("./_toKey");t.exports=n},{"./_baseProperty":277,"./_basePropertyDeep":278,"./_isKey":312,"./_toKey":348}],372:[function(e,t,r){function n(){return[]}t.exports=n},{}],373:[function(e,t,r){function n(){return!1}t.exports=n},{}],374:[function(e,t,r){function n(e){return null==e?"":i(e)}var i=e("./_baseToString");t.exports=n},{"./_baseToString":282}],375:[function(e,t,r){"use strict";var n=e("./lib/parse"),i=e("./lib/Parser"),a=e("./lib/escape"),o=e("./lib/Element"),s=e("./lib/equal"),c=e("./lib/createElement"),u=e("./lib/tag"),l=e("./lib/tagString"),p=e("./lib/is"),f=e("./lib/clone"),h=e("./lib/stringify");r=t.exports=function(){return u.apply(null,arguments)},r.Element=o,r.equal=s.equal,r.nameEqual=s.name,r.attrsEqual=s.attrs,r.childrenEqual=s.children,r.isNode=p.isNode,r.isElement=p.isElement,r.isText=p.isText,r.clone=f,r.createElement=c,r.escapeXML=a.escapeXML,r.unescapeXML=a.unescapeXML,r.escapeXMLText=a.escapeXMLText,r.unescapeXMLText=a.unescapeXMLText,r.Parser=i,r.parse=n,r.tag=u,r.tagString=l,r.stringify=h},{"./lib/Element":376,"./lib/Parser":377,"./lib/clone":378,"./lib/createElement":379,"./lib/equal":380,"./lib/escape":381,"./lib/is":382,"./lib/parse":383,"./lib/stringify":385,"./lib/tag":386,"./lib/tagString":387}],376:[function(e,t,r){"use strict";function n(e,t){this.name=e,this.parent=null,this.children=[],this.attrs={},this.setAttrs(t)}var i=e("./escape"),a=i.escapeXML,o=i.escapeXMLText,s=e("./equal"),c=s.equal,u=s.name,l=s.attrs,p=s.children,f=e("./clone");n.prototype.is=function(e,t){return this.getName()===e&&(!t||this.getNS()===t)},n.prototype.getName=function(){return this.name.indexOf(":")>=0?this.name.substr(this.name.indexOf(":")+1):this.name},n.prototype.getNS=function(){if(this.name.indexOf(":")>=0){var e=this.name.substr(0,this.name.indexOf(":"));return this.findNS(e)}return this.findNS()},n.prototype.findNS=function(e){if(e){var t="xmlns:"+e;if(this.attrs[t])return this.attrs[t];if(this.parent)return this.parent.findNS(e)}else{if(this.attrs.xmlns)return this.attrs.xmlns;if(this.parent)return this.parent.findNS()}},n.prototype.getXmlns=function(){var e={};this.parent&&(e=this.parent.getXmlns());for(var t in this.attrs){var r=t.match("xmlns:?(.*)");this.attrs.hasOwnProperty(t)&&r&&(e[this.attrs[t]]=r[1])}return e},n.prototype.setAttrs=function(e){"string"==typeof e?this.attrs.xmlns=e:e&&Object.keys(e).forEach(function(t){this.attrs[t]=e[t]},this)},n.prototype.getAttr=function(e,t){if(!t)return this.attrs[e];var r=this.getXmlns();return r[t]?this.attrs[[r[t],e].join(":")]:null},n.prototype.getChild=function(e,t){return this.getChildren(e,t)[0]},n.prototype.getChildren=function(e,t){for(var r=[],n=0;n");for(var t=0;t")},n.prototype.write=function(e){e("<"),e(this.name);for(var t in this.attrs){var r=this.attrs[t];null!=r&&(e(" "),e(t),e('="'),"string"!=typeof r&&(r=r.toString()),e(a(r)),e('"'))}0===this.children.length?e("/>"):this._addChildren(e)},n.prototype.nameEquals=function(e){return u(this,e)},n.prototype.attrsEquals=function(e){return l(this,e)},n.prototype.childrenEquals=function(e){return p(this,e)},n.prototype.equals=function(e){return c(this,e)},t.exports=n},{"./clone":378,"./equal":380,"./escape":381}],377:[function(e,t,r){"use strict";var n=e("events").EventEmitter,i=e("inherits"),a=e("./Element"),o=e("./parsers/ltx"),s=function(e){n.call(this);var t=this.Parser=e&&e.Parser||this.DefaultParser,r=this.Element=e&&e.Element||this.DefaultElement;this.parser=new t;var i,a=this;this.parser.on("startElement",function(e,t){var n=new r(e,t);i=i?i.cnode(n):n}),this.parser.on("endElement",function(e){i&&e===i.name&&(i.parent?i=i.parent:a.tree||(a.tree=i,i=void 0))}),this.parser.on("text",function(e){i&&i.t(e)}),this.parser.on("error",function(e){a.error=e,a.emit("error",e)})};i(s,n),s.prototype.DefaultParser=o,s.prototype.DefaultElement=a,s.prototype.write=function(e){this.parser.write(e)},s.prototype.end=function(e){this.parser.end(e),this.error||(this.tree?this.emit("tree",this.tree):this.emit("error",new Error("Incomplete document")))},t.exports=s},{"./Element":376,"./parsers/ltx":384,events:171,inherits:215}],378:[function(e,t,r){"use strict";t.exports=function e(t){for(var e=new t.constructor(t.name,t.attrs),r=0;r":">",'"':""","'":"'"},o={"&":"&","&":"&","<":"<","<":"<",">":">",">":">",""":'"',""":'"',"'":"'","'":"'"};r.escapeXML=function(e){return e.replace(/&|<|>|"|'/g,n)},r.unescapeXML=function(e){return e.replace(/&(amp|#38|lt|#60|gt|#62|quot|#34|apos|#39);/g,i)},r.escapeXMLText=function(e){return e.replace(/&|<|>/g,n)},r.unescapeXMLText=function(e){return e.replace(/&(amp|#38|lt|#60|gt|#62);/g,i)}},{}],382:[function(e,t,r){"use strict";var n=e("./Element");t.exports.isNode=function(e){return e instanceof n||"string"==typeof e},t.exports.isElement=function(e){return e instanceof n},t.exports.isText=function(e){return"string"==typeof e}},{"./Element":376}],383:[function(e,t,r){"use strict";var n=e("./Parser");t.exports=function(e,t){var r;r="function"==typeof t?new t:new n(t);var i=null,a=null;if(r.on("tree",function(e){i=e}),r.on("error",function(e){a=e}),r.write(e),r.end(),a)throw a;return i}},{"./Parser":377}],384:[function(e,t,r){"use strict";var n=e("inherits"),i=e("events").EventEmitter,a=e("../escape").unescapeXML,o=0,s=1,c=2,u=3,l=4,p=5,f=6,h=7,d=8,m=9,g=t.exports=function(){i.call(this);var e,t,r,n,g,v,b,y=o,w=0;this._handleTagOpening=function(e,t,r){e?this.emit("endElement",t):(this.emit("startElement",t,r),g&&this.emit("endElement",t))},this.write=function(i){function x(){if("number"==typeof w){var e=i.slice(w,k);return w=void 0,e}}"string"!=typeof i&&(i=i.toString());var k=0;for(e&&(i=e+i,k+=e.length,e=null);k"===i.substr(k+1,2)){var S=x();S&&this.emit("text",a(S)),y=s}break;case u:47===_&&w===k?(w=k+1,n=!0):33===_?"[CDATA["===i.substr(k+1,7)?(w=k+8,y=m):(w=void 0,y=s):63===_?(w=void 0,y=c):(_<=32||47===_||62===_)&&(t=x(),k--,y=l);break;case s:if(62===_){var E=i.charCodeAt(k-1),A=i.charCodeAt(k-2);(45===E&&45===A||93===E&&93===A)&&(y=o)}break;case c:if(62===_){var C=i.charCodeAt(k-1);63===C&&(y=o)}break;case l:62===_?(this._handleTagOpening(n,t,r),t=void 0,r=void 0,n=void 0,g=void 0,y=o,w=k+1):47===_?g=!0:_>32&&(w=k,y=p);break;case p:(_<=32||61===_)&&(b=x(),k--,y=f);break;case f:61===_&&(y=h);break;case h:34!==_&&39!==_||(v=_,y=d,w=k+1);break;case d:if(_===v){var T=a(x());r[b]=T,b=void 0,y=l}}}"number"==typeof w&&w<=i.length&&(e=i.slice(w),w=0)}};n(g,i),g.prototype.end=function(e){e&&this.write(e),this.write=function(){}}},{"../escape":381,events:171,inherits:215}],385:[function(e,t,r){"use strict";function n(e,t,r){"number"==typeof t&&(t=" ".repeat(t)),r||(r=1);var i="";return i+="<"+e.name,Object.keys(e.attrs).forEach(function(t){i+=" "+t+'="'+e.attrs[t]+'"'}),e.children.length?(i+=">",e.children.forEach(function(e,a){t&&(i+="\n"+t.repeat(r)),i+="string"==typeof e?e:n(e,t,r+1)}),t&&(i+="\n"+t.repeat(r-1)),i+=""):i+="/>",i}t.exports=n},{}],386:[function(e,t,r){"use strict";var n=e("./tagString"),i=e("./parse");t.exports=function(){return i(n.apply(null,arguments))}},{"./parse":383,"./tagString":387}],387:[function(e,t,r){"use strict";var n=e("./escape").escapeXML;t.exports=function(){for(var e=arguments[0],t="",r=1;r>>32-t}function a(e,t,r,n,a,o,s){return i(e+(t&r|~t&n)+a+o|0,s)+t|0}function o(e,t,r,n,a,o,s){return i(e+(t&n|r&~n)+a+o|0,s)+t|0}function s(e,t,r,n,a,o,s){return i(e+(t^r^n)+a+o|0,s)+t|0}function c(e,t,r,n,a,o,s){return i(e+(r^(t|~n))+a+o|0,s)+t|0}var u=e("inherits"),l=e("hash-base"),p=new Array(16);u(n,l),n.prototype._update=function(){for(var e=p,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,u=this._d;r=a(r,n,i,u,e[0],3614090360,7),u=a(u,r,n,i,e[1],3905402710,12),i=a(i,u,r,n,e[2],606105819,17),n=a(n,i,u,r,e[3],3250441966,22),r=a(r,n,i,u,e[4],4118548399,7),u=a(u,r,n,i,e[5],1200080426,12),i=a(i,u,r,n,e[6],2821735955,17),n=a(n,i,u,r,e[7],4249261313,22),r=a(r,n,i,u,e[8],1770035416,7),u=a(u,r,n,i,e[9],2336552879,12),i=a(i,u,r,n,e[10],4294925233,17),n=a(n,i,u,r,e[11],2304563134,22),r=a(r,n,i,u,e[12],1804603682,7),u=a(u,r,n,i,e[13],4254626195,12),i=a(i,u,r,n,e[14],2792965006,17),n=a(n,i,u,r,e[15],1236535329,22),r=o(r,n,i,u,e[1],4129170786,5),u=o(u,r,n,i,e[6],3225465664,9),i=o(i,u,r,n,e[11],643717713,14),n=o(n,i,u,r,e[0],3921069994,20),r=o(r,n,i,u,e[5],3593408605,5),u=o(u,r,n,i,e[10],38016083,9),i=o(i,u,r,n,e[15],3634488961,14),n=o(n,i,u,r,e[4],3889429448,20),r=o(r,n,i,u,e[9],568446438,5),u=o(u,r,n,i,e[14],3275163606,9),i=o(i,u,r,n,e[3],4107603335,14),n=o(n,i,u,r,e[8],1163531501,20),r=o(r,n,i,u,e[13],2850285829,5),u=o(u,r,n,i,e[2],4243563512,9),i=o(i,u,r,n,e[7],1735328473,14),n=o(n,i,u,r,e[12],2368359562,20),r=s(r,n,i,u,e[5],4294588738,4),u=s(u,r,n,i,e[8],2272392833,11),i=s(i,u,r,n,e[11],1839030562,16),n=s(n,i,u,r,e[14],4259657740,23),r=s(r,n,i,u,e[1],2763975236,4),u=s(u,r,n,i,e[4],1272893353,11),i=s(i,u,r,n,e[7],4139469664,16),n=s(n,i,u,r,e[10],3200236656,23),r=s(r,n,i,u,e[13],681279174,4),u=s(u,r,n,i,e[0],3936430074,11),i=s(i,u,r,n,e[3],3572445317,16),n=s(n,i,u,r,e[6],76029189,23),r=s(r,n,i,u,e[9],3654602809,4),u=s(u,r,n,i,e[12],3873151461,11),i=s(i,u,r,n,e[15],530742520,16),n=s(n,i,u,r,e[2],3299628645,23),r=c(r,n,i,u,e[0],4096336452,6),u=c(u,r,n,i,e[7],1126891415,10),i=c(i,u,r,n,e[14],2878612391,15),n=c(n,i,u,r,e[5],4237533241,21),r=c(r,n,i,u,e[12],1700485571,6),u=c(u,r,n,i,e[3],2399980690,10),i=c(i,u,r,n,e[10],4293915773,15),n=c(n,i,u,r,e[1],2240044497,21),r=c(r,n,i,u,e[8],1873313359,6),u=c(u,r,n,i,e[15],4264355552,10),i=c(i,u,r,n,e[6],2734768916,15),n=c(n,i,u,r,e[13],1309151649,21),r=c(r,n,i,u,e[4],4149444226,6),u=c(u,r,n,i,e[11],3174756917,10),i=c(i,u,r,n,e[2],718787259,15),n=c(n,i,u,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+u|0},n.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new r(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:122,"hash-base":198,inherits:215}],389:[function(e,t,r){function n(e){this.rand=e||new a.Rand}var i=e("bn.js"),a=e("brorand");t.exports=n,n.create=function(e){return new n(e)},n.prototype._rand=function(e){var t=e.bitLength(),r=this.rand.generate(Math.ceil(t/8));r[0]|=3;var n=7&t;return 0!==n&&(r[r.length-1]>>=7-n),new i(r)},n.prototype.test=function(e,t,r){var n=e.bitLength(),a=i.mont(e),o=new i(1).toRed(a);t||(t=Math.max(1,n/48|0));for(var s=e.subn(1),c=s.subn(1),u=0;!s.testn(u);u++);for(var l=e.shrn(u),p=s.toRed(a),f=!0;t>0;t--){var h=this._rand(c);r&&r(h);var d=h.toRed(a).redPow(l);if(0!==d.cmp(o)&&0!==d.cmp(p)){for(var m=1;m0;t--){var p=this._rand(s),f=e.gcd(p);if(0!==f.cmpn(1))return f;var h=p.toRed(n).redPow(u);if(0!==h.cmp(a)&&0!==h.cmp(l)){for(var d=1;d=0;s--)if(c[s]!==u[s])return!1;for(s=c.length-1;s>=0;s--)if(o=c[s],!h(e[o],t[o],n,i))return!1;return!0}function g(e,t,n){h(e,t,!0)&&l(e,t,n,"notDeepStrictEqual",g)}function b(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&t.call({},e)===!0}function v(e){var t;try{e()}catch(e){t=e}return t}function y(e,t,n,i){var r;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(i=n,n=null),r=v(t),i=(n&&n.name?" ("+n.name+").":".")+(i?" "+i:"."),e&&!r&&l(r,n,"Missing expected exception"+i);var a="string"==typeof i,o=!e&&w.isError(r),s=!e&&r&&!n;if((o&&a&&b(r,n)||s)&&l(r,n,"Got unwanted exception"+i),e&&r&&n&&!b(r,n)||!e&&r)throw r}var w=e("util/"),x=Object.prototype.hasOwnProperty,k=Array.prototype.slice,_=function(){return"foo"===function(){}.name}(),j=t.exports=f,S=/\s*function\s+([^\(\s]*)\s*/;j.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=p(this),this.generatedMessage=!0);var t=e.stackStartFunction||l;if(Error.captureStackTrace)Error.captureStackTrace(this,t);else{var n=new Error;if(n.stack){var i=n.stack,r=s(t),a=i.indexOf("\n"+r);if(a>=0){var o=i.indexOf("\n",a+1);i=i.substring(o+1)}this.stack=i}}},w.inherits(j.AssertionError,Error),j.fail=l,j.ok=f,j.equal=function(e,t,n){e!=t&&l(e,t,n,"==",j.equal)},j.notEqual=function(e,t,n){e==t&&l(e,t,n,"!=",j.notEqual)},j.deepEqual=function(e,t,n){h(e,t,!1)||l(e,t,n,"deepEqual",j.deepEqual)},j.deepStrictEqual=function(e,t,n){h(e,t,!0)||l(e,t,n,"deepStrictEqual",j.deepStrictEqual)},j.notDeepEqual=function(e,t,n){h(e,t,!1)&&l(e,t,n,"notDeepEqual",j.notDeepEqual)},j.notDeepStrictEqual=g,j.strictEqual=function(e,t,n){e!==t&&l(e,t,n,"===",j.strictEqual)},j.notStrictEqual=function(e,t,n){e===t&&l(e,t,n,"!==",j.notStrictEqual)},j.throws=function(e,t,n){y(!0,e,t,n)},j.doesNotThrow=function(e,t,n){y(!1,e,t,n)},j.ifError=function(e){if(e)throw e};var E=Object.keys||function(e){var t=[];for(var n in e)x.call(e,n)&&t.push(n);return t}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"util/":253}],3:[function(e,t,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],4:[function(e,t,n){"use strict";var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var i in n)n.hasOwnProperty(i)&&(e[i]=n[i])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,i,r){if(t.subarray&&e.subarray)return void e.set(t.subarray(n,n+i),r);for(var a=0;a>>16&65535|0,o=0;0!==n;){o=n>2e3?2e3:n,n-=o;do r=r+t[i++]|0,a=a+r|0;while(--o);r%=65521,a%=65521}return r|a<<16|0}t.exports=i},{}],6:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],7:[function(e,t,n){"use strict";function i(){for(var e,t=[],n=0;n<256;n++){e=n;for(var i=0;i<8;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}function r(e,t,n,i){var r=a,o=i+n;e^=-1;for(var s=i;s>>8^r[255&(e^t[s])];return e^-1}var a=i();t.exports=r},{}],8:[function(e,t,n){"use strict";function i(e,t){return e.msg=q[t],t}function r(e){return(e<<1)-(e>4?9:0)}function a(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(I.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function s(e,t){O._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function c(e,t){e.pending_buf[e.pending++]=t}function u(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function p(e,t,n,i){var r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,I.arraySet(t,e.input,e.next_in,r,n),1===e.state.wrap?e.adler=D(e.adler,t,r,n):2===e.state.wrap&&(e.adler=M(e.adler,t,r,n)),e.next_in+=r,e.total_in+=r,r)}function l(e,t){var n,i,r=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-le?e.strstart-(e.w_size-le):0,u=e.window,p=e.w_mask,l=e.prev,f=e.strstart+pe,h=u[a+o-1],d=u[a+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do if(n=t,u[n+o]===d&&u[n+o-1]===h&&u[n]===u[a]&&u[++n]===u[a+1]){a+=2,n++;do;while(u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&u[++a]===u[++n]&&ao){if(e.match_start=t,o=i,i>=s)break;h=u[a+o-1],d=u[a+o]}}while((t=l[t&p])>c&&0!==--r);return o<=e.lookahead?o:e.lookahead}function f(e){var t,n,i,r,a,o=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-le)){I.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,n=e.hash_size,t=n;do i=e.head[--t],e.head[t]=i>=o?i-o:0;while(--n);n=o,t=n;do i=e.prev[--t],e.prev[t]=i>=o?i-o:0;while(--n);r+=o}if(0===e.strm.avail_in)break;if(n=p(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=ue)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(f(e),0===e.lookahead&&t===B)return we;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var i=e.block_start+n;if((0===e.strstart||e.strstart>=i)&&(e.lookahead=e.strstart-i,e.strstart=i,s(e,!1),0===e.strm.avail_out))return we;if(e.strstart-e.block_start>=e.w_size-le&&(s(e,!1),0===e.strm.avail_out))return we}return e.insert=0,t===R?(s(e,!0),0===e.strm.avail_out?ke:_e):e.strstart>e.block_start&&(s(e,!1),0===e.strm.avail_out)?we:we}function d(e,t){for(var n,i;;){if(e.lookahead=ue&&(e.ins_h=(e.ins_h<=ue)if(i=O._tr_tally(e,e.strstart-e.match_start,e.match_length-ue),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ue){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=ue&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=ue-1)),e.prev_length>=ue&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-ue,i=O._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ue),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=(e.ins_h<=ue&&e.strstart>0&&(r=e.strstart-1,i=o[r],i===o[++r]&&i===o[++r]&&i===o[++r])){a=e.strstart+pe;do;while(i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&i===o[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ue?(n=O._tr_tally(e,1,e.match_length-ue),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=O._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(s(e,!1),0===e.strm.avail_out))return we}return e.insert=0,t===R?(s(e,!0),0===e.strm.avail_out?ke:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?we:xe}function b(e,t){for(var n;;){if(0===e.lookahead&&(f(e),0===e.lookahead)){if(t===B)return we;break}if(e.match_length=0,n=O._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(s(e,!1),0===e.strm.avail_out))return we}return e.insert=0,t===R?(s(e,!0),0===e.strm.avail_out?ke:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?we:xe}function v(e,t,n,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=r}function y(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=T[e.level].max_lazy,e.good_match=T[e.level].good_length,e.nice_match=T[e.level].nice_length,e.max_chain_length=T[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ue-1,e.match_available=0,e.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Q,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(2*se),this.dyn_dtree=new I.Buf16(2*(2*ae+1)),this.bl_tree=new I.Buf16(2*(2*oe+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(ce+1),this.heap=new I.Buf16(2*re+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*re+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function x(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=$,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?he:ve,e.adler=2===t.wrap?0:1,t.last_flush=B,O._tr_init(t),P):i(e,U)}function k(e){var t=x(e);return t===P&&y(e.state),t}function _(e,t){return e&&e.state?2!==e.state.wrap?U:(e.state.gzhead=t,P):U}function j(e,t,n,r,a,o){if(!e)return U;var s=1;if(t===V&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),a<1||a>Y||n!==Q||r<8||r>15||t<0||t>9||o<0||o>J)return i(e,U);8===r&&(r=9);var c=new w;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=r,c.w_size=1<N||t<0)return e?i(e,U):U;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===ye&&t!==R)return i(e,0===e.avail_out?K:U);if(s.strm=e,n=s.last_flush,s.last_flush=t,s.status===he)if(2===s.wrap)e.adler=0,c(s,31),c(s,139),c(s,8),s.gzhead?(c(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),c(s,255&s.gzhead.time),c(s,s.gzhead.time>>8&255),c(s,s.gzhead.time>>16&255),c(s,s.gzhead.time>>24&255),c(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),c(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(c(s,255&s.gzhead.extra.length),c(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=M(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=de):(c(s,0),c(s,0),c(s,0),c(s,0),c(s,0),c(s,9===s.level?2:s.strategy>=X||s.level<2?4:0),c(s,je),s.status=ve);else{var f=Q+(s.w_bits-8<<4)<<8,h=-1;h=s.strategy>=X||s.level<2?0:s.level<6?1:6===s.level?2:3,f|=h<<6,0!==s.strstart&&(f|=fe),f+=31-f%31,s.status=ve,u(s,f),0!==s.strstart&&(u(s,e.adler>>>16),u(s,65535&e.adler)),e.adler=1}if(s.status===de)if(s.gzhead.extra){for(p=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>p&&(e.adler=M(e.adler,s.pending_buf,s.pending-p,p)),o(e),p=s.pending,s.pending!==s.pending_buf_size));)c(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>p&&(e.adler=M(e.adler,s.pending_buf,s.pending-p,p)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=me)}else s.status=me;if(s.status===me)if(s.gzhead.name){p=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>p&&(e.adler=M(e.adler,s.pending_buf,s.pending-p,p)),o(e),p=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexp&&(e.adler=M(e.adler,s.pending_buf,s.pending-p,p)),0===l&&(s.gzindex=0,s.status=ge)}else s.status=ge;if(s.status===ge)if(s.gzhead.comment){p=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>p&&(e.adler=M(e.adler,s.pending_buf,s.pending-p,p)),o(e),p=s.pending,s.pending===s.pending_buf_size)){l=1;break}l=s.gzindexp&&(e.adler=M(e.adler,s.pending_buf,s.pending-p,p)),0===l&&(s.status=be)}else s.status=be;if(s.status===be&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(c(s,255&e.adler),c(s,e.adler>>8&255),e.adler=0,s.status=ve)):s.status=ve),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,P}else if(0===e.avail_in&&r(t)<=r(n)&&t!==R)return i(e,K);if(s.status===ye&&0!==e.avail_in)return i(e,K);if(0!==e.avail_in||0!==s.lookahead||t!==B&&s.status!==ye){var d=s.strategy===X?b(s,t):s.strategy===W?g(s,t):T[s.level].func(s,t);if(d!==ke&&d!==_e||(s.status=ye),d===we||d===ke)return 0===e.avail_out&&(s.last_flush=-1),P;if(d===xe&&(t===z?O._tr_align(s):t!==N&&(O._tr_stored_block(s,0,0,!1),t===F&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,P}return t!==R?P:s.wrap<=0?L:(2===s.wrap?(c(s,255&e.adler),c(s,e.adler>>8&255),c(s,e.adler>>16&255),c(s,e.adler>>24&255),c(s,255&e.total_in),c(s,e.total_in>>8&255),c(s,e.total_in>>16&255),c(s,e.total_in>>24&255)):(u(s,e.adler>>>16),u(s,65535&e.adler)),o(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?P:L)}function A(e){var t;return e&&e.state?(t=e.state.status,t!==he&&t!==de&&t!==me&&t!==ge&&t!==be&&t!==ve&&t!==ye?i(e,U):(e.state=null,t===ve?i(e,H):P)):U}function C(e,t){var n,i,r,o,s,c,u,p,l=t.length;if(!e||!e.state)return U;if(n=e.state,o=n.wrap,2===o||1===o&&n.status!==he||n.lookahead)return U;for(1===o&&(e.adler=D(e.adler,t,l,0)),n.wrap=0,l>=n.w_size&&(0===o&&(a(n.head),n.strstart=0,n.block_start=0,n.insert=0),p=new I.Buf8(n.w_size),I.arraySet(p,t,l-n.w_size,n.w_size,0),t=p,l=n.w_size),s=e.avail_in,c=e.next_in,u=e.input,e.avail_in=l,e.next_in=0,e.input=t,f(n);n.lookahead>=ue;){i=n.strstart,r=n.lookahead-(ue-1);do n.ins_h=(n.ins_h<>>24,m>>>=k,g-=k,k=x>>>16&255,0===k)C[s++]=65535&x;else{if(!(16&k)){if(0===(64&k)){x=b[(65535&x)+(m&(1<>>=k,g-=k),g<15&&(m+=A[a++]<>>24,m>>>=k,g-=k,k=x>>>16&255,!(16&k)){if(0===(64&k)){x=v[(65535&x)+(m&(1<p){e.msg="invalid distance too far back",n.mode=i;break e}if(m>>>=k,g-=k,k=s-c,j>k){if(k=j-k,k>f&&n.sane){e.msg="invalid distance too far back",n.mode=i;break e}if(S=0,E=d,0===h){if(S+=l-k,k<_){_-=k;do C[s++]=d[S++];while(--k);S=s-j,E=C}}else if(h2;)C[s++]=E[S++],C[s++]=E[S++],C[s++]=E[S++],_-=3;_&&(C[s++]=E[S++],_>1&&(C[s++]=E[S++]))}else{S=s-j;do C[s++]=C[S++],C[s++]=C[S++],C[s++]=C[S++],_-=3;while(_>2);_&&(C[s++]=C[S++],_>1&&(C[s++]=C[S++]))}break}}break}}while(a>3,a-=_,g-=_<<3,m&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new v.Buf16(320),this.work=new v.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new v.Buf32(me),t.distcode=t.distdyn=new v.Buf32(ge),t.sane=1,t.back=-1,T):D}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):D}function s(e,t){var n,i;return e&&e.state?(i=e.state,t<0?(n=0,t=-t):(n=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?D:(null!==i.window&&i.wbits!==t&&(i.window=null),i.wrap=n,i.wbits=t,o(e))):D}function c(e,t){var n,i;return e?(i=new r,e.state=i,i.window=null,n=s(e,t),n!==T&&(e.state=null),n):D}function u(e){return c(e,ve)}function p(e){if(ye){var t;for(g=new v.Buf32(512),b=new v.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(j,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(S,e.lens,0,32,b,0,e.work,{bits:5}),ye=!1}e.lencode=g,e.lenbits=9,e.distcode=b,e.distbits=5}function l(e,t,n,i){var r,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(v.arraySet(a.window,t,n-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(r=a.wsize-a.wnext,r>i&&(r=i),v.arraySet(a.window,t,n-i,r,a.wnext),i-=r,i?(v.arraySet(a.window,t,n-i,i,0),a.wnext=i,a.whave=a.wsize):(a.wnext+=r,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,n.check=w(n.check,Ae,2,0),f=0,h=0,n.mode=R;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",n.mode=fe;break}if((15&f)!==z){e.msg="unknown compression method",n.mode=fe;break}if(f>>>=4,h-=4,ke=(15&f)+8,0===n.wbits)n.wbits=ke;else if(ke>n.wbits){e.msg="invalid window size",n.mode=fe;break}n.dmax=1<>8&1),512&n.flags&&(Ae[0]=255&f,Ae[1]=f>>>8&255,n.check=w(n.check,Ae,2,0)),f=0,h=0,n.mode=N;case N:for(;h<32;){if(0===c)break e;c--,f+=r[o++]<>>8&255,Ae[2]=f>>>16&255,Ae[3]=f>>>24&255,n.check=w(n.check,Ae,4,0)),f=0,h=0,n.mode=P;case P:for(;h<16;){if(0===c)break e;c--,f+=r[o++]<>8),512&n.flags&&(Ae[0]=255&f,Ae[1]=f>>>8&255,n.check=w(n.check,Ae,2,0)),f=0,h=0,n.mode=L;case L:if(1024&n.flags){for(;h<16;){if(0===c)break e;c--,f+=r[o++]<>>8&255,n.check=w(n.check,Ae,2,0)),f=0,h=0}else n.head&&(n.head.extra=null);n.mode=U;case U:if(1024&n.flags&&(g=n.length,g>c&&(g=c),g&&(n.head&&(ke=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),v.arraySet(n.head.extra,r,o,g,ke)),512&n.flags&&(n.check=w(n.check,r,g,o)),c-=g,o+=g,n.length-=g),n.length))break e;n.length=0,n.mode=H;case H:if(2048&n.flags){if(0===c)break e;g=0;do ke=r[o+g++],n.head&&ke&&n.length<65536&&(n.head.name+=String.fromCharCode(ke));while(ke&&g>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=W;break;case G:for(;h<32;){if(0===c)break e;c--,f+=r[o++]<>>=7&h,h-=7&h,n.mode=ue;break}for(;h<3;){if(0===c)break e;c--,f+=r[o++]<>>=1,h-=1,3&f){case 0:n.mode=Z;break;case 1:if(p(n),n.mode=ne,t===C){f>>>=2,h-=2;break e}break;case 2:n.mode=Y;break;case 3:e.msg="invalid block type",n.mode=fe}f>>>=2,h-=2;break;case Z:for(f>>>=7&h,h-=7&h;h<32;){if(0===c)break e;c--,f+=r[o++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=fe;break}if(n.length=65535&f,f=0,h=0,n.mode=$,t===C)break e;case $:n.mode=Q;case Q:if(g=n.length){if(g>c&&(g=c),g>u&&(g=u),0===g)break e;v.arraySet(a,r,o,g,s),c-=g,o+=g,u-=g,s+=g,n.length-=g;break}n.mode=W;break;case Y:for(;h<14;){if(0===c)break e;c--,f+=r[o++]<>>=5,h-=5,n.ndist=(31&f)+1,f>>>=5,h-=5,n.ncode=(15&f)+4,f>>>=4,h-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=fe;break}n.have=0,n.mode=ee;case ee:for(;n.have>>=3,h-=3}for(;n.have<19;)n.lens[Ce[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,je={bits:n.lenbits},_e=k(_,n.lens,0,19,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid code lengths set",n.mode=fe;break}n.have=0,n.mode=te;case te:for(;n.have>>24,be=Ee>>>16&255,ve=65535&Ee,!(ge<=h);){if(0===c)break e;c--,f+=r[o++]<>>=ge,h-=ge,n.lens[n.have++]=ve;else{if(16===ve){for(Se=ge+2;h>>=ge,h-=ge,0===n.have){e.msg="invalid bit length repeat",n.mode=fe;break}ke=n.lens[n.have-1],g=3+(3&f),f>>>=2,h-=2}else if(17===ve){for(Se=ge+3;h>>=ge,h-=ge,ke=0,g=3+(7&f),f>>>=3,h-=3}else{for(Se=ge+7;h>>=ge,h-=ge,ke=0,g=11+(127&f),f>>>=7,h-=7}if(n.have+g>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=fe;break}for(;g--;)n.lens[n.have++]=ke}}if(n.mode===fe)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=fe;break}if(n.lenbits=9,je={bits:n.lenbits},_e=k(j,n.lens,0,n.nlen,n.lencode,0,n.work,je),n.lenbits=je.bits,_e){e.msg="invalid literal/lengths set",n.mode=fe;break}if(n.distbits=6,n.distcode=n.distdyn,je={bits:n.distbits},_e=k(S,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,je),n.distbits=je.bits,_e){e.msg="invalid distances set",n.mode=fe;break}if(n.mode=ne,t===C)break e;case ne:n.mode=ie;case ie:if(c>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=c,n.hold=f,n.bits=h,x(e,m),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,r=e.input,c=e.avail_in,f=n.hold,h=n.bits,n.mode===W&&(n.back=-1);break}for(n.back=0;Ee=n.lencode[f&(1<>>24,be=Ee>>>16&255,ve=65535&Ee,!(ge<=h);){if(0===c)break e;c--,f+=r[o++]<>ye)],ge=Ee>>>24,be=Ee>>>16&255,ve=65535&Ee,!(ye+ge<=h);){if(0===c)break e;c--,f+=r[o++]<>>=ye, +h-=ye,n.back+=ye}if(f>>>=ge,h-=ge,n.back+=ge,n.length=ve,0===be){n.mode=ce;break}if(32&be){n.back=-1,n.mode=W;break}if(64&be){e.msg="invalid literal/length code",n.mode=fe;break}n.extra=15&be,n.mode=re;case re:if(n.extra){for(Se=n.extra;h>>=n.extra,h-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=ae;case ae:for(;Ee=n.distcode[f&(1<>>24,be=Ee>>>16&255,ve=65535&Ee,!(ge<=h);){if(0===c)break e;c--,f+=r[o++]<>ye)],ge=Ee>>>24,be=Ee>>>16&255,ve=65535&Ee,!(ye+ge<=h);){if(0===c)break e;c--,f+=r[o++]<>>=ye,h-=ye,n.back+=ye}if(f>>>=ge,h-=ge,n.back+=ge,64&be){e.msg="invalid distance code",n.mode=fe;break}n.offset=ve,n.extra=15&be,n.mode=oe;case oe:if(n.extra){for(Se=n.extra;h>>=n.extra,h-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=fe;break}n.mode=se;case se:if(0===u)break e;if(g=m-u,n.offset>g){if(g=n.offset-g,g>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=fe;break}g>n.wnext?(g-=n.wnext,b=n.wsize-g):b=n.wnext-g,g>n.length&&(g=n.length),me=n.window}else me=a,b=s-n.offset,g=n.length;g>u&&(g=u),u-=g,n.length-=g;do a[s++]=me[b++];while(--g);0===n.length&&(n.mode=ie);break;case ce:if(0===u)break e;a[s++]=n.length,u--,n.mode=ie;break;case ue:if(n.wrap){for(;h<32;){if(0===c)break e;c--,f|=r[o++]<=1&&0===L[D];D--);if(M>D&&(M=D),0===D)return m[g++]=20971520,m[g++]=20971520,v.bits=1,0;for(O=1;O0&&(e===s||1!==D))return-1;for(U[1]=0,T=1;Ta||e===u&&F>o)return 1;for(var V=0;;){V++,S=T-B,b[I]j?(E=H[K+b[I]],A=N[P+b[I]]):(E=96,A=0),y=1<>B)+w]=S<<24|E<<16|A|0;while(0!==w);for(y=1<>=1;if(0!==y?(R&=y-1,R+=y):R=0,I++,0===--L[T]){if(T===D)break;T=t[n+b[I]]}if(T>M&&(R&k)!==x){for(0===B&&(B=M),_+=O,q=T-B,z=1<a||e===u&&F>o)return 1;x=R&k,m[x]=M<<24|q<<16|_-g|0}}return 0!==R&&(m[_+R]=T-B<<24|64<<16|0),v.bits=M,0}},{"../utils/common":4}],12:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],13:[function(e,t,n){"use strict";function i(e){for(var t=e.length;--t>=0;)e[t]=0}function r(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?ce[e]:ce[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function c(e,t,n){e.bi_valid>J-n?(e.bi_buf|=t<>J-e.bi_valid,e.bi_valid+=n-J):(e.bi_buf|=t<>>=1,n<<=1;while(--t>0);return n>>>1}function l(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function f(e,t){var n,i,r,a,o,s,c=t.dyn_tree,u=t.max_code,p=t.stat_desc.static_tree,l=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,d=t.stat_desc.max_length,m=0;for(a=0;a<=W;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;nd&&(a=d,m++),c[2*i+1]=a,i>u||(e.bl_count[a]++,o=0,i>=h&&(o=f[i-h]),s=c[2*i],e.opt_len+=s*(a+o),l&&(e.static_len+=s*(p[2*i+1]+o)));if(0!==m){do{for(a=d-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[d]--,m-=2}while(m>0);for(a=d;0!==a;a--)for(i=e.bl_count[a];0!==i;)r=e.heap[--n],r>u||(c[2*r+1]!==a&&(e.opt_len+=(a-c[2*r+1])*c[2*r],c[2*r+1]=a),i--)}}function h(e,t,n){var i,r,a=new Array(W+1),o=0;for(i=1;i<=W;i++)a[i]=o=o+n[i-1]<<1;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=p(a[s]++,s))}}function d(){var e,t,n,i,a,o=new Array(W+1);for(n=0,i=0;i>=7;i8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function b(e,t,n,i){g(e),i&&(s(e,n),s(e,~n)),D.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}function v(e,t,n,i){var r=2*t,a=2*n;return e[r]>1;n>=1;n--)y(e,a,n);r=c;do n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),i=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=i,a[2*r]=a[2*n]+a[2*i],e.depth[r]=(e.depth[n]>=e.depth[i]?e.depth[n]:e.depth[i])+1,a[2*n+1]=a[2*i+1]=r,e.heap[1]=r++,y(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],f(e,t),h(a,u,e.bl_count)}function k(e,t,n){var i,r,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++)r=o,o=t[2*(i+1)+1],++s=3&&0===e.bl_tree[2*re[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function S(e,t,n,i){var r;for(c(e,t-257,5),c(e,n-1,5),c(e,i-4,4),r=0;r>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return q;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return B;for(t=32;t0?(e.strm.data_type===z&&(e.strm.data_type=E(e)),x(e,e.l_desc),x(e,e.d_desc),o=j(e),r=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=r&&(r=a)):r=a=n+5,n+4<=r&&t!==-1?C(e,t,n,i):e.strategy===M||a===r?(c(e,(R<<1)+(i?1:0),3),w(e,oe,se)):(c(e,(N<<1)+(i?1:0),3),S(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),w(e,e.dyn_ltree,e.dyn_dtree)),m(e),i&&g(e)}function O(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ue[n]+H+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var D=e("../utils/common"),M=4,q=0,B=1,z=2,F=0,R=1,N=2,P=3,L=258,U=29,H=256,K=H+1+U,V=30,G=19,X=2*K+1,W=15,J=16,Z=7,$=256,Q=16,Y=17,ee=18,te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ne=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ie=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],re=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ae=512,oe=new Array(2*(K+2));i(oe);var se=new Array(2*V);i(se);var ce=new Array(ae);i(ce);var ue=new Array(L-P+1);i(ue);var pe=new Array(U);i(pe);var le=new Array(V);i(le);var fe,he,de,me=!1;n._tr_init=A,n._tr_stored_block=C,n._tr_flush_block=I,n._tr_tally=O,n._tr_align=T},{"../utils/common":4}],14:[function(e,t,n){"use strict";function i(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=i},{}],15:[function(e,t,n){(function(t,i){function r(e){if(en.UNZIP)throw new TypeError("Bad argument");this.mode=e,this.init_done=!1,this.write_in_progress=!1,this.pending_close=!1,this.windowBits=0,this.level=0,this.memLevel=0,this.strategy=0,this.dictionary=null}function a(e,t){for(var n=0;nn.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+e.chunkSize);if(e.windowBits&&(e.windowBitsn.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+e.windowBits);if(e.level&&(e.leveln.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+e.level);if(e.memLevel&&(e.memLeveln.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+e.memLevel);if(e.strategy&&e.strategy!=n.Z_FILTERED&&e.strategy!=n.Z_HUFFMAN_ONLY&&e.strategy!=n.Z_RLE&&e.strategy!=n.Z_FIXED&&e.strategy!=n.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+e.strategy);if(e.dictionary&&!i.isBuffer(e.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._binding=new m.Zlib(t);var r=this;this._hadError=!1,this._binding.onerror=function(e,t){r._binding=null,r._hadError=!0;var i=new Error(e);i.errno=t,i.code=n.codes[t],r.emit("error",i)};var a=n.Z_DEFAULT_COMPRESSION;"number"==typeof e.level&&(a=e.level);var o=n.Z_DEFAULT_STRATEGY;"number"==typeof e.strategy&&(o=e.strategy),this._binding.init(e.windowBits||n.Z_DEFAULT_WINDOWBITS,a,e.memLevel||n.Z_DEFAULT_MEMLEVEL,o,e.dictionary),this._buffer=new i(this._chunkSize),this._offset=0,this._closed=!1,this._level=a,this._strategy=o,this.once("end",this.close)}var d=e("_stream_transform"),m=e("./binding"),g=e("util"),b=e("assert").ok;m.Z_MIN_WINDOWBITS=8,m.Z_MAX_WINDOWBITS=15,m.Z_DEFAULT_WINDOWBITS=15,m.Z_MIN_CHUNK=64,m.Z_MAX_CHUNK=1/0,m.Z_DEFAULT_CHUNK=16384,m.Z_MIN_MEMLEVEL=1,m.Z_MAX_MEMLEVEL=9,m.Z_DEFAULT_MEMLEVEL=8,m.Z_MIN_LEVEL=-1,m.Z_MAX_LEVEL=9,m.Z_DEFAULT_LEVEL=m.Z_DEFAULT_COMPRESSION,Object.keys(m).forEach(function(e){e.match(/^Z/)&&(n[e]=m[e])}),n.codes={Z_OK:m.Z_OK,Z_STREAM_END:m.Z_STREAM_END,Z_NEED_DICT:m.Z_NEED_DICT,Z_ERRNO:m.Z_ERRNO,Z_STREAM_ERROR:m.Z_STREAM_ERROR,Z_DATA_ERROR:m.Z_DATA_ERROR,Z_MEM_ERROR:m.Z_MEM_ERROR,Z_BUF_ERROR:m.Z_BUF_ERROR,Z_VERSION_ERROR:m.Z_VERSION_ERROR},Object.keys(n.codes).forEach(function(e){n.codes[n.codes[e]]=e}),n.Deflate=o,n.Inflate=s,n.Gzip=c,n.Gunzip=u,n.DeflateRaw=p,n.InflateRaw=l,n.Unzip=f,n.createDeflate=function(e){return new o(e)},n.createInflate=function(e){return new s(e)},n.createDeflateRaw=function(e){return new p(e)},n.createInflateRaw=function(e){return new l(e)},n.createGzip=function(e){return new c(e)},n.createGunzip=function(e){return new u(e)},n.createUnzip=function(e){return new f(e)},n.deflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new o(t),e,n)},n.deflateSync=function(e,t){return a(new o(t),e)},n.gzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new c(t),e,n)},n.gzipSync=function(e,t){return a(new c(t),e)},n.deflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new p(t),e,n)},n.deflateRawSync=function(e,t){return a(new p(t),e)},n.unzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new f(t),e,n)},n.unzipSync=function(e,t){return a(new f(t),e)},n.inflate=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new s(t),e,n)},n.inflateSync=function(e,t){return a(new s(t),e)},n.gunzip=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new u(t),e,n)},n.gunzipSync=function(e,t){return a(new u(t),e)},n.inflateRaw=function(e,t,n){return"function"==typeof t&&(n=t,t={}),r(new l(t),e,n)},n.inflateRawSync=function(e,t){return a(new l(t),e)},g.inherits(h,d),h.prototype.params=function(e,i,r){if(en.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+e);if(i!=n.Z_FILTERED&&i!=n.Z_HUFFMAN_ONLY&&i!=n.Z_RLE&&i!=n.Z_FIXED&&i!=n.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+i);if(this._level!==e||this._strategy!==i){var a=this;this.flush(m.Z_SYNC_FLUSH,function(){a._binding.params(e,i),a._hadError||(a._level=e,a._strategy=i,r&&r())})}else t.nextTick(r)},h.prototype.reset=function(){return this._binding.reset()},h.prototype._flush=function(e){this._transform(new i(0),"",e)},h.prototype.flush=function(e,n){var r=this._writableState;if(("function"==typeof e||void 0===e&&!n)&&(n=e,e=m.Z_FULL_FLUSH),r.ended)n&&t.nextTick(n);else if(r.ending)n&&this.once("end",n);else if(r.needDrain){var a=this;this.once("drain",function(){a.flush(n)})}else this._flushFlag=e,this.write(new i(0),"",n)},h.prototype.close=function(e){if(e&&t.nextTick(e),!this._closed){this._closed=!0,this._binding.close();var n=this;t.nextTick(function(){n.emit("close")})}},h.prototype._transform=function(e,t,n){var r,a=this._writableState,o=a.ending||a.ended,s=o&&(!e||a.length===e.length);if(null===!e&&!i.isBuffer(e))return n(new Error("invalid input"));s?r=m.Z_FINISH:(r=this._flushFlag,e.length>=a.length&&(this._flushFlag=this._opts.flush||m.Z_NO_FLUSH));this._processChunk(e,r,n)},h.prototype._processChunk=function(e,t,n){function r(p,h){if(!c._hadError){var d=o-h;if(b(d>=0,"have should not go down"),d>0){var m=c._buffer.slice(c._offset,c._offset+d);c._offset+=d,u?c.push(m):(l.push(m),f+=m.length)}if((0===h||c._offset>=c._chunkSize)&&(o=c._chunkSize,c._offset=0,c._buffer=new i(c._chunkSize)),0===h){if(s+=a-p,a=p,!u)return!0;var g=c._binding.write(t,e,s,a,c._buffer,c._offset,c._chunkSize);return g.callback=r,void(g.buffer=e)}return!!u&&void n()}}var a=e&&e.length,o=this._chunkSize-this._offset,s=0,c=this,u="function"==typeof n;if(!u){var p,l=[],f=0;this.on("error",function(e){p=e});do var h=this._binding.writeSync(t,e,s,a,this._buffer,this._offset,o);while(!this._hadError&&r(h[0],h[1]));if(this._hadError)throw p;var d=i.concat(l,f);return this.close(),d}var m=this._binding.write(t,e,s,a,this._buffer,this._offset,o);m.buffer=e,m.callback=r},g.inherits(o,h),g.inherits(s,h),g.inherits(c,h),g.inherits(u,h),g.inherits(p,h),g.inherits(l,h),g.inherits(f,h)}).call(this,e("_process"),e("buffer").Buffer)},{"./binding":15,_process:219,_stream_transform:238,assert:2,buffer:17,util:253}],17:[function(e,t,n){(function(t){"use strict";function i(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function r(){return o.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function g(e){return+e!=e&&(e=0),o.alloc(+e)}function b(e,t){if(o.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return W(e).length;default:if(i)return V(e).length;t=(""+t).toLowerCase(),i=!0}}function v(e,t,n){var i=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return T(this,t,n);case"ascii":return O(this,t,n);case"latin1":case"binary":return D(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return q(this,t,n);default:if(i)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),i=!0}}function y(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function w(e,t,n,i,r){if(0===e.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=o.from(t,i)),o.isBuffer(t))return 0===t.length?-1:x(e,t,n,i,r);if("number"==typeof t)return t=255&t,o.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):x(e,[t],n,i,r);throw new TypeError("val must be string, number or Buffer")}function x(e,t,n,i,r){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,c=t.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}var u;if(r){var p=-1;for(u=n;us&&(n=s-c),u=n;u>=0;u--){for(var l=!0,f=0;fr&&(i=r)):i=r;var a=t.length;if(a%2!==0)throw new TypeError("Invalid hex string");i>a/2&&(i=a/2);for(var o=0;o239?4:a>223?3:a>191?2:1;if(r+s<=n){var c,u,p,l;switch(s){case 1:a<128&&(o=a);break;case 2:c=e[r+1],128===(192&c)&&(l=(31&a)<<6|63&c,l>127&&(o=l));break;case 3:c=e[r+1],u=e[r+2],128===(192&c)&&128===(192&u)&&(l=(15&a)<<12|(63&c)<<6|63&u,l>2047&&(l<55296||l>57343)&&(o=l));break;case 4:c=e[r+1],u=e[r+2],p=e[r+3],128===(192&c)&&128===(192&u)&&128===(192&p)&&(l=(15&a)<<18|(63&c)<<12|(63&u)<<6|63&p,l>65535&&l<1114112&&(o=l))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,i.push(o>>>10&1023|55296),o=56320|1023&o),i.push(o),r+=s}return I(i)}function I(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var n="",i=0;ii)&&(n=i);for(var r="",a=t;an)throw new RangeError("Trying to access beyond buffer length")}function z(e,t,n,i,r,a){if(!o.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function F(e,t,n,i){t<0&&(t=65535+t+1);for(var r=0,a=Math.min(e.length-n,2);r>>8*(i?r:1-r)}function R(e,t,n,i){t<0&&(t=4294967295+t+1);for(var r=0,a=Math.min(e.length-n,4);r>>8*(i?r:3-r)&255}function N(e,t,n,i,r,a){if(n+i>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function P(e,t,n,i,r){return r||N(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Q.write(e,t,n,i,23,4),n+4}function L(e,t,n,i,r){return r||N(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Q.write(e,t,n,i,52,8),n+8}function U(e){if(e=H(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function H(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function K(e){return e<16?"0"+e.toString(16):e.toString(16)}function V(e,t){t=t||1/0;for(var n,i=e.length,r=null,a=[],o=0;o55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),r=n;continue}n=(r-55296<<10|n-56320)+65536}else r&&(t-=3)>-1&&a.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function G(e){for(var t=[],n=0;n>8,r=n%256,a.push(r),a.push(i);return a}function W(e){return $.toByteArray(U(e)); +}function J(e,t,n,i){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}function Z(e){return e!==e}var $=e("base64-js"),Q=e("ieee754"),Y=e("isarray");n.Buffer=o,n.SlowBuffer=g,n.INSPECT_MAX_BYTES=50,o.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:i(),n.kMaxLength=r(),o.poolSize=8192,o._augment=function(e){return e.__proto__=o.prototype,e},o.from=function(e,t,n){return s(null,e,t,n)},o.TYPED_ARRAY_SUPPORT&&(o.prototype.__proto__=Uint8Array.prototype,o.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&o[Symbol.species]===o&&Object.defineProperty(o,Symbol.species,{value:null,configurable:!0})),o.alloc=function(e,t,n){return u(null,e,t,n)},o.allocUnsafe=function(e){return p(null,e)},o.allocUnsafeSlow=function(e){return p(null,e)},o.isBuffer=function(e){return!(null==e||!e._isBuffer)},o.compare=function(e,t){if(!o.isBuffer(e)||!o.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,r=0,a=Math.min(n,i);r0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},o.prototype.compare=function(e,t,n,i,r){if(!o.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),t<0||n>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&t>=n)return 0;if(i>=r)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var a=r-i,s=n-t,c=Math.min(a,s),u=this.slice(i,r),p=e.slice(t,n),l=0;lr)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var a=!1;;)switch(i){case"hex":return k(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return j(this,e,t,n);case"latin1":case"binary":return S(this,e,t,n);case"base64":return E(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,n);default:if(a)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),a=!0}},o.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;o.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),t0&&(r*=256);)i+=this[e+--t]*r;return i},o.prototype.readUInt8=function(e,t){return t||B(e,1,this.length),this[e]},o.prototype.readUInt16LE=function(e,t){return t||B(e,2,this.length),this[e]|this[e+1]<<8},o.prototype.readUInt16BE=function(e,t){return t||B(e,2,this.length),this[e]<<8|this[e+1]},o.prototype.readUInt32LE=function(e,t){return t||B(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},o.prototype.readUInt32BE=function(e,t){return t||B(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},o.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||B(e,t,this.length);for(var i=this[e],r=1,a=0;++a=r&&(i-=Math.pow(2,8*t)),i},o.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||B(e,t,this.length);for(var i=t,r=1,a=this[e+--i];i>0&&(r*=256);)a+=this[e+--i]*r;return r*=128,a>=r&&(a-=Math.pow(2,8*t)),a},o.prototype.readInt8=function(e,t){return t||B(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},o.prototype.readInt16LE=function(e,t){t||B(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt16BE=function(e,t){t||B(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},o.prototype.readInt32LE=function(e,t){return t||B(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},o.prototype.readInt32BE=function(e,t){return t||B(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},o.prototype.readFloatLE=function(e,t){return t||B(e,4,this.length),Q.read(this,e,!0,23,4)},o.prototype.readFloatBE=function(e,t){return t||B(e,4,this.length),Q.read(this,e,!1,23,4)},o.prototype.readDoubleLE=function(e,t){return t||B(e,8,this.length),Q.read(this,e,!0,52,8)},o.prototype.readDoubleBE=function(e,t){return t||B(e,8,this.length),Q.read(this,e,!1,52,8)},o.prototype.writeUIntLE=function(e,t,n,i){if(e=+e,t=0|t,n=0|n,!i){var r=Math.pow(2,8*n)-1;z(this,e,t,n,r,0)}var a=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+a]=e/o&255;return t+n},o.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,1,255,0),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},o.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},o.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,2,65535,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},o.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):R(this,e,t,!0),t+4},o.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,4,4294967295,0),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},o.prototype.writeIntLE=function(e,t,n,i){if(e=+e,t=0|t,!i){var r=Math.pow(2,8*n-1);z(this,e,t,n,r-1,-r)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+n},o.prototype.writeIntBE=function(e,t,n,i){if(e=+e,t=0|t,!i){var r=Math.pow(2,8*n-1);z(this,e,t,n,r-1,-r)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},o.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,1,127,-128),o.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},o.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},o.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,2,32767,-32768),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},o.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,4,2147483647,-2147483648),o.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):R(this,e,t,!0),t+4},o.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||z(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),o.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):R(this,e,t,!1),t+4},o.prototype.writeFloatLE=function(e,t,n){return P(this,e,t,!0,n)},o.prototype.writeFloatBE=function(e,t,n){return P(this,e,t,!1,n)},o.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},o.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},o.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(a<1e3||!o.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function r(e){return 3*e.length/4-i(e)}function a(e){var t,n,r,a,o,s,c=e.length;o=i(e),s=new l(3*c/4-o),r=o>0?c-4:c;var u=0;for(t=0,n=0;t>16&255,s[u++]=a>>8&255,s[u++]=255&a;return 2===o?(a=p[e.charCodeAt(t)]<<2|p[e.charCodeAt(t+1)]>>4,s[u++]=255&a):1===o&&(a=p[e.charCodeAt(t)]<<10|p[e.charCodeAt(t+1)]<<4|p[e.charCodeAt(t+2)]>>2,s[u++]=a>>8&255,s[u++]=255&a),s}function o(e){return u[e>>18&63]+u[e>>12&63]+u[e>>6&63]+u[63&e]}function s(e,t,n){for(var i,r=[],a=t;ap?p:c+o));return 1===i?(t=e[n-1],r+=u[t>>2],r+=u[t<<4&63],r+="=="):2===i&&(t=(e[n-2]<<8)+e[n-1],r+=u[t>>10],r+=u[t>>4&63],r+=u[t<<2&63],r+="="),a.push(r),a.join("")}n.byteLength=r,n.toByteArray=a,n.fromByteArray=c;for(var u=[],p=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,d=f.length;h>1,p=-7,l=n?r-1:0,f=n?-1:1,h=e[t+l];for(l+=f,a=h&(1<<-p)-1,h>>=-p,p+=s;p>0;a=256*a+e[t+l],l+=f,p-=8);for(o=a&(1<<-p)-1,a>>=-p,p+=i;p>0;o=256*o+e[t+l],l+=f,p-=8);if(0===a)a=1-u;else{if(a===c)return o?NaN:(h?-1:1)*(1/0);o+=Math.pow(2,i),a-=u}return(h?-1:1)*o*Math.pow(2,a-i)},n.write=function(e,t,n,i,r,a){var o,s,c,u=8*a-r-1,p=(1<>1,f=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,h=i?0:a-1,d=i?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=p):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),t+=o+l>=1?f/c:f*Math.pow(2,1-l),t*c>=2&&(o++,c/=2),o+l>=p?(s=0,o=p):o+l>=1?(s=(t*c-1)*Math.pow(2,r),o+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,r),o=0));r>=8;e[n+h]=255&s,h+=d,s/=256,r-=8);for(o=o<0;e[n+h]=255&o,h+=d,o/=256,u-=8);e[n+h-d]|=128*m}},{}],20:[function(e,t,n){var i={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==i.call(e)}},{}],21:[function(e,t,n){"use strict";n.randomBytes=n.rng=n.pseudoRandomBytes=n.prng=e("randombytes"),n.createHash=n.Hash=e("create-hash"),n.createHmac=n.Hmac=e("create-hmac");var i=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(Object.keys(e("browserify-sign/algos")));n.getHashes=function(){return i};var r=e("pbkdf2");n.pbkdf2=r.pbkdf2,n.pbkdf2Sync=r.pbkdf2Sync;var a=e("browserify-cipher");["Cipher","createCipher","Cipheriv","createCipheriv","Decipher","createDecipher","Decipheriv","createDecipheriv","getCiphers","listCiphers"].forEach(function(e){n[e]=a[e]});var o=e("diffie-hellman");["DiffieHellmanGroup","createDiffieHellmanGroup","getDiffieHellman","createDiffieHellman","DiffieHellman"].forEach(function(e){n[e]=o[e]});var s=e("browserify-sign");["createSign","Sign","createVerify","Verify"].forEach(function(e){n[e]=s[e]}),n.createECDH=e("create-ecdh");var c=e("public-encrypt");["publicEncrypt","privateEncrypt","publicDecrypt","privateDecrypt"].forEach(function(e){n[e]=c[e]}),["createCredentials"].forEach(function(e){n[e]=function(){throw new Error(["sorry, "+e+" is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))}})},{"browserify-cipher":22,"browserify-sign":52,"browserify-sign/algos":51,"create-ecdh":119,"create-hash":145,"create-hmac":158,"diffie-hellman":159,pbkdf2:166,"public-encrypt":168,randombytes:213}],22:[function(e,t,n){function i(e,t){var n,i;if(e=e.toLowerCase(),f[e])n=f[e].key,i=f[e].iv;else{if(!l[e])throw new TypeError("invalid suite type");n=8*l[e].key,i=l[e].iv}var r=c(t,!1,n,i);return a(e,r.key,r.iv)}function r(e,t){var n,i;if(e=e.toLowerCase(),f[e])n=f[e].key,i=f[e].iv;else{if(!l[e])throw new TypeError("invalid suite type");n=8*l[e].key,i=l[e].iv}var r=c(t,!1,n,i);return o(e,r.key,r.iv)}function a(e,t,n){if(e=e.toLowerCase(),f[e])return u.createCipheriv(e,t,n);if(l[e])return new p({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function o(e,t,n){if(e=e.toLowerCase(),f[e])return u.createDecipheriv(e,t,n);if(l[e])return new p({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}function s(){return Object.keys(l).concat(u.getCiphers())}var c=e("evp_bytestokey"),u=e("browserify-aes/browser"),p=e("browserify-des"),l=e("browserify-des/modes"),f=e("browserify-aes/modes");n.createCipher=n.Cipher=i,n.createCipheriv=n.Cipheriv=a,n.createDecipher=n.Decipher=r,n.createDecipheriv=n.Decipheriv=o,n.listCiphers=n.getCiphers=s},{"browserify-aes/browser":25,"browserify-aes/modes":29,"browserify-des":40,"browserify-des/modes":41,evp_bytestokey:50}],23:[function(e,t,n){(function(e){function t(e){var t,n;return t=e>s||e<0?(n=Math.abs(e)%s,e<0?s-n:n):e}function i(e){for(var t=0;t>>8^255&n^99,this.SBOX[r]=n,this.INV_SBOX[n]=r,a=e[r],o=e[a],s=e[o],i=257*e[n]^16843008*n,this.SUB_MIX[0][r]=i<<24|i>>>8,this.SUB_MIX[1][r]=i<<16|i>>>16,this.SUB_MIX[2][r]=i<<8|i>>>24,this.SUB_MIX[3][r]=i,i=16843009*s^65537*o^257*a^16843008*r,this.INV_SUB_MIX[0][n]=i<<24|i>>>8,this.INV_SUB_MIX[1][n]=i<<16|i>>>16,this.INV_SUB_MIX[2][n]=i<<8|i>>>24,this.INV_SUB_MIX[3][n]=i,0===r?r=c=1:(r=a^e[e[e[s^a]]],c^=e[e[c]]);return!0};var c=new r;o.blockSize=16,o.prototype.blockSize=o.blockSize,o.keySize=32,o.prototype.keySize=o.keySize,o.prototype._doReset=function(){var e,t,n,i,r,a;for(n=this._key,t=n.length,this._nRounds=t+6,r=4*(this._nRounds+1),this._keySchedule=[],i=0;i>>24,a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a],a^=c.RCON[i/t|0]<<24):t>6&&i%t===4?a=c.SBOX[a>>>24]<<24|c.SBOX[a>>>16&255]<<16|c.SBOX[a>>>8&255]<<8|c.SBOX[255&a]:void 0,this._keySchedule[i-t]^a);for(this._invKeySchedule=[],e=0;e>>24]]^c.INV_SUB_MIX[1][c.SBOX[a>>>16&255]]^c.INV_SUB_MIX[2][c.SBOX[a>>>8&255]]^c.INV_SUB_MIX[3][c.SBOX[255&a]];return!0},o.prototype.encryptBlock=function(t){t=a(new e(t));var n=this._doCryptBlock(t,this._keySchedule,c.SUB_MIX,c.SBOX),i=new e(16);return i.writeUInt32BE(n[0],0),i.writeUInt32BE(n[1],4),i.writeUInt32BE(n[2],8),i.writeUInt32BE(n[3],12),i},o.prototype.decryptBlock=function(t){t=a(new e(t));var n=[t[3],t[1]];t[1]=n[0],t[3]=n[1];var i=this._doCryptBlock(t,this._invKeySchedule,c.INV_SUB_MIX,c.INV_SBOX),r=new e(16);return r.writeUInt32BE(i[0],0),r.writeUInt32BE(i[3],4),r.writeUInt32BE(i[2],8),r.writeUInt32BE(i[1],12),r},o.prototype.scrub=function(){i(this._keySchedule),i(this._invKeySchedule),i(this._key)},o.prototype._doCryptBlock=function(e,n,i,r){var a,o,s,c,u,p,l,f,h;o=e[0]^n[0],s=e[1]^n[1],c=e[2]^n[2],u=e[3]^n[3],a=4;for(var d=1;d>>24]^i[1][s>>>16&255]^i[2][c>>>8&255]^i[3][255&u]^n[a++],l=i[0][s>>>24]^i[1][c>>>16&255]^i[2][u>>>8&255]^i[3][255&o]^n[a++],f=i[0][c>>>24]^i[1][u>>>16&255]^i[2][o>>>8&255]^i[3][255&s]^n[a++],h=i[0][u>>>24]^i[1][o>>>16&255]^i[2][s>>>8&255]^i[3][255&c]^n[a++],o=p,s=l,c=f,u=h;return p=(r[o>>>24]<<24|r[s>>>16&255]<<16|r[c>>>8&255]<<8|r[255&u])^n[a++],l=(r[s>>>24]<<24|r[c>>>16&255]<<16|r[u>>>8&255]<<8|r[255&o])^n[a++],f=(r[c>>>24]<<24|r[u>>>16&255]<<16|r[o>>>8&255]<<8|r[255&s])^n[a++],h=(r[u>>>24]<<24|r[o>>>16&255]<<16|r[s>>>8&255]<<8|r[255&c])^n[a++],[t(p),t(l),t(f),t(h)]},n.AES=o}).call(this,e("buffer").Buffer)},{buffer:17}],24:[function(e,t,n){(function(n){function i(e,t,r,s){if(!(this instanceof i))return new i(e,t,r);o.call(this),this._finID=n.concat([r,new n([0,0,0,1])]),r=n.concat([r,new n([0,0,0,2])]),this._cipher=new a.AES(t),this._prev=new n(r.length),this._cache=new n(""),this._secCache=new n(""),this._decrypt=s,this._alen=0,this._len=0,r.copy(this._prev),this._mode=e;var u=new n(4);u.fill(0),this._ghash=new c(this._cipher.encryptBlock(u)),this._authTag=null,this._called=!1}function r(e,t){var n=0;e.length!==t.length&&n++;for(var i=Math.min(e.length,t.length),r=-1;++r16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},r.prototype.flush=function(){if(this.cache.length)return this.cache};var m={ECB:e("./modes/ecb"),CBC:e("./modes/cbc"),CFB:e("./modes/cfb"),CFB8:e("./modes/cfb8"),CFB1:e("./modes/cfb1"),OFB:e("./modes/ofb"),CTR:e("./modes/ctr"),GCM:e("./modes/ctr")};n.createDecipher=s,n.createDecipheriv=o}).call(this,e("buffer").Buffer)},{"./aes":23,"./authCipher":24,"./modes":29,"./modes/cbc":30,"./modes/cfb":31,"./modes/cfb1":32,"./modes/cfb8":33,"./modes/ctr":34,"./modes/ecb":35,"./modes/ofb":36,"./streamCipher":39,buffer:17,"cipher-base":38,evp_bytestokey:50,inherits:216}],27:[function(e,t,n){(function(t){function i(e,n,a){return this instanceof i?(c.call(this),this._cache=new r,this._cipher=new s.AES(n),this._prev=new t(a.length),a.copy(this._prev),this._mode=e,void(this._autopadding=!0)):new i(e,n,a)}function r(){return this instanceof r?void(this.cache=new t("")):new r}function a(e,n,r){var a=p[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=new t(r)),"string"==typeof n&&(n=new t(n)),n.length!==a.key/8)throw new TypeError("invalid key length "+n.length);if(r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new f(d[a.mode],n,r):"auth"===a.type?new h(d[a.mode],n,r):new i(d[a.mode],n,r)}function o(e,t){var n=p[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var i=l(t,!1,n.key,n.iv);return a(e,i.key,i.iv)}var s=e("./aes"),c=e("cipher-base"),u=e("inherits"),p=e("./modes"),l=e("evp_bytestokey"),f=e("./streamCipher"),h=e("./authCipher");u(i,c),i.prototype._update=function(e){this._cache.add(e);for(var n,i,r=[];n=this._cache.get();)i=this._mode.encrypt(this,n),r.push(i);return t.concat(r)},i.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if("10101010101010101010101010101010"!==e.toString("hex"))throw this._cipher.scrub(),new Error("data not multiple of block length")},i.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},r.prototype.add=function(e){this.cache=t.concat([this.cache,e])},r.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},r.prototype.flush=function(){for(var e=16-this.cache.length,n=new t(e),i=-1;++ic||e<0?(n=Math.abs(e)%c,e<0?c-n:n):e}function o(e,t){return[e[0]^t[0],e[1]^t[1],e[2]^t[2],e[3]^t[3]]}var s=new e(16);s.fill(0),t.exports=n,n.prototype.ghash=function(e){for(var t=-1;++t0;e--)a[e]=a[e]>>>1|(1&a[e-1])<<31;a[0]=a[0]>>>1,n&&(a[0]=a[0]^225<<24)}this.state=r(s)},n.prototype.update=function(t){this.cache=e.concat([this.cache,t]);for(var n;this.cache.length>=16;)n=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(n)},n.prototype.final=function(t,n){return this.cache.length&&this.ghash(e.concat([this.cache,s],16)),this.ghash(r([0,t,0,n])),this.state};var c=Math.pow(2,32)}).call(this,e("buffer").Buffer)},{buffer:17}],29:[function(e,t,n){n["aes-128-ecb"]={cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},n["aes-192-ecb"]={cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},n["aes-256-ecb"]={cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},n["aes-128-cbc"]={cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},n["aes-192-cbc"]={cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},n["aes-256-cbc"]={cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},n.aes128=n["aes-128-cbc"],n.aes192=n["aes-192-cbc"],n.aes256=n["aes-256-cbc"],n["aes-128-cfb"]={cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},n["aes-192-cfb"]={cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},n["aes-256-cfb"]={cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},n["aes-128-cfb8"]={cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},n["aes-192-cfb8"]={cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},n["aes-256-cfb8"]={cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},n["aes-128-cfb1"]={cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},n["aes-192-cfb1"]={cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},n["aes-256-cfb1"]={cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},n["aes-128-ofb"]={cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},n["aes-192-ofb"]={cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},n["aes-256-ofb"]={cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},n["aes-128-ctr"]={cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},n["aes-192-ctr"]={cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},n["aes-256-ctr"]={cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},n["aes-128-gcm"]={cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},n["aes-192-gcm"]={cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},n["aes-256-gcm"]={cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}},{}],30:[function(e,t,n){var i=e("buffer-xor");n.encrypt=function(e,t){var n=i(t,e._prev);return e._prev=e._cipher.encryptBlock(n),e._prev},n.decrypt=function(e,t){var n=e._prev;e._prev=t;var r=e._cipher.decryptBlock(t);return i(r,n)}},{"buffer-xor":37}],31:[function(e,t,n){(function(t){function i(e,n,i){var a=n.length,o=r(n,e._cache);return e._cache=e._cache.slice(a),e._prev=t.concat([e._prev,i?n:o]),o}var r=e("buffer-xor");n.encrypt=function(e,n,r){for(var a,o=new t("");n.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=new t("")),!(e._cache.length<=n.length)){o=t.concat([o,i(e,n,r)]);break}a=e._cache.length,o=t.concat([o,i(e,n.slice(0,a),r)]),n=n.slice(a)}return o}}).call(this,e("buffer").Buffer)},{buffer:17,"buffer-xor":37}],32:[function(e,t,n){(function(e){function t(e,t,n){for(var r,a,o,s=-1,c=8,u=0;++s>s%8,e._prev=i(e._prev,n?a:o);return u}function i(t,n){var i=t.length,r=-1,a=new e(t.length);for(t=e.concat([t,new e([n])]);++r>7;return a}n.encrypt=function(n,i,r){for(var a=i.length,o=new e(a),s=-1;++s0;i--)t+=this._buffer(e,t),n+=this._flushBuffer(r,n);return t+=this._buffer(e,t),r},i.prototype.final=function(e){var t;e&&(t=this.update(e));var n;return n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t>>1];n=c.r28shl(n,o),i=c.r28shl(i,o),c.pc2(n,i,e.keys,r)}},r.prototype._update=function(e,t,n,i){var r=this._desState,a=c.readUInt32BE(e,t),o=c.readUInt32BE(e,t+4);c.ip(a,o,r.tmp,0),a=r.tmp[0],o=r.tmp[1],"encrypt"===this.type?this._encrypt(r,a,o,r.tmp,0):this._decrypt(r,a,o,r.tmp,0),a=r.tmp[0],o=r.tmp[1],c.writeUInt32BE(n,a,i),c.writeUInt32BE(n,o,i+4)},r.prototype._pad=function(e,t){for(var n=e.length-t,i=t;i>>0,a=h}c.rip(o,a,i,r)},r.prototype._decrypt=function(e,t,n,i,r){for(var a=n,o=t,s=e.keys.length-2;s>=0;s-=2){var u=e.keys[s],p=e.keys[s+1];c.expand(a,e.tmp,0),u^=e.tmp[0],p^=e.tmp[1];var l=c.substitute(u,p),f=c.permute(l),h=a;a=(o^f)>>>0,o=h}c.rip(a,o,i,r)}},{"../des":43,inherits:216,"minimalistic-assert":49}],47:[function(e,t,n){"use strict";function i(e,t){a.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16),r=t.slice(16,24);"encrypt"===e?this.ciphers=[u.create({type:"encrypt",key:n}),u.create({type:"decrypt",key:i}),u.create({type:"encrypt",key:r})]:this.ciphers=[u.create({type:"decrypt",key:r}),u.create({type:"encrypt",key:i}),u.create({type:"decrypt",key:n})]}function r(e){c.call(this,e);var t=new i(this.type,this.options.key);this._edeState=t}var a=e("minimalistic-assert"),o=e("inherits"),s=e("../des"),c=s.Cipher,u=s.DES;o(r,c),t.exports=r,r.create=function(e){return new r(e)},r.prototype._update=function(e,t,n,i){var r=this._edeState;r.ciphers[0]._update(e,t,n,i),r.ciphers[1]._update(n,i,n,i),r.ciphers[2]._update(n,i,n,i)},r.prototype._pad=u.prototype._pad,r.prototype._unpad=u.prototype._unpad},{"../des":43,inherits:216,"minimalistic-assert":49}],48:[function(e,t,n){"use strict";n.readUInt32BE=function(e,t){var n=e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t];return n>>>0},n.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},n.ip=function(e,t,n,i){for(var r=0,a=0,o=6;o>=0;o-=2){for(var s=0;s<=24;s+=8)r<<=1,r|=t>>>s+o&1;for(var s=0;s<=24;s+=8)r<<=1,r|=e>>>s+o&1}for(var o=6;o>=0;o-=2){for(var s=1;s<=25;s+=8)a<<=1,a|=t>>>s+o&1;for(var s=1;s<=25;s+=8)a<<=1,a|=e>>>s+o&1}n[i+0]=r>>>0,n[i+1]=a>>>0},n.rip=function(e,t,n,i){for(var r=0,a=0,o=0;o<4;o++)for(var s=24;s>=0;s-=8)r<<=1,r|=t>>>s+o&1,r<<=1,r|=e>>>s+o&1;for(var o=4;o<8;o++)for(var s=24;s>=0;s-=8)a<<=1,a|=t>>>s+o&1,a<<=1,a|=e>>>s+o&1;n[i+0]=r>>>0,n[i+1]=a>>>0},n.pc1=function(e,t,n,i){for(var r=0,a=0,o=7;o>=5;o--){for(var s=0;s<=24;s+=8)r<<=1,r|=t>>s+o&1;for(var s=0;s<=24;s+=8)r<<=1,r|=e>>s+o&1}for(var s=0;s<=24;s+=8)r<<=1,r|=t>>s+o&1;for(var o=1;o<=3;o++){for(var s=0;s<=24;s+=8)a<<=1,a|=t>>s+o&1;for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1}for(var s=0;s<=24;s+=8)a<<=1,a|=e>>s+o&1;n[i+0]=r>>>0,n[i+1]=a>>>0},n.r28shl=function(e,t){return e<>>28-t};var i=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];n.pc2=function(e,t,n,r){for(var a=0,o=0,s=i.length>>>1,c=0;c>>i[c]&1;for(var c=s;c>>i[c]&1;n[r+0]=a>>>0,n[r+1]=o>>>0},n.expand=function(e,t,n){var i=0,r=0;i=(1&e)<<5|e>>>27;for(var a=23;a>=15;a-=4)i<<=6,i|=e>>>a&63;for(var a=11;a>=3;a-=4)r|=e>>>a&63,r<<=6;r|=(31&e)<<1|e>>>31,t[n+0]=i>>>0,t[n+1]=r>>>0};var r=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];n.substitute=function(e,t){for(var n=0,i=0;i<4;i++){var a=e>>>18-6*i&63,o=r[64*i+a];n<<=4,n|=o}for(var i=0;i<4;i++){var a=t>>>18-6*i&63,o=r[256+64*i+a];n<<=4,n|=o}return n>>>0};var a=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];n.permute=function(e){for(var t=0,n=0;n>>a[n]&1;return t>>>0},n.padSplit=function(e,t,n){for(var i=e.toString(2);i.length0&&h.push(o),h.push(e),t&&h.push(t),o=r(n.concat(h)),h=[],s=0,i>0)for(;;){if(0===i)break;if(s===o.length)break;p[c++]=o[s],i--,s++}if(a>0&&s!==o.length)for(;;){if(0===a)break;if(s===o.length)break;l[u++]=o[s],a--,s++}if(0===i&&0===a)break}for(s=0;s=49&&o<=54?o-49+10:o>=17&&o<=22?o-17+10:15&o}return i}function s(e,t,n,i){for(var r=0,a=Math.min(e.length,n),o=t;o=49?s-49+10:s>=17?s-17+10:s}return r}function c(e){for(var t=new Array(e.bitLength()),n=0;n>>r}return t}function u(e,t,n){n.negative=t.negative^e.negative;var i=e.length+t.length|0;n.length=i,i=i-1|0;var r=0|e.words[0],a=0|t.words[0],o=r*a,s=67108863&o,c=o/67108864|0;n.words[0]=s;for(var u=1;u>>26,l=67108863&c,f=Math.min(u,t.length-1),h=Math.max(0,u-e.length+1);h<=f;h++){var d=u-h|0;r=0|e.words[d],a=0|t.words[h],o=r*a+l,p+=o/67108864|0,l=67108863&o}n.words[u]=0|l,c=0|p}return 0!==c?n.words[u]=0|c:n.length--,n.strip()}function p(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var i=0,r=0,a=0;a>>26)|0,r+=o>>>26,o&=67108863}n.words[a]=s,i=o,o=r}return 0!==i?n.words[a]=i:n.length--,n.strip()}function l(e,t,n){var i=new f;return i.mulp(e,t,n)}function f(e,t){this.x=e,this.y=t}function h(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function d(){h.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function m(){h.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function g(){h.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function b(){h.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function v(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function y(e){v.call(this,e),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}"object"==typeof t?t.exports=a:n.BN=a,a.BN=a,a.wordSize=26;var w;try{w=e("buffer").Buffer}catch(e){}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return e.cmp(t)<0?e:t},a.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"==typeof e)return this._initArray(e,t,n);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36),e=e.toString().replace(/\s+/g,"");var r=0;"-"===e[0]&&r++,16===t?this._parseHex(e,r):this._parseBase(e,t,r),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(i(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},a.prototype._initArray=function(e,t,n){if(i("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r=0;r-=3)o=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[a]|=o<>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);else if("le"===n)for(r=0,a=0;r>>26-s&67108863,s+=24,s>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=6)r=o(e,n,n+6),this.words[i]|=r<>>26-a&4194303,a+=24,a>=26&&(a-=26,i++);n+6!==t&&(r=o(e,t,n+6),this.words[i]|=r<>>26-a&4194303),this.strip()},a.prototype._parseBase=function(e,t,n){this.words=[0],this.length=1;for(var i=0,r=1;r<=67108863;r*=t)i++;i--,r=r/t|0;for(var a=e.length-n,o=a%i,c=Math.min(a,a-o)+n,u=0,p=n;p1&&0===this.words[this.length-1];)this.length--;return this._normSign()},a.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},a.prototype.inspect=function(){return(this.red?""};var x=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],k=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];a.prototype.toString=function(e,t){e=e||10,t=0|t||1;var n;if(16===e||"hex"===e){n="";for(var r=0,a=0,o=0;o>>24-r&16777215,n=0!==a||o!==this.length-1?x[6-c.length]+c+n:c+n,r+=2,r>=26&&(r-=26,o--)}for(0!==a&&(n=a.toString(16)+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}if(e===(0|e)&&e>=2&&e<=36){var u=k[e],p=_[e];n="";var l=this.clone();for(l.negative=0;!l.isZero();){var f=l.modn(p).toString(e);l=l.idivn(p),n=l.isZero()?f+n:x[u-f.length]+f+n}for(this.isZero()&&(n="0"+n);n.length%t!==0;)n="0"+n;return 0!==this.negative&&(n="-"+n),n}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i("undefined"!=typeof w),this.toArrayLike(w,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,n){var r=this.byteLength(),a=n||Math.max(1,r);i(r<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,c="le"===t,u=new e(a),p=this.clone();if(c){for(s=0;!p.isZero();s++)o=p.andln(255),p.iushrn(8),u[s]=o;for(;s=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0===(8191&t)&&(n+=13,t>>>=13),0===(127&t)&&(n+=7,t>>>=7),0===(15&t)&&(n+=4,t>>>=4),0===(3&t)&&(n+=2,t>>>=2),0===(1&t)&&n++,n},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var n=0;ne.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,n;this.length>e.length?(t=this,n=e):(t=e,n=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var r=0;r0&&(this.words[r]=~this.words[r]&67108863>>26-n),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var n=e/26|0,r=e%26;return this._expand(n+1),t?this.words[n]=this.words[n]|1<e.length?(n=this,i=e):(n=e,i=this);for(var r=0,a=0;a>>26;for(;0!==r&&a>>26;if(this.length=n.length,0!==r)this.words[this.length]=r,this.length++;else if(n!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;var i,r;n>0?(i=this,r=e):(i=e,r=this);for(var a=0,o=0;o>26,this.words[o]=67108863&t;for(;0!==a&&o>26,this.words[o]=67108863&t;if(0===a&&o>>13,h=0|o[1],d=8191&h,m=h>>>13,g=0|o[2],b=8191&g,v=g>>>13,y=0|o[3],w=8191&y,x=y>>>13,k=0|o[4],_=8191&k,j=k>>>13,S=0|o[5],E=8191&S,A=S>>>13,C=0|o[6],T=8191&C,I=C>>>13,O=0|o[7],D=8191&O,M=O>>>13,q=0|o[8],B=8191&q,z=q>>>13,F=0|o[9],R=8191&F,N=F>>>13,P=0|s[0],L=8191&P,U=P>>>13,H=0|s[1],K=8191&H,V=H>>>13,G=0|s[2],X=8191&G,W=G>>>13,J=0|s[3],Z=8191&J,$=J>>>13,Q=0|s[4],Y=8191&Q,ee=Q>>>13,te=0|s[5],ne=8191&te,ie=te>>>13,re=0|s[6],ae=8191&re,oe=re>>>13,se=0|s[7],ce=8191&se,ue=se>>>13,pe=0|s[8],le=8191&pe,fe=pe>>>13,he=0|s[9],de=8191&he,me=he>>>13;n.negative=e.negative^t.negative,n.length=19,i=Math.imul(l,L),r=Math.imul(l,U),r=r+Math.imul(f,L)|0,a=Math.imul(f,U);var ge=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(ge>>>26)|0,ge&=67108863,i=Math.imul(d,L),r=Math.imul(d,U),r=r+Math.imul(m,L)|0,a=Math.imul(m,U),i=i+Math.imul(l,K)|0,r=r+Math.imul(l,V)|0,r=r+Math.imul(f,K)|0,a=a+Math.imul(f,V)|0;var be=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(be>>>26)|0,be&=67108863,i=Math.imul(b,L),r=Math.imul(b,U),r=r+Math.imul(v,L)|0,a=Math.imul(v,U),i=i+Math.imul(d,K)|0,r=r+Math.imul(d,V)|0,r=r+Math.imul(m,K)|0,a=a+Math.imul(m,V)|0,i=i+Math.imul(l,X)|0,r=r+Math.imul(l,W)|0,r=r+Math.imul(f,X)|0,a=a+Math.imul(f,W)|0;var ve=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(ve>>>26)|0,ve&=67108863,i=Math.imul(w,L),r=Math.imul(w,U),r=r+Math.imul(x,L)|0,a=Math.imul(x,U),i=i+Math.imul(b,K)|0,r=r+Math.imul(b,V)|0,r=r+Math.imul(v,K)|0,a=a+Math.imul(v,V)|0,i=i+Math.imul(d,X)|0,r=r+Math.imul(d,W)|0,r=r+Math.imul(m,X)|0,a=a+Math.imul(m,W)|0,i=i+Math.imul(l,Z)|0,r=r+Math.imul(l,$)|0,r=r+Math.imul(f,Z)|0,a=a+Math.imul(f,$)|0;var ye=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(ye>>>26)|0,ye&=67108863,i=Math.imul(_,L),r=Math.imul(_,U),r=r+Math.imul(j,L)|0,a=Math.imul(j,U),i=i+Math.imul(w,K)|0,r=r+Math.imul(w,V)|0,r=r+Math.imul(x,K)|0,a=a+Math.imul(x,V)|0,i=i+Math.imul(b,X)|0,r=r+Math.imul(b,W)|0,r=r+Math.imul(v,X)|0,a=a+Math.imul(v,W)|0,i=i+Math.imul(d,Z)|0,r=r+Math.imul(d,$)|0,r=r+Math.imul(m,Z)|0,a=a+Math.imul(m,$)|0,i=i+Math.imul(l,Y)|0,r=r+Math.imul(l,ee)|0,r=r+Math.imul(f,Y)|0,a=a+Math.imul(f,ee)|0;var we=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(we>>>26)|0,we&=67108863,i=Math.imul(E,L),r=Math.imul(E,U),r=r+Math.imul(A,L)|0,a=Math.imul(A,U),i=i+Math.imul(_,K)|0,r=r+Math.imul(_,V)|0,r=r+Math.imul(j,K)|0,a=a+Math.imul(j,V)|0,i=i+Math.imul(w,X)|0,r=r+Math.imul(w,W)|0,r=r+Math.imul(x,X)|0,a=a+Math.imul(x,W)|0,i=i+Math.imul(b,Z)|0,r=r+Math.imul(b,$)|0,r=r+Math.imul(v,Z)|0,a=a+Math.imul(v,$)|0,i=i+Math.imul(d,Y)|0,r=r+Math.imul(d,ee)|0,r=r+Math.imul(m,Y)|0,a=a+Math.imul(m,ee)|0,i=i+Math.imul(l,ne)|0,r=r+Math.imul(l,ie)|0,r=r+Math.imul(f,ne)|0,a=a+Math.imul(f,ie)|0;var xe=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(xe>>>26)|0,xe&=67108863,i=Math.imul(T,L), +r=Math.imul(T,U),r=r+Math.imul(I,L)|0,a=Math.imul(I,U),i=i+Math.imul(E,K)|0,r=r+Math.imul(E,V)|0,r=r+Math.imul(A,K)|0,a=a+Math.imul(A,V)|0,i=i+Math.imul(_,X)|0,r=r+Math.imul(_,W)|0,r=r+Math.imul(j,X)|0,a=a+Math.imul(j,W)|0,i=i+Math.imul(w,Z)|0,r=r+Math.imul(w,$)|0,r=r+Math.imul(x,Z)|0,a=a+Math.imul(x,$)|0,i=i+Math.imul(b,Y)|0,r=r+Math.imul(b,ee)|0,r=r+Math.imul(v,Y)|0,a=a+Math.imul(v,ee)|0,i=i+Math.imul(d,ne)|0,r=r+Math.imul(d,ie)|0,r=r+Math.imul(m,ne)|0,a=a+Math.imul(m,ie)|0,i=i+Math.imul(l,ae)|0,r=r+Math.imul(l,oe)|0,r=r+Math.imul(f,ae)|0,a=a+Math.imul(f,oe)|0;var ke=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(ke>>>26)|0,ke&=67108863,i=Math.imul(D,L),r=Math.imul(D,U),r=r+Math.imul(M,L)|0,a=Math.imul(M,U),i=i+Math.imul(T,K)|0,r=r+Math.imul(T,V)|0,r=r+Math.imul(I,K)|0,a=a+Math.imul(I,V)|0,i=i+Math.imul(E,X)|0,r=r+Math.imul(E,W)|0,r=r+Math.imul(A,X)|0,a=a+Math.imul(A,W)|0,i=i+Math.imul(_,Z)|0,r=r+Math.imul(_,$)|0,r=r+Math.imul(j,Z)|0,a=a+Math.imul(j,$)|0,i=i+Math.imul(w,Y)|0,r=r+Math.imul(w,ee)|0,r=r+Math.imul(x,Y)|0,a=a+Math.imul(x,ee)|0,i=i+Math.imul(b,ne)|0,r=r+Math.imul(b,ie)|0,r=r+Math.imul(v,ne)|0,a=a+Math.imul(v,ie)|0,i=i+Math.imul(d,ae)|0,r=r+Math.imul(d,oe)|0,r=r+Math.imul(m,ae)|0,a=a+Math.imul(m,oe)|0,i=i+Math.imul(l,ce)|0,r=r+Math.imul(l,ue)|0,r=r+Math.imul(f,ce)|0,a=a+Math.imul(f,ue)|0;var _e=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(_e>>>26)|0,_e&=67108863,i=Math.imul(B,L),r=Math.imul(B,U),r=r+Math.imul(z,L)|0,a=Math.imul(z,U),i=i+Math.imul(D,K)|0,r=r+Math.imul(D,V)|0,r=r+Math.imul(M,K)|0,a=a+Math.imul(M,V)|0,i=i+Math.imul(T,X)|0,r=r+Math.imul(T,W)|0,r=r+Math.imul(I,X)|0,a=a+Math.imul(I,W)|0,i=i+Math.imul(E,Z)|0,r=r+Math.imul(E,$)|0,r=r+Math.imul(A,Z)|0,a=a+Math.imul(A,$)|0,i=i+Math.imul(_,Y)|0,r=r+Math.imul(_,ee)|0,r=r+Math.imul(j,Y)|0,a=a+Math.imul(j,ee)|0,i=i+Math.imul(w,ne)|0,r=r+Math.imul(w,ie)|0,r=r+Math.imul(x,ne)|0,a=a+Math.imul(x,ie)|0,i=i+Math.imul(b,ae)|0,r=r+Math.imul(b,oe)|0,r=r+Math.imul(v,ae)|0,a=a+Math.imul(v,oe)|0,i=i+Math.imul(d,ce)|0,r=r+Math.imul(d,ue)|0,r=r+Math.imul(m,ce)|0,a=a+Math.imul(m,ue)|0,i=i+Math.imul(l,le)|0,r=r+Math.imul(l,fe)|0,r=r+Math.imul(f,le)|0,a=a+Math.imul(f,fe)|0;var je=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(je>>>26)|0,je&=67108863,i=Math.imul(R,L),r=Math.imul(R,U),r=r+Math.imul(N,L)|0,a=Math.imul(N,U),i=i+Math.imul(B,K)|0,r=r+Math.imul(B,V)|0,r=r+Math.imul(z,K)|0,a=a+Math.imul(z,V)|0,i=i+Math.imul(D,X)|0,r=r+Math.imul(D,W)|0,r=r+Math.imul(M,X)|0,a=a+Math.imul(M,W)|0,i=i+Math.imul(T,Z)|0,r=r+Math.imul(T,$)|0,r=r+Math.imul(I,Z)|0,a=a+Math.imul(I,$)|0,i=i+Math.imul(E,Y)|0,r=r+Math.imul(E,ee)|0,r=r+Math.imul(A,Y)|0,a=a+Math.imul(A,ee)|0,i=i+Math.imul(_,ne)|0,r=r+Math.imul(_,ie)|0,r=r+Math.imul(j,ne)|0,a=a+Math.imul(j,ie)|0,i=i+Math.imul(w,ae)|0,r=r+Math.imul(w,oe)|0,r=r+Math.imul(x,ae)|0,a=a+Math.imul(x,oe)|0,i=i+Math.imul(b,ce)|0,r=r+Math.imul(b,ue)|0,r=r+Math.imul(v,ce)|0,a=a+Math.imul(v,ue)|0,i=i+Math.imul(d,le)|0,r=r+Math.imul(d,fe)|0,r=r+Math.imul(m,le)|0,a=a+Math.imul(m,fe)|0,i=i+Math.imul(l,de)|0,r=r+Math.imul(l,me)|0,r=r+Math.imul(f,de)|0,a=a+Math.imul(f,me)|0;var Se=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Se>>>26)|0,Se&=67108863,i=Math.imul(R,K),r=Math.imul(R,V),r=r+Math.imul(N,K)|0,a=Math.imul(N,V),i=i+Math.imul(B,X)|0,r=r+Math.imul(B,W)|0,r=r+Math.imul(z,X)|0,a=a+Math.imul(z,W)|0,i=i+Math.imul(D,Z)|0,r=r+Math.imul(D,$)|0,r=r+Math.imul(M,Z)|0,a=a+Math.imul(M,$)|0,i=i+Math.imul(T,Y)|0,r=r+Math.imul(T,ee)|0,r=r+Math.imul(I,Y)|0,a=a+Math.imul(I,ee)|0,i=i+Math.imul(E,ne)|0,r=r+Math.imul(E,ie)|0,r=r+Math.imul(A,ne)|0,a=a+Math.imul(A,ie)|0,i=i+Math.imul(_,ae)|0,r=r+Math.imul(_,oe)|0,r=r+Math.imul(j,ae)|0,a=a+Math.imul(j,oe)|0,i=i+Math.imul(w,ce)|0,r=r+Math.imul(w,ue)|0,r=r+Math.imul(x,ce)|0,a=a+Math.imul(x,ue)|0,i=i+Math.imul(b,le)|0,r=r+Math.imul(b,fe)|0,r=r+Math.imul(v,le)|0,a=a+Math.imul(v,fe)|0,i=i+Math.imul(d,de)|0,r=r+Math.imul(d,me)|0,r=r+Math.imul(m,de)|0,a=a+Math.imul(m,me)|0;var Ee=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,i=Math.imul(R,X),r=Math.imul(R,W),r=r+Math.imul(N,X)|0,a=Math.imul(N,W),i=i+Math.imul(B,Z)|0,r=r+Math.imul(B,$)|0,r=r+Math.imul(z,Z)|0,a=a+Math.imul(z,$)|0,i=i+Math.imul(D,Y)|0,r=r+Math.imul(D,ee)|0,r=r+Math.imul(M,Y)|0,a=a+Math.imul(M,ee)|0,i=i+Math.imul(T,ne)|0,r=r+Math.imul(T,ie)|0,r=r+Math.imul(I,ne)|0,a=a+Math.imul(I,ie)|0,i=i+Math.imul(E,ae)|0,r=r+Math.imul(E,oe)|0,r=r+Math.imul(A,ae)|0,a=a+Math.imul(A,oe)|0,i=i+Math.imul(_,ce)|0,r=r+Math.imul(_,ue)|0,r=r+Math.imul(j,ce)|0,a=a+Math.imul(j,ue)|0,i=i+Math.imul(w,le)|0,r=r+Math.imul(w,fe)|0,r=r+Math.imul(x,le)|0,a=a+Math.imul(x,fe)|0,i=i+Math.imul(b,de)|0,r=r+Math.imul(b,me)|0,r=r+Math.imul(v,de)|0,a=a+Math.imul(v,me)|0;var Ae=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,i=Math.imul(R,Z),r=Math.imul(R,$),r=r+Math.imul(N,Z)|0,a=Math.imul(N,$),i=i+Math.imul(B,Y)|0,r=r+Math.imul(B,ee)|0,r=r+Math.imul(z,Y)|0,a=a+Math.imul(z,ee)|0,i=i+Math.imul(D,ne)|0,r=r+Math.imul(D,ie)|0,r=r+Math.imul(M,ne)|0,a=a+Math.imul(M,ie)|0,i=i+Math.imul(T,ae)|0,r=r+Math.imul(T,oe)|0,r=r+Math.imul(I,ae)|0,a=a+Math.imul(I,oe)|0,i=i+Math.imul(E,ce)|0,r=r+Math.imul(E,ue)|0,r=r+Math.imul(A,ce)|0,a=a+Math.imul(A,ue)|0,i=i+Math.imul(_,le)|0,r=r+Math.imul(_,fe)|0,r=r+Math.imul(j,le)|0,a=a+Math.imul(j,fe)|0,i=i+Math.imul(w,de)|0,r=r+Math.imul(w,me)|0,r=r+Math.imul(x,de)|0,a=a+Math.imul(x,me)|0;var Ce=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,i=Math.imul(R,Y),r=Math.imul(R,ee),r=r+Math.imul(N,Y)|0,a=Math.imul(N,ee),i=i+Math.imul(B,ne)|0,r=r+Math.imul(B,ie)|0,r=r+Math.imul(z,ne)|0,a=a+Math.imul(z,ie)|0,i=i+Math.imul(D,ae)|0,r=r+Math.imul(D,oe)|0,r=r+Math.imul(M,ae)|0,a=a+Math.imul(M,oe)|0,i=i+Math.imul(T,ce)|0,r=r+Math.imul(T,ue)|0,r=r+Math.imul(I,ce)|0,a=a+Math.imul(I,ue)|0,i=i+Math.imul(E,le)|0,r=r+Math.imul(E,fe)|0,r=r+Math.imul(A,le)|0,a=a+Math.imul(A,fe)|0,i=i+Math.imul(_,de)|0,r=r+Math.imul(_,me)|0,r=r+Math.imul(j,de)|0,a=a+Math.imul(j,me)|0;var Te=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Te>>>26)|0,Te&=67108863,i=Math.imul(R,ne),r=Math.imul(R,ie),r=r+Math.imul(N,ne)|0,a=Math.imul(N,ie),i=i+Math.imul(B,ae)|0,r=r+Math.imul(B,oe)|0,r=r+Math.imul(z,ae)|0,a=a+Math.imul(z,oe)|0,i=i+Math.imul(D,ce)|0,r=r+Math.imul(D,ue)|0,r=r+Math.imul(M,ce)|0,a=a+Math.imul(M,ue)|0,i=i+Math.imul(T,le)|0,r=r+Math.imul(T,fe)|0,r=r+Math.imul(I,le)|0,a=a+Math.imul(I,fe)|0,i=i+Math.imul(E,de)|0,r=r+Math.imul(E,me)|0,r=r+Math.imul(A,de)|0,a=a+Math.imul(A,me)|0;var Ie=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,i=Math.imul(R,ae),r=Math.imul(R,oe),r=r+Math.imul(N,ae)|0,a=Math.imul(N,oe),i=i+Math.imul(B,ce)|0,r=r+Math.imul(B,ue)|0,r=r+Math.imul(z,ce)|0,a=a+Math.imul(z,ue)|0,i=i+Math.imul(D,le)|0,r=r+Math.imul(D,fe)|0,r=r+Math.imul(M,le)|0,a=a+Math.imul(M,fe)|0,i=i+Math.imul(T,de)|0,r=r+Math.imul(T,me)|0,r=r+Math.imul(I,de)|0,a=a+Math.imul(I,me)|0;var Oe=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,i=Math.imul(R,ce),r=Math.imul(R,ue),r=r+Math.imul(N,ce)|0,a=Math.imul(N,ue),i=i+Math.imul(B,le)|0,r=r+Math.imul(B,fe)|0,r=r+Math.imul(z,le)|0,a=a+Math.imul(z,fe)|0,i=i+Math.imul(D,de)|0,r=r+Math.imul(D,me)|0,r=r+Math.imul(M,de)|0,a=a+Math.imul(M,me)|0;var De=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(De>>>26)|0,De&=67108863,i=Math.imul(R,le),r=Math.imul(R,fe),r=r+Math.imul(N,le)|0,a=Math.imul(N,fe),i=i+Math.imul(B,de)|0,r=r+Math.imul(B,me)|0,r=r+Math.imul(z,de)|0,a=a+Math.imul(z,me)|0;var Me=(u+i|0)+((8191&r)<<13)|0;u=(a+(r>>>13)|0)+(Me>>>26)|0,Me&=67108863,i=Math.imul(R,de),r=Math.imul(R,me),r=r+Math.imul(N,de)|0,a=Math.imul(N,me);var qe=(u+i|0)+((8191&r)<<13)|0;return u=(a+(r>>>13)|0)+(qe>>>26)|0,qe&=67108863,c[0]=ge,c[1]=be,c[2]=ve,c[3]=ye,c[4]=we,c[5]=xe,c[6]=ke,c[7]=_e,c[8]=je,c[9]=Se,c[10]=Ee,c[11]=Ae,c[12]=Ce,c[13]=Te,c[14]=Ie,c[15]=Oe,c[16]=De,c[17]=Me,c[18]=qe,0!==u&&(c[19]=u,n.length++),n};Math.imul||(j=u),a.prototype.mulTo=function(e,t){var n,i=this.length+e.length;return n=10===this.length&&10===e.length?j(this,e,t):i<63?u(this,e,t):i<1024?p(this,e,t):l(this,e,t)},f.prototype.makeRBT=function(e){for(var t=new Array(e),n=a.prototype._countBits(e)-1,i=0;i>=1;return i},f.prototype.permute=function(e,t,n,i,r,a){for(var o=0;o>>=1)r++;return 1<>>=13,n[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=r/67108864|0,t+=a>>>26,this.words[n]=67108863&a}return 0!==t&&(this.words[n]=t,this.length++),this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=c(e);if(0===t.length)return new a(1);for(var n=this,i=0;i=0);var t,n=e%26,r=(e-n)/26,a=67108863>>>26-n<<26-n;if(0!==n){var o=0;for(t=0;t>>26-n}o&&(this.words[t]=o,this.length++)}if(0!==r){for(t=this.length-1;t>=0;t--)this.words[t+r]=this.words[t];for(t=0;t=0);var r;r=t?(t-t%26)/26:0;var a=e%26,o=Math.min((e-a)/26,this.length),s=67108863^67108863>>>a<o)for(this.length-=o,u=0;u=0&&(0!==p||u>=r);u--){var l=0|this.words[u];this.words[u]=p<<26-a|l>>>a,p=l&s}return c&&0!==p&&(c.words[c.length++]=p),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,n){return i(0===this.negative),this.iushrn(e,t,n)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,n=(e-t)/26,r=1<=0);var t=e%26,n=(e-t)/26;if(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=n)return this;if(0!==t&&n++,this.length=Math.min(n,this.length),0!==t){var r=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(c/67108864|0),this.words[r+n]=67108863&o}for(;r>26,this.words[r+n]=67108863&o;if(0===s)return this.strip();for(i(s===-1),s=0,r=0;r>26,this.words[r]=67108863&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var n=this.length-e.length,i=this.clone(),r=e,o=0|r.words[r.length-1],s=this._countBits(o);n=26-s,0!==n&&(r=r.ushln(n),i.iushln(n),o=0|r.words[r.length-1]);var c,u=i.length-r.length;if("mod"!==t){c=new a(null),c.length=u+1,c.words=new Array(c.length);for(var p=0;p=0;f--){var h=67108864*(0|i.words[r.length+f])+(0|i.words[r.length+f-1]);for(h=Math.min(h/o|0,67108863),i._ishlnsubmul(r,h,f);0!==i.negative;)h--,i.negative=0,i._ishlnsubmul(r,1,f),i.isZero()||(i.negative^=1);c&&(c.words[f]=h)}return c&&c.strip(),i.strip(),"div"!==t&&0!==n&&i.iushrn(n),{div:c||null,mod:i}},a.prototype.divmod=function(e,t,n){if(i(!e.isZero()),this.isZero())return{div:new a(0),mod:new a(0)};var r,o,s;return 0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(r=s.div.neg()),"div"!==t&&(o=s.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:r,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(r=s.div.neg()),{div:r,mod:s.mod}):0!==(this.negative&e.negative)?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),r=e.andln(1),a=n.cmp(i);return a<0||1===r&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=67108863);for(var t=(1<<26)%e,n=0,r=this.length-1;r>=0;r--)n=(t*n+(0|this.words[r]))%e;return n},a.prototype.idivn=function(e){i(e<=67108863);for(var t=0,n=this.length-1;n>=0;n--){var r=(0|this.words[n])+67108864*t;this.words[n]=r/e|0,t=r%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new a(1),o=new a(0),s=new a(0),c=new a(1),u=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++u;for(var p=n.clone(),l=t.clone();!t.isZero();){for(var f=0,h=1;0===(t.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(r.isOdd()||o.isOdd())&&(r.iadd(p),o.isub(l)),r.iushrn(1),o.iushrn(1);for(var d=0,m=1;0===(n.words[0]&m)&&d<26;++d,m<<=1);if(d>0)for(n.iushrn(d);d-- >0;)(s.isOdd()||c.isOdd())&&(s.iadd(p),c.isub(l)),s.iushrn(1),c.iushrn(1);t.cmp(n)>=0?(t.isub(n),r.isub(s),o.isub(c)):(n.isub(t),s.isub(r),c.isub(o))}return{a:s,b:c,gcd:n.iushln(u)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t=this,n=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var r=new a(1),o=new a(0),s=n.clone();t.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;0===(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)r.isOdd()&&r.iadd(s),r.iushrn(1);for(var p=0,l=1;0===(n.words[0]&l)&&p<26;++p,l<<=1);if(p>0)for(n.iushrn(p);p-- >0;)o.isOdd()&&o.iadd(s),o.iushrn(1);t.cmp(n)>=0?(t.isub(n),r.isub(o)):(n.isub(t),o.isub(r))}var f;return f=0===t.cmpn(1)?r:o,f.cmpn(0)<0&&f.iadd(e),f},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0,n.negative=0;for(var i=0;t.isEven()&&n.isEven();i++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var r=t.cmp(n);if(r<0){var a=t;t=n,n=a}else if(0===r||0===n.cmpn(1))break;t.isub(n)}return n.iushln(i)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return 0===(1&this.words[0])},a.prototype.isOdd=function(){return 1===(1&this.words[0])},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,n=(e-t)/26,r=1<>>26,s&=67108863,this.words[o]=s}return 0!==a&&(this.words[o]=a,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(e){var t=e<0;if(0!==this.negative&&!t)return-1;if(0===this.negative&&t)return 1;this.strip();var n;if(this.length>1)n=1;else{t&&(e=-e),i(e<=67108863,"Number is too big");var r=0|this.words[0];n=r===e?0:re.length)return 1;if(this.length=0;n--){var i=0|this.words[n],r=0|e.words[n];if(i!==r){ir&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return this.cmpn(e)===-1},a.prototype.lt=function(e){return this.cmp(e)===-1},a.prototype.lten=function(e){return this.cmpn(e)<=0},a.prototype.lte=function(e){return this.cmp(e)<=0},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new v(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};h.prototype._tmp=function(){var e=new a(null);return e.words=new Array(Math.ceil(this.n/13)),e},h.prototype.ireduce=function(e){var t,n=e;do this.split(n,this.tmp),n=this.imulK(n),n=n.iadd(this.tmp),t=n.bitLength();while(t>this.n);var i=t0?n.isub(this.p):n.strip(),n},h.prototype.split=function(e,t){e.iushrn(this.n,0,t)},h.prototype.imulK=function(e){return e.imul(this.k)},r(d,h),d.prototype.split=function(e,t){for(var n=4194303,i=Math.min(e.length,9),r=0;r>>22,a=o}a>>>=22,e.words[r-10]=a,0===a&&e.length>10?e.length-=10:e.length-=9},d.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n>>=26,e.words[n]=r,t=i}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function e(t){if(S[t])return S[t];var e;if("k256"===t)e=new d;else if("p224"===t)e=new m;else if("p192"===t)e=new g;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new b}return S[t]=e,e},v.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},v.prototype._verify2=function(e,t){i(0===(e.negative|t.negative),"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},v.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},v.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},v.prototype.add=function(e,t){this._verify2(e,t);var n=e.add(t);return n.cmp(this.m)>=0&&n.isub(this.m),n._forceRed(this)},v.prototype.iadd=function(e,t){this._verify2(e,t);var n=e.iadd(t);return n.cmp(this.m)>=0&&n.isub(this.m),n},v.prototype.sub=function(e,t){this._verify2(e,t);var n=e.sub(t);return n.cmpn(0)<0&&n.iadd(this.m),n._forceRed(this)},v.prototype.isub=function(e,t){this._verify2(e,t);var n=e.isub(t);return n.cmpn(0)<0&&n.iadd(this.m),n},v.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},v.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},v.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},v.prototype.isqr=function(e){return this.imul(e,e.clone())},v.prototype.sqr=function(e){return this.mul(e,e)},v.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2===1),3===t){var n=this.m.add(new a(1)).iushrn(2);return this.pow(e,n)}for(var r=this.m.subn(1),o=0;!r.isZero()&&0===r.andln(1);)o++,r.iushrn(1);i(!r.isZero());var s=new a(1).toRed(this),c=s.redNeg(),u=this.m.subn(1).iushrn(1),p=this.m.bitLength();for(p=new a(2*p*p).toRed(this);0!==this.pow(p,u).cmp(c);)p.redIAdd(c);for(var l=this.pow(p,r),f=this.pow(e,r.addn(1).iushrn(1)),h=this.pow(e,r),d=o;0!==h.cmp(s);){for(var m=h,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;r--){for(var p=t.words[r],l=u-1;l>=0;l--){var f=p>>l&1;o!==i[0]&&(o=this.sqr(o)),0!==f||0!==s?(s<<=1,s|=f,c++,(c===n||0===r&&0===l)&&(o=this.mul(o,i[s]),c=0,s=0)):c=0}u=26}return o},v.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},v.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new y(e)},r(y,v),y.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},y.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},y.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var n=e.imul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),a=r;return r.cmp(this.m)>=0?a=r.isub(this.m):r.cmpn(0)<0&&(a=r.iadd(this.m)),a._forceRed(this)},y.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var n=e.mul(t),i=n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),r=n.isub(i).iushrn(this.shift),o=r;return r.cmp(this.m)>=0?o=r.isub(this.m):r.cmpn(0)<0&&(o=r.iadd(this.m)),o._forceRed(this)},y.prototype.invm=function(e){var t=this.imod(e._invmp(this.m).mul(this.r2));return t._forceRed(this)}}("undefined"==typeof t||t,this)},{}],55:[function(e,t,n){(function(n){function i(e){var t=a(e),n=t.toRed(o.mont(e.modulus)).redPow(new o(e.publicExponent)).fromRed();return{blinder:n,unblinder:t.invm(e.modulus)}}function r(e,t){var r=i(t),a=t.modulus.byteLength(),s=(o.mont(t.modulus),new o(e).mul(r.blinder).umod(t.modulus)),c=s.toRed(o.mont(t.prime1)),u=s.toRed(o.mont(t.prime2)),p=t.coefficient,l=t.prime1,f=t.prime2,h=c.redPow(t.exponent1),d=u.redPow(t.exponent2);h=h.fromRed(),d=d.fromRed();var m=h.isub(d).imul(p).umod(l);return m.imul(f),d.iadd(m),new n(d.imul(r.unblinder).umod(t.modulus).toArray(!1,a))}function a(e){for(var t=e.modulus.byteLength(),n=new o(s(t));n.cmp(e.modulus)>=0||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new o(s(t));return n}var o=e("bn.js"),s=e("randombytes");t.exports=r,r.getr=a}).call(this,e("buffer").Buffer)},{"bn.js":54,buffer:17,randombytes:213}],56:[function(e,t,n){"use strict";var i=n;i.version=e("../package.json").version,i.utils=e("./elliptic/utils"),i.rand=e("brorand"),i.hmacDRBG=e("./elliptic/hmac-drbg"),i.curve=e("./elliptic/curve"),i.curves=e("./elliptic/curves"),i.ec=e("./elliptic/ec"),i.eddsa=e("./elliptic/eddsa")},{"../package.json":79,"./elliptic/curve":59,"./elliptic/curves":62,"./elliptic/ec":63,"./elliptic/eddsa":66,"./elliptic/hmac-drbg":69,"./elliptic/utils":71,brorand:72}],57:[function(e,t,n){"use strict";function i(e,t){this.type=e,this.p=new a(t.p,16),this.red=t.prime?a.red(t.prime):a.mont(this.p),this.zero=new a(0).toRed(this.red),this.one=new a(1).toRed(this.red),this.two=new a(2).toRed(this.red),this.n=t.n&&new a(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4);var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function r(e,t){this.curve=e,this.type=t,this.precomputed=null}var a=e("bn.js"),o=e("../../elliptic"),s=o.utils,c=s.getNAF,u=s.getJSF,p=s.assert;t.exports=i,i.prototype.point=function(){throw new Error("Not implemented")},i.prototype.validate=function(){throw new Error("Not implemented")},i.prototype._fixedNafMul=function(e,t){p(e.precomputed);var n=e._getDoubles(),i=c(t,1),r=(1<=o;t--)s=(s<<1)+i[t];a.push(s)}for(var u=this.jpoint(null,null,null),l=this.jpoint(null,null,null),f=r;f>0;f--){for(var o=0;o=0;s--){for(var t=0;s>=0&&0===a[s];s--)t++;if(s>=0&&t++,o=o.dblp(t),s<0)break;var u=a[s];p(0!==u),o="affine"===e.type?u>0?o.mixedAdd(r[u-1>>1]):o.mixedAdd(r[-u-1>>1].neg()):u>0?o.add(r[u-1>>1]):o.add(r[-u-1>>1].neg())}return"affine"===e.type?o.toP():o},i.prototype._wnafMulAdd=function(e,t,n,i,r){for(var a=this._wnafT1,o=this._wnafT2,s=this._wnafT3,p=0,l=0;l=1;l-=2){var d=l-1,m=l;if(1===a[d]&&1===a[m]){var g=[t[d],null,null,t[m]];0===t[d].y.cmp(t[m].y)?(g[1]=t[d].add(t[m]),g[2]=t[d].toJ().mixedAdd(t[m].neg())):0===t[d].y.cmp(t[m].y.redNeg())?(g[1]=t[d].toJ().mixedAdd(t[m]),g[2]=t[d].add(t[m].neg())):(g[1]=t[d].toJ().mixedAdd(t[m]),g[2]=t[d].toJ().mixedAdd(t[m].neg()));var b=[-3,-1,-5,-7,0,7,5,1,3],v=u(n[d],n[m]);p=Math.max(v[0].length,p),s[d]=new Array(p),s[m]=new Array(p);for(var y=0;y=0;l--){for(var j=0;l>=0;){for(var S=!0,y=0;y=0&&j++,k=k.dblp(j),l<0)break;for(var y=0;y0?f=o[y][E-1>>1]:E<0&&(f=o[y][-E-1>>1].neg()),k="affine"===f.type?k.mixedAdd(f):k.add(f))}}for(var l=0;l=Math.ceil((e.bitLength()+1)/t.step)},r.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],i=this,r=0;r":""},r.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&0===this.y.cmp(this.z)},r.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr();n=n.redIAdd(n);var i=this.curve._mulA(e),r=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),a=i.redAdd(t),o=a.redSub(n),s=i.redSub(t),c=r.redMul(o),u=a.redMul(s),p=r.redMul(s),l=o.redMul(a);return this.curve.point(c,u,l,p)},r.prototype._projDbl=function(){var e,t,n,i=this.x.redAdd(this.y).redSqr(),r=this.x.redSqr(),a=this.y.redSqr();if(this.curve.twisted){var o=this.curve._mulA(r),s=o.redAdd(a);if(this.zOne)e=i.redSub(r).redSub(a).redMul(s.redSub(this.curve.two)),t=s.redMul(o.redSub(a)),n=s.redSqr().redSub(s).redSub(s);else{var c=this.z.redSqr(),u=s.redSub(c).redISub(c);e=i.redSub(r).redISub(a).redMul(u),t=s.redMul(o.redSub(a)),n=s.redMul(u)}}else{var o=r.redAdd(a),c=this.curve._mulC(this.c.redMul(this.z)).redSqr(),u=o.redSub(c).redSub(c);e=this.curve._mulC(i.redISub(o)).redMul(u),t=this.curve._mulC(o).redMul(r.redISub(a)),n=o.redMul(u)}return this.curve.point(e,t,n)},r.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},r.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),i=this.t.redMul(this.curve.dd).redMul(e.t),r=this.z.redMul(e.z.redAdd(e.z)),a=n.redSub(t),o=r.redSub(i),s=r.redAdd(i),c=n.redAdd(t),u=a.redMul(o),p=s.redMul(c),l=a.redMul(c),f=o.redMul(s);return this.curve.point(u,p,f,l)},r.prototype._projAdd=function(e){var t,n,i=this.z.redMul(e.z),r=i.redSqr(),a=this.x.redMul(e.x),o=this.y.redMul(e.y),s=this.curve.d.redMul(a).redMul(o),c=r.redSub(s),u=r.redAdd(s),p=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(a).redISub(o),l=i.redMul(c).redMul(p);return this.curve.twisted?(t=i.redMul(u).redMul(o.redSub(this.curve._mulA(a))),n=c.redMul(u)):(t=i.redMul(u).redMul(o.redSub(a)),n=this.curve._mulC(c).redMul(u)),this.curve.point(l,t,n)},r.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},r.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},r.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},r.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},r.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},r.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},r.prototype.getX=function(){return this.normalize(),this.x.fromRed()},r.prototype.getY=function(){return this.normalize(),this.y.fromRed()},r.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},r.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(i),0===this.x.cmp(t))return!0}return!1},r.prototype.toP=r.prototype.normalize,r.prototype.mixedAdd=r.prototype.add},{"../../elliptic":56,"../curve":59,"bn.js":54,inherits:216}],59:[function(e,t,n){"use strict";var i=n;i.base=e("./base"),i.short=e("./short"),i.mont=e("./mont"),i.edwards=e("./edwards")},{"./base":57,"./edwards":58,"./mont":60,"./short":61}],60:[function(e,t,n){"use strict";function i(e){c.call(this,"mont",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.i4=new o(4).toRed(this.red).redInvm(),this.two=new o(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function r(e,t,n){c.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new o(t,16),this.z=new o(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}var a=e("../curve"),o=e("bn.js"),s=e("inherits"),c=a.base,u=e("../../elliptic"),p=u.utils;s(i,c),t.exports=i,i.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),i=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t),r=i.redSqrt();return 0===r.redSqr().cmp(i)},s(r,c.BasePoint),i.prototype.decodePoint=function(e,t){return this.point(p.toArray(e,t),1)},i.prototype.point=function(e,t){return new r(this,e,t)},i.prototype.pointFromJSON=function(e){return r.fromJSON(this,e)},r.prototype.precompute=function(){},r.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},r.fromJSON=function(e,t){return new r(e,t[0],t[1]||e.one)},r.prototype.inspect=function(){return this.isInfinity()?"":""},r.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},r.prototype.dbl=function(){var e=this.x.redAdd(this.z),t=e.redSqr(),n=this.x.redSub(this.z),i=n.redSqr(),r=t.redSub(i),a=t.redMul(i),o=r.redMul(i.redAdd(this.curve.a24.redMul(r)));return this.curve.point(a,o)},r.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),i=this.x.redSub(this.z),r=e.x.redAdd(e.z),a=e.x.redSub(e.z),o=a.redMul(n),s=r.redMul(i),c=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(c,u)},r.prototype.mul=function(e){for(var t=e.clone(),n=this,i=this.curve.point(null,null),r=this,a=[];0!==t.cmpn(0);t.iushrn(1))a.push(t.andln(1));for(var o=a.length-1;o>=0;o--)0===a[o]?(n=n.diffAdd(i,r),i=i.dbl()):(i=n.diffAdd(i,r),n=n.dbl());return i},r.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},r.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},r.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},r.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../../elliptic":56,"../curve":59,"bn.js":54,inherits:216}],61:[function(e,t,n){"use strict";function i(e){p.call(this,"short",e),this.a=new c(e.a,16).toRed(this.red),this.b=new c(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function r(e,t,n,i){p.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new c(t,16),this.y=new c(n,16),i&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function a(e,t,n,i){p.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===i?(this.x=this.curve.one,this.y=this.curve.one,this.z=new c(0)):(this.x=new c(t,16),this.y=new c(n,16),this.z=new c(i,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}var o=e("../curve"),s=e("../../elliptic"),c=e("bn.js"),u=e("inherits"),p=o.base,l=s.utils.assert;u(i,p),t.exports=i,i.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new c(e.beta,16).toRed(this.red);else{var i=this._getEndoRoots(this.p);t=i[0].cmp(i[1])<0?i[0]:i[1],t=t.toRed(this.red)}if(e.lambda)n=new c(e.lambda,16);else{var r=this._getEndoRoots(this.n);0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(t))?n=r[0]:(n=r[1],l(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}var a;return a=e.basis?e.basis.map(function(e){return{a:new c(e.a,16),b:new c(e.b,16)}}):this._getEndoBasis(n),{beta:t,lambda:n,basis:a}}},i.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:c.mont(e),n=new c(2).toRed(t).redInvm(),i=n.redNeg(),r=new c(3).toRed(t).redNeg().redSqrt().redMul(n),a=i.redAdd(r).fromRed(),o=i.redSub(r).fromRed();return[a,o]},i.prototype._getEndoBasis=function(e){for(var t,n,i,r,a,o,s,u,p,l=this.n.ushrn(Math.floor(this.n.bitLength()/2)),f=e,h=this.n.clone(),d=new c(1),m=new c(0),g=new c(0),b=new c(1),v=0;0!==f.cmpn(0);){var y=h.div(f);u=h.sub(y.mul(f)),p=g.sub(y.mul(d));var w=b.sub(y.mul(m));if(!i&&u.cmp(l)<0)t=s.neg(),n=d,i=u.neg(),r=p;else if(i&&2===++v)break;s=u,h=f,f=u,g=d,d=p,b=m,m=w}a=u.neg(),o=p;var x=i.sqr().add(r.sqr()),k=a.sqr().add(o.sqr());return k.cmp(x)>=0&&(a=t,o=n),i.negative&&(i=i.neg(),r=r.neg()),a.negative&&(a=a.neg(),o=o.neg()),[{a:i,b:r},{a:a,b:o}]},i.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],i=t[1],r=i.b.mul(e).divRound(this.n),a=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),s=a.mul(i.a),c=r.mul(n.b),u=a.mul(i.b),p=e.sub(o).sub(s),l=c.add(u).neg();return{k1:p,k2:l}},i.prototype.pointFromX=function(e,t){e=new c(e,16),e.red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),i=n.redSqrt();if(0!==i.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var r=i.fromRed().isOdd();return(t&&!r||!t&&r)&&(i=i.redNeg()),this.point(e,i)},i.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,i=this.a.redMul(t),r=t.redSqr().redMul(t).redIAdd(i).redIAdd(this.b);return 0===n.redSqr().redISub(r).cmpn(0)},i.prototype._endoWnafMulAdd=function(e,t,n){for(var i=this._endoWnafT1,r=this._endoWnafT2,a=0;a":""},r.prototype.isInfinity=function(){return this.inf},r.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var n=t.redSqr().redISub(this.x).redISub(e.x),i=t.redMul(this.x.redSub(n)).redISub(this.y);return this.curve.point(n,i)},r.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,n=this.x.redSqr(),i=e.redInvm(),r=n.redAdd(n).redIAdd(n).redIAdd(t).redMul(i),a=r.redSqr().redISub(this.x.redAdd(this.x)),o=r.redMul(this.x.redSub(a)).redISub(this.y);return this.curve.point(a,o)},r.prototype.getX=function(){return this.x.fromRed()},r.prototype.getY=function(){return this.y.fromRed()},r.prototype.mul=function(e){return e=new c(e,16),this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},r.prototype.mulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r):this.curve._wnafMulAdd(1,i,r,2)},r.prototype.jmulAdd=function(e,t,n){var i=[this,t],r=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(i,r,!0):this.curve._wnafMulAdd(1,i,r,2,!0)},r.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},r.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var n=this.precomputed,i=function(e){return e.neg()};t.precomputed={naf:n.naf&&{wnd:n.naf.wnd,points:n.naf.points.map(i)},doubles:n.doubles&&{step:n.doubles.step,points:n.doubles.points.map(i)}}}return t},r.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var e=this.curve.jpoint(this.x,this.y,this.curve.one);return e},u(a,p.BasePoint),i.prototype.jpoint=function(e,t,n){return new a(this,e,t,n)},a.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),i=this.y.redMul(t).redMul(e);return this.curve.point(n,i)},a.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},a.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),n=this.z.redSqr(),i=this.x.redMul(t),r=e.x.redMul(n),a=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(n.redMul(this.z)),s=i.redSub(r),c=a.redSub(o);if(0===s.cmpn(0))return 0!==c.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),p=u.redMul(s),l=i.redMul(u),f=c.redSqr().redIAdd(p).redISub(l).redISub(l),h=c.redMul(l.redISub(f)).redISub(a.redMul(p)),d=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,h,d)},a.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),n=this.x,i=e.x.redMul(t),r=this.y,a=e.y.redMul(t).redMul(this.z),o=n.redSub(i),s=r.redSub(a);if(0===o.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=o.redSqr(),u=c.redMul(o),p=n.redMul(c),l=s.redSqr().redIAdd(u).redISub(p).redISub(p),f=s.redMul(p.redISub(l)).redISub(r.redMul(u)),h=this.z.redMul(o);return this.curve.jpoint(l,f,h)},a.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n=0)return!1;if(n.redIAdd(r),0===this.x.cmp(n))return!0}return!1},a.prototype.inspect=function(){return this.isInfinity()?"":""},a.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../../elliptic":56,"../curve":59,"bn.js":54,inherits:216}],62:[function(e,t,n){"use strict";function i(e){"short"===e.type?this.curve=new s.curve.short(e):"edwards"===e.type?this.curve=new s.curve.edwards(e):this.curve=new s.curve.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,c(this.g.validate(),"Invalid curve"),c(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function r(e,t){Object.defineProperty(a,e,{configurable:!0,enumerable:!0,get:function(){var n=new i(t);return Object.defineProperty(a,e,{configurable:!0,enumerable:!0,value:n}),n}})}var a=n,o=e("hash.js"),s=e("../elliptic"),c=s.utils.assert;a.PresetCurve=i,r("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),r("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),r("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),r("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),r("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),r("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"0",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),r("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var u;try{u=e("./precomputed/secp256k1")}catch(e){u=void 0}r("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",u]})},{"../elliptic":56,"./precomputed/secp256k1":70,"hash.js":73}],63:[function(e,t,n){"use strict";function i(e){return this instanceof i?("string"==typeof e&&(s(a.curves.hasOwnProperty(e),"Unknown curve "+e),e=a.curves[e]),e instanceof a.curves.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),void(this.hash=e.hash||e.curve.hash)):new i(e)}var r=e("bn.js"),a=e("../../elliptic"),o=a.utils,s=o.assert,c=e("./key"),u=e("./signature");t.exports=i,i.prototype.keyPair=function(e){return new c(this,e)},i.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},i.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},i.prototype.genKeyPair=function(e){e||(e={});for(var t=new a.hmacDRBG({hash:this.hash,pers:e.pers,entropy:e.entropy||a.rand(this.hash.hmacStrength),nonce:this.n.toArray()}),n=this.n.byteLength(),i=this.n.sub(new r(2));;){var o=new r(t.generate(n));if(!(o.cmp(i)>0))return o.iaddn(1),this.keyFromPrivate(o)}},i.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},i.prototype.sign=function(e,t,n,i){"object"==typeof n&&(i=n,n=null),i||(i={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var o=this.n.byteLength(),s=t.getPrivate().toArray("be",o),c=e.toArray("be",o),p=new a.hmacDRBG({hash:this.hash,entropy:s,nonce:c,pers:i.pers,persEnc:i.persEnc}),l=this.n.sub(new r(1)),f=0;!0;f++){var h=i.k?i.k(f):new r(p.generate(this.n.byteLength()));if(h=this._truncateToN(h,!0),!(h.cmpn(1)<=0||h.cmp(l)>=0)){var d=this.g.mul(h);if(!d.isInfinity()){var m=d.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var b=h.invm(this.n).mul(g.mul(t.getPrivate()).iadd(e));if(b=b.umod(this.n),0!==b.cmpn(0)){var v=(d.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return i.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),v^=1),new u({r:g,s:b,recoveryParam:v})}}}}}},i.prototype.verify=function(e,t,n,i){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,i),t=new u(t,"hex");var a=t.r,o=t.s;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;var s=o.invm(this.n),c=s.mul(e).umod(this.n),p=s.mul(a).umod(this.n);if(!this.curve._maxwellTrick){var l=this.g.mulAdd(c,n.getPublic(),p);return!l.isInfinity()&&0===l.getX().umod(this.n).cmp(a)}var l=this.g.jmulAdd(c,n.getPublic(),p);return!l.isInfinity()&&l.eqXToP(a)},i.prototype.recoverPubKey=function(e,t,n,i){s((3&n)===n,"The recovery param is more than two bits"),t=new u(t,i);var a=this.n,o=new r(e),c=t.r,p=t.s,l=1&n,f=n>>1;if(c.cmp(this.curve.p.umod(this.curve.n))>=0&&f)throw new Error("Unable to find sencond key candinate");c=f?this.curve.pointFromX(c.add(this.curve.n),l):this.curve.pointFromX(c,l);var h=t.r.invm(a),d=a.sub(o).mul(h).umod(a),m=p.mul(h).umod(a);return this.g.mulAdd(d,c,m)},i.prototype.getKeyRecoveryParam=function(e,t,n,i){if(t=new u(t,i),null!==t.recoveryParam)return t.recoveryParam;for(var r=0;r<4;r++){var a;try{a=this.recoverPubKey(e,t,r)}catch(e){continue}if(a.eq(n))return r}throw new Error("Unable to find valid recovery factor")}},{"../../elliptic":56,"./key":64,"./signature":65,"bn.js":54}],64:[function(e,t,n){"use strict";function i(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}var r=e("bn.js");t.exports=i,i.fromPublic=function(e,t,n){return t instanceof i?t:new i(e,{pub:t,pubEnc:n})},i.fromPrivate=function(e,t,n){return t instanceof i?t:new i(e,{priv:t,privEnc:n})},i.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{ +result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},i.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},i.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},i.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},i.prototype._importPublic=function(e,t){return e.x||e.y?void(this.pub=this.ec.curve.point(e.x,e.y)):void(this.pub=this.ec.curve.decodePoint(e,t))},i.prototype.derive=function(e){return e.mul(this.priv).getX()},i.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},i.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},i.prototype.inspect=function(){return""}},{"bn.js":54}],65:[function(e,t,n){"use strict";function i(e,t){return e instanceof i?e:void(this._importDER(e,t)||(l(e.r&&e.s,"Signature without r or s"),this.r=new c(e.r,16),this.s=new c(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam))}function r(){this.place=0}function a(e,t){var n=e[t.place++];if(!(128&n))return n;for(var i=15&n,r=0,a=0,o=t.place;a>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}var c=e("bn.js"),u=e("../../elliptic"),p=u.utils,l=p.assert;t.exports=i,i.prototype._importDER=function(e,t){e=p.toArray(e,t);var n=new r;if(48!==e[n.place++])return!1;var i=a(e,n);if(i+n.place!==e.length)return!1;if(2!==e[n.place++])return!1;var o=a(e,n),s=e.slice(n.place,o+n.place);if(n.place+=o,2!==e[n.place++])return!1;var u=a(e,n);if(e.length!==u+n.place)return!1;var l=e.slice(n.place,u+n.place);return 0===s[0]&&128&s[1]&&(s=s.slice(1)),0===l[0]&&128&l[1]&&(l=l.slice(1)),this.r=new c(s),this.s=new c(l),this.recoveryParam=null,!0},i.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=o(t),n=o(n);!(n[0]||128&n[1]);)n=n.slice(1);var i=[2];s(i,t.length),i=i.concat(t),i.push(2),s(i,n.length);var r=i.concat(n),a=[48];return s(a,r.length),a=a.concat(r),p.encode(a,e)}},{"../../elliptic":56,"bn.js":54}],66:[function(e,t,n){"use strict";function i(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof i))return new i(e);var e=a.curves[e].curve;this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}var r=e("hash.js"),a=e("../../elliptic"),o=a.utils,s=o.assert,c=o.parseBytes,u=e("./key"),p=e("./signature");t.exports=i,i.prototype.sign=function(e,t){e=c(e);var n=this.keyFromSecret(t),i=this.hashInt(n.messagePrefix(),e),r=this.g.mul(i),a=this.encodePoint(r),o=this.hashInt(a,n.pubBytes(),e).mul(n.priv()),s=i.add(o).umod(this.curve.n);return this.makeSignature({R:r,S:s,Rencoded:a})},i.prototype.verify=function(e,t,n){e=c(e),t=this.makeSignature(t);var i=this.keyFromPublic(n),r=this.hashInt(t.Rencoded(),i.pubBytes(),e),a=this.g.mul(t.S()),o=t.R().add(i.pub().mul(r));return o.eq(a)},i.prototype.hashInt=function(){for(var e=this.hash(),t=0;t=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}var r=e("hash.js"),a=e("../elliptic"),o=a.utils,s=o.assert;t.exports=i,i.prototype._init=function(e,t,n){var i=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this.reseed=1},i.prototype.generate=function(e,t,n,i){if(this.reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(i=n,n=t,t=null),n&&(n=o.toArray(n,i),this._update(n));for(var r=[];r.length>8,o=255&r;a?n.push(a,o):n.push(o)}return n}function r(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",n=0;n=0;){var a;if(r.isOdd()){var o=r.andln(i-1);a=o>(i>>1)-1?(i>>1)-o:o,r.isubn(a)}else a=0;n.push(a);for(var s=0!==r.cmpn(0)&&0===r.andln(i-1)?t+1:1,c=1;c0||t.cmpn(-r)>0;){var a=e.andln(3)+i&3,o=t.andln(3)+r&3;3===a&&(a=-1),3===o&&(o=-1);var s;if(0===(1&a))s=0;else{var c=e.andln(7)+i&7;s=3!==c&&5!==c||2!==o?a:-a}n[0].push(s);var u;if(0===(1&o))u=0;else{var c=t.andln(7)+r&7;u=3!==c&&5!==c||2!==a?o:-o}n[1].push(u),2*i===s+1&&(i=1-i),2*r===u+1&&(r=1-r),e.iushrn(1),t.iushrn(1)}return n}function c(e,t,n){var i="_"+t;e.prototype[t]=function(){return void 0!==this[i]?this[i]:this[i]=n.call(this)}}function u(e){return"string"==typeof e?l.toArray(e,"hex"):e}function p(e){return new f(e,"hex","le")}var l=n,f=e("bn.js");l.assert=function(e,t){if(!e)throw new Error(t||"Assertion failed")},l.toArray=i,l.zero2=r,l.toHex=a,l.encode=function(e,t){return"hex"===t?a(e):e},l.getNAF=o,l.getJSF=s,l.cachedProperty=c,l.parseBytes=u,l.intFromLE=p},{"bn.js":54}],72:[function(e,t,n){function i(e){this.rand=e}var r;if(t.exports=function(e){return r||(r=new i(null)),r.generate(e)},t.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},"object"==typeof window)window.crypto&&window.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return window.crypto.getRandomValues(t),t}:window.msCrypto&&window.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return window.msCrypto.getRandomValues(t),t}:i.prototype._rand=function(){throw new Error("Not implemented yet")};else try{var a=e("crypto");i.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){i.prototype._rand=function(e){for(var t=new Uint8Array(e),n=0;n=this._delta8){e=this.pending;var n=e.length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=a.join32(e,0,e.length-n,this.endian);for(var i=0;i>>24&255,i[r++]=e>>>16&255,i[r++]=e>>>8&255,i[r++]=255&e}else{i[r++]=255&e,i[r++]=e>>>8&255,i[r++]=e>>>16&255,i[r++]=e>>>24&255,i[r++]=0,i[r++]=0,i[r++]=0,i[r++]=0;for(var a=8;athis.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var t=e.length;t>>3}function d(e){return O(e,17)^O(e,19)^e>>>10}function m(e,t,n,i){return 0===e?c(t,n,i):1===e||3===e?p(t,n,i):2===e?u(t,n,i):void 0}function g(e,t,n,i,r,a){var o=e&n^~e&r;return o<0&&(o+=4294967296),o}function b(e,t,n,i,r,a){var o=t&i^~t&a;return o<0&&(o+=4294967296),o}function v(e,t,n,i,r,a){var o=e&n^e&r^n&r;return o<0&&(o+=4294967296),o}function y(e,t,n,i,r,a){var o=t&i^t&a^i&a;return o<0&&(o+=4294967296),o}function w(e,t){var n=z(e,t,28),i=z(t,e,2),r=z(t,e,7),a=n^i^r;return a<0&&(a+=4294967296),a}function x(e,t){var n=F(e,t,28),i=F(t,e,2),r=F(t,e,7),a=n^i^r;return a<0&&(a+=4294967296),a}function k(e,t){var n=z(e,t,14),i=z(e,t,18),r=z(t,e,9),a=n^i^r;return a<0&&(a+=4294967296),a}function _(e,t){var n=F(e,t,14),i=F(e,t,18),r=F(t,e,9),a=n^i^r;return a<0&&(a+=4294967296),a}function j(e,t){var n=z(e,t,1),i=z(e,t,8),r=R(e,t,7),a=n^i^r;return a<0&&(a+=4294967296),a}function S(e,t){var n=F(e,t,1),i=F(e,t,8),r=N(e,t,7),a=n^i^r;return a<0&&(a+=4294967296),a}function E(e,t){var n=z(e,t,19),i=z(t,e,29),r=R(e,t,6),a=n^i^r;return a<0&&(a+=4294967296),a}function A(e,t){var n=F(e,t,19),i=F(t,e,29),r=N(e,t,6),a=n^i^r;return a<0&&(a+=4294967296),a}var C=e("../hash"),T=C.utils,I=T.assert,O=T.rotr32,D=T.rotl32,M=T.sum32,q=T.sum32_4,B=T.sum32_5,z=T.rotr64_hi,F=T.rotr64_lo,R=T.shr64_hi,N=T.shr64_lo,P=T.sum64,L=T.sum64_hi,U=T.sum64_lo,H=T.sum64_4_hi,K=T.sum64_4_lo,V=T.sum64_5_hi,G=T.sum64_5_lo,X=C.common.BlockHash,W=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],J=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],Z=[1518500249,1859775393,2400959708,3395469782];T.inherits(i,X),n.sha256=i,i.blockSize=512,i.outSize=256,i.hmacStrength=192,i.padLength=64,i.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i>8,o=255&r;a?n.push(a,o):n.push(o)}else for(var i=0;i>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24;return t>>>0}function o(e,t){for(var n="",i=0;i>>0}return a}function p(e,t){for(var n=new Array(4*e.length),i=0,r=0;i>>24,n[r+1]=a>>>16&255,n[r+2]=a>>>8&255,n[r+3]=255&a):(n[r+3]=a>>>24,n[r+2]=a>>>16&255,n[r+1]=a>>>8&255,n[r]=255&a)}return n}function l(e,t){return e>>>t|e<<32-t}function f(e,t){return e<>>32-t}function h(e,t){return e+t>>>0}function d(e,t,n){return e+t+n>>>0}function m(e,t,n,i){return e+t+n+i>>>0}function g(e,t,n,i,r){return e+t+n+i+r>>>0}function b(e,t){if(!e)throw new Error(t||"Assertion failed")}function v(e,t,n,i){var r=e[t],a=e[t+1],o=i+a>>>0,s=(o>>0,e[t+1]=o}function y(e,t,n,i){var r=t+i>>>0,a=(r>>0}function w(e,t,n,i){var r=t+i;return r>>>0}function x(e,t,n,i,r,a,o,s){var c=0,u=t;u=u+i>>>0,c+=u>>0,c+=u>>0,c+=u>>0}function k(e,t,n,i,r,a,o,s){var c=t+i+a+s;return c>>>0}function _(e,t,n,i,r,a,o,s,c,u){var p=0,l=t;l=l+i>>>0,p+=l>>0,p+=l>>0,p+=l>>0,p+=l>>0}function j(e,t,n,i,r,a,o,s,c,u){var p=t+i+a+s+u;return p>>>0}function S(e,t,n){var i=t<<32-n|e>>>n;return i>>>0}function E(e,t,n){var i=e<<32-n|t>>>n;return i>>>0}function A(e,t,n){return e>>>n}function C(e,t,n){var i=e<<32-n|t>>>n;return i>>>0}var T=n,I=e("inherits");T.toArray=i,T.toHex=r,T.htonl=a,T.toHex32=o,T.zero2=s,T.zero8=c,T.join32=u,T.split32=p,T.rotr32=l,T.rotl32=f,T.sum32=h,T.sum32_3=d,T.sum32_4=m,T.sum32_5=g,T.assert=b,T.inherits=I,n.sum64=v,n.sum64_hi=y,n.sum64_lo=w,n.sum64_4_hi=x,n.sum64_4_lo=k,n.sum64_5_hi=_,n.sum64_5_lo=j,n.rotr64_hi=S,n.rotr64_lo=E,n.shr64_hi=A,n.shr64_lo=C},{inherits:216}],79:[function(e,t,n){t.exports={name:"elliptic",version:"6.3.2",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},keywords:["EC","Elliptic","curve","Cryptography"],author:{name:"Fedor Indutny",email:"fedor@indutny.com"},license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^1.4.3",coveralls:"^2.11.3",grunt:"^0.4.5","grunt-browserify":"^5.0.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^8.6.2",istanbul:"^0.4.2",jscs:"^2.9.0",jshint:"^2.6.0",mocha:"^2.1.0"},dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0",inherits:"^2.0.1"},gitHead:"cbace4683a4a548dc0306ef36756151a20299cd5",_id:"elliptic@6.3.2",_shasum:"e4c81e0829cf0a65ab70e998b8232723b5c1bc48",_from:"elliptic@>=6.0.0 <7.0.0",_npmVersion:"3.10.3",_nodeVersion:"6.3.0",_npmUser:{name:"indutny",email:"fedor@indutny.com"},dist:{shasum:"e4c81e0829cf0a65ab70e998b8232723b5c1bc48",tarball:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz"},maintainers:[{name:"indutny",email:"fedor@indutny.com"}],_npmOperationalInternal:{host:"packages-16-east.internal.npmjs.com",tmp:"tmp/elliptic-6.3.2.tgz_1473938837205_0.3108903462998569"},directories:{},_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.3.2.tgz",readme:"ERROR: No README data found!"}},{}],80:[function(e,t,n){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],81:[function(e,t,n){var i=e("asn1.js"),r=i.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});n.RSAPrivateKey=r;var a=i.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});n.RSAPublicKey=a;var o=i.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});n.PublicKey=o;var s=i.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=i.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});n.PrivateKey=c;var u=i.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});n.EncryptedPrivateKey=u;var p=i.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});n.DSAPrivateKey=p,n.DSAparam=i.define("DSAparam",function(){this.int()});var l=i.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});n.ECPrivateKey=l;var f=i.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});n.signature=i.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"asn1.js":84}],82:[function(e,t,n){(function(n){var i=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m,r=/^-----BEGIN (.*) KEY-----\r?\n/m,a=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m,o=e("evp_bytestokey"),s=e("browserify-aes");t.exports=function(e,t){var c,u=e.toString(),p=u.match(i);if(p){var l="aes"+p[1],f=new n(p[2],"hex"),h=new n(p[3].replace(/\r?\n/g,""),"base64"),d=o(t,f.slice(0,8),parseInt(p[1],10)).key,m=[],g=s.createDecipheriv(l,d,f);m.push(g.update(h)),m.push(g.final()),c=n.concat(m)}else{var b=u.match(a);c=new n(b[2].replace(/\r?\n/g,""),"base64")}var v=u.match(r)[1]+" KEY";return{tag:v,data:c}}}).call(this,e("buffer").Buffer)},{"browserify-aes":101,buffer:17,evp_bytestokey:116}],83:[function(e,t,n){(function(n){function i(e){var t;"object"!=typeof e||n.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new n(e));var i,o,c=s(e,t),u=c.tag,p=c.data;switch(u){case"PUBLIC KEY":switch(o=a.PublicKey.decode(p,"der"),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=a.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+u);case"ENCRYPTED PRIVATE KEY":p=a.EncryptedPrivateKey.decode(p,"der"),p=r(p,t);case"PRIVATE KEY":switch(o=a.PrivateKey.decode(p,"der"),i=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:a.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=a.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+i)}throw new Error("unknown key type "+u);case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(p,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(p,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(p,"der")};case"EC PRIVATE KEY":return p=a.ECPrivateKey.decode(p,"der"),{curve:p.parameters.value,privateKey:p.privateKey};default:throw new Error("unknown key type "+u)}}function r(e,t){var i=e.algorithm.decrypt.kde.kdeparams.salt,r=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=o[e.algorithm.decrypt.cipher.algo.join(".")],s=e.algorithm.decrypt.cipher.iv,p=e.subjectPrivateKey,l=parseInt(a.split("-")[1],10)/8,f=u.pbkdf2Sync(t,i,r,l),h=c.createDecipheriv(a,f,s),d=[];return d.push(h.update(p)),d.push(h.final()),n.concat(d)}var a=e("./asn1"),o=e("./aesid.json"),s=e("./fixProc"),c=e("browserify-aes"),u=e("pbkdf2");t.exports=i,i.signature=a.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":80,"./asn1":81,"./fixProc":82,"browserify-aes":101,buffer:17,pbkdf2:166}],84:[function(e,t,n){var i=n;i.bignum=e("bn.js"),i.define=e("./asn1/api").define,i.base=e("./asn1/base"),i.constants=e("./asn1/constants"),i.decoders=e("./asn1/decoders"),i.encoders=e("./asn1/encoders")},{"./asn1/api":85,"./asn1/base":87,"./asn1/constants":91,"./asn1/decoders":93,"./asn1/encoders":96,"bn.js":54}],85:[function(e,t,n){function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}var r=e("../asn1"),a=e("inherits"),o=n;o.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(t){var n;try{n=e("vm").runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){n=function(e){this._initNamed(e)}}return a(n,t),n.prototype._initNamed=function(e){t.call(this,e)},new n(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(r.decoders[e])),this.decoders[e]},i.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r.encoders[e])),this.encoders[e]},i.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},{"../asn1":84,inherits:216,vm:254}],86:[function(e,t,n){function i(e,t){return o.call(this,t),s.isBuffer(e)?(this.base=e,this.offset=0,void(this.length=e.length)):void this.error("Input not Buffer")}function r(e,t){if(Array.isArray(e))this.length=0,this.value=e.map(function(e){return e instanceof r||(e=new r(e,t)),this.length+=e.length,e},this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=s.byteLength(e);else{if(!s.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}var a=e("inherits"),o=e("../base").Reporter,s=e("buffer").Buffer;a(i,o),n.DecoderBuffer=i,i.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},i.prototype.restore=function(e){var t=new i(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},i.prototype.isEmpty=function(){return this.offset===this.length},i.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},i.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var n=new i(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},i.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},n.EncoderBuffer=r,r.prototype.join=function(e,t){return e||(e=new s(this.length)),t||(t=0),0===this.length?e:(Array.isArray(this.value)?this.value.forEach(function(n){n.join(e,t),t+=n.length}):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):s.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length),e)}},{"../base":87,buffer:17,inherits:216}],87:[function(e,t,n){var i=n;i.Reporter=e("./reporter").Reporter,i.DecoderBuffer=e("./buffer").DecoderBuffer,i.EncoderBuffer=e("./buffer").EncoderBuffer,i.Node=e("./node")},{"./buffer":86,"./node":88,"./reporter":89}],88:[function(e,t,n){function i(e,t){var n={};this._baseState=n,n.enc=e,n.parent=t||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}var r=e("../base").Reporter,a=e("../base").EncoderBuffer,o=e("../base").DecoderBuffer,s=e("minimalistic-assert"),c=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(c),p=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];t.exports=i;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];i.prototype.clone=function(){var e=this._baseState,t={};l.forEach(function(n){t[n]=e[n]});var n=new this.constructor(t.parent);return n._baseState=t,n},i.prototype._wrap=function(){var e=this._baseState;u.forEach(function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}},this)},i.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter(function(e){return e._baseState.parent===this},this),s.equal(t.children.length,1,"Root node can have only one child")},i.prototype._useArgs=function(e){var t=this._baseState,n=e.filter(function(e){return e instanceof this.constructor},this);e=e.filter(function(e){return!(e instanceof this.constructor)},this),0!==n.length&&(s(null===t.children),t.children=n,n.forEach(function(e){e._baseState.parent=this},this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map(function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach(function(n){n==(0|n)&&(n|=0);var i=e[n];t[i]=n}),t}))},p.forEach(function(e){i.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}}),c.forEach(function(e){i.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}}),i.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},i.prototype.optional=function(){var e=this._baseState;return e.optional=!0,this},i.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},i.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit), +t.explicit=e,this},i.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},i.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},i.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},i.prototype.any=function(){var e=this._baseState;return e.any=!0,this},i.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map(function(t){return e[t]})),this},i.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},i.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var i=n.default,r=!0,a=null;if(null!==n.key&&(a=e.enterKey(n.key)),n.optional){var s=null;if(null!==n.explicit?s=n.explicit:null!==n.implicit?s=n.implicit:null!==n.tag&&(s=n.tag),null!==s||n.any){if(r=this._peekTag(e,s,n.any),e.isError(r))return r}else{var c=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),r=!0}catch(e){r=!1}e.restore(c)}}var u;if(n.obj&&r&&(u=e.enterObject()),r){if(null!==n.explicit){var p=this._decodeTag(e,n.explicit);if(e.isError(p))return p;e=p}var l=e.offset;if(null===n.use&&null===n.choice){if(n.any)var c=e.save();var f=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(f))return f;n.any?i=e.raw(c):e=f}if(t&&t.track&&null!==n.tag&&t.track(e.path(),l,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),i=n.any?i:null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),e.isError(i))return i;if(n.any||null!==n.choice||null===n.children||n.children.forEach(function(n){n._decode(e,t)}),n.contains&&("octstr"===n.tag||"bitstr"===n.tag)){var h=new o(i);i=this._getUse(n.contains,e._reporterState.obj)._decode(h,t)}}return n.obj&&r&&(i=e.leaveObject(u)),null===n.key||null===i&&r!==!0?null!==a&&e.exitKey(a):e.leaveKey(a,n.key,i),i},i.prototype._decodeGeneric=function(e,t,n){var i=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,i.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&i.args?this._decodeObjid(t,i.args[0],i.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,i.args&&i.args[0],n):null!==i.use?this._getUse(i.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},i.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},i.prototype._decodeChoice=function(e,t){var n=this._baseState,i=null,r=!1;return Object.keys(n.choice).some(function(a){var o=e.save(),s=n.choice[a];try{var c=s._decode(e,t);if(e.isError(c))return!1;i={type:a,value:c},r=!0}catch(t){return e.restore(o),!1}return!0},this),r?i:e.error("Choice not matched")},i.prototype._createEncoderBuffer=function(e){return new a(e,this.reporter)},i.prototype._encode=function(e,t,n){var i=this._baseState;if(null===i.default||i.default!==e){var r=this._encodeValue(e,t,n);if(void 0!==r&&!this._skipDefault(r,t,n))return r}},i.prototype._encodeValue=function(e,t,n){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new r);var a=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var o=null,s=!1;if(i.any)a=this._createEncoderBuffer(e);else if(i.choice)a=this._encodeChoice(e,t);else if(i.contains)o=this._getUse(i.contains,n)._encode(e,t),s=!0;else if(i.children)o=i.children.map(function(n){if("null_"===n._baseState.tag)return n._encode(null,t,e);if(null===n._baseState.key)return t.error("Child should have a key");var i=t.enterKey(n._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var r=n._encode(e[n._baseState.key],t,e);return t.leaveKey(i),r},this).filter(function(e){return e}),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,o=this._createEncoderBuffer(e.map(function(n){var i=this._baseState;return this._getUse(i.args[0],e)._encode(n,t)},c))}else null!==i.use?a=this._getUse(i.use,n)._encode(e,t):(o=this._encodePrimitive(i.tag,e),s=!0);var a;if(!i.any&&null===i.choice){var u=null!==i.implicit?i.implicit:i.tag,p=null===i.implicit?"universal":"context";null===u?null===i.use&&t.error("Tag could be ommited only for .use()"):null===i.use&&(a=this._encodeComposite(u,s,p,o))}return null!==i.explicit&&(a=this._encodeComposite(i.explicit,!1,"context",a)),a},i.prototype._encodeChoice=function(e,t){var n=this._baseState,i=n.choice[e.type];return i||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),i._encode(e.value,t)},i.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},i.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},i.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},{"../base":87,"minimalistic-assert":98}],89:[function(e,t,n){function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function r(e,t){this.path=e,this.rethrow(t)}var a=e("inherits");n.Reporter=i,i.prototype.isError=function(e){return e instanceof r},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,n){var i=this._reporterState;this.exitKey(e),null!==i.obj&&(i.obj[t]=n)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},i.prototype.error=function(e){var t,n=this._reporterState,i=e instanceof r;if(t=i?e:new r(n.path.map(function(e){return"["+JSON.stringify(e)+"]"}).join(""),e.message||e,e.stack),!n.options.partial)throw t;return i||n.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},a(r,Error),r.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,r),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:216}],90:[function(e,t,n){var i=e("../constants");n.tagClass={0:"universal",1:"application",2:"context",3:"private"},n.tagClassByName=i._reverse(n.tagClass),n.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},n.tagByName=i._reverse(n.tag)},{"../constants":91}],91:[function(e,t,n){var i=n;i._reverse=function(e){var t={};return Object.keys(e).forEach(function(n){(0|n)==n&&(n=0|n);var i=e[n];t[i]=n}),t},i.der=e("./der")},{"./der":90}],92:[function(e,t,n){function i(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new r,this.tree._init(e.body)}function r(e){u.Node.call(this,"der",e)}function a(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var i=l.tagClass[n>>6],r=0===(32&n);if(31===(31&n)){var a=n;for(n=0;128===(128&a);){if(a=e.readUInt8(t),e.isError(a))return a;n<<=7,n|=127&a}}else n&=31;var o=l.tag[n];return{cls:i,primitive:r,tag:n,tagStr:o}}function o(e,t,n){var i=e.readUInt8(n);if(e.isError(i))return i;if(!t&&128===i)return null;if(0===(128&i))return i;var r=127&i;if(r>4)return e.error("length octect is too long");i=0;for(var a=0;a=31?i.error("Multi-octet tag encoding unsupported"):(t||(r|=32),r|=l.tagClassByName[n||"universal"]<<6)}var s=e("inherits"),c=e("buffer").Buffer,u=e("../../asn1"),p=u.base,l=u.constants.der;t.exports=i,i.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},s(r,p.Node),r.prototype._encodeComposite=function(e,t,n,i){var r=o(e,t,n,this.reporter);if(i.length<128){var a=new c(2);return a[0]=r,a[1]=i.length,this._createEncoderBuffer([a,i])}for(var s=1,u=i.length;u>=256;u>>=8)s++;var a=new c(2+s);a[0]=r,a[1]=128|s;for(var u=1+s,p=i.length;p>0;u--,p>>=8)a[u]=255&p;return this._createEncoderBuffer([a,i])},r.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var n=new c(2*e.length),i=0;i=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var r=0,i=0;i=128;a>>=7)r++}for(var o=new c(r),s=o.length-1,i=e.length-1;i>=0;i--){var a=e[i];for(o[s--]=127&a;(a>>=7)>0;)o[s--]=128|127&a}return this._createEncoderBuffer(o)},r.prototype._encodeTime=function(e,t){var n,i=new Date(e);return"gentime"===t?n=[a(i.getFullYear()),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[a(i.getFullYear()%100),a(i.getUTCMonth()+1),a(i.getUTCDate()),a(i.getUTCHours()),a(i.getUTCMinutes()),a(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},r.prototype._encodeNull=function(){return this._createEncoderBuffer("")},r.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!c.isBuffer(e)){var n=e.toArray();!e.sign&&128&n[0]&&n.unshift(0),e=new c(n)}if(c.isBuffer(e)){var i=e.length;0===e.length&&i++;var r=new c(i);return e.copy(r),0===e.length&&(r[0]=0),this._createEncoderBuffer(r)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var i=1,a=e;a>=256;a>>=8)i++;for(var r=new Array(i),a=r.length-1;a>=0;a--)r[a]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(new c(r))},r.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},r.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},r.prototype._skipDefault=function(e,t,n){var i,r=this._baseState;if(null===r.default)return!1;var a=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),a.length!==r.defaultBuffer.length)return!1;for(i=0;i0&&n.ishrn(i),n}function u(e,t){e=c(e,t),e=e.mod(t);var i=new n(e.toArray());if(i.length=t)throw new Error("invalid sig")}var s=e("./curves"),c=e("elliptic"),u=e("parse-asn1"),p=e("bn.js"),l=c.ec;t.exports=i}).call(this,e("buffer").Buffer)},{"./curves":53,"bn.js":54,buffer:17,elliptic:56,"parse-asn1":83}],119:[function(e,t,n){(function(n){function i(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new a.ec(this.curveType.name),this.keys=void 0}function r(e,t,i){Array.isArray(e)||(e=e.toArray());var r=new n(e);if(i&&r.length>5]|=128<>>9<<4)+14]=t;for(var n=1732584193,i=-271733879,r=-1732584194,p=271733878,l=0;l>16)+(t>>16)+(n>>16);return i<<16|65535&n}function p(e,t){return e<>>32-t}var l=e("./helpers");t.exports=function(e){return l.hash(e,i,16)}},{"./helpers":146}],148:[function(e,t,n){arguments[4][38][0].apply(n,arguments)},{buffer:17,dup:38,inherits:216,stream:240,string_decoder:247}],149:[function(e,t,n){(function(e){function n(e){for(var t=[],n=0,i=0;n>>5]|=e[n]<<24-i%32;return t}function i(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t}function r(e,t,n){for(var i=0;i<16;i++){var r=n+i,l=t[r];t[r]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}var v,y,w,x,k,_,j,S,E,A;_=v=e[0],j=y=e[1],S=w=e[2],E=x=e[3],A=k=e[4];var C;for(i=0;i<80;i+=1)C=v+t[n+f[i]]|0,C+=i<16?a(y,w,x)+g[0]:i<32?o(y,w,x)+g[1]:i<48?s(y,w,x)+g[2]:i<64?c(y,w,x)+g[3]:u(y,w,x)+g[4],C=0|C,C=p(C,d[i]),C=C+k|0,v=k,k=x,x=p(w,10),w=y,y=C,C=_+t[n+h[i]]|0,C+=i<16?u(j,S,E)+b[0]:i<32?c(j,S,E)+b[1]:i<48?s(j,S,E)+b[2]:i<64?o(j,S,E)+b[3]:a(j,S,E)+b[4],C=0|C,C=p(C,m[i]),C=C+A|0,_=A,A=E,E=p(S,10),S=j,j=C;C=e[1]+w+E|0,e[1]=e[2]+x+A|0,e[2]=e[3]+k+_|0,e[3]=e[4]+v+j|0,e[4]=e[0]+y+S|0,e[0]=C}function a(e,t,n){return e^t^n}function o(e,t,n){return e&t|~e&n}function s(e,t,n){return(e|~t)^n}function c(e,t,n){return e&n|t&~n}function u(e,t,n){return e^(t|~n)}function p(e,t){return e<>>32-t}function l(t){var a=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=n(t),s=8*t.length,c=8*t.length;o[s>>>5]|=128<<24-s%32,o[(s+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);for(var u=0;u>>24)|4278255360&(p<<24|p>>>8)}var l=i(a);return new e(l)}var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],g=[0,1518500249,1859775393,2400959708,2840853838],b=[1352829926,1548603684,1836072691,2053994217,0];t.exports=l}).call(this,e("buffer").Buffer)},{buffer:17}],150:[function(e,t,n){(function(e){function n(t,n){this._block=new e(t),this._finalSize=n,this._blockSize=t,this._len=0,this._s=0}n.prototype.update=function(t,n){"string"==typeof t&&(n=n||"utf8",t=new e(t,n));for(var i=this._len+=t.length,r=this._s||0,a=0,o=this._block;r=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var n=this._update(this._block)||this._hash();return e?n.toString(e):n},n.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=n}).call(this,e("buffer").Buffer)},{buffer:17}],151:[function(e,t,n){var n=t.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=e("./sha"),n.sha1=e("./sha1"),n.sha224=e("./sha224"),n.sha256=e("./sha256"),n.sha384=e("./sha384"),n.sha512=e("./sha512")},{"./sha":152,"./sha1":153,"./sha224":154,"./sha256":155,"./sha384":156,"./sha512":157}],152:[function(e,t,n){(function(n){function i(){this.init(),this._w=p,c.call(this,64,56)}function r(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function o(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}var s=e("inherits"),c=e("./hash"),u=[1518500249,1859775393,-1894007588,-899497514],p=new Array(80);s(i,c),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,s=0|this._c,c=0|this._d,p=0|this._e,l=0;l<16;++l)t[l]=e.readInt32BE(4*l);for(;l<80;++l)t[l]=t[l-3]^t[l-8]^t[l-14]^t[l-16];for(var f=0;f<80;++f){var h=~~(f/20),d=r(n)+o(h,i,s,c)+p+t[f]+u[h]|0;p=c,c=s,s=a(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=s+this._c|0,this._d=c+this._d|0,this._e=p+this._e|0},i.prototype._hash=function(){var e=new n(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":150,buffer:17,inherits:216}],153:[function(e,t,n){(function(n){function i(){this.init(),this._w=l,u.call(this,64,56)}function r(e){return e<<1|e>>>31}function a(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,t,n,i){return 0===e?t&n|~t&i:2===e?t&n|t&i|n&i:t^n^i}var c=e("inherits"),u=e("./hash"),p=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);c(i,u),i.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,c=0|this._c,u=0|this._d,l=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=r(t[f-3]^t[f-8]^t[f-14]^t[f-16]);for(var h=0;h<80;++h){var d=~~(h/20),m=a(n)+s(d,i,c,u)+l+t[h]+p[d]|0;l=u,u=c,c=o(i),i=n,n=m}this._a=n+this._a|0,this._b=i+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=l+this._e|0},i.prototype._hash=function(){var e=new n(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":150,buffer:17,inherits:216}],154:[function(e,t,n){(function(n){function i(){this.init(),this._w=s,o.call(this,64,56)}var r=e("inherits"),a=e("./sha256"),o=e("./hash"),s=new Array(64);r(i,a),i.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},i.prototype._hash=function(){var e=new n(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":150,"./sha256":155,buffer:17,inherits:216}],155:[function(e,t,n){(function(n){function i(){this.init(),this._w=h,l.call(this,64,56)}function r(e,t,n){return n^e&(t^n)}function a(e,t,n){return e&t|n&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var p=e("inherits"),l=e("./hash"),f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=new Array(64);p(i,l),i.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._a,i=0|this._b,p=0|this._c,l=0|this._d,h=0|this._e,d=0|this._f,m=0|this._g,g=0|this._h,b=0;b<16;++b)t[b]=e.readInt32BE(4*b);for(;b<64;++b)t[b]=u(t[b-2])+t[b-7]+c(t[b-15])+t[b-16]|0;for(var v=0;v<64;++v){var y=g+s(h)+r(h,d,m)+f[v]+t[v]|0,w=o(n)+a(n,i,p)|0;g=m,m=d,d=h,h=l+y|0,l=p,p=i,i=n,n=y+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=p+this._c|0,this._d=l+this._d|0,this._e=h+this._e|0,this._f=d+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},i.prototype._hash=function(){var e=new n(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":150,buffer:17,inherits:216}],156:[function(e,t,n){(function(n){function i(){this.init(),this._w=s,o.call(this,128,112)}var r=e("inherits"),a=e("./sha512"),o=e("./hash"),s=new Array(160);r(i,a),i.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},i.prototype._hash=function(){function e(e,n,i){t.writeInt32BE(e,i),t.writeInt32BE(n,i+4)}var t=new n(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":150,"./sha512":157,buffer:17,inherits:216}],157:[function(e,t,n){(function(n){function i(){this.init(),this._w=g,d.call(this,128,112)}function r(e,t,n){return n^e&(t^n)}function a(e,t,n){return e&t|n&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function f(e,t){return e>>>0>>0?1:0}var h=e("inherits"),d=e("./hash"),m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],g=new Array(160);h(i,d),i.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},i.prototype._update=function(e){for(var t=this._w,n=0|this._ah,i=0|this._bh,h=0|this._ch,d=0|this._dh,g=0|this._eh,b=0|this._fh,v=0|this._gh,y=0|this._hh,w=0|this._al,x=0|this._bl,k=0|this._cl,_=0|this._dl,j=0|this._el,S=0|this._fl,E=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var T=t[C-30],I=t[C-30+1],O=c(T,I),D=u(I,T);T=t[C-4],I=t[C-4+1];var M=p(T,I),q=l(I,T),B=t[C-14],z=t[C-14+1],F=t[C-32],R=t[C-32+1],N=D+z|0,P=O+B+f(N,D)|0;N=N+q|0,P=P+M+f(N,q)|0,N=N+R|0,P=P+F+f(N,R)|0,t[C]=P,t[C+1]=N}for(var L=0;L<160;L+=2){P=t[L],N=t[L+1];var U=a(n,i,h),H=a(w,x,k),K=o(n,w),V=o(w,n),G=s(g,j),X=s(j,g),W=m[L],J=m[L+1],Z=r(g,b,v),$=r(j,S,E),Q=A+X|0,Y=y+G+f(Q,A)|0;Q=Q+$|0,Y=Y+Z+f(Q,$)|0,Q=Q+J|0,Y=Y+W+f(Q,J)|0,Q=Q+N|0,Y=Y+P+f(Q,N)|0;var ee=V+H|0,te=K+U+f(ee,V)|0;y=v,A=E,v=b,E=S,b=g,S=j,j=_+Q|0,g=d+Y+f(j,_)|0,d=h,_=k,h=i,k=x,i=n,x=w,w=Q+ee|0,n=Y+te+f(w,Q)|0}this._al=this._al+w|0,this._bl=this._bl+x|0,this._cl=this._cl+k|0,this._dl=this._dl+_|0,this._el=this._el+j|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+n+f(this._al,w)|0,this._bh=this._bh+i+f(this._bl,x)|0,this._ch=this._ch+h+f(this._cl,k)|0,this._dh=this._dh+d+f(this._dl,_)|0,this._eh=this._eh+g+f(this._el,j)|0,this._fh=this._fh+b+f(this._fl,S)|0,this._gh=this._gh+v+f(this._gl,E)|0,this._hh=this._hh+y+f(this._hl,A)|0},i.prototype._hash=function(){function e(e,n,i){t.writeInt32BE(e,i),t.writeInt32BE(n,i+4)}var t=new n(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=i}).call(this,e("buffer").Buffer)},{"./hash":150,buffer:17,inherits:216}],158:[function(e,t,n){(function(n){"use strict";function i(e,t){o.call(this),e=e.toLowerCase(),"string"==typeof t&&(t=new n(t));var i="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>i?t=r(e).update(t).digest():t.lengthe;)n.ishrn(1);if(n.isEven()&&n.iadd(f),n.testn(1)||n.iadd(h),t.cmp(h)){if(!t.cmp(d))for(;n.mod(m).cmp(g);)n.iadd(v)}else for(;n.mod(u).cmp(b);)n.iadd(v);if(i=n.shrn(1),r(i)&&r(n)&&a(i)&&a(n)&&l.test(i)&&l.test(n))return n}}var s=e("randombytes");t.exports=o,o.simpleSieve=r,o.fermatTest=a;var c=e("bn.js"),u=new c(24),p=e("miller-rabin"),l=new p,f=new c(1),h=new c(2),d=new c(5),m=(new c(16),new c(8),new c(10)),g=new c(3),b=(new c(7),new c(11)),v=new c(4),y=(new c(12),null)},{"bn.js":163,"miller-rabin":164,randombytes:213}],162:[function(e,t,n){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],163:[function(e,t,n){arguments[4][54][0].apply(n,arguments)},{dup:54}],164:[function(e,t,n){function i(e){this.rand=e||new a.Rand}var r=e("bn.js"),a=e("brorand");t.exports=i,i.create=function(e){return new i(e)},i.prototype._rand=function(e){var t=e.bitLength(),n=this.rand.generate(Math.ceil(t/8));n[0]|=3;var i=7&t;return 0!==i&&(n[n.length-1]>>=7-i),new r(n)},i.prototype.test=function(e,t,n){var i=e.bitLength(),a=r.mont(e),o=new r(1).toRed(a);t||(t=Math.max(1,i/48|0));for(var s=e.subn(1),c=s.subn(1),u=0;!s.testn(u);u++);for(var p=e.shrn(u),l=s.toRed(a),f=!0;t>0;t--){var h=this._rand(c);n&&n(h);var d=h.toRed(a).redPow(p);if(0!==d.cmp(o)&&0!==d.cmp(l)){for(var m=1;m0;t--){var l=this._rand(s),f=e.gcd(l);if(0!==f.cmpn(1))return f;var h=l.toRed(i).redPow(u);if(0!==h.cmp(a)&&0!==h.cmp(p)){for(var d=1;d=6?"utf-8":"binary"}n.pbkdf2Sync=function(e,t,n,s,c){i.isBuffer(e)||(e=new i(e,o)),i.isBuffer(t)||(t=new i(t,o)),a(n,s),c=c||"sha1";var u,p=1,l=new i(s),f=new i(t.length+4);t.copy(f,0,0,t.length);for(var h,d,m=1;m<=p;m++){f.writeUInt32BE(m,t.length);var g=r(c,e).update(f).digest();u||(u=g.length,d=new i(u),p=Math.ceil(s/u),h=s-(p-1)*u),g.copy(d,0,0,u);for(var b=1;bi||t!==t)throw new TypeError("Bad key length")}},{}],168:[function(e,t,n){n.publicEncrypt=e("./publicEncrypt"),n.privateDecrypt=e("./privateDecrypt"),n.privateEncrypt=function(e,t){return n.publicEncrypt(e,t,!0)},n.publicDecrypt=function(e,t){return n.privateDecrypt(e,t,!0)}},{"./privateDecrypt":209,"./publicEncrypt":210}],169:[function(e,t,n){(function(n){function i(e){var t=new n(4);return t.writeUInt32BE(e,0),t}var r=e("create-hash");t.exports=function(e,t){for(var a,o=new n(""),s=0;o.length=t.length){a++;break}var o=t.slice(2,r-1);t.slice(r-1,r);if(("0002"!==i.toString("hex")&&!n||"0001"!==i.toString("hex")&&n)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return t.slice(r)}function a(e,t){e=new n(e),t=new n(t);var i=0,r=e.length;e.length!==t.length&&(i++,r=Math.min(e.length,t.length));for(var a=-1;++al||new u(t).cmp(c.modulus)>=0)throw new Error("decryption error");var h;h=a?f(new u(t),c):p(t,c);var d=new n(l-h.length);if(d.fill(0),h=n.concat([d,h],l),4===s)return i(c,h);if(1===s)return r(c,h,a);if(3===s)return h;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":169,"./withPublic":211,"./xor":212,"bn.js":170,"browserify-rsa":171,buffer:17,"create-hash":145,"parse-asn1":175}],210:[function(e,t,n){(function(n){function i(e,t){var i=e.modulus.byteLength(),r=t.length,a=c("sha1").update(new n("")).digest(),o=a.length,f=2*o;if(r>i-f-2)throw new Error("message too long");var h=new n(i-r-f-2);h.fill(0);var d=i-o-1,m=s(o),g=p(n.concat([a,h,new n([1]),t],d),u(m,d)),b=p(m,u(g,o));return new l(n.concat([new n([0]),b,g],i))}function r(e,t,i){var r=t.length,o=e.modulus.byteLength();if(r>o-11)throw new Error("message too long");var s;return i?(s=new n(o-r-3),s.fill(255)):s=a(o-r-3),new l(n.concat([new n([0,i?1:2]),s,new n([0]),t],o))}function a(e,t){for(var i,r=new n(e),a=0,o=s(2*e),c=0;a=0)throw new Error("data too long for modulus")}return n?h(s,c):f(s,c)}}).call(this,e("buffer").Buffer)},{"./mgf":169,"./withPublic":211,"./xor":212,"bn.js":170,"browserify-rsa":171,buffer:17,"create-hash":145,"parse-asn1":175,randombytes:213}],211:[function(e,t,n){(function(n){function i(e,t){return new n(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}var r=e("bn.js");t.exports=i}).call(this,e("buffer").Buffer)},{"bn.js":170,buffer:17}],212:[function(e,t,n){t.exports=function(e,t){for(var n=e.length,i=-1;++i65536)throw new Error("requested too many random bytes");var a=new n.Uint8Array(t);t>0&&o.getRandomValues(a);var s=new i(a.buffer);return"function"==typeof r?e.nextTick(function(){r(null,s)}):s}var o=n.crypto||n.msCrypto;o&&o.getRandomValues?t.exports=a:t.exports=r}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:219,buffer:17}],214:[function(e,t,n){function i(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"==typeof e}function a(e){return"number"==typeof e}function o(e){return"object"==typeof e&&null!==e}function s(e){return void 0===e}t.exports=i,i.EventEmitter=i,i.prototype._events=void 0,i.prototype._maxListeners=void 0,i.defaultMaxListeners=10,i.prototype.setMaxListeners=function(e){if(!a(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},i.prototype.emit=function(e){var t,n,i,a,c,u;if(this._events||(this._events={}),"error"===e&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if(t=arguments[1],t instanceof Error)throw t;var p=new Error('Uncaught, unspecified "error" event. ('+t+")");throw p.context=t,p}if(n=this._events[e],s(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(o(n))for(a=Array.prototype.slice.call(arguments,1),u=n.slice(),i=u.length,c=0;c0&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace())),this},i.prototype.on=i.prototype.addListener,i.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},i.prototype.removeListener=function(e,t){var n,i,a,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],a=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(o(n)){for(s=a;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},i.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},i.prototype.listeners=function(e){var t;return t=this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},i.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},i.listenerCount=function(e,t){return e.listenerCount(t)}},{}],215:[function(e,t,n){var i=e("http"),r=t.exports;for(var a in i)i.hasOwnProperty(a)&&(r[a]=i[a]);r.request=function(e,t){return e||(e={}),e.scheme="https",e.protocol="https:",i.request.call(this,e,t)}},{http:241}],216:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],217:[function(e,t,n){function i(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}function r(e){return"function"==typeof e.readFloatLE&&"function"==typeof e.slice&&i(e.slice(0,0))}t.exports=function(e){return null!=e&&(i(e)||r(e)||!!e._isBuffer)}},{}],218:[function(e,t,n){(function(e){function t(e,t){for(var n=0,i=e.length-1;i>=0;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function i(e,t){if(e.filter)return e.filter(t);for(var n=[],i=0;i=-1&&!r;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,r="/"===o.charAt(0))}return n=t(i(n.split("/"),function(e){return!!e}),!r).join("/"),(r?"/":"")+n||"."},n.normalize=function(e){var r=n.isAbsolute(e),a="/"===o(e,-1);return e=t(i(e.split("/"),function(e){return!!e}),!r).join("/"),e||r||(e="."),e&&a&&(e+="/"),(r?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(i(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},n.relative=function(e,t){function i(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var r=i(e.split("/")),a=i(t.split("/")),o=Math.min(r.length,a.length),s=o,c=0;c1)for(var n=1;n1&&(i=n[0]+"@",e=n[1]),e=e.replace(D,".");var r=e.split("."),o=a(r,t).join(".");return i+o}function s(e){for(var t,n,i=[],r=0,a=e.length;r=55296&&t<=56319&&r65535&&(e-=65536,t+=z(e>>>10&1023|55296),e=56320|1023&e),t+=z(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:k}function p(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function l(e,t,n){var i=0;for(e=n?B(e/E):e>>1,e+=B(e/t);e>q*j>>1;i+=k)e=B(e/q);return B(i+(q+1)*e/(e+S))}function f(e){var t,n,i,a,o,s,p,f,h,d,m=[],g=e.length,b=0,v=C,y=A;for(n=e.lastIndexOf(T),n<0&&(n=0),i=0;i=128&&r("not-basic"),m.push(e.charCodeAt(i));for(a=n>0?n+1:0;a=g&&r("invalid-input"),f=u(e.charCodeAt(a++)),(f>=k||f>B((x-b)/s))&&r("overflow"),b+=f*s,h=p<=y?_:p>=y+j?j:p-y,!(fB(x/d)&&r("overflow"),s*=d;t=m.length+1,y=l(b-o,t,0==o),B(b/t)>x-v&&r("overflow"),v+=B(b/t),b%=t,m.splice(b++,0,v)}return c(m)}function h(e){var t,n,i,a,o,c,u,f,h,d,m,g,b,v,y,w=[];for(e=s(e),g=e.length,t=C,n=0,o=A,c=0;c=t&&mB((x-n)/b)&&r("overflow"),n+=(u-t)*b,t=u,c=0;cx&&r("overflow"),m==t){for(f=n,h=k;d=h<=o?_:h>=o+j?j:h-o,!(f= 0x80 (not a basic code point)","invalid-input":"Invalid input"},q=k-_,B=Math.floor,z=String.fromCharCode;if(y={version:"1.4.1",ucs2:{decode:s,encode:c},decode:f,encode:h,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return y});else if(g&&b)if(t.exports==g)b.exports=y;else for(w in y)y.hasOwnProperty(w)&&(g[w]=y[w]);else i.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],221:[function(e,t,n){"use strict";function i(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.exports=function(e,t,n,a){t=t||"&",n=n||"=";var o={};if("string"!=typeof e||0===e.length)return o;var s=/\+/g;e=e.split(t);var c=1e3;a&&"number"==typeof a.maxKeys&&(c=a.maxKeys);var u=e.length;c>0&&u>c&&(u=c);for(var p=0;p=0?(l=m.substr(0,g),f=m.substr(g+1)):(l=m,f=""),h=decodeURIComponent(l),d=decodeURIComponent(f),i(o,h)?r(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o};var r=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],222:[function(e,t,n){"use strict";function i(e,t){if(e.map)return e.map(t);for(var n=[],i=0;i0)if(t.ended&&!r){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&r){var c=new Error("stream.unshift() after end event");e.emit("error",c)}else{var u;!t.decoder||r||i||(n=t.decoder.write(n),u=!t.objectMode&&0===n.length),r||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),d(e,t)}else r||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=c(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function p(e,t){var n=null;return q.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk")),n}function l(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(R("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?I(h,e):h(e))}function h(e){R("emit readable"),e.emit("readable"),w(e)}function d(e,t){t.readingMore||(t.readingMore=!0,I(m,e,t))}function m(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=k(e,t.buffer,t.decoder),n}function k(e,t,n){var i;return ea.length?a.length:e;if(r+=o===a.length?a:a.slice(0,e),e-=o,0===e){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}function j(e,t){var n=B.allocUnsafe(e),i=t.head,r=1;for(i.data.copy(n),e-=i.data.length;i=i.next;){var a=i.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),e-=o,0===e){o===a.length?(++r,i.next?t.head=i.next:t.head=t.tail=null):(t.head=i,i.data=a.slice(o));break}++r}return t.length-=r,n}function S(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,I(E,t,e))}function E(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var n=0,i=e.length;n=t.highWaterMark||t.ended))return R("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?S(this):f(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&S(this),null;var i=t.needReadable;R("need readable",i),(0===t.length||t.length-e0?x(e,t):null,null===r?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&S(this)),null!==r&&this.emit("data",r),r},a.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(e,t){function r(e){R("onunpipe"),e===f&&o()}function a(){R("onend"),e.end()}function o(){R("cleanup"),e.removeListener("close",u),e.removeListener("finish",p),e.removeListener("drain",b),e.removeListener("error",c),e.removeListener("unpipe",r),f.removeListener("end",a),f.removeListener("end",o),f.removeListener("data",s),v=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||b()}function s(t){R("ondata"),y=!1;var n=e.write(t);!1!==n||y||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&C(h.pipes,e)!==-1)&&!v&&(R("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,y=!0),f.pause())}function c(t){R("onerror",t),l(),e.removeListener("error",c),0===M(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",p),l()}function p(){R("onfinish"),e.removeListener("close",u),l()}function l(){R("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,R("pipe count=%d opts=%j",h.pipesCount,t);var d=(!t||t.end!==!1)&&e!==n.stdout&&e!==n.stderr,m=d?a:o;h.endEmitted?I(m):f.once("end",m),e.on("unpipe",r);var b=g(f);e.on("drain",b);var v=!1,y=!1;return f.on("data",s),i(e,"error",c),e.once("close",u),e.once("finish",p),e.emit("pipe",f),h.flowing||(R("pipe resume"),f.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var r=0;r-1?setImmediate:j;o.WritableState=a;var E=e("core-util-is");E.inherits=e("inherits");var A,C={deprecate:e("util-deprecate")};!function(){try{A=e("stream")}catch(e){}finally{A||(A=e("events").EventEmitter)}}();var T=e("buffer").Buffer,I=e("buffer-shims");E.inherits(o,A),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:C.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var O;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(O=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(e){return!!O.call(this,e)||e&&e._writableState instanceof a}})):O=function(e){return e instanceof this},o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,n){var r=this._writableState,a=!1;return"function"==typeof t&&(n=t,t=null),T.isBuffer(e)?t="buffer":t||(t=r.defaultEncoding),"function"!=typeof n&&(n=i),r.ended?s(this,n):c(this,r,e,n)&&(r.pendingcb++,a=p(this,r,e,t,n)),a},o.prototype.cork=function(){var e=this._writableState;e.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||b(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},o.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,n){var i=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||x(this,i,n)}}).call(this,e("_process"))},{"./_stream_duplex":225,_process:219,buffer:17,"buffer-shims":231,"core-util-is":232,events:214,inherits:216,"process-nextick-args":234,"util-deprecate":235}],230:[function(e,t,n){"use strict";function i(){this.head=null,this.tail=null,this.length=0}var r=(e("buffer").Buffer,e("buffer-shims"));t.exports=i,i.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},i.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},i.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},i.prototype.clear=function(){this.head=this.tail=null,this.length=0},i.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},i.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t=r.allocUnsafe(e>>>0),n=this.head,i=0;n;)n.data.copy(t,i),i+=n.data.length,n=n.next;return t}},{buffer:17,"buffer-shims":231}],231:[function(e,t,n){(function(t){"use strict";var i=e("buffer"),r=i.Buffer,a=i.SlowBuffer,o=i.kMaxLength||2147483647;n.alloc=function(e,t,n){if("function"==typeof r.alloc)return r.alloc(e,t,n);if("number"==typeof n)throw new TypeError("encoding must not be number");if("number"!=typeof e)throw new TypeError("size must be a number");if(e>o)throw new RangeError("size is too large");var i=n,a=t;void 0===a&&(i=void 0,a=0);var s=new r(e);if("string"==typeof a)for(var c=new r(a,i),u=c.length,p=-1;++po)throw new RangeError("size is too large");return new r(e)},n.from=function(e,n,i){if("function"==typeof r.from&&(!t.Uint8Array||Uint8Array.from!==r.from))return r.from(e,n,i);if("number"==typeof e)throw new TypeError('"value" argument must not be a number');if("string"==typeof e)return new r(e,n);if("undefined"!=typeof ArrayBuffer&&e instanceof ArrayBuffer){var a=n;if(1===arguments.length)return new r(e);"undefined"==typeof a&&(a=0);var o=i;if("undefined"==typeof o&&(o=e.byteLength-a),a>=e.byteLength)throw new RangeError("'offset' is out of bounds");if(o>e.byteLength-a)throw new RangeError("'length' is out of bounds");return new r(e.slice(a,a+o))}if(r.isBuffer(e)){var s=new r(e.length);return e.copy(s,0,0,e.length),s}if(e){if(Array.isArray(e)||"undefined"!=typeof ArrayBuffer&&e.buffer instanceof ArrayBuffer||"length"in e)return new r(e);if("Buffer"===e.type&&Array.isArray(e.data))return new r(e.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")},n.allocUnsafeSlow=function(e){if("function"==typeof r.allocUnsafeSlow)return r.allocUnsafeSlow(e);if("number"!=typeof e)throw new TypeError("size must be a number");if(e>=o)throw new RangeError("size is too large");return new a(e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{buffer:17}],232:[function(e,t,n){(function(e){function t(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function i(e){return"boolean"==typeof e}function r(e){return null===e}function a(e){return null==e}function o(e){return"number"==typeof e}function s(e){return"string"==typeof e}function c(e){return"symbol"==typeof e}function u(e){return void 0===e}function p(e){return"[object RegExp]"===g(e)}function l(e){return"object"==typeof e&&null!==e}function f(e){return"[object Date]"===g(e)}function h(e){return"[object Error]"===g(e)||e instanceof Error}function d(e){return"function"==typeof e}function m(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function g(e){return Object.prototype.toString.call(e)}n.isArray=t,n.isBoolean=i,n.isNull=r,n.isNullOrUndefined=a,n.isNumber=o,n.isString=s,n.isSymbol=c,n.isUndefined=u,n.isRegExp=p,n.isObject=l,n.isDate=f,n.isError=h,n.isFunction=d,n.isPrimitive=m,n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../../../insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../insert-module-globals/node_modules/is-buffer/index.js":217}],233:[function(e,t,n){arguments[4][20][0].apply(n,arguments)},{dup:20}],234:[function(e,t,n){(function(e){"use strict";function n(t,n,i,r){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,n)});case 3:return e.nextTick(function(){t.call(null,n,i)});case 4:return e.nextTick(function(){t.call(null,n,i,r)});default:for(a=new Array(s-1),o=0;oe._pos){var a=n.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new r(a.length),s=0;se._pos&&(e.push(new r(new Uint8Array(u.result.slice(e._pos)))),e._pos=u.result.byteLength)},u.onload=function(){e.push(null)},u.readAsArrayBuffer(n)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":242,_process:219,buffer:17,inherits:216,"readable-stream":237}],245:[function(e,t,n){t.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],246:[function(e,t,n){var i=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(i.isBuffer(e)){for(var t=new Uint8Array(e.length),n=e.length,r=0;r=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived=55296&&i<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var r=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,r),r-=this.charReceived),t+=e.toString(this.encoding,0,r);var r=t.length-1,i=t.charCodeAt(r);if(i>=55296&&i<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,r)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,i=this.charBuffer,r=this.encoding;t+=i.slice(0,n).toString(r)}return t}},{buffer:17}],248:[function(e,t,n){function i(e,t){this._id=e,this._clearFn=t}var r=e("process/browser.js").nextTick,a=Function.prototype.apply,o=Array.prototype.slice,s={},c=0;n.setTimeout=function(){return new i(a.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new i(a.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},i.prototype.unref=i.prototype.ref=function(){},i.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n.setImmediate="function"==typeof setImmediate?setImmediate:function(e){var t=c++,i=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,r(function(){s[t]&&(i?e.apply(null,i):e.call(null),n.clearImmediate(t))}),t},n.clearImmediate="function"==typeof clearImmediate?clearImmediate:function(e){delete s[e]}},{"process/browser.js":219}],249:[function(e,t,n){"use strict";function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function r(e,t,n){if(e&&u.isObject(e)&&e instanceof i)return e;var r=new i;return r.parse(e,t,n),r}function a(e){return u.isString(e)&&(e=r(e)),e instanceof i?e.format():i.prototype.format.call(e)}function o(e,t){return r(e,!1,!0).resolve(t)}function s(e,t){return e?r(e,!1,!0).resolveObject(t):t}var c=e("punycode"),u=e("./util");n.parse=r,n.resolve=o,n.resolveObject=s,n.format=a,n.Url=i;var p=/^([a-z0-9.+-]+:)/i,l=/:[0-9]*$/,f=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,h=["<",">",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),g=["%","/","?",";","#"].concat(m),b=["/","?","#"],v=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},k={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=e("querystring");i.prototype.parse=function(e,t,n){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var i=e.indexOf("?"),r=i!==-1&&i127?"x":q[z];if(!B.match(y)){var R=D.slice(0,A),N=D.slice(A+1),P=q.match(w);P&&(R.push(P[1]),N.unshift(P[2])),N.length&&(s="/"+N.join(".")+s),this.hostname=R.join(".");break}}}this.hostname.length>v?this.hostname="":this.hostname=this.hostname.toLowerCase(),O||(this.hostname=c.toASCII(this.hostname));var L=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+L,this.href+=this.host,O&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!x[d])for(var A=0,M=m.length;A0)&&n.host.split("@");S&&(n.auth=S.shift(),n.host=n.hostname=S.shift())}return n.search=e.search,n.query=e.query,u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!x.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var E=x.slice(-1)[0],A=(n.host||e.host||x.length>1)&&("."===E||".."===E)||""===E,C=0,T=x.length;T>=0;T--)E=x[T],"."===E?x.splice(T,1):".."===E?(x.splice(T,1),C++):C&&(x.splice(T,1),C--);if(!y&&!w)for(;C--;C)x.unshift("..");!y||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var I=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(j){n.hostname=n.host=I?"":x.length?x.shift():"";var S=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@");S&&(n.auth=S.shift(),n.host=n.hostname=S.shift())}return y=y||n.host&&x.length,y&&!I&&x.unshift(""),x.length?n.pathname=x.join("/"):(n.pathname=null,n.path=null),u.isNull(n.pathname)&&u.isNull(n.search)||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var e=this.host,t=l.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":250,punycode:220,querystring:223}],250:[function(e,t,n){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],251:[function(e,t,n){arguments[4][216][0].apply(n,arguments)},{dup:216}],252:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],253:[function(e,t,n){(function(t,i){function r(e,t){var i={seen:[],stylize:o};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),m(t)?i.showHidden=t:t&&n._extend(i,t),x(i.showHidden)&&(i.showHidden=!1),x(i.depth)&&(i.depth=2),x(i.colors)&&(i.colors=!1),x(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=a),c(i,e,i.depth)}function a(e,t){var n=r.styles[t];return n?"["+r.colors[n][0]+"m"+e+"["+r.colors[n][1]+"m":e}function o(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function c(e,t,i){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==n.inspect&&(!t.constructor||t.constructor.prototype!==t)){var r=t.inspect(i,e);return y(r)||(r=c(e,r,i)),r}var a=u(e,t);if(a)return a;var o=Object.keys(t),m=s(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),S(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return p(t);if(0===o.length){if(E(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(k(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(j(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return p(t)}var b="",v=!1,w=["{","}"];if(d(t)&&(v=!0,w=["[","]"]),E(t)){var x=t.name?": "+t.name:"";b=" [Function"+x+"]"}if(k(t)&&(b=" "+RegExp.prototype.toString.call(t)),j(t)&&(b=" "+Date.prototype.toUTCString.call(t)),S(t)&&(b=" "+p(t)),0===o.length&&(!v||0==t.length))return w[0]+b+w[1];if(i<0)return k(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var _;return _=v?l(e,t,i,m,o):o.map(function(n){return f(e,t,i,m,n,v)}),e.seen.pop(),h(_,b,w)}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(y(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return v(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function l(e,t,n,i,r){for(var a=[],o=0,s=t.length;o-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(o)){if(a&&r.match(/^\d+$/))return s;o=JSON.stringify(""+r),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e,t,n){var i=0,r=e.reduce(function(e,t){return i++,t.indexOf("\n")>=0&&i++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return r>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function b(e){return null==e}function v(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function x(e){return void 0===e}function k(e){return _(e)&&"[object RegExp]"===C(e)}function _(e){return"object"==typeof e&&null!==e}function j(e){return _(e)&&"[object Date]"===C(e)}function S(e){return _(e)&&("[object Error]"===C(e)||e instanceof Error)}function E(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function I(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),B[e.getMonth()],t].join(" ")}function O(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var D=/%[sdj%]/g;n.format=function(e){if(!y(e)){for(var t=[],n=0;n=a)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(e){return"[Circular]"}default:return e}}),s=i[n];na;a++){var o=255&n[a>>>2]>>>24-8*(a%4);t[i+a>>>2]|=o<<24-8*((i+a)%4)}else if(n.length>65535)for(var a=0;r>a;a+=4)t[i+a>>>2]=n[a>>>2];else t.push.apply(t,n);return this.sigBytes+=r,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4),t.length=e.ceil(n/4)},clone:function(){var e=r.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;t>i;i+=4)n.push(0|4294967296*e.random());return new a.init(n,t)}}),o=n.enc={},s=o.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;n>r;r++){var a=255&t[r>>>2]>>>24-8*(r%4);i.push((a>>>4).toString(16)),i.push((15&a).toString(16))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;t>i;i+=2)n[i>>>3]|=parseInt(e.substr(i,2),16)<<24-4*(i%8);return new a.init(n,t/2)}},c=o.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],r=0;n>r;r++){var a=255&t[r>>>2]>>>24-8*(r%4);i.push(String.fromCharCode(a))}return i.join("")},parse:function(e){for(var t=e.length,n=[],i=0;t>i;i++)n[i>>>2]|=(255&e.charCodeAt(i))<<24-8*(i%4);return new a.init(n,t)}},u=o.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},p=i.BufferedBlockAlgorithm=r.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=u.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,o=this.blockSize,s=4*o,c=r/s;c=t?e.ceil(c):e.max((0|c)-this._minBufferSize,0);var u=c*o,p=e.min(4*u,r);if(u){for(var l=0;u>l;l+=o)this._doProcessBlock(i,l);var f=i.splice(0,u);n.sigBytes-=p}return new a.init(f,p)},clone:function(){var e=r.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});i.Hasher=p.extend({cfg:r.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){e&&this._append(e);var t=this._doFinalize();return t},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new l.HMAC.init(e,n).finalize(t)}}});var l=n.algo={};return n}(Math);return e})},{}],258:[function(e,t,n){!function(i,r){"object"==typeof n?t.exports=n=r(e("./core"),e("./sha1"),e("./hmac")):"function"==typeof define&&define.amd?define(["./core","./sha1","./hmac"],r):r(i.CryptoJS)}(this,function(e){return e.HmacSHA1})},{"./core":257,"./hmac":259,"./sha1":260}],259:[function(e,t,n){!function(i,r){"object"==typeof n?t.exports=n=r(e("./core")):"function"==typeof define&&define.amd?define(["./core"],r):r(i.CryptoJS)}(this,function(e){!function(){var t=e,n=t.lib,i=n.Base,r=t.enc,a=r.Utf8,o=t.algo;o.HMAC=i.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=a.parse(t));var n=e.blockSize,i=4*n;t.sigBytes>i&&(t=e.finalize(t)),t.clamp();for(var r=this._oKey=t.clone(),o=this._iKey=t.clone(),s=r.words,c=o.words,u=0;n>u;u++)s[u]^=1549556828,c[u]^=909522486;r.sigBytes=o.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);t.reset();var i=t.finalize(this._oKey.clone().concat(n));return i}})}()})},{"./core":257}],260:[function(e,t,n){!function(i,r){"object"==typeof n?t.exports=n=r(e("./core")):"function"==typeof define&&define.amd?define(["./core"],r):r(i.CryptoJS)}(this,function(e){return function(){var t=e,n=t.lib,i=n.WordArray,r=n.Hasher,a=t.algo,o=[],s=a.SHA1=r.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],a=n[2],s=n[3],c=n[4],u=0;80>u;u++){if(16>u)o[u]=0|e[t+u];else{var p=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=p<<1|p>>>31}var l=(i<<5|i>>>27)+c+o[u];l+=20>u?(r&a|~r&s)+1518500249:40>u?(r^a^s)+1859775393:60>u?(r&a|r&s|a&s)-1894007588:(r^a^s)-899497514,c=s,s=a,a=r<<30|r>>>2,r=i,i=l}n[0]=0|n[0]+i,n[1]=0|n[1]+r,n[2]=0|n[2]+a,n[3]=0|n[3]+s,n[4]=0|n[4]+c},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[(i+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(i+64>>>9<<4)+15]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA1=r._createHelper(s),t.HmacSHA1=r._createHmacHelper(s)}(),e.SHA1})},{"./core":257}],261:[function(e,t,n){"use strict";var i=e("./lib/Client"),r=e("./lib/sasl"),a=e("node-xmpp-core");t.exports=i,t.exports.Client=i,t.exports.SASL=r,a.exportCoreUtils(t.exports)},{"./lib/Client":262,"./lib/sasl":270,"node-xmpp-core":280}],262:[function(e,t,n){(function(n){"use strict";function i(e){this.options={},e&&(this.options=e),this.availableSaslMechanisms=[b,v,g,m,d],this.options.autostart!==!1&&this.connect()}var r,a,o,s=e("./session"),c=e("node-xmpp-core"),u=c.JID,p=c.Stanza,l=c.Element,f=c.inherits,h=e("./sasl"),d=e("./authentication/anonymous"),m=e("./authentication/plain"),g=e("./authentication/digestmd5"),b=e("./authentication/xoauth2"),v=e("./authentication/external"),y=e("child_process").exec,w=e("debug")("xmpp:client"),x=e("path"),k="jabber:client",_="jabber:iq:register",j="urn:ietf:params:xml:ns:xmpp-sasl",S="urn:ietf:params:xml:ns:xmpp-bind",E="urn:ietf:params:xml:ns:xmpp-session",A=0,C=1,T=2,I=3,O=4,D=5,M="sess",q="bind";if("undefined"==typeof B)var B=null,z=null;"function"==typeof B?r=function(e){return z(e)}:(o=e("buffer").Buffer,r=function(e){return new o(e,"base64").toString("utf8")}),"function"==typeof z?a=function(e){return B(e)}:(o=e("buffer").Buffer,a=function(e){return new o(e,"utf8").toString("base64")}),f(i,s),i.NS_CLIENT=k,i.prototype.connect=function(){return this.options.bosh&&this.options.bosh.prebind?this._connectViaBosh():void this._useStandardConnect()},i.prototype._useStandardConnect=function(){this.options.xmlns=k,delete this.did_bind,delete this.did_session,this.state=A,this.on("end",function(){this.state=A,delete this.did_bind,delete this.did_session}),s.call(this,this.options),this.options.jid=this.jid,this.connection.on("disconnect",function(e){this.state=A,this.connection.reconnect||(e&&this.emit("error",e),this.emit("offline")),delete this.did_bind,delete this.did_session}.bind(this)),this.options.preferred?this.preferredSaslMechanism=this.options.preferred:this.preferredSaslMechanism="DIGEST-MD5";var e=h.detectMechanisms(this.options,this.availableSaslMechanisms);this.availableSaslMechanisms=e},i.prototype._connectViaBosh=function(){w("load bosh prebind");var e=this.options.bosh.prebind;delete this.options.bosh.prebind;var t="node "+x.join(n,"prebind.js")+" "+encodeURI(JSON.stringify(this.options));y(t,function(t,n,i){if(t)e(t,null);else{var r=n.match(/rid:+[ 0-9]*/i),a=n.match(/sid:+[ a-z+'"-_A-Z+0-9]*/i);if(!r||!a)return e(i);if(r=r[0].split(":")[1].trim(),a=a[0].split(":")[1].replace("'","").replace("'","").trim(),r&&a)return e(null,{rid:r,sid:a});e(i)}})},i.prototype.onStanza=function(e){return"stream:error"===e.name?this._handleStreamError(e):this.state!==D&&e.is("features")?(this.streamFeatures=e,this.useFeatures()):void this._handleStanza(e)},i.prototype._handleStanza=function(e){switch(this.state){case D:this.emit("stanza",e);break;case A:this.emit("stanza:preauth",e);break;case C:this._handleAuthState(e);break;case I:e.is("iq")&&e.attrs.id===q&&this._handleBindState(e);break;case O:e.is("iq")===!0&&e.attrs.id===M&&this._handleSessionState(e)}},i.prototype._handleStreamError=function(e){this.reconnect||this.emit("error",e)},i.prototype._handleSessionState=function(e){"result"===e.attrs.type?(this.state=T,this.did_session=!0,this.useFeatures()):this.emit("error","Cannot bind resource")},i.prototype._handleBindState=function(e){if("result"===e.attrs.type){this.state=T,this.did_bind=!0;var t=e.getChild("bind",S);t&&t.getChild("jid")&&(this.jid=new u(t.getChild("jid").getText())),this.useFeatures()}else this.emit("error","Cannot bind resource")},i.prototype._handleAuthState=function(e){if(e.is("challenge",j)){var t=r(e.getText()),n=a(this.mech.challenge(t)),i=new l("response",{xmlns:j}).t(n);this.send(i)}else e.is("success",j)?(this.mech=null,this.state=T,this.emit("auth")):this.emit("error","XMPP authentication failure")},i.prototype._handlePreAuthState=function(){this.state=C;var e=this.streamFeatures.getChild("mechanisms",j).getChildren("mechanism",j).map(function(e){return e.getText()});if(this.mech=h.selectMechanism(e,this.preferredSaslMechanism,this.availableSaslMechanisms),this.mech){this.mech.authzid=this.jid.bare().toString(),this.mech.authcid=this.jid.local,this.mech.password=this.password,this.mech.api_key=this.api_key,this.mech.access_token=this.access_token,this.mech.oauth2_token=this.oauth2_token,this.mech.oauth2_auth=this.oauth2_auth,this.mech.realm=this.jid.domain,this.actAs&&(this.mech.actAs=this.actAs.user),this.mech.digest_uri="xmpp/"+this.jid.domain;var t=a(this.mech.auth()),n=this.mech.authAttrs();n.xmlns=j,n.mechanism=this.mech.name,this.send(new l("auth",n).t(t))}else this.emit("error",new Error("No usable SASL mechanism"))},i.prototype.useFeatures=function(){if(this.state===A&&this.register)delete this.register,this.doRegister();else if(this.state===A&&this.streamFeatures.getChild("mechanisms",j))this._handlePreAuthState();else if(this.state===T&&!this.did_bind&&this.streamFeatures.getChild("bind",S)){this.state=I;var e=new p("iq",{type:"set",id:q}).c("bind",{xmlns:S});this.jid.resource&&e.c("resource").t(this.jid.resource),this.send(e)}else if(this.state===T&&!this.did_session&&this.streamFeatures.getChild("session",E)){this.state=O;var t=new p("iq",{type:"set",to:this.jid.domain,id:M}).c("session",{xmlns:E});this.send(t)}else this.state===T&&(this.state=D,this.emit("online",{jid:this.jid}))},i.prototype.doRegister=function(){var e="register"+Math.ceil(99999*Math.random()),t=new p("iq",{type:"set",id:e,to:this.jid.domain}).c("query",{xmlns:_}).c("username").t(this.jid.local).up().c("password").t(this.password);this.send(t);var n=this,i=function(t){t.is("iq")&&t.attrs.id===e&&(n.removeListener("stanza",i),"result"===t.attrs.type?n.useFeatures():n.emit("error",new Error("Registration error")))};this.on("stanza:preauth",i)},i.prototype.getSaslMechanisms=function(){return this.availableSaslMechanisms},i.prototype.clearSaslMechanism=function(){this.availableSaslMechanisms=[]},i.prototype.registerSaslMechanism=function(e){this.availableSaslMechanisms.indexOf(e)===-1&&this.availableSaslMechanisms.push(e)},i.prototype.unregisterSaslMechanism=function(e){var t=this.availableSaslMechanisms.indexOf(e);t>=0&&(this.availableSaslMechanisms=this.availableSaslMechanisms.splice(t,1))},t.exports=i}).call(this,"/node_modules/node-xmpp-client/lib")},{"./authentication/anonymous":263,"./authentication/digestmd5":264,"./authentication/external":265,"./authentication/plain":267,"./authentication/xoauth2":268,"./sasl":270,"./session":271,buffer:17,child_process:1,debug:275,"node-xmpp-core":280,path:3}],263:[function(e,t,n){"use strict";function i(){}var r=e("./mechanism"),a=e("node-xmpp-core").inherits;a(i,r),i.prototype.name="ANONYMOUS",i.prototype.auth=function(){return this.authzid},i.prototype.match=function(){return!0},t.exports=i},{"./mechanism":266,"node-xmpp-core":280}],264:[function(e,t,n){"use strict";function i(e,t){var n=f.createHash?f.createHash("md5"):new h;return n.update(e,"binary").digest(t||"binary")}function r(e){return i(e,"hex")}function a(e){for(var t={};e;){var n;(n=/^(.+?)=(.*?[^\\]),\s*(.*)/.exec(e))?(t[n[1]]=n[2].replace(/"/g,""),e=n[3]):(n=/^(.+?)=(.+?),\s*(.*)/.exec(e))?(t[n[1]]=n[2],e=n[3]):(n=/^(.+?)="(.*?[^\\])"$/.exec(e))?(t[n[1]]=n[2],e=n[3]):(n=/^(.+?)=(.+?)$/.exec(e))?(t[n[1]]=n[2],e=n[3]):e=null}return t}function o(e){var t="";for(var n in e){var i=e[n];i&&(t+=","+n+'="'+i+'"')}return t.substr(1)}function s(e,t,n){for(;e.length0?(t.emit("connect"),t.processResponse(i),n.nextTick(t.mayRequest.bind(t))):t.emit("error","Invalid parameters"))})}var r=e("events").EventEmitter,a=e("node-xmpp-core"),o=a.inherits,s=a.ltx,c=e("request"),u=e("debug")("xmpp:client:bosh");o(i,r),i.prototype.contentType="text/xml; charset=utf-8",i.prototype.send=function(e){this.queue.push(e.root()),n.nextTick(this.mayRequest.bind(this))},i.prototype.startStream=function(){var e=this;this.rid++,this.request({to:this.jid.domain,"xmpp:restart":"true"},[],function(t,i){t?(e.emit("error",t),e.emit("disconnect"),e.emit("end"),delete e.sid,e.emit("close")):(e.streamOpened=!0,i&&e.processResponse(i),n.nextTick(e.mayRequest.bind(e)))})},i.prototype.processResponse=function(e){if(u("process bosh server response "+e.toString()),e&&e.children)for(var t=0;t0&&this.currentRequests=400)return n(new Error("HTTP status "+o.statusCode));var u;try{u=s.parse(c)}catch(e){return n(e)}u&&"terminate"===u.attrs.type&&u.attrs.condition?n(new Error(u.attrs.condition)):u?n(null,u):n(new Error("no "))}),this.currentRequests++},t.exports=i}).call(this,e("_process"))},{_process:219,debug:275,events:214,"node-xmpp-core":280,request:273}],270:[function(e,t,n){"use strict";function i(e,t,n){var i,r=[],a={};return Array.isArray(n)&&(r=r.concat(n)),r.forEach(function(e){a[e.prototype.name]=e}),a[t]&&e.indexOf(t)>=0&&(i=a[t]),r.forEach(function(t){!i&&e.indexOf(t.prototype.name)>=0&&(i=t)}),i?new i:null}function r(e,t){var n=t||[],i=[];return n.forEach(function(t){var n=t.prototype.match;n(e)&&i.push(t)}),i}var a=e("./authentication/mechanism");n.selectMechanism=i,n.detectMechanisms=r,n.AbstractMechanism=a},{"./authentication/mechanism":266}],271:[function(e,t,n){(function(n){"use strict";function i(e){a.call(this),this.setOptions(e),e.websocket&&e.websocket.url?(h("start websocket connection"),this._setupWebsocketConnection(e)):e.bosh&&e.bosh.url?(h("start bosh connection"),this._setupBoshConnection(e)):(h("start socket connection"),this._setupSocketConnection(e))}var r=e("tls"),a=e("events").EventEmitter,o=e("node-xmpp-core"),s=o.inherits,c=o.Connection,u=o.JID,p=o.SRV,l=e("./bosh"),f=e("./websockets"),h=e("debug")("xmpp:client:session");s(i,a),i.prototype._setupSocketConnection=function(e){var t={xmlns:{"":e.xmlns},streamAttrs:{version:"1.0",to:this.jid.domain},serialized:e.serialized};for(var n in e)n in t||(t[n]=e[n]);if(this.connection=new c(t),this._addConnectionListeners(),e.host||e.port)this._socketConnectionToHost(e);else{if(!p)throw new Error("Cannot load SRV");this._performSrvLookup(e)}},i.prototype._socketConnectionToHost=function(e){var t=this;e.legacySSL?(this.connection.allowTLS=!1,this.connection.connect({socket:function(){return r.connect(e.port||5223,e.host||"localhost",e.credentials||{},function(){this.socket.authorized?t.emit("connect",this.socket):t.emit("error","unauthorized")}.bind(this))}})):(e.credentials&&(this.connection.credentials=r.createSecureContext(e.credentials)),e.disallowTLS&&(this.connection.allowTLS=!1),this.connection.listen({socket:function(){n.nextTick(function(){this.socket.connect(e.port||5222,e.host)}.bind(this));var t=e.socket;return e.socket=null,t}}))},i.prototype._performSrvLookup=function(e){if(e.legacySSL)throw new Error("LegacySSL mode does not support DNS lookups");e.credentials&&(this.connection.credentials=r.createSecureContext(e.credentials)),e.disallowTLS&&(this.connection.allowTLS=!1),this.connection.listen({socket:p.connect({socket:e.socket,services:["_xmpp-client._tcp"],domain:this.jid.domain,defaultPort:5222})})},i.prototype._setupBoshConnection=function(e){this.connection=new l({jid:this.jid,bosh:e.bosh}),this._addConnectionListeners(),this.connection.on("connected",function(){this.connection.startStream&&this.connection.startStream()}.bind(this))},i.prototype._setupWebsocketConnection=function(e){this.connection=new f({jid:this.jid,websocket:e.websocket}),this._addConnectionListeners(),this.connection.on("connected",function(){this.connection.startStream&&this.connection.startStream()}.bind(this))},i.prototype.setOptions=function(e){this.jid="string"==typeof e.jid?new u(e.jid):e.jid,this.password=e.password,this.preferredSaslMechanism=e.preferredSaslMechanism,this.api_key=e.api_key,this.access_token=e.access_token,this.oauth2_token=e.oauth2_token,this.oauth2_auth=e.oauth2_auth,this.register=e.register,"string"==typeof e.actAs?this.actAs=new u(e.actAs):this.actAs=e.actAs},i.prototype._addConnectionListeners=function(e){e=e||this.connection,e.on("stanza",this.onStanza.bind(this)),e.on("drain",this.emit.bind(this,"drain")),e.on("end",this.emit.bind(this,"end")),e.on("close",this.emit.bind(this,"close")),e.on("error",this.emit.bind(this,"error")),e.on("connect",this.emit.bind(this,"connect")),e.on("reconnect",this.emit.bind(this,"reconnect")),e.on("disconnect",this.emit.bind(this,"disconnect")),e.startStream&&(e.on("connect",function(){e.startStream()}),this.on("auth",function(){e.startStream()}))},i.prototype.pause=function(){this.connection&&this.connection.pause&&this.connection.pause()},i.prototype.resume=function(){this.connection&&this.connection.resume&&this.connection.resume()},i.prototype.send=function(e){return!!this.connection&&this.connection.send(e)},i.prototype.end=function(){this.connection&&this.connection.end()},i.prototype.onStanza=function(){},t.exports=i}).call(this,e("_process"))},{"./bosh":269,"./websockets":272,_process:219,debug:275,events:214,"node-xmpp-core":280,tls:1}],272:[function(e,t,n){"use strict";function i(e){r.call(this),this.url=e.websocket.url,this.jid=e.jid,this.xmlns={"":h},this.websocket=new l(this.url,["xmpp"]),this.websocket.onopen=this.onopen.bind(this),this.websocket.onmessage=this.onmessage.bind(this),this.websocket.onclose=this.onclose.bind(this),this.websocket.onerror=this.onerror.bind(this)}var r=e("events").EventEmitter,a=e("node-xmpp-core"),o=a.Element,s=a.StreamParser,c=a.Connection,u=a.inherits,p=e("ws"),l=p.Server?p:window.WebSocket,f=e("debug")("xmpp:client:websocket"),h="urn:ietf:params:xml:ns:xmpp-framing";u(i,r),i.prototype.maxStanzaSize=65535,i.prototype.xmppVersion="1.0",i.prototype.onopen=function(){this.startParser(),this.emit("connected")},i.prototype.startParser=function(){var e=this;this.parser=new s(this.maxStanzaSize),this.parser.on("start",function(t){e.streamAttrs=t,e.streamNsAttrs={};for(var n in t)"xmlns"!==n&&"xmlns:"!==n.substr(0,6)||(e.streamNsAttrs[n]=t[n]);e.emit("streamStart",t)}),this.parser.on("stanza",function(t){e.onStanza(t)}),this.parser.on("error",this.onerror.bind(this)),this.parser.on("end",function(){e.stopParser(),e.end()})},i.prototype.stopParser=function(){this.parser&&delete this.parser},i.prototype.onmessage=function(e){f("ws msg <--",e.data),e&&e.data&&this.parser&&this.parser.write(e.data)},i.prototype.onStanza=function(e){e.is("error",c.NS_STREAM)?this.emit("error",e):this.emit("stanza",e)},i.prototype.startStream=function(){var e={};for(var t in this.xmlns)this.xmlns.hasOwnProperty(t)&&(t?e["xmlns:"+t]=this.xmlns[t]:e.xmlns=this.xmlns[t]);this.xmppVersion&&(e.version=this.xmppVersion),this.streamTo&&(e.to=this.streamTo),this.jid&&(e.to=this.jid.domain),this.send(new o("open",e)),this.streamOpened=!0},i.prototype.send=function(e){e.root&&(e=e.root()),!e.attrs.xmlns&&(e.is("iq")||e.is("presence")||e.is("message"))&&(e.attrs.xmlns="jabber:client"),e=e.toString(),f("ws send -->",e),this.websocket.send(e)},i.prototype.onclose=function(){this.emit("disconnect"),this.emit("close")},i.prototype.end=function(){this.send(new o("close",{xmlns:h})),this.emit("disconnect"),this.emit("end"),this.websocket&&this.websocket.close()},i.prototype.onerror=function(e){this.emit("error",e)},t.exports=i},{debug:275,events:214,"node-xmpp-core":280,ws:3}],273:[function(e,t,n){!function(e,i){"function"==typeof define&&define.amd?define([],i):"object"==typeof n?t.exports=i():e.returnExports=i()}(this,function(){function e(r,a){if("function"!=typeof a)throw new Error("Bad callback given: "+a);if(!r)throw new Error("No options given");var s=r.onResponse;if(r="string"==typeof r?{uri:r}:JSON.parse(JSON.stringify(r)),r.onResponse=s,r.verbose&&(e.log=i()),r.url&&(r.uri=r.url,delete r.url),!r.uri&&""!==r.uri)throw new Error("options.uri is a required argument");if("string"!=typeof r.uri)throw new Error("options.uri must be a string");for(var c=["proxy","_redirectsFollowed","maxRedirects","followRedirect"],u=0;u>18&63,a=c>>12&63,o=c>>6&63,s=63&c,h[l++]=u.charAt(r)+u.charAt(a)+u.charAt(o)+u.charAt(s);while(p299)&&n.error){e=new Error("CouchDB error: "+(n.error.reason||n.error.error));for(var r in n)e[r]=n[r];return i(e,t,n)}return i(e,t,n)}"string"==typeof t&&(t={uri:t}),t.json=!0,t.body&&(t.json=t.body),delete t.body,i=i||n;var a=e(t,r);return a},e})},{}],274:[function(e,t,n){function i(e){if(e=String(e),!(e.length>1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*p;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*c;case"seconds":case"second":case"secs":case"sec":case"s":return n*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(e){return e>=p?Math.round(e/p)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function a(e){return o(e,p,"day")||o(e,u,"hour")||o(e,c,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,n){if(!(e0)return i(e);if("number"===n&&isNaN(e)===!1)return t.long?a(e):r(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],275:[function(e,t,n){(function(i){function r(){return!("undefined"==typeof window||!window||"undefined"==typeof window.process||"renderer"!==window.process.type)||("undefined"!=typeof document&&document&&"WebkitAppearance"in document.documentElement.style||"undefined"!=typeof window&&window&&window.console&&(console.firebug||console.exception&&console.table)||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function a(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),t){var i="color: "+this.color;e.splice(1,0,i,"color: inherit");var r=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(a=r))}),e.splice(a,0,i)}}function o(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?n.storage.removeItem("debug"):n.storage.debug=e}catch(e){}}function c(){try{return n.storage.debug}catch(e){}if("undefined"!=typeof i&&"env"in i)return i.env.DEBUG}function u(){try{return window.localStorage}catch(e){}}n=t.exports=e("./debug"),n.log=o,n.formatArgs=a,n.save=s,n.load=c,n.useColors=r,n.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:u(),n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},n.enable(c())}).call(this,e("_process"))},{"./debug":276,_process:219}],276:[function(e,t,n){function i(e){var t,i=0;for(t in e)i=(i<<5)-i+e.charCodeAt(t),i|=0;return n.colors[Math.abs(i)%n.colors.length]}function r(e){function t(){if(t.enabled){var e=t,i=+new Date,r=i-(u||i);e.diff=r,e.prev=u,e.curr=i,u=i;for(var a=new Array(arguments.length),o=0;o>>32-t}function a(e,t,n,i,a,o,s){return r(e+(t&n|~t&i)+a+o|0,s)+t|0}function o(e,t,n,i,a,o,s){return r(e+(t&i|n&~i)+a+o|0,s)+t|0}function s(e,t,n,i,a,o,s){return r(e+(t^n^i)+a+o|0,s)+t|0}function c(e,t,n,i,a,o,s){return r(e+(n^(t|~i))+a+o|0,s)+t|0}var u=e("inherits"),p=e("hash-base"),l=new Array(16);u(i,p),i.prototype._update=function(){for(var e=l,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=this._a,i=this._b,r=this._c,u=this._d;n=a(n,i,r,u,e[0],3614090360,7),u=a(u,n,i,r,e[1],3905402710,12),r=a(r,u,n,i,e[2],606105819,17),i=a(i,r,u,n,e[3],3250441966,22),n=a(n,i,r,u,e[4],4118548399,7),u=a(u,n,i,r,e[5],1200080426,12),r=a(r,u,n,i,e[6],2821735955,17),i=a(i,r,u,n,e[7],4249261313,22),n=a(n,i,r,u,e[8],1770035416,7),u=a(u,n,i,r,e[9],2336552879,12),r=a(r,u,n,i,e[10],4294925233,17),i=a(i,r,u,n,e[11],2304563134,22),n=a(n,i,r,u,e[12],1804603682,7),u=a(u,n,i,r,e[13],4254626195,12),r=a(r,u,n,i,e[14],2792965006,17),i=a(i,r,u,n,e[15],1236535329,22),n=o(n,i,r,u,e[1],4129170786,5),u=o(u,n,i,r,e[6],3225465664,9),r=o(r,u,n,i,e[11],643717713,14),i=o(i,r,u,n,e[0],3921069994,20),n=o(n,i,r,u,e[5],3593408605,5),u=o(u,n,i,r,e[10],38016083,9),r=o(r,u,n,i,e[15],3634488961,14),i=o(i,r,u,n,e[4],3889429448,20),n=o(n,i,r,u,e[9],568446438,5),u=o(u,n,i,r,e[14],3275163606,9),r=o(r,u,n,i,e[3],4107603335,14),i=o(i,r,u,n,e[8],1163531501,20),n=o(n,i,r,u,e[13],2850285829,5),u=o(u,n,i,r,e[2],4243563512,9),r=o(r,u,n,i,e[7],1735328473,14),i=o(i,r,u,n,e[12],2368359562,20),n=s(n,i,r,u,e[5],4294588738,4),u=s(u,n,i,r,e[8],2272392833,11),r=s(r,u,n,i,e[11],1839030562,16),i=s(i,r,u,n,e[14],4259657740,23),n=s(n,i,r,u,e[1],2763975236,4),u=s(u,n,i,r,e[4],1272893353,11),r=s(r,u,n,i,e[7],4139469664,16),i=s(i,r,u,n,e[10],3200236656,23),n=s(n,i,r,u,e[13],681279174,4),u=s(u,n,i,r,e[0],3936430074,11),r=s(r,u,n,i,e[3],3572445317,16),i=s(i,r,u,n,e[6],76029189,23),n=s(n,i,r,u,e[9],3654602809,4),u=s(u,n,i,r,e[12],3873151461,11),r=s(r,u,n,i,e[15],530742520,16),i=s(i,r,u,n,e[2],3299628645,23),n=c(n,i,r,u,e[0],4096336452,6),u=c(u,n,i,r,e[7],1126891415,10),r=c(r,u,n,i,e[14],2878612391,15),i=c(i,r,u,n,e[5],4237533241,21),n=c(n,i,r,u,e[12],1700485571,6),u=c(u,n,i,r,e[3],2399980690,10),r=c(r,u,n,i,e[10],4293915773,15),i=c(i,r,u,n,e[1],2240044497,21),n=c(n,i,r,u,e[8],1873313359,6),u=c(u,n,i,r,e[15],4264355552,10),r=c(r,u,n,i,e[6],2734768916,15),i=c(i,r,u,n,e[13],1309151649,21),n=c(n,i,r,u,e[4],4149444226,6),u=c(u,n,i,r,e[11],3174756917,10),r=c(r,u,n,i,e[2],718787259,15),i=c(i,r,u,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+i|0,this._c=this._c+r|0,this._d=this._d+u|0},i.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=new n(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:17,"hash-base":278,inherits:279}],278:[function(e,t,n){(function(n){"use strict";function i(e){r.call(this),this._block=new n(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}var r=e("stream").Transform,a=e("inherits");a(i,r),i.prototype._transform=function(e,t,n){var i=null;try{this.update(e,t)}catch(e){i=e}n(i)},i.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},i.prototype.update=function(e,t){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=new n(e,t));for(var i=this._block,r=0;this._blockOffset+e.length-r>=this._blockSize;){for(var a=this._blockOffset;a0;++o)this._length[o]+=s,s=this._length[o]/4294967296|0,s>0&&(this._length[o]-=4294967296*s);return this},i.prototype._update=function(e){throw new Error("_update is not implemented")},i.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();return void 0!==e&&(t=t.toString(e)),t},i.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=i}).call(this,e("buffer").Buffer)},{buffer:17,inherits:279,stream:240}],279:[function(e,t,n){arguments[4][216][0].apply(n,arguments)},{dup:216}],280:[function(e,t,n){"use strict";var i=e("./lib/Connection"),r=e("@xmpp/streamparser"),a=e("@xmpp/jid"),o=e("@xmpp/xml"),s=e("inherits");n.SRV=e("./lib/SRV"),n.exportCoreUtils=function(e){e.Connection=i,e.StreamParser=r,e.JID=a,e.inherits=s,e.stanza=o,e.Stanza=o.Stanza,e.createStanza=o.createStanza,e.IQ=o.IQ,e.Presence=o.Presence,e.Message=o.Message,e.Parser=o.Parser,e.parse=o.parse,e.ltx=o.ltx,e.createElement=o.createElement,e.Element=o.Element,e.escapeXML=o.escapeXML,e.escapeXMLText=o.escapeXMLText},n.exportCoreUtils(n)},{"./lib/Connection":281,"./lib/SRV":3,"@xmpp/jid":282,"@xmpp/streamparser":286,"@xmpp/xml":289,inherits:311}],281:[function(e,t,n){"use strict";function i(e,t){var n=d({},t);return n.initialDelay=t&&(t.initialReconnectDelay||t.reconnectDelay)||v,n.maxDelay=t&&t.maxReconnectDelay||y,n.immediate=t&&t.socket&&"function"!=typeof t.socket,n.type=t&&t.delayType,n.emitter=e,n}function r(e){s.call(this),this.streamAttrs=e&&e.streamAttrs||{},this.xmlns=e&&e.xmlns||{},this.xmlns.stream=g,this.streamOpen=e&&e.streamOpen||w,this.streamClose=e&&e.streamClose||x,this.rejectUnauthorized=!(!e||!e.rejectUnauthorized),this.serialized=!(!e||!e.serialized),this.requestCert=!(!e||!e.requestCert),this.servername=e&&e.servername,this.boundOnData=this.onData.bind(this),this.boundOnClose=this.onClose.bind(this),this.boundEmitData=this.emit.bind(this,"data"),this.boundEmitDrain=this.emit.bind(this,"drain"),this._setupSocket(i(this,e)),this.once("reconnect",function(){this.reconnect=e&&e.reconnect})}function a(e){return e.children?e.children.reduce(function(e,t){return e+a(t)},""):e}var o=e("net"),s=e("events").EventEmitter,c=e("inherits"),u=e("@xmpp/xml").Element,p=e("reconnect-core"),l=e("@xmpp/streamparser"),f=e("node-xmpp-tls-connect"),h=e("debug")("xmpp:connection"),d=e("lodash.assign"),m="urn:ietf:params:xml:ns:xmpp-tls",g="http://etherx.jabber.org/streams",b="urn:ietf:params:xml:ns:xmpp-streams",v=1e3,y=3e4,w="stream:stream",x="";c(r,s),r.prototype.NS_XMPP_TLS=m,r.NS_STREAM=g,r.prototype.NS_XMPP_STREAMS=b,r.prototype.allowTLS=!0,r.prototype._setupSocket=function(e){h("setup socket");var t={},n=p(function(e){var i=this.socket;return"on"===e.preserve?(e.preserve=t,t=e):e=t=e.preserve?e.preserve:e||t,"function"==typeof e.socket?(h("use lazy socket"),this.socket=e.socket.call(this)):(h("use standard socket"),this.socket=e.socket,e.socket=null,this.socket&&this.once("connect",function(){n.options.immediate=!1})),this.socket=this.socket||new o.Socket,i!==this.socket&&this.setupStream(),this.socket}.bind(this));n(n.options=e);var i=this.end;this.end=this.disconnect=function(){this.closeStream(),i()},this.on("connection",function(){this.parser||this.startParser()}),this.on("end",function(){t={}})},r.prototype.setupStream=function(){h("setup stream"),this.socket.on("end",this.onEnd.bind(this)),this.socket.on("data",this.boundOnData),this.socket.on("close",this.boundOnClose),this.socket.on("data",this.boundEmitData),this.socket.on("drain",this.boundEmitDrain),this.socket.on("error",function(){}),this.socket.serializeStanza||(this.serialized?this.socket.serializeStanza=function(e,t){e.write(function(e){t(e)})}:this.socket.serializeStanza=function(e,t){t(e.toString())})},r.prototype.pause=function(){this.socket.pause&&this.socket.pause()},r.prototype.resume=function(){this.socket.resume&&this.socket.resume()},r.prototype.send=function(e){if(this.socket&&this.streamOpened){if(!this.socket.writable)return void this.socket.end();h("send: "+e.toString());var t=!0;if(e.root){var n=this.rmXmlns(e.root());this.socket.serializeStanza(n,function(e){t=this.write(e)}.bind(this.socket))}else t=this.socket.write(e);return t}},r.prototype.startParser=function(){var e=this;this.parser=new l(this.maxStanzaSize),this.parser.on("streamStart",function(t){e.streamNsAttrs={};for(var n in t)"xmlns"!==n&&"xmlns:"!==n.substr(0,6)||(e.streamNsAttrs[n]=t[n]);e.emit("streamStart",t)}),this.parser.on("stanza",function(t){e.onStanza(e.addStreamNs(t))}),this.parser.on("error",function(t){e.error(t.condition||"internal-server-error",t.message)}),this.parser.once("end",function(){e.stopParser(),e.reconnect?e.once("reconnect",e.startParser.bind(e)):e.end()})},r.prototype.stopParser=function(){if(this.parser){var e=this.parser;this.parser=null,e.end()}},r.prototype.openStream=function(){var e={};for(var t in this.xmlns)this.xmlns.hasOwnProperty(t)&&(t?e["xmlns:"+t]=this.xmlns[t]:e.xmlns=this.xmlns[t]);for(t in this.streamAttrs)this.streamAttrs.hasOwnProperty(t)&&(e[t]=this.streamAttrs[t]);this.streamTo&&(e.to=this.streamTo);var n,i=new u(this.streamOpen,e);if("stream:stream"===i.name){i.t(" ");var r=i.toString();n=r.substr(0,r.indexOf(" "))}else n=i.toString();this.streamOpened=!0,this.send(n)},r.prototype.startStream=r.prototype.openStream,r.prototype.closeStream=function(){this.send(this.streamClose),this.streamOpened=!1},r.prototype.endStream=r.prototype.closeStream,r.prototype.onData=function(e){h("receive: "+e.toString("utf8")),this.parser&&this.parser.write(e)},r.prototype.setSecure=function(e,t,n){this.socket.removeListener("data",this.boundOnData),this.socket.removeListener("data",this.boundEmitData),this.socket.removeListener("drain",this.boundEmitDrain),this.socket.removeListener("close",this.boundOnClose),this.socket.clearTimer&&this.socket.clearTimer();var i=f({socket:this.socket,rejectUnauthorized:this.rejectUnauthorized,credentials:e||this.credentials,requestCert:this.requestCert,isServer:!!t,servername:t&&n},function(){this.isSecure=!0,this.once("disconnect",function(){this.isSecure=!1}),i.emit("connect",i)}.bind(this));i.on("clientError",this.emit.bind(this,"error")),this.reconnect||(this.reconnect=!0,this.once("reconnect",function(){this.reconnect=!1})),this.stopParser(),this.listen({socket:i,preserve:"on"})},r.prototype.onStanza=function(e){if(e.is("error",g)){var t=new Error(""+a(e));t.stanza=e,this.socket.emit("error",t)}else e.is("features",this.NS_STREAM)&&this.allowTLS&&!this.isSecure&&e.getChild("starttls",this.NS_XMPP_TLS)?this.send(new u("starttls",{xmlns:this.NS_XMPP_TLS})):this.allowTLS&&e.is("proceed",this.NS_XMPP_TLS)?this.setSecure():this.emit("stanza",e)},r.prototype.addStreamNs=function(e){for(var t in this.streamNsAttrs)e.attrs[t]||"xmlns"===t&&this.streamNsAttrs[t]===this.xmlns[""]||(e.attrs[t]=this.streamNsAttrs[t]);return e},r.prototype.rmXmlns=function(e){for(var t in this.xmlns){var n=t?"xmlns:"+t:"xmlns";e.attrs[n]===this.xmlns[t]&&(e.attrs[n]=null)}return e},r.prototype.onEnd=function(){this.closeStream(),this.reconnect||this.emit("end")},r.prototype.onClose=function(){this.reconnect||this.emit("close")},r.prototype.error=function(e,t){if(this.emit("error",new Error(t)),this.socket&&this.socket.writable){this.streamOpened||this.openStream();var n=new u("stream:error");n.c(e,{xmlns:b}),t&&n.c("text",{xmlns:b,"xml:lang":"en"}).t(t),this.send(n),this.end()}},t.exports=r},{"@xmpp/streamparser":286,"@xmpp/xml":289,debug:275,events:214,inherits:311,"lodash.assign":312,net:1,"node-xmpp-tls-connect":3,"reconnect-core":313}],282:[function(e,t,n){"use strict";var i=e("./lib/JID"),r=e("./lib/tag");t.exports=function(e,t,n){return Array.isArray(e)?r.apply(null,arguments):new i(e,t,n)},t.exports.JID=i,t.exports.tag=r,t.exports.equal=function(e,t){return e.equals(t)},t.exports.is=function(e){return e instanceof i}},{"./lib/JID":283,"./lib/tag":285}],283:[function(e,t,n){"use strict";function i(e,t,n){if(this._local=null,this.user=null,this._domain=null,this._resource=null,!e||t||n){if(!t)throw new Error("Argument error");this.setLocal(e),this.setDomain(t),this.setResource(n)}else this.parseJID(e)}var r=e("./escaping");i.prototype.parseJID=function(e){var t=e.indexOf("/");t!==-1&&(this.setResource(e.substr(t+1)),e=e.substr(0,t));var n=e.indexOf("@");n!==-1&&(this.setLocal(e.substr(0,n)),e=e.substr(n+1)),this.setDomain(e)},i.prototype.toString=function(e){var t=this._domain;return this._local&&(t=this.getLocal(e)+"@"+t),this._resource&&(t=t+"/"+this._resource),t},i.prototype.bare=function(){return this._resource?new i(this._local,this._domain,null):this},i.prototype.equals=function(e){return this._local===e._local&&this._domain===e._domain&&this._resource===e._resource},i.prototype.setLocal=function(e,t){return t=t||r.detect(e),t&&(e=r.escape(e)),this._local=e&&e.toLowerCase(),this.user=this._local,this},i.prototype.setUser=function(){console.log("JID.setUser: Use JID.setLocal instead"),this.setLocal.apply(this,arguments)},i.prototype.getUser=function(){return console.log("JID.getUser: Use JID.getLocal instead"),this.getLocal.apply(this,arguments)},i.prototype.getLocal=function(e){e=e||!1;var t=null;return t=e?r.unescape(this._local):this._local},Object.defineProperty(i.prototype,"local",{get:i.prototype.getLocal,set:i.prototype.setLocal}),i.prototype.setDomain=function(e){return this._domain=e.toLowerCase(),this},i.prototype.getDomain=function(){return this._domain},Object.defineProperty(i.prototype,"domain",{get:i.prototype.getDomain,set:i.prototype.setDomain}),i.prototype.setResource=function(e){return this._resource=e,this},i.prototype.getResource=function(){return this._resource},Object.defineProperty(i.prototype,"resource",{get:i.prototype.getResource,set:i.prototype.setResource}),i.prototype.detectEscape=r.detectEscape,i.prototype.escapeLocal=r.escape,i.prototype.unescapeLocal=r.unescape, +t.exports=i},{"./escaping":284}],284:[function(e,t,n){"use strict";t.exports.detect=function(e){if(!e)return!1;var t=e.replace(/\\20/g,"").replace(/\\22/g,"").replace(/\\26/g,"").replace(/\\27/g,"").replace(/\\2f/g,"").replace(/\\3a/g,"").replace(/\\3c/g,"").replace(/\\3e/g,"").replace(/\\40/g,"").replace(/\\5c/g,""),n=t.search(/\\| |"|&|'|\/|:|<|>|@/g);return n!==-1},t.exports.escape=function(e){return null===e?null:e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/"/g,"\\22").replace(/&/g,"\\26").replace(/'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(//g,"\\3e").replace(/@/g,"\\40").replace(/\3a/g,"c3a")},t.exports.unescape=function(e){return null===e?null:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")}},{}],285:[function(e,t,n){"use strict";var i=e("./JID");t.exports=function(){for(var e=arguments[0],t=Array.prototype.slice.call(arguments,1),n="",r=0;r");if(t>=0&&n>=0&&tthis.bytesParsedOnStanzaBegin+this.maxStanzaSize)return void this.error("policy-violation","Maximum stanza size exceeded");this.bytesParsed+=e.length,this.parser.write(e)}},i.prototype.end=function(e){e&&this.write(e),delete this.parser,this.emit("end")},i.prototype.error=function(e,t){var n=new Error(t);n.condition=e,this.emit("error",n)},t.exports=i},{"@xmpp/xml":289,events:214,inherits:311,"ltx/lib/parsers/ltx":288}],287:[function(e,t,n){"use strict";function i(e){return a[e]}function r(e){return o[e]}var a={"&":"&","<":"<",">":">",'"':""","'":"'"},o={"&":"&","&":"&","<":"<","<":"<",">":">",">":">",""":'"',""":'"',"'":"'","'":"'"};n.escapeXML=function(e){return e.replace(/&|<|>|"|'/g,i)},n.unescapeXML=function(e){return e.replace(/&(amp|#38|lt|#60|gt|#62|quot|#34|apos|#39);/g,r)},n.escapeXMLText=function(e){return e.replace(/&|<|>/g,i)},n.unescapeXMLText=function(e){return e.replace(/&(amp|#38|lt|#60|gt|#62);/g,r)}},{}],288:[function(e,t,n){"use strict";var i=e("inherits"),r=e("events").EventEmitter,a=e("../escape").unescapeXML,o=0,s=1,c=2,u=3,p=4,l=5,f=6,h=7,d=8,m=t.exports=function(){r.call(this);var e,t,n,i,m,g,b,v=o,y=0;this._handleTagOpening=function(e,t,n){e?this.emit("endElement",t):(this.emit("startElement",t,n),m&&this.emit("endElement",t))},this.write=function(r){function w(){if("number"==typeof y){var e=r.slice(y,x);return y=void 0,e}}"string"!=typeof r&&(r=r.toString());var x=0;for(e&&(r=e+r,x+=e.length,e=null);x32&&(y=x,v=l);break;case l:(k<=32||61===k)&&(b=w(),x--,v=f);break;case f:61===k&&(v=h);break;case h:34!==k&&39!==k||(g=k,v=d,y=x+1);break;case d:if(k===g){var A=a(w());n[b]=A,b=void 0,v=p}}}"number"==typeof y&&y<=r.length&&(e=r.slice(y),y=0)}};i(m,r),m.prototype.end=function(e){e&&this.write(e),this.write=function(){}}},{"../escape":287,events:214,inherits:311}],289:[function(e,t,n){"use strict";var i=e("ltx"),r=e("./lib/tag");n=t.exports=function(){return r.apply(null,arguments)},Object.assign(n,i),n.IQ=e("./lib/IQ"),n.Message=e("./lib/Message"),n.Presence=e("./lib/Presence"),n.Stanza=e("./lib/Stanza"),n.createStanza=e("./lib/createStanza"),n.parse=e("./lib/parse"),n.Parser=e("./lib/Parser"),n.tag=e("./lib/tag"),n.ltx=i},{"./lib/IQ":290,"./lib/Message":291,"./lib/Parser":292,"./lib/Presence":293,"./lib/Stanza":294,"./lib/createStanza":295,"./lib/parse":296,"./lib/tag":297,ltx:298}],290:[function(e,t,n){"use strict";function i(e){r.call(this,"iq",e)}var r=e("./Stanza"),a=e("inherits");a(i,r),t.exports=i},{"./Stanza":294,inherits:311}],291:[function(e,t,n){"use strict";function i(e){r.call(this,"message",e)}var r=e("./Stanza"),a=e("inherits");a(i,r),t.exports=i},{"./Stanza":294,inherits:311}],292:[function(e,t,n){"use strict";function i(e){o.call(this,e)}var r=e("inherits"),a=e("./createStanza"),o=e("ltx").Parser;r(i,o),i.prototype.DefaultElement=a,t.exports=i},{"./createStanza":295,inherits:311,ltx:298}],293:[function(e,t,n){"use strict";function i(e){r.call(this,"presence",e)}var r=e("./Stanza"),a=e("inherits");a(i,r),t.exports=i},{"./Stanza":294,inherits:311}],294:[function(e,t,n){"use strict";function i(e,t){a.call(this,e,t)}var r=e("inherits"),a=e("ltx").Element;r(i,a),Object.defineProperty(i.prototype,"from",{get:function(){return this.attrs.from},set:function(e){this.attrs.from=e}}),Object.defineProperty(i.prototype,"to",{get:function(){return this.attrs.to},set:function(e){this.attrs.to=e}}),Object.defineProperty(i.prototype,"id",{get:function(){return this.attrs.id},set:function(e){this.attrs.id=e}}),Object.defineProperty(i.prototype,"type",{get:function(){return this.attrs.type},set:function(e){this.attrs.type=e}}),t.exports=i},{inherits:311,ltx:298}],295:[function(e,t,n){"use strict";var i=e("./Stanza"),r=e("ltx").Element;t.exports=function(e,t){var n;switch(e){case"presence":case"message":case"iq":n=new i(e,t);break;default:n=new r(e,t)}var a=Array.prototype.slice.call(arguments,2);return a.forEach(function(e){n.cnode(e)}),n}},{"./Stanza":294,ltx:298}],296:[function(e,t,n){"use strict";var i=e("./Parser"),r=e("ltx").parse;t.exports=function(e){return r(e,i)}},{"./Parser":292,ltx:298}],297:[function(e,t,n){"use strict";var i=e("ltx").tagString,r=e("./parse");t.exports=function(){return r(i.apply(null,arguments))}},{"./parse":296,ltx:298}],298:[function(e,t,n){"use strict";var i=e("./lib/parse"),r=e("./lib/Parser"),a=e("./lib/escape"),o=e("./lib/Element"),s=e("./lib/equal"),c=e("./lib/createElement"),u=e("./lib/tag"),p=e("./lib/tagString"),l=e("./lib/is"),f=e("./lib/clone"),h=e("./lib/stringify");n=t.exports=function(){return u.apply(null,arguments)},n.Element=o,n.equal=s.equal,n.nameEqual=s.name,n.attrsEqual=s.attrs,n.childrenEqual=s.children,n.isNode=l.isNode,n.isElement=l.isElement,n.isText=l.isText,n.clone=f,n.createElement=c,n.escapeXML=a.escapeXML,n.unescapeXML=a.unescapeXML,n.escapeXMLText=a.escapeXMLText,n.unescapeXMLText=a.unescapeXMLText,n.Parser=r,n.parse=i,n.tag=u,n.tagString=p,n.stringify=h},{"./lib/Element":299,"./lib/Parser":300,"./lib/clone":301,"./lib/createElement":302,"./lib/equal":303,"./lib/escape":304,"./lib/is":305,"./lib/parse":306,"./lib/stringify":308,"./lib/tag":309,"./lib/tagString":310}],299:[function(e,t,n){"use strict";function i(e,t){this.name=e,this.parent=null,this.children=[],this.attrs={},this.setAttrs(t)}var r=e("./escape"),a=r.escapeXML,o=r.escapeXMLText,s=e("./equal"),c=s.equal,u=s.name,p=s.attrs,l=s.children,f=e("./clone");i.prototype.is=function(e,t){return this.getName()===e&&(!t||this.getNS()===t)},i.prototype.getName=function(){return this.name.indexOf(":")>=0?this.name.substr(this.name.indexOf(":")+1):this.name},i.prototype.getNS=function(){if(this.name.indexOf(":")>=0){var e=this.name.substr(0,this.name.indexOf(":"));return this.findNS(e)}return this.findNS()},i.prototype.findNS=function(e){if(e){var t="xmlns:"+e;if(this.attrs[t])return this.attrs[t];if(this.parent)return this.parent.findNS(e)}else{if(this.attrs.xmlns)return this.attrs.xmlns;if(this.parent)return this.parent.findNS()}},i.prototype.getXmlns=function(){var e={};this.parent&&(e=this.parent.getXmlns());for(var t in this.attrs){var n=t.match("xmlns:?(.*)");this.attrs.hasOwnProperty(t)&&n&&(e[this.attrs[t]]=n[1])}return e},i.prototype.setAttrs=function(e){"string"==typeof e?this.attrs.xmlns=e:e&&Object.keys(e).forEach(function(t){this.attrs[t]=e[t]},this)},i.prototype.getAttr=function(e,t){if(!t)return this.attrs[e];var n=this.getXmlns();return n[t]?this.attrs[[n[t],e].join(":")]:null},i.prototype.getChild=function(e,t){return this.getChildren(e,t)[0]},i.prototype.getChildren=function(e,t){for(var n=[],i=0;i");for(var t=0;t")},i.prototype.write=function(e){e("<"),e(this.name);for(var t in this.attrs){var n=this.attrs[t];null!=n&&(e(" "),e(t),e('="'),"string"!=typeof n&&(n=n.toString()),e(a(n)),e('"'))}0===this.children.length?e("/>"):this._addChildren(e)},i.prototype.nameEquals=function(e){return u(this,e)},i.prototype.attrsEquals=function(e){return p(this,e)},i.prototype.childrenEquals=function(e){return l(this,e)},i.prototype.equals=function(e){return c(this,e)},t.exports=i},{"./clone":301,"./equal":303,"./escape":304}],300:[function(e,t,n){"use strict";var i=e("events").EventEmitter,r=e("inherits"),a=e("./Element"),o=e("./parsers/ltx"),s=function(e){i.call(this);var t=this.Parser=e&&e.Parser||this.DefaultParser,n=this.Element=e&&e.Element||this.DefaultElement;this.parser=new t;var r,a=this;this.parser.on("startElement",function(e,t){var i=new n(e,t);r=r?r.cnode(i):i}),this.parser.on("endElement",function(e){r&&e===r.name&&(r.parent?r=r.parent:a.tree||(a.tree=r,r=void 0))}),this.parser.on("text",function(e){r&&r.t(e)}),this.parser.on("error",function(e){a.error=e,a.emit("error",e)})};r(s,i),s.prototype.DefaultParser=o,s.prototype.DefaultElement=a,s.prototype.write=function(e){this.parser.write(e)},s.prototype.end=function(e){this.parser.end(e),this.error||(this.tree?this.emit("tree",this.tree):this.emit("error",new Error("Incomplete document")))},t.exports=s},{"./Element":299,"./parsers/ltx":307,events:214,inherits:311}],301:[function(e,t,n){"use strict";t.exports=function e(t){for(var e=new t.constructor(t.name,t.attrs),n=0;n"):r+="/>",r}t.exports=i},{}],309:[function(e,t,n){"use strict";var i=e("./tagString"),r=e("./parse");t.exports=function(){return r(i.apply(null,arguments))}},{"./parse":306,"./tagString":310}],310:[function(e,t,n){"use strict";var i=e("./escape").escapeXML;t.exports=function(){for(var e=arguments[0],t="",n=1;n1?n[r-1]:void 0,o=r>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(r--,a):void 0,o&&h(n[0],n[1],o)&&(a=r<3?void 0:a,r=1),t=Object(t);++i-1&&e%1==0&&e-1&&e%1==0&&e<=j}function x(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function k(e){return!!e&&"object"==typeof e}function _(e){return b(e)?o(e):c(e)}var j=9007199254740991,S="[object Arguments]",E="[object Function]",A="[object GeneratorFunction]",C=/^(?:0|[1-9]\d*)$/,T=Object.prototype,I=T.hasOwnProperty,O=T.toString,D=T.propertyIsEnumerable,M=a(Object.keys,Object),q=Math.max,B=!D.call({valueOf:1},"valueOf"),z=Array.isArray,F=l(function(e,t){if(B||d(t)||b(t))return void p(t,_(t),e);for(var n in t)I.call(t,n)&&s(e,n,t[n])});t.exports=F},{}],313:[function(e,t,n){var i=e("events").EventEmitter,r=e("backoff"),a=function(){};t.exports=function(e){return function(t,n){function o(i,r){function o(e){p=a,h.removeListener("connect",f),h.removeListener("error",l),h.removeListener("close",l),h.removeListener("end",l),"Request"==h.constructor.name&&h.on("error",a)}function l(e){if(s.connected=!1,o(e),s.emit("disconnect",e),s.reconnect)try{c.backoff()}catch(e){}}function f(){c.reset(),s.connected=!0,n&&h.removeListener("connect",n),s.emit("connect",h)}if(s.reconnect){p(),s.emit("reconnect",i,r);var h=e.apply(null,u);h!==s._connection&&s.emit("connection",h),s._connection=h,p=o,h.on("error",l).on("close",l).on("end",l),t.immediate||"Request"==h.constructor.name?(s.connected=!0,s.emit("connect",h),h.once("data",function(){c.reset()})):h.on("connect",f)}}n="function"==typeof t?t:n,t="object"==typeof t?t:{initialDelay:1e3,maxDelay:3e4},n||(n=t.onConnect);var s=t.emitter||new i;s.connected=!1,s.reconnect=!0,n&&s.on("connect",n);var c=(r[t.type]||r.fibonacci)(t);c.on("backoff",function(e,t){s.emit("backoff",e,t)});var u,p=a;return c.on("ready",o),s.connect=s.listen=function(){return this.reconnect=!0,c.reset(),u=[].slice.call(arguments),o(0,0),s},s.end=s.disconnect=function(){return s.reconnect=!1,s._connection&&s._connection.end(),s.emit("disconnect"),s},s}}},{backoff:314,events:214}],314:[function(e,t,n){var i=e("./lib/backoff"),r=e("./lib/strategy/exponential"),a=e("./lib/strategy/fibonacci"),o=e("./lib/function_call.js");t.exports.Backoff=i,t.exports.FunctionCall=o,t.exports.FibonacciStrategy=a,t.exports.ExponentialStrategy=r,t.exports.fibonacci=function(e){return new i(new a(e))},t.exports.exponential=function(e){return new i(new r(e))},t.exports.call=function(e,t,n){var i=Array.prototype.slice.call(arguments);return e=i[0],t=i.slice(1,i.length-1),n=i[i.length-1],new o(e,t,n)}},{"./lib/backoff":315,"./lib/function_call.js":316,"./lib/strategy/exponential":317,"./lib/strategy/fibonacci":318}],315:[function(e,t,n){function i(e){r.EventEmitter.call(this),this.backoffStrategy_=e,this.maxNumberOfRetry_=-1,this.backoffNumber_=0,this.backoffDelay_=0,this.timeoutID_=-1,this.handlers={backoff:this.onBackoff_.bind(this)}}var r=e("events"),a=e("util");a.inherits(i,r.EventEmitter),i.prototype.failAfter=function(e){if(e<1)throw new Error("Maximum number of retry must be greater than 0. Actual: "+e);this.maxNumberOfRetry_=e},i.prototype.backoff=function(e){if(this.timeoutID_!==-1)throw new Error("Backoff in progress.");this.backoffNumber_===this.maxNumberOfRetry_?(this.emit("fail",e),this.reset()):(this.backoffDelay_=this.backoffStrategy_.next(),this.timeoutID_=setTimeout(this.handlers.backoff,this.backoffDelay_),this.emit("backoff",this.backoffNumber_,this.backoffDelay_,e))},i.prototype.onBackoff_=function(){this.timeoutID_=-1,this.emit("ready",this.backoffNumber_,this.backoffDelay_),this.backoffNumber_++},i.prototype.reset=function(){this.backoffNumber_=0,this.backoffStrategy_.reset(),clearTimeout(this.timeoutID_),this.timeoutID_=-1},t.exports=i},{events:214,util:253}],316:[function(e,t,n){function i(e){return"function"==typeof e}function r(e,t,n){if(a.EventEmitter.call(this),!i(e))throw new Error("fn should be a function.Actual: "+typeof e);if(!i(n))throw new Error("callback should be a function.Actual: "+typeof e);this.function_=e,this.arguments_=t,this.callback_=n,this.results_=[],this.backoff_=null,this.strategy_=null,this.failAfter_=-1,this.state_=r.State_.PENDING}var a=e("events"),o=e("util"),s=e("./backoff"),c=e("./strategy/fibonacci");o.inherits(r,a.EventEmitter),r.State_={PENDING:0,RUNNING:1,COMPLETED:2,ABORTED:3},r.prototype.isPending=function(){return this.state_==r.State_.PENDING},r.prototype.isRunning=function(){return this.state_==r.State_.RUNNING},r.prototype.isCompleted=function(){return this.state_==r.State_.COMPLETED},r.prototype.isAborted=function(){return this.state_==r.State_.ABORTED},r.prototype.setStrategy=function(e){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.strategy_=e,this},r.prototype.getResults=function(){return this.results_.concat()},r.prototype.failAfter=function(e){if(!this.isPending())throw new Error("FunctionCall in progress.");return this.failAfter_=e,this},r.prototype.abort=function(){if(this.isCompleted())throw new Error("FunctionCall already completed.");this.isRunning()&&this.backoff_.reset(),this.state_=r.State_.ABORTED},r.prototype.start=function(e){if(this.isAborted())throw new Error("FunctionCall aborted.");if(!this.isPending())throw new Error("FunctionCall already started.");var t=this.strategy_||new c;this.backoff_=e?e(t):new s(t),this.backoff_.on("ready",this.doCall_.bind(this)),this.backoff_.on("fail",this.doCallback_.bind(this)),this.backoff_.on("backoff",this.handleBackoff_.bind(this)),this.failAfter_>0&&this.backoff_.failAfter(this.failAfter_),this.state_=r.State_.RUNNING,this.doCall_()},r.prototype.doCall_=function(){var e=["call"].concat(this.arguments_);a.EventEmitter.prototype.emit.apply(this,e);var t=this.handleFunctionCallback_.bind(this);this.function_.apply(null,this.arguments_.concat(t))},r.prototype.doCallback_=function(){var e=this.results_[this.results_.length-1];this.callback_.apply(null,e)},r.prototype.handleFunctionCallback_=function(){if(!this.isAborted()){var e=Array.prototype.slice.call(arguments);this.results_.push(e),a.EventEmitter.prototype.emit.apply(this,["callback"].concat(e)),e[0]?this.backoff_.backoff(e[0]):(this.state_=r.State_.COMPLETED,this.doCallback_())}},r.prototype.handleBackoff_=function(e,t,n){this.emit("backoff",e,t,n)},t.exports=r},{"./backoff":315,"./strategy/fibonacci":318,events:214,util:253}],317:[function(e,t,n){function i(e){a.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var r=e("util"),a=e("./strategy");r.inherits(i,a),i.prototype.next_=function(){return this.backoffDelay_=Math.min(this.nextBackoffDelay_,this.getMaxDelay()),this.nextBackoffDelay_=2*this.backoffDelay_,this.backoffDelay_},i.prototype.reset_=function(){this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()},t.exports=i},{"./strategy":319,util:253}],318:[function(e,t,n){function i(e){a.call(this,e),this.backoffDelay_=0,this.nextBackoffDelay_=this.getInitialDelay()}var r=e("util"),a=e("./strategy");r.inherits(i,a),i.prototype.next_=function(){var e=Math.min(this.nextBackoffDelay_,this.getMaxDelay());return this.nextBackoffDelay_+=this.backoffDelay_,this.backoffDelay_=e,e},i.prototype.reset_=function(){this.nextBackoffDelay_=this.getInitialDelay(),this.backoffDelay_=0},t.exports=i},{"./strategy":319,util:253}],319:[function(e,t,n){function i(e){return void 0!==e&&null!==e}function r(e){if(e=e||{},i(e.initialDelay)&&e.initialDelay<1)throw new Error("The initial timeout must be greater than 0.");if(i(e.maxDelay)&&e.maxDelay<1)throw new Error("The maximal timeout must be greater than 0.");if(this.initialDelay_=e.initialDelay||100,this.maxDelay_=e.maxDelay||1e4,this.maxDelay_<=this.initialDelay_)throw new Error("The maximal backoff delay must be greater than the initial backoff delay.");if(i(e.randomisationFactor)&&(e.randomisationFactor<0||e.randomisationFactor>1))throw new Error("The randomisation factor must be between 0 and 1.");this.randomisationFactor_=e.randomisationFactor||0}e("events"),e("util");r.prototype.getMaxDelay=function(){return this.maxDelay_},r.prototype.getInitialDelay=function(){return this.initialDelay_},r.prototype.next=function(){var e=this.next_(),t=1+Math.random()*this.randomisationFactor_,n=Math.round(e*t);return n},r.prototype.next_=function(){throw new Error("BackoffStrategy.next_() unimplemented.")},r.prototype.reset=function(){this.reset_()},r.prototype.reset_=function(){throw new Error("BackoffStrategy.reset_() unimplemented.")},t.exports=r},{events:214,util:253}],320:[function(e,t,n){"use strict";function i(e,t,n){"function"==typeof t&&(n=t);var i={};return"object"==typeof t?s(i,t,{uri:e}):"string"==typeof e?s(i,{uri:e}):s(i,e),i.callback=n||i.callback,i}function r(e,t,n){if("undefined"==typeof e)throw new Error("undefined is not a valid uri or options object.");var a=i(e,t,n);if("HEAD"===a.method&&p(a))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new r.Request(a)}function a(e){var t=e.toUpperCase();return function(e,n,a){var o=i(e,n,a);return o.method=t,r(o,o.callback)}}function o(e,t,n,r){return function(a,o,c){var u=i(a,o,c),p={};return s(!0,p,t,u),p.pool=u.pool||t.pool,r&&(p.method=r.toUpperCase()),"function"==typeof n&&(e=n),e(p,p.callback)}}var s=e("extend"),c=e("./lib/cookies"),u=e("./lib/helpers"),p=u.paramsHaveRequestBody;r.get=a("get"),r.head=a("head"),r.post=a("post"),r.put=a("put"),r.patch=a("patch"),r.del=a("delete"),r.delete=a("delete"),r.jar=function(e){return c.jar(e)},r.cookie=function(e){return c.parse(e)},r.defaults=function(e,t){var n=this;e=e||{},"function"==typeof e&&(t=e,e={});var i=o(n,e,t),r=["get","head","post","put","patch","del","delete"];return r.forEach(function(r){i[r]=o(n[r],e,t,r)}),i.cookie=o(n.cookie,e,t),i.jar=n.jar,i.defaults=n.defaults,i},r.forever=function(e,t){var n={};return t&&s(n,t),e&&(n.agentOptions=e),n.forever=!0,r.defaults(n)},t.exports=r,r.Request=e("./request"),r.initParams=i,Object.defineProperty(r,"debug",{enumerable:!0,get:function(){return r.Request.debug},set:function(e){r.Request.debug=e}})},{"./lib/cookies":322,"./lib/helpers":325,"./request":447,extend:337}],321:[function(e,t,n){"use strict";function i(e){this.request=e,this.hasAuth=!1,this.sentAuth=!1,this.bearerToken=null,this.user=null,this.pass=null}var r=e("caseless"),a=e("uuid"),o=e("./helpers"),s=o.md5,c=o.toBase64;i.prototype.basic=function(e,t,n){var i=this;("string"!=typeof e||void 0!==t&&"string"!=typeof t)&&i.request.emit("error",new Error("auth() received invalid user or password")),i.user=e,i.pass=t,i.hasAuth=!0;var r=e+":"+(t||"");if(n||"undefined"==typeof n){var a="Basic "+c(r);return i.sentAuth=!0,a}},i.prototype.bearer=function(e,t){var n=this;if(n.bearerToken=e,n.hasAuth=!0,t||"undefined"==typeof t){"function"==typeof e&&(e=e());var i="Bearer "+(e||"");return n.sentAuth=!0,i}},i.prototype.digest=function(e,t,n){for(var i=this,r={},o=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;;){var c=o.exec(n);if(!c)break;r[c[1]]=c[2]||c[3]}var u=function(e,t,n,i,r,a){var o=s(t+":"+n+":"+i);return e&&"md5-sess"===e.toLowerCase()?s(o+":"+r+":"+a):o},p=/(^|,)\s*auth\s*($|,)/.test(r.qop)&&"auth",l=p&&"00000001",f=p&&a().replace(/-/g,""),h=u(r.algorithm,i.user,r.realm,i.pass,r.nonce,f),d=s(e+":"+t),m=s(p?h+":"+r.nonce+":"+l+":"+f+":"+p+":"+d:h+":"+r.nonce+":"+d),g={username:i.user,realm:r.realm,nonce:r.nonce,uri:t,qop:p,response:m,nc:l,cnonce:f,algorithm:r.algorithm,opaque:r.opaque};n=[];for(var b in g)g[b]&&("qop"===b||"nc"===b||"algorithm"===b?n.push(b+"="+g[b]):n.push(b+'="'+g[b]+'"'));return n="Digest "+n.join(", "),i.sentAuth=!0,n},i.prototype.onRequest=function(e,t,n,i){var r,a=this,o=a.request;void 0===i&&void 0===e?a.request.emit("error",new Error("no auth mechanism defined")):r=void 0!==i?a.bearer(i,n):a.basic(e,t,n),r&&o.setHeader("authorization",r)},i.prototype.onResponse=function(e){var t=this,n=t.request;if(!t.hasAuth||t.sentAuth)return null;var i=r(e.headers),a=i.get("www-authenticate"),o=a&&a.split(" ")[0].toLowerCase();switch(n.debug("reauth",o),o){case"basic":return t.basic(t.user,t.pass,!0);case"bearer":return t.bearer(t.bearerToken,!0);case"digest":return t.digest(n.method,n.path,a)}},n.Auth=i},{"./helpers":325,caseless:334,uuid:442}],322:[function(e,t,n){"use strict";function i(e){var t=this;t._jar=new o(e,{looseMode:!0})}var r=e("tough-cookie"),a=r.Cookie,o=r.CookieJar;n.parse=function(e){if(e&&e.uri&&(e=e.uri),"string"!=typeof e)throw new Error("The cookie function only accepts STRING as param");return a.parse(e,{loose:!0})},i.prototype.setCookie=function(e,t,n){var i=this;return i._jar.setCookieSync(e,t,n||{})},i.prototype.getCookieString=function(e){var t=this;return t._jar.getCookieStringSync(e)},i.prototype.getCookies=function(e){var t=this;return t._jar.getCookiesSync(e)},n.jar=function(e){return new i(e)}},{"tough-cookie":434}],323:[function(e,t,n){(function(e){"use strict";function n(e){return e.replace(/^\.*/,".").toLowerCase()}function i(e){e=e.trim().toLowerCase();var t=e.split(":",2),i=n(t[0]),r=t[1],a=e.indexOf(":")>-1;return{hostname:i,port:r,hasPort:a}}function r(e,t){var r=e.port||("https:"===e.protocol?"443":"80"),a=n(e.hostname),o=t.split(",");return o.map(i).some(function(e){var t=a.indexOf(e.hostname),n=t>-1&&t===a.length-e.hostname.length;return e.hasPort?r===e.port&&n:n})}function a(t){var n=e.env.NO_PROXY||e.env.no_proxy||"";return"*"===n?null:""!==n&&r(t,n)?null:"http:"===t.protocol?e.env.HTTP_PROXY||e.env.http_proxy||null:"https:"===t.protocol?e.env.HTTPS_PROXY||e.env.https_proxy||e.env.HTTP_PROXY||e.env.http_proxy||null:null}t.exports=a}).call(this,e("_process"))},{_process:219}],324:[function(e,t,n){"use strict";function i(e){this.request=e}var r=e("fs"),a=e("querystring"),o=e("har-validator"),s=e("extend");i.prototype.reducer=function(e,t){if(void 0===e[t.name])return e[t.name]=t.value,e;var n=[e[t.name],t.value];return e[t.name]=n,e},i.prototype.prep=function(e){function t(t){return t.some(function(t){return 0===e.postData.mimeType.indexOf(t)})}if(e.queryObj={},e.headersObj={}, +e.postData.jsonObj=!1,e.postData.paramsObj=!1,e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(this.reducer,{})),e.headers&&e.headers.length&&(e.headersObj=e.headers.reduceRight(function(e,t){return e[t.name]=t.value,e},{})),e.cookies&&e.cookies.length){var n=e.cookies.map(function(e){return e.name+"="+e.value});n.length&&(e.headersObj.cookie=n.join("; "))}if(t(["multipart/mixed","multipart/related","multipart/form-data","multipart/alternative"]))e.postData.mimeType="multipart/form-data";else if(t(["application/x-www-form-urlencoded"]))e.postData.params?(e.postData.paramsObj=e.postData.params.reduce(this.reducer,{}),e.postData.text=a.stringify(e.postData.paramsObj)):e.postData.text="";else if(t(["text/json","text/x-json","application/json","application/x-json"])&&(e.postData.mimeType="application/json",e.postData.text))try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){this.request.debug(t),e.postData.mimeType="text/plain"}return e},i.prototype.options=function(e){function t(e){return 0===i.postData.mimeType.indexOf(e)}if(!e.har)return e;var n={};if(s(n,e.har),n.log&&n.log.entries&&(n=n.log.entries[0]),n.url=n.url||e.url||e.uri||e.baseUrl||"/",n.httpVersion=n.httpVersion||"HTTP/1.1",n.queryString=n.queryString||[],n.headers=n.headers||[],n.cookies=n.cookies||[],n.postData=n.postData||{},n.postData.mimeType=n.postData.mimeType||"application/octet-stream",n.bodySize=0,n.headersSize=0,n.postData.size=0,!o.request(n))return e;var i=this.prep(n);return i.url&&(e.url=i.url),i.method&&(e.method=i.method),Object.keys(i.queryObj).length&&(e.qs=i.queryObj),Object.keys(i.headersObj).length&&(e.headers=i.headersObj),t("application/x-www-form-urlencoded")?e.form=i.postData.paramsObj:t("application/json")?i.postData.jsonObj&&(e.body=i.postData.jsonObj,e.json=!0):t("multipart/form-data")?(e.formData={},i.postData.params.forEach(function(t){var n={};return t.fileName||t.fileName||t.contentType?(t.fileName&&!t.value?n.value=r.createReadStream(t.fileName):t.value&&(n.value=t.value),t.fileName&&(n.options={filename:t.fileName,contentType:t.contentType?t.contentType:null}),void(e.formData[t.name]=n)):void(e.formData[t.name]=t.value)})):i.postData.text&&(e.body=i.postData.text),e},n.Har=i},{extend:337,fs:1,"har-validator":341,querystring:223}],325:[function(e,t,n){(function(t,i){"use strict";function r(e){return e.body||e.requestBodyStream||e.json&&"boolean"!=typeof e.json||e.multipart}function a(e,t){var n;try{n=JSON.stringify(e,t)}catch(i){n=l(e,t)}return n}function o(e){return f.createHash("md5").update(e).digest("hex")}function s(e){return e.readable&&e.path&&e.mode}function c(e){return new i(e||"","utf8").toString("base64")}function u(e){var t={};return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function p(){var e=t.version.replace("v","").split(".");return{major:parseInt(e[0],10),minor:parseInt(e[1],10),patch:parseInt(e[2],10)}}var l=e("json-stringify-safe"),f=e("crypto"),h="undefined"==typeof setImmediate?t.nextTick:setImmediate;n.paramsHaveRequestBody=r,n.safeStringify=a,n.md5=o,n.isReadStream=s,n.toBase64=c,n.copy=u,n.version=p,n.defer=h}).call(this,e("_process"),e("buffer").Buffer)},{_process:219,buffer:17,crypto:21,"json-stringify-safe":423}],326:[function(e,t,n){(function(t){"use strict";function i(e){this.request=e,this.boundary=r(),this.chunked=!1,this.body=null}var r=e("uuid"),a=e("combined-stream"),o=e("isstream");i.prototype.isChunked=function(e){var t=this,n=!1,i=e.data||e;return i.forEach||t.request.emit("error",new Error("Argument error, options.multipart.")),void 0!==e.chunked&&(n=e.chunked),"chunked"===t.request.getHeader("transfer-encoding")&&(n=!0),n||i.forEach(function(e){"undefined"==typeof e.body&&t.request.emit("error",new Error("Body attribute missing in multipart.")),o(e.body)&&(n=!0)}),n},i.prototype.setHeaders=function(e){var t=this;e&&!t.request.hasHeader("transfer-encoding")&&t.request.setHeader("transfer-encoding","chunked");var n=t.request.getHeader("content-type");n&&n.indexOf("multipart")!==-1?n.indexOf("boundary")!==-1?t.boundary=n.replace(/.*boundary=([^\s;]+).*/,"$1"):t.request.setHeader("content-type",n+"; boundary="+t.boundary):t.request.setHeader("content-type","multipart/related; boundary="+t.boundary)},i.prototype.build=function(e,n){function i(e){return"number"==typeof e&&(e=e.toString()),n?o.append(e):o.push(new t(e))}var r=this,o=n?new a:[];return r.request.preambleCRLF&&i("\r\n"),e.forEach(function(e){var t="--"+r.boundary+"\r\n";Object.keys(e).forEach(function(n){"body"!==n&&(t+=n+": "+e[n]+"\r\n")}),t+="\r\n",i(t),i(e.body),i("\r\n")}),i("--"+r.boundary+"--"),r.request.postambleCRLF&&i("\r\n"),o},i.prototype.onRequest=function(e){var t=this,n=t.isChunked(e),i=e.data||e;t.setHeaders(n),t.chunked=n,t.body=t.build(i,n)},n.Multipart=i}).call(this,e("buffer").Buffer)},{buffer:17,"combined-stream":335,isstream:422,uuid:442}],327:[function(e,t,n){(function(t){"use strict";function i(e){this.request=e,this.params=null}var r=e("url"),a=e("qs"),o=e("caseless"),s=e("uuid"),c=e("oauth-sign"),u=e("crypto");i.prototype.buildParams=function(e,t,n,i,r,a){var o={};for(var u in e)o["oauth_"+u]=e[u];o.oauth_version||(o.oauth_version="1.0"),o.oauth_timestamp||(o.oauth_timestamp=Math.floor(Date.now()/1e3).toString()),o.oauth_nonce||(o.oauth_nonce=s().replace(/-/g,"")),o.oauth_signature_method||(o.oauth_signature_method="HMAC-SHA1");var p=o.oauth_consumer_secret||o.oauth_private_key;delete o.oauth_consumer_secret,delete o.oauth_private_key;var l=o.oauth_token_secret;delete o.oauth_token_secret;var f=o.oauth_realm;delete o.oauth_realm,delete o.oauth_transport_method;var h=t.protocol+"//"+t.host+t.pathname,d=a.parse([].concat(i,r,a.stringify(o)).join("&"));return o.oauth_signature=c.sign(o.oauth_signature_method,n,h,d,p,l),f&&(o.realm=f),o},i.prototype.buildBodyHash=function(e,n){["HMAC-SHA1","RSA-SHA1"].indexOf(e.signature_method||"HMAC-SHA1")<0&&this.request.emit("error",new Error("oauth: "+e.signature_method+" signature_method not supported with body_hash signing."));var i=u.createHash("sha1");i.update(n||"");var r=i.digest("hex");return new t(r).toString("base64")},i.prototype.concatParams=function(e,t,n){n=n||"";var i=Object.keys(e).filter(function(e){return"realm"!==e&&"oauth_signature"!==e}).sort();return e.realm&&i.splice(0,0,"realm"),i.push("oauth_signature"),i.map(function(t){return t+"="+n+c.rfc3986(e[t])+n}).join(t)},i.prototype.onRequest=function(e){var t=this;t.params=e;var n,i,s=t.request.uri||{},c=t.request.method||"",u=o(t.request.headers),p=t.request.body||"",l=t.request.qsLib||a,f=u.get("content-type")||"",h="application/x-www-form-urlencoded",d=e.transport_method||"header";f.slice(0,h.length)===h&&(f=h,n=p),s.query&&(i=s.query),"body"!==d||"POST"===c&&f===h||t.request.emit("error",new Error("oauth: transport_method of body requires POST and content-type "+h)),n||"boolean"!=typeof e.body_hash||(e.body_hash=t.buildBodyHash(e,t.request.body.toString()));var m=t.buildParams(e,s,c,i,n,l);switch(d){case"header":t.request.setHeader("Authorization","OAuth "+t.concatParams(m,",",'"'));break;case"query":var g=t.request.uri.href+=(i?"&":"?")+t.concatParams(m,"&");t.request.uri=r.parse(g),t.request.path=t.request.uri.path;break;case"body":t.request.body=(n?n+"&":"")+t.concatParams(m,"&");break;default:t.request.emit("error",new Error("oauth: transport_method invalid"))}},n.OAuth=i}).call(this,e("buffer").Buffer)},{buffer:17,caseless:334,crypto:21,"oauth-sign":427,qs:429,url:249,uuid:442}],328:[function(e,t,n){"use strict";function i(e){this.request=e,this.lib=null,this.useQuerystring=null,this.parseOptions=null,this.stringifyOptions=null}var r=e("qs"),a=e("querystring");i.prototype.init=function(e){this.lib||(this.useQuerystring=e.useQuerystring,this.lib=this.useQuerystring?a:r,this.parseOptions=e.qsParseOptions||{},this.stringifyOptions=e.qsStringifyOptions||{})},i.prototype.stringify=function(e){return this.useQuerystring?this.rfc3986(this.lib.stringify(e,this.stringifyOptions.sep||null,this.stringifyOptions.eq||null,this.stringifyOptions)):this.lib.stringify(e,this.stringifyOptions)},i.prototype.parse=function(e){return this.useQuerystring?this.lib.parse(e,this.parseOptions.sep||null,this.parseOptions.eq||null,this.parseOptions):this.lib.parse(e,this.parseOptions)},i.prototype.rfc3986=function(e){return e.replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},i.prototype.unescape=a.unescape,n.Querystring=i},{qs:429,querystring:223}],329:[function(e,t,n){"use strict";function i(e){this.request=e,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}var r=e("url"),a=/^https?:/;i.prototype.onRequest=function(e){var t=this;void 0!==e.maxRedirects&&(t.maxRedirects=e.maxRedirects),"function"==typeof e.followRedirect&&(t.allowRedirect=e.followRedirect),void 0!==e.followRedirect&&(t.followRedirects=!!e.followRedirect),void 0!==e.followAllRedirects&&(t.followAllRedirects=e.followAllRedirects),(t.followRedirects||t.followAllRedirects)&&(t.redirects=t.redirects||[]),void 0!==e.removeRefererHeader&&(t.removeRefererHeader=e.removeRefererHeader),void 0!==e.followOriginalHttpMethod&&(t.followOriginalHttpMethod=e.followOriginalHttpMethod)},i.prototype.redirectTo=function(e){var t=this,n=t.request,i=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var r=e.caseless.get("location");if(n.debug("redirect",r),t.followAllRedirects)i=r;else if(t.followRedirects)switch(n.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:i=r}}else if(401===e.statusCode){var a=n._auth.onResponse(e);a&&(n.setHeader("authorization",a),i=n.uri)}return i},i.prototype.onResponse=function(e){var t=this,n=t.request,i=t.redirectTo(e);if(!i||!t.allowRedirect.call(n,e))return!1;if(n.debug("redirect to",i),e.resume&&e.resume(),t.redirectsFollowed>=t.maxRedirects)return n.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+n.uri.href)),!1;t.redirectsFollowed+=1,a.test(i)||(i=r.resolve(n.uri.href,i));var o=n.uri;return n.uri=r.parse(i),n.uri.protocol!==o.protocol&&delete n.agent,t.redirects.push({statusCode:e.statusCode,redirectUri:i}),t.followAllRedirects&&"HEAD"!==n.method&&401!==e.statusCode&&307!==e.statusCode&&(n.method=t.followOriginalHttpMethod?n.method:"GET"),delete n.src,delete n.req,delete n._started,401!==e.statusCode&&307!==e.statusCode&&(delete n.body,delete n._form,n.headers&&(n.removeHeader("host"),n.removeHeader("content-type"),n.removeHeader("content-length"),n.uri.hostname!==n.originalHost.split(":")[0]&&n.removeHeader("authorization"))),t.removeRefererHeader||n.setHeader("referer",o.href),n.emit("redirect"),n.init(),!0},n.Redirect=i},{url:249}],330:[function(e,t,n){"use strict";function i(e){var t=e.port,n=e.protocol,i=e.hostname+":";return i+=t?t:"https:"===n?"443":"80"}function r(e,t){var n=t.reduce(function(e,t){return e[t.toLowerCase()]=!0,e},{});return Object.keys(e).filter(function(e){return n[e.toLowerCase()]}).reduce(function(t,n){return t[n]=e[n],t},{})}function a(e,t){var n=e.proxy,i={proxy:{host:n.hostname,port:+n.port,proxyAuth:n.auth,headers:t},headers:e.headers,ca:e.ca,cert:e.cert,key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return i}function o(e,t){var n="https:"===e.protocol?"https":"http",i="https:"===t.protocol?"Https":"Http";return[n,i].join("Over")}function s(e){var t=e.uri,n=e.proxy,i=o(t,n);return p[i]}function c(e){this.request=e,this.proxyHeaderWhiteList=l,this.proxyHeaderExclusiveList=[],"undefined"!=typeof e.tunnel&&(this.tunnelOverride=e.tunnel)}var u=e("url"),p=e("tunnel-agent"),l=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],f=["proxy-authorization"];c.prototype.isEnabled=function(){var e=this,t=e.request;return"undefined"!=typeof e.tunnelOverride?e.tunnelOverride:"https:"===t.uri.protocol},c.prototype.setup=function(e){var t=this,n=t.request;if(e=e||{},"string"==typeof n.proxy&&(n.proxy=u.parse(n.proxy)),!n.proxy||!n.tunnel)return!1;e.proxyHeaderWhiteList&&(t.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(t.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var o=t.proxyHeaderExclusiveList.concat(f),c=t.proxyHeaderWhiteList.concat(o),p=r(n.headers,c);p.host=i(n.uri),o.forEach(n.removeHeader,n);var l=s(n),h=a(n,p);return n.agent=l(h),!0},c.defaultProxyHeaderWhiteList=l,c.defaultProxyHeaderExclusiveList=f,n.Tunnel=c},{"tunnel-agent":441,url:249}],331:[function(e,t,n){function i(e){return"AWS "+e.key+":"+a(e)}function r(e){return l.createHmac("sha1",e.secret).update(e.message).digest("base64")}function a(e){return e.message=s(e),r(e)}function o(e){return e.message=c(e),r(e)}function s(e){var t=e.amazonHeaders||"";t&&(t+="\n");var n=[e.verb,e.md5,e.contentType,e.date?e.date.toUTCString():"",t+e.resource];return n.join("\n")}function c(e){return"GET\n\n\n"+e.date+"\n"+e.resource}function u(e){for(var t=[],n=Object.keys(e),i=0,r=n.length;i=0&&"us-east-1"===this.region||["cloudfront","ls","route53","iam","importexport","sts"].indexOf(this.service)>=0},s.prototype.createHost=function(){var e=this.isSingleRegion()?"":("s3"===this.service&&"us-east-1"!==this.region?"-":".")+this.region,t="ses"===this.service?"email":this.service;return t+e+".amazonaws.com"},s.prototype.prepareRequest=function(){this.parsePath();var e,t=this.request,n=t.headers;t.signQuery?(this.parsedPath.query=e=this.parsedPath.query||{},this.credentials.sessionToken&&(e["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"!==this.service||e["X-Amz-Expires"]||(e["X-Amz-Expires"]=86400),e["X-Amz-Date"]?this.datetime=e["X-Amz-Date"]:e["X-Amz-Date"]=this.getDateTime(),e["X-Amz-Algorithm"]="AWS4-HMAC-SHA256",e["X-Amz-Credential"]=this.credentials.accessKeyId+"/"+this.credentialString(),e["X-Amz-SignedHeaders"]=this.signedHeaders()):(t.doNotModifyHeaders||this.isCodeCommitGit||(!t.body||n["Content-Type"]||n["content-type"]||(n["Content-Type"]="application/x-www-form-urlencoded; charset=utf-8"),!t.body||n["Content-Length"]||n["content-length"]||(n["Content-Length"]=i.byteLength(t.body)),this.credentials.sessionToken&&(n["X-Amz-Security-Token"]=this.credentials.sessionToken),"s3"===this.service&&(n["X-Amz-Content-Sha256"]=a(this.request.body||"","hex")),n["X-Amz-Date"]?this.datetime=n["X-Amz-Date"]:n["X-Amz-Date"]=this.getDateTime()),delete n.Authorization,delete n.authorization)},s.prototype.sign=function(){return this.parsedPath||this.prepareRequest(),this.request.signQuery?this.parsedPath.query["X-Amz-Signature"]=this.signature():this.request.headers.Authorization=this.authHeader(),this.request.path=this.formatPath(),this.request},s.prototype.getDateTime=function(){if(!this.datetime){var e=this.request.headers,t=new Date(e.Date||e.date||new Date);this.datetime=t.toISOString().replace(/[:\-]|\.\d{3}/g,""),this.isCodeCommitGit&&(this.datetime=this.datetime.slice(0,-1))}return this.datetime},s.prototype.getDate=function(){return this.getDateTime().substr(0,8)},s.prototype.authHeader=function(){return["AWS4-HMAC-SHA256 Credential="+this.credentials.accessKeyId+"/"+this.credentialString(),"SignedHeaders="+this.signedHeaders(),"Signature="+this.signature()].join(", ")},s.prototype.signature=function(){var e,t,n,i=this.getDate(),a=[this.credentials.secretAccessKey,i,this.region,this.service].join(),o=h.get(a);return o||(e=r("AWS4"+this.credentials.secretAccessKey,i),t=r(e,this.region),n=r(t,this.service),o=r(n,"aws4_request"),h.set(a,o)),r(o,this.stringToSign(),"hex")},s.prototype.stringToSign=function(){return["AWS4-HMAC-SHA256",this.getDateTime(),this.credentialString(),a(this.canonicalString(),"hex")].join("\n")},s.prototype.canonicalString=function(){this.parsedPath||this.prepareRequest();var e=this.parsedPath.path,t=this.parsedPath.query,n="",i="s3"!==this.service,r="s3"===this.service||this.request.doNotEncodePath,s="s3"===this.service,c="s3"===this.service,u="s3"===this.service&&this.request.signQuery?"UNSIGNED-PAYLOAD":this.isCodeCommitGit?"":a(this.request.body||"","hex");return t&&(n=o(p.stringify(Object.keys(t).sort().reduce(function(e,n){return n?(e[n]=Array.isArray(t[n])?c?t[n][0]:t[n].slice().sort():t[n],e):e},{})))),"/"!==e&&(i&&(e=e.replace(/\/{2,}/g,"/")),e=e.split("/").reduce(function(e,t){return i&&".."===t?e.pop():i&&"."===t||(r&&(t=p.unescape(t)),e.push(o(p.escape(t)))),e},[]).join("/"),"/"!==e[0]&&(e="/"+e),s&&(e=e.replace(/%2F/g,"/"))),[this.request.method||"GET",e,n,this.canonicalHeaders()+"\n",this.signedHeaders(),u].join("\n")},s.prototype.canonicalHeaders=function(){function e(e){return e.toString().trim().replace(/\s+/g," ")}var t=this.request.headers;return Object.keys(t).sort(function(e,t){return e.toLowerCase()=0&&(n=p.parse(e.slice(t+1)),e=e.slice(0,t)),/[^0-9A-Za-z!'()*\-._~%\/]/.test(e)&&(e=e.split("/").map(function(e){return p.escape(p.unescape(e))}).join("/")),this.parsedPath={path:e,query:n}},s.prototype.formatPath=function(){var e=this.parsedPath.path,t=this.parsedPath.query;return t?(null!=t[""]&&delete t[""],e+"?"+o(p.stringify(t))):e},c.RequestSigner=s,c.sign=function(e,t){return new s(e,t).sign()}}).call(this,e("_process"),e("buffer").Buffer)},{"./lru":333,_process:219,buffer:17,crypto:21,querystring:223,url:249}],333:[function(e,t,n){function i(e){this.capacity=0|e,this.map=Object.create(null),this.list=new r}function r(){this.firstNode=null,this.lastNode=null}function a(e,t){this.key=e,this.val=t,this.prev=null,this.next=null}t.exports=function(e){return new i(e)},i.prototype.get=function(e){var t=this.map[e];if(null!=t)return this.used(t),t.val},i.prototype.set=function(e,t){var n=this.map[e];if(null!=n)n.val=t;else{if(this.capacity||this.prune(),!this.capacity)return!1;n=new a(e,t),this.map[e]=n,this.capacity--}return this.used(n),!0},i.prototype.used=function(e){this.list.moveToFront(e)},i.prototype.prune=function(){var e=this.list.pop();null!=e&&(delete this.map[e.key],this.capacity++)},r.prototype.moveToFront=function(e){this.firstNode!=e&&(this.remove(e),null==this.firstNode?(this.firstNode=e,this.lastNode=e,e.prev=null,e.next=null):(e.prev=null,e.next=this.firstNode,e.next.prev=e,this.firstNode=e))},r.prototype.pop=function(){var e=this.lastNode;return null!=e&&this.remove(e),e},r.prototype.remove=function(e){this.firstNode==e?this.firstNode=e.next:null!=e.prev&&(e.prev.next=e.next),this.lastNode==e?this.lastNode=e.prev:null!=e.next&&(e.next.prev=e.prev)}},{}],334:[function(e,t,n){function i(e){this.dict=e||{}}i.prototype.set=function(e,t,n){if("object"!=typeof e){"undefined"==typeof n&&(n=!0);var i=this.has(e);return!n&&i?this.dict[i]=this.dict[i]+","+t:this.dict[i||e]=t,i}for(var r in e)this.set(r,e[r],t)},i.prototype.has=function(e){for(var t=Object.keys(this.dict),e=e.toLowerCase(),n=0;n0&&!e.useChunkedEncodingByDefault){var o=this.freeSockets[r].pop();o.removeListener("error",o._onIdleError),delete o._onIdleError,e._reusedSocket=!0,e.onSocket(o)}else this.addRequestNoreuse(e,t,n)},r.prototype.removeSocket=function(e,t,n,i){if(this.sockets[t]){var r=this.sockets[t].indexOf(e);r!==-1&&this.sockets[t].splice(r,1)}else this.sockets[t]&&0===this.sockets[t].length&&(delete this.sockets[t],delete this.requests[t]);if(this.freeSockets[t]){var r=this.freeSockets[t].indexOf(e);r!==-1&&(this.freeSockets[t].splice(r,1),0===this.freeSockets[t].length&&delete this.freeSockets[t])}this.requests[t]&&this.requests[t].length&&this.createSocket(t,n,i).emit("free")},s.inherits(a,r),a.prototype.createConnection=o,a.prototype.addRequestNoreuse=l.prototype.addRequest},{http:241,https:215,net:1,tls:1,util:253}],339:[function(e,t,n){t.exports="object"==typeof self?self.FormData:window.FormData},{}],340:[function(e,t,n){"use strict";function i(e){this.name="ValidationError",this.errors=e}i.prototype=Error.prototype,t.exports=i},{}],341:[function(e,t,n){"use strict";var i=e("pinkie-promise"),r=e("./runner"),a=e("./schemas"),o=function(e){return function(t){return new i(function(n,i){r(e,t,function(e,r){return null===e?n(t):i(e)})})}};t.exports=o(a.har),Object.keys(a).map(function(e){t.exports[e]=o(a[e])})},{"./runner":342,"./schemas":350,"pinkie-promise":366}],342:[function(e,t,n){"use strict";var i=e("./schemas"),r=e("./error"),a=e("is-my-json-valid");t.exports=function(e,t,n){var o=!1,s=a(e,{greedy:!0,verbose:!0,schemas:i});return void 0!==t&&(o=s(t)),"function"==typeof n?n(s.errors?new r(s.errors):null,o):o}},{"./error":340,"./schemas":350,"is-my-json-valid":360}],343:[function(e,t,n){t.exports={properties:{beforeRequest:{$ref:"#cacheEntry"},afterRequest:{$ref:"#cacheEntry"},comment:{type:"string"}}}},{}],344:[function(e,t,n){t.exports={oneOf:[{type:"object",optional:!0,required:["lastAccess","eTag","hitCount"],properties:{expires:{type:"string"},lastAccess:{type:"string"},eTag:{type:"string"},hitCount:{type:"integer"},comment:{type:"string"}}},{type:null,additionalProperties:!1}]}},{}],345:[function(e,t,n){t.exports={type:"object",required:["size","mimeType"],properties:{size:{type:"integer"},compression:{type:"integer"},mimeType:{type:"string"},text:{type:"string"},encoding:{type:"string"},comment:{type:"string"}}}},{}],346:[function(e,t,n){t.exports={type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},path:{type:"string"},domain:{type:"string"},expires:{type:["string","null"],format:"date-time"},httpOnly:{type:"boolean"},secure:{type:"boolean"},comment:{type:"string"}}}},{}],347:[function(e,t,n){t.exports={type:"object",required:["name","version"],properties:{name:{type:"string"},version:{type:"string"},comment:{type:"string"}}}},{}],348:[function(e,t,n){t.exports={type:"object",optional:!0,required:["startedDateTime","time","request","response","cache","timings"], +properties:{pageref:{type:"string"},startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},time:{type:"number",min:0},request:{$ref:"#request"},response:{$ref:"#response"},cache:{$ref:"#cache"},timings:{$ref:"#timings"},serverIPAddress:{type:"string",oneOf:[{format:"ipv4"},{format:"ipv6"}]},connection:{type:"string"},comment:{type:"string"}}}},{}],349:[function(e,t,n){t.exports={type:"object",required:["log"],properties:{log:{$ref:"#log"}}}},{}],350:[function(e,t,n){"use strict";var i={cache:e("./cache.json"),cacheEntry:e("./cacheEntry.json"),content:e("./content.json"),cookie:e("./cookie.json"),creator:e("./creator.json"),entry:e("./entry.json"),har:e("./har.json"),log:e("./log.json"),page:e("./page.json"),pageTimings:e("./pageTimings.json"),postData:e("./postData.json"),record:e("./record.json"),request:e("./request.json"),response:e("./response.json"),timings:e("./timings.json")};i.cache.properties.beforeRequest=i.cacheEntry,i.cache.properties.afterRequest=i.cacheEntry,i.page.properties.pageTimings=i.pageTimings,i.request.properties.cookies.items=i.cookie,i.request.properties.headers.items=i.record,i.request.properties.queryString.items=i.record,i.request.properties.postData=i.postData,i.response.properties.cookies.items=i.cookie,i.response.properties.headers.items=i.record,i.response.properties.content=i.content,i.entry.properties.request=i.request,i.entry.properties.response=i.response,i.entry.properties.cache=i.cache,i.entry.properties.timings=i.timings,i.log.properties.creator=i.creator,i.log.properties.browser=i.creator,i.log.properties.pages.items=i.page,i.log.properties.entries.items=i.entry,i.har.properties.log=i.log,t.exports=i},{"./cache.json":343,"./cacheEntry.json":344,"./content.json":345,"./cookie.json":346,"./creator.json":347,"./entry.json":348,"./har.json":349,"./log.json":351,"./page.json":352,"./pageTimings.json":353,"./postData.json":354,"./record.json":355,"./request.json":356,"./response.json":357,"./timings.json":358}],351:[function(e,t,n){t.exports={type:"object",required:["version","creator","entries"],properties:{version:{type:"string"},creator:{$ref:"#creator"},browser:{$ref:"#creator"},pages:{type:"array",items:{$ref:"#page"}},entries:{type:"array",items:{$ref:"#entry"}},comment:{type:"string"}}}},{}],352:[function(e,t,n){t.exports={type:"object",optional:!0,required:["startedDateTime","id","title","pageTimings"],properties:{startedDateTime:{type:"string",format:"date-time",pattern:"^(\\d{4})(-)?(\\d\\d)(-)?(\\d\\d)(T)?(\\d\\d)(:)?(\\d\\d)(:)?(\\d\\d)(\\.\\d+)?(Z|([+-])(\\d\\d)(:)?(\\d\\d))"},id:{type:"string",unique:!0},title:{type:"string"},pageTimings:{$ref:"#pageTimings"},comment:{type:"string"}}}},{}],353:[function(e,t,n){t.exports={type:"object",properties:{onContentLoad:{type:"number",min:-1},onLoad:{type:"number",min:-1},comment:{type:"string"}}}},{}],354:[function(e,t,n){t.exports={type:"object",optional:!0,required:["mimeType"],properties:{mimeType:{type:"string"},text:{type:"string"},params:{type:"array",required:["name"],properties:{name:{type:"string"},value:{type:"string"},fileName:{type:"string"},contentType:{type:"string"},comment:{type:"string"}}},comment:{type:"string"}}}},{}],355:[function(e,t,n){t.exports={type:"object",required:["name","value"],properties:{name:{type:"string"},value:{type:"string"},comment:{type:"string"}}}},{}],356:[function(e,t,n){t.exports={type:"object",required:["method","url","httpVersion","cookies","headers","queryString","headersSize","bodySize"],properties:{method:{type:"string"},url:{type:"string",format:"uri"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"#cookie"}},headers:{type:"array",items:{$ref:"#record"}},queryString:{type:"array",items:{$ref:"#record"}},postData:{$ref:"#postData"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},{}],357:[function(e,t,n){t.exports={type:"object",required:["status","statusText","httpVersion","cookies","headers","content","redirectURL","headersSize","bodySize"],properties:{status:{type:"integer"},statusText:{type:"string"},httpVersion:{type:"string"},cookies:{type:"array",items:{$ref:"#cookie"}},headers:{type:"array",items:{$ref:"#record"}},content:{$ref:"#content"},redirectURL:{type:"string"},headersSize:{type:"integer"},bodySize:{type:"integer"},comment:{type:"string"}}}},{}],358:[function(e,t,n){t.exports={required:["send","wait","receive"],properties:{dns:{type:"number",min:-1},connect:{type:"number",min:-1},blocked:{type:"number",min:-1},send:{type:"number",min:-1},wait:{type:"number",min:-1},receive:{type:"number",min:-1},ssl:{type:"number",min:-1},comment:{type:"string"}}}},{}],359:[function(e,t,n){n["date-time"]=/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}[tT ]\d{2}:\d{2}:\d{2}(\.\d+)?([zZ]|[+-]\d{2}:\d{2})$/,n.date=/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-[0-9]{2}$/,n.time=/^\d{2}:\d{2}:\d{2}$/,n.email=/^\S+@\S+$/,n["ip-address"]=n.ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,n.ipv6=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,n.uri=/^[a-zA-Z][a-zA-Z0-9+-.]*:[^\s]*$/,n.color=/(#?([0-9A-Fa-f]{3,6})\b)|(aqua)|(black)|(blue)|(fuchsia)|(gray)|(green)|(lime)|(maroon)|(navy)|(olive)|(orange)|(purple)|(red)|(silver)|(teal)|(white)|(yellow)|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\))/,n.hostname=/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])(\.([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]{0,61}[a-zA-Z0-9]))*$/,n.alpha=/^[a-zA-Z]+$/,n.alphanumeric=/^[a-zA-Z0-9]+$/,n.style=/\s*(.+?):\s*([^;]+);?/g,n.phone=/^\+(?:[0-9] ?){6,14}[0-9]$/,n["utc-millisec"]=/^[0-9]{1,15}\.?[0-9]{0,15}$/},{}],360:[function(e,t,n){var i=e("generate-object-property"),r=e("generate-function"),a=e("jsonpointer"),o=e("xtend"),s=e("./formats"),c=function(e,t,n){var i=function(e){return e&&e.id===n?e:"object"==typeof e&&e?Object.keys(e).reduce(function(t,n){return t||i(e[n])},null):null},r=i(e);if(r)return r;n=n.replace(/^#/,""),n=n.replace(/\/$/,"");try{return a.get(e,decodeURI(n))}catch(e){var o,s=n.indexOf("#");if(0!==s)if(s===-1)o=t[n];else{var c=n.slice(0,s);o=t[c];var u=n.slice(s).replace(/^#/,"");try{return a.get(o,u)}catch(e){}}else o=t[n];return o||null}},u=function(e){e=JSON.stringify(e);for(var t=/\[([^\[\]"]+)\]/;t.test(e);)e=e.replace(t,'."+$1+"');return e},p={};p.any=function(){return"true"},p.null=function(e){return e+" === null"},p.boolean=function(e){return"typeof "+e+' === "boolean"'},p.array=function(e){return"Array.isArray("+e+")"},p.object=function(e){return"typeof "+e+' === "object" && '+e+" && !Array.isArray("+e+")"},p.number=function(e){return"typeof "+e+' === "number"'},p.integer=function(e){return"typeof "+e+' === "number" && (Math.floor('+e+") === "+e+" || "+e+" > 9007199254740992 || "+e+" < -9007199254740992)"},p.string=function(e){return"typeof "+e+' === "string"'};var l=function(e){for(var t=[],n=0;n1){var r=(0|e)!==e?Math.pow(10,e.toString().split(".").pop().length):1;n=r>i||Math.round(i*e)%(i*t)}else n=e%t;return!n},h=function(e,t,n,a,d){var m=d?o(s,d.formats):s,g={unique:l,formats:m,isMultipleOf:f},b=!!d&&!!d.verbose,v=!(!d||void 0===d.greedy)&&d.greedy,y={},w=function(e){return e+(y[e]=(y[e]||0)+1)},x={},k=function(e){if(x[e])return x[e];var t=w("pattern");return g[t]=new RegExp(e),x[e]=t,t},_=["i","j","k","l","m","n","o","p","q","r","s","t","u","v","x","y","z"],j=function(){var e=_.shift();return _.push(e+e[0]),e},S=function(e,r,a,o){var l=r.properties,f=r.type,y=!1;Array.isArray(r.items)&&(l={},r.items.forEach(function(e,t){l[t]=e}),f="array",y=!0);var x=0,_=function(t,n,i){E("errors++"),a===!0&&(E("if (validate.errors === null) validate.errors = []"),b?E("validate.errors.push({field:%s,message:%s,value:%s,type:%s})",u(n||e),JSON.stringify(t),i||e,JSON.stringify(f)):E("validate.errors.push({field:%s,message:%s})",u(n||e),JSON.stringify(t)))};r.required===!0?(x++,E("if (%s === undefined) {",e),_("is required"),E("} else {")):(x++,E("if (%s !== undefined) {",e));var A=[].concat(f).map(function(t){return p[t||"any"](e)}).join(" || ")||"true";if("true"!==A&&(x++,E("if (!(%s)) {",A),_("is the wrong type"),E("} else {")),y)if(r.additionalItems===!1)E("if (%s.length > %d) {",e,r.items.length),_("has additional items"),E("}");else if(r.additionalItems){var C=j();E("for (var %s = %d; %s < %s.length; %s++) {",C,r.items.length,C,e,C),S(e+"["+C+"]",r.additionalItems,a,o),E("}")}if(r.format&&m[r.format]){"string"!==f&&s[r.format]&&E("if (%s) {",p.string(e));var T=w("format");g[T]=m[r.format],"function"==typeof g[T]?E("if (!%s(%s)) {",T,e):E("if (!%s.test(%s)) {",T,e),_("must be "+r.format+" format"),E("}"),"string"!==f&&s[r.format]&&E("}")}if(Array.isArray(r.required)){var I=function(t){var n=i(e,t);E("if (%s === undefined) {",n),_("is required",n),E("missing++"),E("}")};E("if ((%s)) {","object"!==f?p.object(e):"true"),E("var missing = 0"),r.required.map(I),E("}"),v||(E("if (missing === 0) {"),x++)}if(r.uniqueItems&&("array"!==f&&E("if (%s) {",p.array(e)),E("if (!(unique(%s))) {",e),_("must be unique"),E("}"),"array"!==f&&E("}")),r.enum){var O=r.enum.some(function(e){return"object"==typeof e}),D=O?function(t){return"JSON.stringify("+e+") !== JSON.stringify("+JSON.stringify(t)+")"}:function(t){return e+" !== "+JSON.stringify(t)};E("if (%s) {",r.enum.map(D).join(" && ")||"false"),_("must be an enum value"),E("}")}if(r.dependencies&&("object"!==f&&E("if (%s) {",p.object(e)),Object.keys(r.dependencies).forEach(function(t){var n=r.dependencies[t];"string"==typeof n&&(n=[n]);var s=function(t){return i(e,t)+" !== undefined"};Array.isArray(n)&&(E("if (%s !== undefined && !(%s)) {",i(e,t),n.map(s).join(" && ")||"true"),_("dependencies not set"),E("}")),"object"==typeof n&&(E("if (%s !== undefined) {",i(e,t)),S(e,n,a,o),E("}"))}),"object"!==f&&E("}")),r.additionalProperties||r.additionalProperties===!1){"object"!==f&&E("if (%s) {",p.object(e));var C=j(),M=w("keys"),q=function(e){return M+"["+C+"] !== "+JSON.stringify(e)},B=function(e){return"!"+k(e)+".test("+M+"["+C+"])"},z=Object.keys(l||{}).map(q).concat(Object.keys(r.patternProperties||{}).map(B)).join(" && ")||"true";E("var %s = Object.keys(%s)",M,e)("for (var %s = 0; %s < %s.length; %s++) {",C,C,M,C)("if (%s) {",z),r.additionalProperties===!1?(o&&E("delete %s",e+"["+M+"["+C+"]]"),_("has additional properties",null,JSON.stringify(e+".")+" + "+M+"["+C+"]")):S(e+"["+M+"["+C+"]]",r.additionalProperties,a,o),E("}")("}"),"object"!==f&&E("}")}if(r.$ref){var F=c(n,d&&d.schemas||{},r.$ref);if(F){var R=t[r.$ref];R||(t[r.$ref]=function(e){return R(e)},R=h(F,t,n,!1,d));var T=w("ref");g[T]=R,E("if (!(%s(%s))) {",T,e),_("referenced schema does not match"),E("}")}}if(r.not){var N=w("prev");E("var %s = errors",N),S(e,r.not,!1,o),E("if (%s === errors) {",N),_("negative schema matches"),E("} else {")("errors = %s",N)("}")}if(r.items&&!y){"array"!==f&&E("if (%s) {",p.array(e));var C=j();E("for (var %s = 0; %s < %s.length; %s++) {",C,C,e,C),S(e+"["+C+"]",r.items,a,o),E("}"),"array"!==f&&E("}")}if(r.patternProperties){"object"!==f&&E("if (%s) {",p.object(e));var M=w("keys"),C=j();E("var %s = Object.keys(%s)",M,e)("for (var %s = 0; %s < %s.length; %s++) {",C,C,M,C),Object.keys(r.patternProperties).forEach(function(t){var n=k(t);E("if (%s.test(%s)) {",n,M+"["+C+"]"),S(e+"["+M+"["+C+"]]",r.patternProperties[t],a,o),E("}")}),E("}"),"object"!==f&&E("}")}if(r.pattern){var P=k(r.pattern);"string"!==f&&E("if (%s) {",p.string(e)),E("if (!(%s.test(%s))) {",P,e),_("pattern mismatch"),E("}"),"string"!==f&&E("}")}if(r.allOf&&r.allOf.forEach(function(t){S(e,t,a,o)}),r.anyOf&&r.anyOf.length){var N=w("prev");r.anyOf.forEach(function(t,n){0===n?E("var %s = errors",N):E("if (errors !== %s) {",N)("errors = %s",N),S(e,t,!1,!1)}),r.anyOf.forEach(function(e,t){t&&E("}")}),E("if (%s !== errors) {",N),_("no schemas match"),E("}")}if(r.oneOf&&r.oneOf.length){var N=w("prev"),L=w("passes");E("var %s = errors",N)("var %s = 0",L),r.oneOf.forEach(function(t,n){S(e,t,!1,!1),E("if (%s === errors) {",N)("%s++",L)("} else {")("errors = %s",N)("}")}),E("if (%s !== 1) {",L),_("no (or more than one) schemas match"),E("}")}for(void 0!==r.multipleOf&&("number"!==f&&"integer"!==f&&E("if (%s) {",p.number(e)),E("if (!isMultipleOf(%s, %d)) {",e,r.multipleOf),_("has a remainder"),E("}"),"number"!==f&&"integer"!==f&&E("}")),void 0!==r.maxProperties&&("object"!==f&&E("if (%s) {",p.object(e)),E("if (Object.keys(%s).length > %d) {",e,r.maxProperties),_("has more properties than allowed"),E("}"),"object"!==f&&E("}")),void 0!==r.minProperties&&("object"!==f&&E("if (%s) {",p.object(e)),E("if (Object.keys(%s).length < %d) {",e,r.minProperties),_("has less properties than allowed"),E("}"),"object"!==f&&E("}")),void 0!==r.maxItems&&("array"!==f&&E("if (%s) {",p.array(e)),E("if (%s.length > %d) {",e,r.maxItems),_("has more items than allowed"),E("}"),"array"!==f&&E("}")),void 0!==r.minItems&&("array"!==f&&E("if (%s) {",p.array(e)),E("if (%s.length < %d) {",e,r.minItems),_("has less items than allowed"),E("}"),"array"!==f&&E("}")),void 0!==r.maxLength&&("string"!==f&&E("if (%s) {",p.string(e)),E("if (%s.length > %d) {",e,r.maxLength),_("has longer length than allowed"),E("}"),"string"!==f&&E("}")),void 0!==r.minLength&&("string"!==f&&E("if (%s) {",p.string(e)),E("if (%s.length < %d) {",e,r.minLength),_("has less length than allowed"),E("}"),"string"!==f&&E("}")),void 0!==r.minimum&&("number"!==f&&"integer"!==f&&E("if (%s) {",p.number(e)),E("if (%s %s %d) {",e,r.exclusiveMinimum?"<=":"<",r.minimum),_("is less than minimum"),E("}"),"number"!==f&&"integer"!==f&&E("}")),void 0!==r.maximum&&("number"!==f&&"integer"!==f&&E("if (%s) {",p.number(e)),E("if (%s %s %d) {",e,r.exclusiveMaximum?">=":">",r.maximum),_("is more than maximum"),E("}"),"number"!==f&&"integer"!==f&&E("}")),l&&Object.keys(l).forEach(function(t){Array.isArray(f)&&f.indexOf("null")!==-1&&E("if (%s !== null) {",e),S(i(e,t),l[t],a,o),Array.isArray(f)&&f.indexOf("null")!==-1&&E("}")});x--;)E("}")},E=r("function validate(data) {")("if (data === undefined) data = null")("validate.errors = null")("var errors = 0");return S("data",e,a,d&&d.filter),E("return errors === 0")("}"),E=E.toFunction(g),E.errors=null,Object.defineProperty&&Object.defineProperty(E,"error",{get:function(){return E.errors?E.errors.map(function(e){return e.field+" "+e.message}).join("\n"):""}}),E.toJSON=function(){return e},E};t.exports=function(e,t){return"string"==typeof e&&(e=JSON.parse(e)),h(e,{},e,!0,t)},t.exports.filter=function(e,n){var i=t.exports(e,o(n,{filter:!0}));return function(e){return i(e),e}}},{"./formats":359,"generate-function":361,"generate-object-property":362,jsonpointer:364,xtend:365}],361:[function(e,t,n){var i=e("util"),r=/[\{\[]/,a=/[\}\]]/;t.exports=function(){var e=[],t=0,n=function(n){for(var i="";i.length<2*t;)i+=" ";e.push(i+n)},o=function(e){return e?a.test(e.trim()[0])&&r.test(e[e.length-1])?(t--,n(i.format.apply(i,arguments)),t++,o):r.test(e[e.length-1])?(n(i.format.apply(i,arguments)),t++,o):a.test(e.trim()[0])?(t--,n(i.format.apply(i,arguments)),o):(n(i.format.apply(i,arguments)),o):o};return o.toString=function(){return e.join("\n")},o.toFunction=function(e){var t="return ("+o.toString()+")",n=Object.keys(e||{}).map(function(e){return e}),i=n.map(function(t){return e[t]});return Function.apply(null,n.concat(t)).apply(null,i)},arguments.length&&o.apply(null,arguments),o}},{util:253}],362:[function(e,t,n){var i=e("is-property"),r=function(e,t){return i(t)?e+"."+t:e+"["+JSON.stringify(t)+"]"};r.valid=i,r.property=function(e){return i(e)?e:JSON.stringify(e)},t.exports=r},{"is-property":363}],363:[function(e,t,n){"use strict";function i(e){return/^[$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc][$A-Z\_a-z\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc0-9\u0300-\u036f\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19b0-\u19c0\u19c8\u19c9\u19d0-\u19d9\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1dc0-\u1de6\u1dfc-\u1dff\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f]*$/.test(e)}t.exports=i},{}],364:[function(e,t,n){function i(e){switch(e){case"~1":return"/";case"~0":return"~"}throw new Error("Invalid tilde escape: "+e)}function r(e){return p.test(e)?e.replace(l,i):e}function a(e,t,n){for(var i,a,o=1,s=t.length;oo,"undefined"==typeof e[i]&&(Array.isArray(e)&&"-"===i&&(i=e.length),a&&(""!==t[o]&&t[o]<1/0||"-"===t[o]?e[i]=[]:e[i]={})),a);)e=e[i];var c=e[i];return void 0===n?delete e[i]:e[i]=n,c}function o(e){if("string"==typeof e){if(e=e.split("/"),""===e[0])return e;throw new Error("Invalid JSON pointer.")}if(Array.isArray(e))return e;throw new Error("Invalid JSON pointer.")}function s(e,t){if("object"!=typeof e)throw new Error("Invalid input object.");t=o(t);var n=t.length;if(1===n)return e;for(var i=1;i\?@\[\]\^`\{\|\}~]+$/)&&!a.hasOwnProperty(n))return a[n]=i,""});return""!==o?null:a},randomString:function(e){for(var t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",n=t.length,i=[],r=0;r>>2]|=(n[r>>>2]>>>24-8*(r%4)&255)<<24-8*((i+r)%4);else if(65535>>2]=n[r>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-8*(n%4),t.length=e.ceil(n/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],i=0;i>>2]>>>24-8*(i%4)&255;n.push((r>>>4).toString(16)),n.push((15&r).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>3]|=parseInt(e.substr(i,2),16)<<24-4*(i%8);return new o.init(n,t/2)}},u=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],i=0;i>>2]>>>24-8*(i%4)&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],i=0;i>>2]|=(255&e.charCodeAt(i))<<24-8*(i%4);return new o.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(u.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return u.parse(unescape(encodeURIComponent(e)))}},l=i.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new o.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,i=n.words,r=n.sigBytes,a=this.blockSize,s=r/(4*a),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*a,r=e.min(4*t,r),t){for(var c=0;cu;u++){if(16>u)a[u]=0|e[t+u];else{var p=a[u-3]^a[u-8]^a[u-14]^a[u-16];a[u]=p<<1|p>>>31}p=(i<<5|i>>>27)+c+a[u],p=20>u?p+((r&o|~r&s)+1518500249):40>u?p+((r^o^s)+1859775393):60>u?p+((r&o|r&s|o&s)-1894007588):p+((r^o^s)-899497514),c=s,s=o,o=r<<30|r>>>2,r=i,i=p}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+o|0,n[3]=n[3]+s|0,n[4]=n[4]+c|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,i=8*e.sigBytes;return t[i>>>5]|=128<<24-i%32,t[(i+64>>>9<<4)+14]=Math.floor(n/4294967296),t[(i+64>>>9<<4)+15]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA1=i._createHelper(t),e.HmacSHA1=i._createHmacHelper(t)}(),function(e){for(var t=r,n=t.lib,i=n.WordArray,a=n.Hasher,n=t.algo,o=[],s=[],c=function(e){return 4294967296*(e-(0|e))|0},u=2,p=0;64>p;){var l;e:{l=u;for(var f=e.sqrt(l),h=2;h<=f;h++)if(!(l%h)){l=!1;break e}l=!0}l&&(8>p&&(o[p]=c(e.pow(u,.5))),s[p]=c(e.pow(u,1/3)),p++),u++}var d=[],n=n.SHA256=a.extend({_doReset:function(){this._hash=new i.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,i=n[0],r=n[1],a=n[2],o=n[3],c=n[4],u=n[5],p=n[6],l=n[7],f=0;64>f;f++){if(16>f)d[f]=0|e[t+f];else{var h=d[f-15],m=d[f-2];d[f]=((h<<25|h>>>7)^(h<<14|h>>>18)^h>>>3)+d[f-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+d[f-16]}h=l+((c<<26|c>>>6)^(c<<21|c>>>11)^(c<<7|c>>>25))+(c&u^~c&p)+s[f]+d[f],m=((i<<30|i>>>2)^(i<<19|i>>>13)^(i<<10|i>>>22))+(i&r^i&a^r&a),l=p,p=u,u=c,c=o+h|0,o=a,a=r,r=i,i=h+m|0}n[0]=n[0]+i|0,n[1]=n[1]+r|0,n[2]=n[2]+a|0,n[3]=n[3]+o|0,n[4]=n[4]+c|0,n[5]=n[5]+u|0,n[6]=n[6]+p|0,n[7]=n[7]+l|0},_doFinalize:function(){var t=this._data,n=t.words,i=8*this._nDataBytes,r=8*t.sigBytes;return n[r>>>5]|=128<<24-r%32,n[(r+64>>>9<<4)+14]=e.floor(i/4294967296),n[(r+64>>>9<<4)+15]=i,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=a._createHelper(n),t.HmacSHA256=a._createHmacHelper(n)}(Math),function(){var e=r,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var i=e.blockSize,r=4*i;n.sigBytes>r&&(n=e.finalize(n)),n.clamp();for(var a=this._oKey=n.clone(),o=this._iKey=n.clone(),s=a.words,c=o.words,u=0;u>>2]>>>24-8*(r%4)&255)<<16|(t[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|t[r+2>>>2]>>>24-8*((r+2)%4)&255,o=0;4>o&&r+.75*o>>6*(3-o)&63));if(t=i.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,i=this._map,r=i.charAt(64);r&&(r=e.indexOf(r),-1!=r&&(n=r));for(var r=[],a=0,o=0;o>>6-2*(o%4);r[a>>>2]|=(s|c)<<24-8*(a%4),a++}return t.create(r,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),i.crypto.internals=r,"undefined"!=typeof t&&t.exports&&(t.exports=i)},{}],369:[function(e,t,n){var i=e("./parser"),r=e("./signer"),a=e("./verify"),o=e("./utils");t.exports={parse:i.parseRequest,parseRequest:i.parseRequest,sign:r.signRequest,signRequest:r.signRequest,createSigner:r.createSigner,isSigner:r.isSigner,sshKeyToPEM:o.sshKeyToPEM,sshKeyFingerprint:o.fingerprint,pemToRsaSSHKey:o.pemToRsaSSHKey,verify:a.verifySignature,verifySignature:a.verifySignature,verifyHMAC:a.verifyHMAC}},{"./parser":370,"./signer":371,"./utils":372,"./verify":373}],370:[function(e,t,n){function i(e){l.call(this,e,i)}function r(e){l.call(this,e,r)}function a(e){l.call(this,e,a)}function o(e){l.call(this,e,o)}function s(e){l.call(this,e,s)}var c=e("assert-plus"),u=e("util"),p=e("./utils"),l=(p.HASH_ALGOS,p.PK_ALGOS,p.HttpSignatureError),f=p.InvalidAlgorithmError,h=p.validateAlgorithm,d={New:0,Params:1},m={Name:0,Quote:1,Value:2,Comma:3};u.inherits(i,l),u.inherits(r,l),u.inherits(a,l),u.inherits(o,l),u.inherits(s,l),t.exports={parseRequest:function(e,t){if(c.object(e,"request"),c.object(e.headers,"request.headers"),void 0===t&&(t={}),void 0===t.headers&&(t.headers=[e.headers["x-date"]?"x-date":"date"]),c.object(t,"options"),c.arrayOfString(t.headers,"options.headers"),c.optionalNumber(t.clockSkew,"options.clockSkew"),!e.headers.authorization)throw new o("no authorization header present in the request");t.clockSkew=t.clockSkew||300;var n=0,u=d.New,p=m.Name,l="",g="",b={scheme:"",params:{},signingString:"",get algorithm(){return this.params.algorithm.toUpperCase()},get keyId(){return this.params.keyId}},v=e.headers.authorization;for(n=0;n=65&&w<=90||w>=97&&w<=122)l+=y;else{if("="!==y)throw new r("bad param format");if(0===l.length)throw new r("bad param format");p=m.Quote}break;case m.Quote:if('"'!==y)throw new r("bad param format");g="",p=m.Value;break;case m.Value:'"'===y?(b.params[l]=g,p=m.Comma):g+=y;break;case m.Comma:if(","!==y)throw new r("bad param format");l="",p=m.Name;break;default:throw new Error("Invalid substate")}break;default:throw new Error("Invalid substate")}}if(b.params.headers&&""!==b.params.headers?b.params.headers=b.params.headers.split(" "):e.headers["x-date"]?b.params.headers=["x-date"]:b.params.headers=["date"],!b.scheme||"Signature"!==b.scheme)throw new r('scheme was not "Signature"');if(!b.params.keyId)throw new r("keyId was not specified");if(!b.params.algorithm)throw new r("algorithm was not specified");if(!b.params.signature)throw new r("signature was not specified");b.params.algorithm=b.params.algorithm.toLowerCase();try{h(b.params.algorithm)}catch(e){throw e instanceof f?new a(b.params.algorithm+" is not supported"):e}for(n=0;n1e3*t.clockSkew)throw new i("clock skew of "+S/1e3+"s was greater than "+t.clockSkew+"s")}if(t.headers.forEach(function(e){if(b.params.headers.indexOf(e)<0)throw new o(e+" was not a signed header")}),t.algorithms&&t.algorithms.indexOf(b.params.algorithm)===-1)throw new a(b.params.algorithm+" is not a supported algorithm");return b}}},{"./utils":372,"assert-plus":374,util:253}],371:[function(e,t,n){(function(n){function i(e){g.call(this,e,i)}function r(e){g.call(this,e,r)}function a(e){o.object(e,"options");var t=[];if(void 0!==e.algorithm&&(o.string(e.algorithm,"options.algorithm"),t=b(e.algorithm)),this.rs_alg=t,void 0!==e.sign)o.func(e.sign,"options.sign"),this.rs_signFunc=e.sign;else if("hmac"===t[0]&&void 0!==e.key){if(o.string(e.keyId,"options.keyId"),this.rs_keyId=e.keyId,"string"!=typeof e.key&&!n.isBuffer(e.key))throw new TypeError("options.key for HMAC must be a string or Buffer");this.rs_signer=s.createHmac(t[1].toUpperCase(),e.key),this.rs_signer.sign=function(){var e=this.digest("base64");return{hashAlgorithm:t[1],toString:function(){return e}}}}else{if(void 0===e.key)throw new TypeError("options.sign (func) or options.key is required");var i=e.key;if(("string"==typeof i||n.isBuffer(i))&&(i=u.parsePrivateKey(i)),o.ok(u.PrivateKey.isPrivateKey(i,[1,2]),"options.key must be a sshpk.PrivateKey"),this.rs_key=i,o.string(e.keyId,"options.keyId"),this.rs_keyId=e.keyId,!d[i.type])throw new m(i.type.toUpperCase()+" type keys are not supported");if(void 0!==t[0]&&i.type!==t[0])throw new m("options.key must be a "+t[0].toUpperCase()+" key, was given a "+i.type.toUpperCase()+" key instead");this.rs_signer=i.createSign(t[1])}this.rs_headers=[],this.rs_lines=[]}var o=e("assert-plus"),s=e("crypto"),c=(e("http"),e("util")),u=e("sshpk"),p=e("jsprim"),l=e("./utils"),f=e("util").format,h=l.HASH_ALGOS,d=l.PK_ALGOS,m=l.InvalidAlgorithmError,g=l.HttpSignatureError,b=l.validateAlgorithm,v='Signature keyId="%s",algorithm="%s",headers="%s",signature="%s"';c.inherits(i,g),c.inherits(r,g),a.prototype.writeHeader=function(e,t){if(o.string(e,"header"),e=e.toLowerCase(),o.string(t,"value"),this.rs_headers.push(e),this.rs_signFunc)this.rs_lines.push(e+": "+t);else{var n=e+": "+t;this.rs_headers.length>0&&(n="\n"+n),this.rs_signer.update(n)}return t},a.prototype.writeDateHeader=function(){return this.writeHeader("date",p.rfc1123(new Date))},a.prototype.writeTarget=function(e,t){o.string(e,"method"),o.string(t,"path"),e=e.toLowerCase(),this.writeHeader("(request-target)",e+" "+t)},a.prototype.sign=function(e){if(o.func(e,"callback"),this.rs_headers.length<1)throw new Error("At least one header must be signed");var t,n;if(this.rs_signFunc){var i=this.rs_lines.join("\n"),r=this;this.rs_signFunc(i,function(i,a){if(i)return void e(i);try{o.object(a,"signature"),o.string(a.keyId,"signature.keyId"),o.string(a.algorithm,"signature.algorithm"),o.string(a.signature,"signature.signature"),t=b(a.algorithm),n=f(v,a.keyId,a.algorithm,r.rs_headers.join(" "),a.signature)}catch(t){return void e(t)}e(null,n)})}else{try{var a=this.rs_signer.sign()}catch(t){return void e(t)}t=(this.rs_alg[0]||this.rs_key.type)+"-"+a.hashAlgorithm;var s=a.toString();n=f(v,this.rs_keyId,t,this.rs_headers.join(" "),s),e(null,n)}},t.exports={isSigner:function(e){return"object"==typeof e&&e instanceof a},createSigner:function(e){return new a(e)},signRequest:function(e,t){o.object(e,"request"),o.object(t,"options"),o.optionalString(t.algorithm,"options.algorithm"),o.string(t.keyId,"options.keyId"),o.optionalArrayOfString(t.headers,"options.headers"),o.optionalString(t.httpVersion,"options.httpVersion"),e.getHeader("Date")||e.setHeader("Date",p.rfc1123(new Date)),t.headers||(t.headers=["date"]),t.httpVersion||(t.httpVersion="1.1");var a=[];t.algorithm&&(t.algorithm=t.algorithm.toLowerCase(),a=b(t.algorithm));var c,l="";for(c=0;c=0);for(a in e)r=n.slice(0),r.push(a),l(e[a],t-1,r,i)}function f(e,t){if(0===t)return[e];T.ok(null!==e),T.equal(typeof e,"object"),T.equal(typeof t,"number"),T.ok(t>=0);var n,i=[];for(n in e)f(e[n],t-1).forEach(function(e){i.push([n].concat(e))});return i}function h(e,t){return e.substr(0,t.length)==t}function d(e,t){return e.substr(e.length-t.length,t.length)==t}function m(e){return"number"==typeof e&&(e=new Date(e)),T.ok(e.constructor===Date),I.sprintf("%4d-%02d-%02dT%02d:%02d:%02d.%03dZ",e.getUTCFullYear(),e.getUTCMonth()+1,e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())}function g(e){return I.sprintf("%s, %02d %s %04d %02d:%02d:%02d GMT",q[e.getUTCDay()],e.getUTCDate(),M[e.getUTCMonth()],e.getUTCFullYear(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds())}function b(e){var t=+e;return isNaN(t)?new Date(e):new Date(t)}function v(e,t){var n=D.validate(t,e);if(0===n.errors.length)return null;var i,r,a=n.errors[0],o=a.property,s=a.message.toLowerCase();(i=s.indexOf("the property "))!=-1&&(r=s.indexOf(" is not defined in the schema and the schema does not allow additional properties"))!=-1&&(i+="the property ".length,o=""===o?s.substr(i,r-i):o+"."+s.substr(i,r-i),s="unsupported property");var c=new O.VError('property "%s": %s',o,s);return c.jsv_details=a,c}function y(e){return T.ok(Array.isArray(e)&&e.length>0,"randElt argument must be a non-empty array"),e[Math.floor(Math.random()*e.length)]}function w(e){T.ok(e[0]>=0&&e[1]>=0,"negative numbers not allowed in hrtimes"),T.ok(e[1]<1e9,"nanoseconds column overflow")}function x(e,t){w(e),w(t),T.ok(e[0]>t[0]||e[0]==t[0]&&e[1]>=t[1],"negative differences not allowed");var n=[e[0]-t[0],0];return e[1]>=t[1]?n[1]=e[1]-t[1]:(n[0]--,n[1]=1e9-(t[1]-e[1])),n}function k(e){return w(e),Math.floor(1e9*e[0]+e[1])}function _(e){return w(e),Math.floor(1e6*e[0]+e[1]/1e3)}function j(e){return w(e),Math.floor(1e3*e[0]+e[1]/1e6)}function S(e,t){return w(e),w(t),e[1]+=t[1],e[1]>=1e9&&(e[0]++,e[1]-=1e9),e[0]+=t[0],e}function E(e,t){w(e);var n=[e[0],e[1]];return S(n,t)}function A(e,t){T.ok("object"==typeof e&&null!==e,"obj argument must be a non-null object"),T.ok(Array.isArray(t),"allowed argument must be an array of strings");for(var n=0;n0)throw new Error("non-zero precision not supported");switch(t.match(/-/)&&(u=!0),t.match(/0/)&&(p="0"),t.match(/\+/)&&(l=!0),c){case"s":if(void 0===f||null===f)throw new Error("argument "+v+": attempted to print undefined or null as a string");b+=r(p,n,u,f.toString());break;case"d":f=Math.floor(f);case"f":l=l&&f>0?"+":"",b+=l+r(p,n,u,f.toString());break;case"j":0===n&&(n=10),b+=s.inspect(f,!1,n);break;case"r":b+=a(f);break;default:throw new Error("unsupported conversion: "+c)}}else b+="%";return b+=e}function r(e,t,n,i){for(var r=i;r.lengtht.maxItems&&p("There must be a maximum of "+t.maxItems+" in the array")}else(t.properties||t.additionalProperties)&&c.concat(o(e,t.properties,n,t.additionalProperties));if(t.pattern&&"string"==typeof e&&!e.match(t.pattern)&&p("does not match the regex pattern "+t.pattern),t.maxLength&&"string"==typeof e&&e.length>t.maxLength&&p("may only be "+t.maxLength+" characters long"),t.minLength&&"string"==typeof e&&e.lengthe&&p("must have a minimum value of "+t.minimum),void 0!==typeof t.maximum&&typeof e==typeof t.maximum&&t.maximum0?c.sprintf.apply(null,t):"",this.jse_shortmsg=r,this.jse_summary=r,e&&(n=e.cause,n&&e.cause instanceof Error||(n=e),n&&n instanceof Error&&(this.jse_cause=n,this.jse_summary+=": "+n.message)),this.message=this.jse_summary,Error.call(this,this.jse_summary),Error.captureStackTrace&&(i=e?e.constructorOpt:void 0,i=i||arguments.callee,Error.captureStackTrace(this,i))}function r(e){o.ok(e.length>0),this.ase_errors=e,i.call(this,e[0],"first of %d error%s",e.length,1==e.length?"":"s")}function a(e){Error.call(this);var t,n,i;"object"==typeof e?t=Array.prototype.slice.call(arguments,1):(t=Array.prototype.slice.call(arguments,0),e=void 0),t.length>0?this.message=c.sprintf.apply(null,t):this.message="",e&&(e instanceof Error?n=e:(n=e.cause,i=e.constructorOpt)),Error.captureStackTrace(this,i||this.constructor),n&&this.cause(n)}var o=e("assert"),s=e("util"),c=e("extsprintf");n.VError=i,n.WError=a,n.MultiError=r,s.inherits(i,Error),i.prototype.name="VError",i.prototype.toString=function(){var e=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e+=": "+this.message),e},i.prototype.cause=function(){return this.jse_cause},s.inherits(r,i),s.inherits(a,Error),a.prototype.name="WError",a.prototype.toString=function(){var e=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e+=": "+this.message),this.we_cause&&this.we_cause.message&&(e+="; caused by "+this.we_cause.toString()),e},a.prototype.cause=function(e){return e instanceof Error&&(this.we_cause=e),this.we_cause}},{assert:2,extsprintf:376,util:253}],379:[function(e,t,n){(function(e){var n={dsa:{parts:["p","q","g","y"],sizePart:"p"},rsa:{parts:["e","n"],sizePart:"n"},ecdsa:{parts:["curve","Q"],sizePart:"Q"},ed25519:{parts:["R"],normalize:!1,sizePart:"R"}};n.curve25519=n.ed25519;var i={dsa:{parts:["p","q","g","y","x"]},rsa:{parts:["n","e","d","iqmp","p","q"]},ecdsa:{parts:["curve","Q","d"]},ed25519:{parts:["R","r"],normalize:!1}};i.curve25519=i.ed25519;var r={md5:!0,sha1:!0,sha256:!0,sha384:!0,sha512:!0},a={nistp256:{size:256,pkcs8oid:"1.2.840.10045.3.1.7",p:new e("00ffffffff 00000001 00000000 0000000000000000 ffffffff ffffffff ffffffff".replace(/ /g,""),"hex"),a:new e("00FFFFFFFF 00000001 00000000 0000000000000000 FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g,""),"hex"),b:new e("5ac635d8 aa3a93e7 b3ebbd55 769886bc651d06b0 cc53b0f6 3bce3c3e 27d2604b".replace(/ /g,""),"hex"),s:new e("00c49d3608 86e70493 6a6678e1 139d26b7819f7e90".replace(/ /g,""),"hex"),n:new e("00ffffffff 00000000 ffffffff ffffffffbce6faad a7179e84 f3b9cac2 fc632551".replace(/ /g,""),"hex"),G:new e("046b17d1f2 e12c4247 f8bce6e5 63a440f277037d81 2deb33a0 f4a13945 d898c2964fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e162bce3357 6b315ece cbb64068 37bf51f5".replace(/ /g,""),"hex")},nistp384:{size:384,pkcs8oid:"1.3.132.0.34",p:new e("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffeffffffff 00000000 00000000 ffffffff".replace(/ /g,""),"hex"),a:new e("00FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFEFFFFFFFF 00000000 00000000 FFFFFFFC".replace(/ /g,""),"hex"),b:new e("b3312fa7 e23ee7e4 988e056b e3f82d19181d9c6e fe814112 0314088f 5013875ac656398d 8a2ed19d 2a85c8ed d3ec2aef".replace(/ /g,""),"hex"),s:new e("00a335926a a319a27a 1d00896a 6773a4827acdac73".replace(/ /g,""),"hex"),n:new e("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff c7634d81 f4372ddf581a0db2 48b0a77a ecec196a ccc52973".replace(/ /g,""),"hex"),G:new e("04aa87ca22 be8b0537 8eb1c71e f320ad746e1d3b62 8ba79b98 59f741e0 82542a385502f25d bf55296c 3a545e38 72760ab73617de4a 96262c6f 5d9e98bf 9292dc29f8f41dbd 289a147c e9da3113 b5f0b8c00a60b1ce 1d7e819d 7a431d7c 90ea0e5f".replace(/ /g,""),"hex")},nistp521:{size:521,pkcs8oid:"1.3.132.0.35",p:new e("01ffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffff".replace(/ /g,""),"hex"),a:new e("01FFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g,""),"hex"),b:new e("51953eb961 8e1c9a1f 929a21a0 b68540eea2da725b 99b315f3 b8b48991 8ef109e156193951 ec7e937b 1652c0bd 3bb1bf073573df88 3d2c34f1 ef451fd4 6b503f00".replace(/ /g,""),"hex"),s:new e("00d09e8800 291cb853 96cc6717 393284aaa0da64ba".replace(/ /g,""),"hex"),n:new e("01ffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffa51868783 bf2f966b 7fcc0148 f709a5d03bb5c9b8 899c47ae bb6fb71e 91386409".replace(/ /g,""),"hex"),G:new e("0400c6 858e06b7 0404e9cd 9e3ecb66 2395b4429c648139 053fb521 f828af60 6b4d3dbaa14b5e77 efe75928 fe1dc127 a2ffa8de3348b3c1 856a429b f97e7e31 c2e5bd660118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd998f54449 579b4468 17afbd17 273e662c97ee7299 5ef42640 c550b901 3fad0761353c7086 a272c240 88be9476 9fd16650".replace(/ /g,""),"hex")}};t.exports={info:n,privInfo:i,hashAlgs:r,curves:a}}).call(this,e("buffer").Buffer)},{buffer:17}],380:[function(e,t,n){(function(n){function i(e){r.object(e,"options"),r.arrayOfObject(e.subjects,"options.subjects"),u.assertCompatible(e.subjects[0],f,[1,0],"options.subjects"),u.assertCompatible(e.subjectKey,p,[1,0],"options.subjectKey"),u.assertCompatible(e.issuer,f,[1,0],"options.issuer"),void 0!==e.issuerKey&&u.assertCompatible(e.issuerKey,p,[1,0],"options.issuerKey"),r.object(e.signatures,"options.signatures"),r.buffer(e.serial,"options.serial"),r.date(e.validFrom,"options.validFrom"),r.date(e.validUntil,"optons.validUntil"),this._hashCache={},this.subjects=e.subjects,this.issuer=e.issuer,this.subjectKey=e.subjectKey,this.issuerKey=e.issuerKey,this.signatures=e.signatures,this.serial=e.serial,this.validFrom=e.validFrom,this.validUntil=e.validUntil}t.exports=i;var r=e("assert-plus"),a=e("./algs"),o=e("crypto"),s=e("./fingerprint"),c=(e("./signature"),e("./errors")),u=(e("util"),e("./utils")),p=e("./key"),l=e("./private-key"),f=e("./identity"),h={};h.openssh=e("./formats/openssh-cert"),h.x509=e("./formats/x509"),h.pem=e("./formats/x509-pem");var d=c.CertificateParseError,m=c.InvalidAlgorithmError;i.formats=h,i.prototype.toBuffer=function(e,t){return void 0===e&&(e="x509"),r.string(e,"format"),r.object(h[e],"formats[format]"),r.optionalObject(t,"options"),h[e].write(this,t)},i.prototype.toString=function(e,t){return void 0===e&&(e="pem"),this.toBuffer(e,t).toString()},i.prototype.fingerprint=function(e){void 0===e&&(e="sha256"),r.string(e,"algorithm");var t={type:"certificate",hash:this.hash(e),algorithm:e};return new s(t)},i.prototype.hash=function(e){if(r.string(e,"algorithm"),e=e.toLowerCase(),void 0===a.hashAlgs[e])throw new m(e);if(this._hashCache[e])return this._hashCache[e];var t=o.createHash(e).update(this.toBuffer("x509")).digest();return this._hashCache[e]=t,t},i.prototype.isExpired=function(e){return void 0===e&&(e=new Date),!(e.getTime()>=this.validFrom.getTime()&&e.getTime()2){r="md5","md5"===u[0].toLowerCase()&&(u=u.slice(1)),u=u.join("");var l=/^[a-fA-F0-9]+$/;if(!l.test(u))throw new d(e);try{a=new n(u,"hex")}catch(t){throw new d(e)}}if(void 0===r)throw new d(e);if(void 0===c.hashAlgs[r])throw new m(r);if(void 0!==o&&(o=o.map(function(e){return e.toLowerCase()}),o.indexOf(r)===-1))throw new m(r);return new i({algorithm:r,hash:a,type:t.type||"key"})},i.isFingerprint=function(e,t){return h.isCompatible(e,i,t)},i.prototype._sshpkApiVersion=[1,1],i._oldVersionDetect=function(e){return s.func(e.toString),s.func(e.matches),[1,0]}}).call(this,e("buffer").Buffer)},{"./algs":379,"./certificate":380,"./errors":383,"./key":397,"./utils":401,"assert-plus":408,buffer:17,crypto:21}],385:[function(e,t,n){(function(n){function i(e,t){if("string"==typeof e){if(e.trim().match(/^[-]+[ ]*BEGIN/))return c.read(e,t);if(e.match(/^\s*ssh-[a-z]/))return u.read(e,t);if(e.match(/^\s*ecdsa-/))return u.read(e,t);e=new n(e,"binary")}else{if(s.buffer(e),a(e))return c.read(e,t);if(r(e))return u.read(e,t)}if(e.readUInt32BE(0)e.length||"BEGIN"!==e.slice(t,t+5).toString("ascii"))}function o(e,t){throw new Error('"auto" format cannot be used for writing')}t.exports={read:i,write:o};var s=e("assert-plus"),c=(e("../utils"),e("../key"),e("../private-key"),e("./pem")),u=e("./ssh"),p=e("./rfc4253")}).call(this,e("buffer").Buffer)},{"../key":397,"../private-key":398,"../utils":401,"./pem":387,"./rfc4253":390,"./ssh":392,"assert-plus":408,buffer:17}],386:[function(e,t,n){(function(n){function i(e,t){return!1}function r(e,t){n.isBuffer(e)&&(e=e.toString("ascii"));var i=e.trim().split(/[ \t\n]+/g);if(i.length<2||i.length>3)throw new Error("Not a valid SSH certificate line");var r=i[0],o=i[1];return o=new n(o,"base64"),a(o,r)}function a(e,t,n){var i=new d({buffer:e}),r=i.readString();if(void 0!==t&&r!==t)throw new Error("SSH certificate algorithm mismatch");void 0===t&&(t=r);var a={};a.signatures={},a.signatures.openssh={},a.signatures.openssh.nonce=i.readBuffer();var s={},c=s.parts=[];s.type=l(t);for(var u=g.info[s.type].parts.length;c.length=1,"key must have at least one part");var p=g.info[s.type];if("ecdsa"===s.type){var f=j.exec(t);h.ok(null!==f),h.strictEqual(f[1],c[0].data.toString())}for(var m=0;mh.length&&(v=h.length),g+=m.write(h.slice(b,v),g),m[g++]=10,b=v}return g+=m.write("-----END "+r+"-----\n",g),m.slice(0,g)}t.exports={read:i,write:r};var a=e("assert-plus"),o=e("asn1"),s=e("crypto"),c=(e("../algs"),e("../utils")),u=e("../key"),p=e("../private-key"),l=e("./pkcs1"),f=e("./pkcs8"),h=e("./ssh-private"),d=e("./rfc4253"),m=e("../errors")}).call(this,e("buffer").Buffer)},{"../algs":379,"../errors":383,"../key":397,"../private-key":398,"../utils":401,"./pkcs1":388,"./pkcs8":389,"./rfc4253":390,"./ssh-private":391,asn1:407,"assert-plus":408,buffer:17,crypto:21}],388:[function(e,t,n){(function(n){function i(e,t){return E.read(e,t,"pkcs1")}function r(e,t){return E.write(e,t,"pkcs1")}function a(e,t){return w.strictEqual(e.peek(),x.Ber.Integer,t+" is not an Integer"),_.mpNormalize(e.readString(x.Ber.Integer,!0))}function o(e,t,n){switch(e){case"RSA":if("public"===t)return s(n);if("private"===t)return c(n);throw new Error("Unknown key type: "+t);case"DSA":if("public"===t)return p(n);if("private"===t)return u(n);throw new Error("Unknown key type: "+t);case"EC":case"ECDSA":if("private"===t)return f(n);if("public"===t)return l(n);throw new Error("Unknown key type: "+t);default:throw new Error("Unknown key algo: "+e)}}function s(e){var t=a(e,"modulus"),n=a(e,"exponent"),i={type:"rsa",parts:[{name:"e",data:n},{name:"n",data:t}]};return new j(i)}function c(e){var t=a(e,"version");w.strictEqual(t[0],0);var n=a(e,"modulus"),i=a(e,"public exponent"),r=a(e,"private exponent"),o=a(e,"prime1"),s=a(e,"prime2"),c=a(e,"exponent1"),u=a(e,"exponent2"),p=a(e,"iqmp"),l={type:"rsa",parts:[{name:"n",data:n},{name:"e",data:i},{name:"d",data:r},{name:"iqmp",data:p},{name:"p",data:o},{name:"q",data:s},{name:"dmodp",data:c},{name:"dmodq",data:u}]};return new S(l)}function u(e){var t=a(e,"version");w.strictEqual(t.readUInt8(0),0);var n=a(e,"p"),i=a(e,"q"),r=a(e,"g"),o=a(e,"y"),s=a(e,"x"),c={type:"dsa",parts:[{name:"p",data:n},{name:"q",data:i},{name:"g",data:r},{name:"y",data:o},{name:"x",data:s}]};return new S(c)}function p(e){var t=a(e,"y"),n=a(e,"p"),i=a(e,"q"),r=a(e,"g"),o={type:"dsa",parts:[{name:"y",data:t},{name:"p",data:n},{name:"q",data:i},{name:"g",data:r}]};return new j(o)}function l(e){e.readSequence();var t=e.readOID();w.strictEqual(t,"1.2.840.10045.2.1","must be ecPublicKey");for(var i,r=e.readOID(),a=Object.keys(k.curves),o=0;o=1,"key must have at least one part"),s.ok(e||d.atEnd(),"leftover bytes at end of key");var b=p,v=c.info[o.type];if("private"!==t&&v.parts.length===h.length||(v=c.privInfo[o.type],b=l),s.strictEqual(v.parts.length,h.length),"ecdsa"===o.type){var y=/^ecdsa-sha2-(.+)$/.exec(m);s.ok(null!==y),s.strictEqual(y[1],h[0].data.toString())}for(var w=!0,x=0;xq.length&&(R=q.length),z+=D.write(q.slice(F,R),z),D[z++]=10,F=R}return z+=D.write("-----END "+M+"-----\n",z),D.slice(0,z)}t.exports={read:i,readSSHPrivate:r,write:a};var o,s=e("assert-plus"),c=(e("asn1"),e("../algs"),e("../utils")),u=e("crypto"),p=(e("../key"),e("../private-key")),l=e("./pem"),f=e("./rfc4253"),h=e("../ssh-buffer"),d=e("../errors"),m="openssh-key-v1"}).call(this,e("buffer").Buffer)},{"../algs":379,"../errors":383,"../key":397,"../private-key":398,"../ssh-buffer":400,"../utils":401,"./pem":387,"./rfc4253":390,asn1:407,"assert-plus":408,"bcrypt-pbkdf":409,buffer:17,crypto:21}],392:[function(e,t,n){(function(n){function i(e,t){"string"!=typeof e&&(a.buffer(e,"buf"),e=e.toString("ascii"));var i=e.trim().replace(/[\\\r]/g,""),r=i.match(c);r||(r=i.match(u)),a.ok(r,"key must match regex");var s,p=o.algToKeyType(r[1]),l=new n(r[2],"base64"),f={};if(r[4])try{s=o.read(l)}catch(e){r=i.match(u),a.ok(r,"key must match regex"),l=new n(r[2],"base64"),s=o.readInternal(f,"public",l)}else s=o.readInternal(f,"public",l);if(a.strictEqual(p,s.type),r[4]&&r[4].length>0)s.comment=r[4];else if(f.consumed){var h=r[2]+r[3],d=4*Math.ceil(f.consumed/3);h=h.slice(0,d-2).replace(/[^a-zA-Z0-9+\/=]/g,"")+h.slice(d-2);var m=f.consumed%3;for(m>0&&"="!==h.slice(d-1,d)&&d--;"="===h.slice(d,d+1);)d++;var g=h.slice(d);g=g.replace(/[\r\n]/g," ").replace(/^\s+/,""),g.match(/^[a-zA-Z0-9]/)&&(s.comment=g)}return s}function r(e,t){if(a.object(e),!s.isKey(e))throw new Error("Must be a public key");var i=[],r=o.keyTypeToAlg(e);i.push(r);var c=o.write(e);return i.push(c.toString("base64")),e.comment&&i.push(e.comment),new n(i.join(" "))}t.exports={read:i,write:r};var a=e("assert-plus"),o=e("./rfc4253"),s=(e("../utils"),e("../key")),c=(e("../private-key"),e("./ssh-private"),/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/),u=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/}).call(this,e("buffer").Buffer)},{"../key":397,"../private-key":398,"../utils":401,"./rfc4253":390,"./ssh-private":391,"assert-plus":408,buffer:17}],393:[function(e,t,n){(function(n){function i(e,t){"string"!=typeof e&&(o.buffer(e,"buf"),e=e.toString("ascii"));var i=e.trim().split(/[\r\n]+/g),r=i[0].match(/[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);o.ok(r,"invalid PEM header");var s=i[i.length-1].match(/[-]+[ ]*END CERTIFICATE[ ]*[-]+/);o.ok(s,"invalid PEM footer");for(var c={};;){if(i=i.slice(1),r=i[0].match(/^([A-Za-z0-9-]+): (.+)$/),!r)break;c[r[1].toLowerCase()]=r[2]}return i=i.slice(0,-1).join(""),e=new n(i,"base64"),a.read(e,t)}function r(e,t){var i=a.write(e,t),r="CERTIFICATE",o=i.toString("base64"),s=o.length+o.length/64+18+16+2*r.length+10,c=new n(s),u=0;u+=c.write("-----BEGIN "+r+"-----\n",u);for(var p=0;po.length&&(l=o.length),u+=c.write(o.slice(p,l),u),c[u++]=10,p=l}return u+=c.write("-----END "+r+"-----\n",u),c.slice(0,u)}var a=e("./x509");t.exports={read:i,verify:a.verify,sign:a.sign,write:r};var o=e("assert-plus");e("asn1"),e("../algs"),e("../utils"),e("../key"),e("../private-key"),e("./pem"),e("../identity"),e("../signature"),e("../certificate")}).call(this,e("buffer").Buffer)},{"../algs":379,"../certificate":380,"../identity":395,"../key":397,"../private-key":398,"../signature":399,"../utils":401,"./pem":387,"./x509":394,asn1:407,"assert-plus":408,buffer:17}],394:[function(e,t,n){(function(n){function i(e,t){return b.strictEqual(e.peek(),v.Ber.Integer,t+" is not an Integer"),y.mpNormalize(e.readString(v.Ber.Integer,!0))}function r(e,t){var n=e.signatures.x509;b.object(n,"x509 signature");var i=n.algo.split("-");if(i[0]!==t.type)return!1;var r=n.cache;if(void 0===r){var a=new v.BerWriter;g(e,a),r=a.buffer}var o=t.createVerify(i[1]);return o.write(r),o.verify(n.signature)}function a(e){return v.Ber.Context|v.Ber.Constructor|e}function o(e){return v.Ber.Context|e}function s(e,t){"string"==typeof e&&(e=new n(e,"binary")),b.buffer(e,"buf");var r=new v.BerReader(e);if(r.readSequence(),Math.abs(r.length-r.remain)>1)throw new Error("DER sequence does not contain whole byte stream");var o=r.offset;r.readSequence();var s=r.offset+r.length,p=s;if(r.peek()===a(0)){r.readSequence(a(0));var l=r.readInt();b.ok(l<=3,"only x.509 versions up to v3 supported")}var f={};f.signatures={};var h=f.signatures.x509={};h.extras={},f.serial=i(r,"serial"),r.readSequence();var d=r.offset+r.length,m=r.readOID(),g=j[m];if(void 0===g)throw new Error("unknown signature algorithm "+m);if(r._offset=d,f.issuer=w.parseAsn1(r),r.readSequence(),f.validFrom=c(r),f.validUntil=c(r),f.subjects=[w.parseAsn1(r)],r.readSequence(),d=r.offset+r.length,f.subjectKey=_.readPkcs8(void 0,"public",r),r._offset=d,r.peek()===a(1)&&(r.readSequence(a(1)),h.extras.issuerUniqueID=e.slice(r.offset,r.offset+r.length),r._offset+=r.length),r.peek()===a(2)&&(r.readSequence(a(2)),h.extras.subjectUniqueID=e.slice(r.offset,r.offset+r.length),r._offset+=r.length),r.peek()===a(3)){r.readSequence(a(3));var y=r.offset+r.length;for(r.readSequence();r.offset=60?r-1:r,n.setUTCFullYear(a,parseInt(t[2],10)-1,parseInt(t[3],10)),n.setUTCHours(parseInt(t[4],10),parseInt(t[5],10)),t[6]&&t[6].length>0&&n.setUTCSeconds(parseInt(t[6],10)),n}function l(e){var t=e.match(C);b.ok(t);var n=new Date;return n.setUTCFullYear(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10)),n.setUTCHours(parseInt(t[4],10),parseInt(t[5],10)),t[6]&&t[6].length>0&&n.setUTCSeconds(parseInt(t[6],10)),n}function f(e){for(var t=""+e;t.length<2;)t="0"+t;return t}function h(e){var t="";return t+=f(e.getUTCFullYear()%100),t+=f(e.getUTCMonth()+1),t+=f(e.getUTCDate()),t+=f(e.getUTCHours()),t+=f(e.getUTCMinutes()),t+=f(e.getUTCSeconds()),t+="Z"}function d(e,t){void 0===e.signatures.x509&&(e.signatures.x509={});var n=e.signatures.x509;if(n.algo=t.type+"-"+t.defaultHashAlgorithm(),void 0===j[n.algo])return!1;var i=new v.BerWriter;g(e,i);var r=i.buffer;n.cache=r;var a=t.createSign();return a.write(r),e.signatures.x509.signature=a.sign(),!0}function m(e,t){var i=e.signatures.x509;b.object(i,"x509 signature");var r=new v.BerWriter;r.startSequence(),i.cache?(r._ensure(i.cache.length),i.cache.copy(r._buf,r._offset),r._offset+=i.cache.length):g(e,r),r.startSequence(),r.writeOID(j[i.algo]),i.algo.match(/^rsa-/)&&r.writeNull(),r.endSequence();var a=i.signature.toBuffer("asn1"),o=new n(a.length+1);return o[0]=0,a.copy(o,1),r.writeBuffer(o,v.Ber.BitString),r.endSequence(),r.buffer}function g(e,t){var n=e.signatures.x509;b.object(n,"x509 signature"),t.startSequence(),t.startSequence(a(0)),t.writeInt(2),t.endSequence(),t.writeBuffer(y.mpNormalize(e.serial),v.Ber.Integer),t.startSequence(),t.writeOID(j[n.algo]),t.endSequence(),e.issuer.toAsn1(t),t.startSequence(),t.writeString(h(e.validFrom),v.Ber.UTCTime),t.writeString(h(e.validUntil),v.Ber.UTCTime),t.endSequence();var i=e.subjects[0],r=e.subjects.slice(1);if(i.toAsn1(t),_.writePkcs8(t,e.subjectKey),n.extras&&n.extras.issuerUniqueID&&t.writeBuffer(n.extras.issuerUniqueID,a(1)),n.extras&&n.extras.subjectUniqueID&&t.writeBuffer(n.extras.subjectUniqueID,a(2)),r.length>0||"host"===i.type||n.extras&&n.extras.exts){t.startSequence(a(3)),t.startSequence();var s=[{oid:S.altName}];n.extras&&n.extras.exts&&(s=n.extras.exts);for(var c=0;c0&&(this.cn=this.componentLookup.cn[0].value),a.optionalString(e.type,"options.type"),void 0===e.type)1===this.components.length&&this.componentLookup.cn&&1===this.componentLookup.cn.length&&this.componentLookup.cn[0].value.match(c)?(this.type="host",this.hostname=this.componentLookup.cn[0].value):this.componentLookup.dc&&this.components.length===this.componentLookup.dc.length?(this.type="host",this.hostname=this.componentLookup.dc.map(function(e){return e.value}).join(".")):this.componentLookup.uid&&this.components.length===this.componentLookup.uid.length?(this.type="user",this.uid=this.componentLookup.uid[0].value):this.componentLookup.cn&&1===this.componentLookup.cn.length&&this.componentLookup.cn[0].value.match(c)?(this.type="host",this.hostname=this.componentLookup.cn[0].value):this.componentLookup.uid&&1===this.componentLookup.uid.length?(this.type="user",this.uid=this.componentLookup.uid[0].value):this.componentLookup.mail&&1===this.componentLookup.mail.length?(this.type="email",this.email=this.componentLookup.mail[0].value):this.componentLookup.cn&&1===this.componentLookup.cn.length?(this.type="user",this.uid=this.componentLookup.cn[0].value):this.type="unknown";else if(this.type=e.type,"host"===this.type)this.hostname=e.hostname;else if("user"===this.type)this.uid=e.uid;else{if("email"!==this.type)throw new Error("Unknown type "+this.type);this.email=e.email}}function r(e,t){if("**"===e||"**"===t)return!0;var n=e.split("."),i=t.split(".");if(n.length!==i.length)return!1;for(var r=0;r1024&&(e="sha256"),"ed25519"===this.type&&(e="sha512"),"ecdsa"===this.type&&(e=this.size<=256?"sha256":this.size<=384?"sha384":"sha512"),e},i.prototype.createVerify=function(e){if(void 0===e&&(e=this.defaultHashAlgorithm()),a.string(e,"hash algorithm"),"ed25519"===this.type&&void 0!==r)return new r.Verifier(this,e);if("curve25519"===this.type)throw new Error("Curve25519 keys are not suitable for signing or verification");var t,i,o;try{i=e.toUpperCase(),t=s.createVerify(i)}catch(e){o=e}(void 0===t||o instanceof Error&&o.message.match(/Unknown message digest/))&&(i="RSA-",i+=e.toUpperCase(),t=s.createVerify(i)),a.ok(t,"failed to create verifier");var c=t.verify.bind(t),p=this.toBuffer("pkcs8"),l=this;return t.verify=function(t,i){if(u.isSignature(t,[2,0]))return t.type===l.type&&((!t.hashAlgorithm||t.hashAlgorithm===e)&&c(p,t.toBuffer("asn1")));if("string"==typeof t||n.isBuffer(t))return c(p,t,i);throw u.isSignature(t,[1,0])?new Error("signature was created by too old a version of sshpk and cannot be verified"):new TypeError("signature must be a string, Buffer, or Signature object")},t},i.prototype.createDiffieHellman=function(){if("rsa"===this.type)throw new Error("RSA keys do not support Diffie-Hellman");return new p(this)},i.prototype.createDH=i.prototype.createDiffieHellman,i.parse=function(e,t,n){"string"!=typeof e&&a.buffer(e,"data"),void 0===t&&(t="auto"),a.string(t,"format"),"string"==typeof n&&(n={filename:n}),a.optionalObject(n,"options"),void 0===n&&(n={}),a.optionalString(n.filename,"options.filename"),void 0===n.filename&&(n.filename="(unnamed)"),a.object(g[t],"formats[format]");try{var i=g[t].read(e,n);return i instanceof h&&(i=i.toPublic()),i.comment||(i.comment=n.filename),i}catch(e){if("KeyEncryptedError"===e.name)throw e;throw new m(n.filename,t,e)}},i.isKey=function(e,t){return f.isCompatible(e,i,t)},i.prototype._sshpkApiVersion=[1,5],i._oldVersionDetect=function(e){return a.func(e.toBuffer),a.func(e.fingerprint),e.createDH?[1,4]:e.defaultHashAlgorithm?[1,3]:e.formats.auto?[1,2]:e.formats.pkcs1?[1,1]:[1,0]}}).call(this,{isBuffer:e("../../../../../../browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js")})},{"../../../../../../browserify/node_modules/insert-module-globals/node_modules/is-buffer/index.js":217,"./algs":379,"./dhe":381,"./ed-compat":382,"./errors":383,"./fingerprint":384,"./formats/auto":385,"./formats/pem":387,"./formats/pkcs1":388,"./formats/pkcs8":389,"./formats/rfc4253":390,"./formats/ssh":392,"./formats/ssh-private":391,"./private-key":398,"./signature":399,"./utils":401,"assert-plus":408,crypto:21}],398:[function(e,t,n){(function(n){function i(e){o.object(e,"options"),h.call(this,e),this._pubCache=void 0}t.exports=i;var r,a,o=e("assert-plus"),s=e("./algs"),c=e("crypto"),u=(e("./fingerprint"),e("./signature")),p=e("./errors"),l=e("util"),f=e("./utils");try{r=e("./ed-compat")}catch(e){}var h=e("./key"),d=(p.InvalidAlgorithmError,p.KeyParseError),m=(p.KeyEncryptedError,{});m.auto=e("./formats/auto"),m.pem=e("./formats/pem"),m.pkcs1=e("./formats/pkcs1"),m.pkcs8=e("./formats/pkcs8"),m.rfc4253=e("./formats/rfc4253"),m["ssh-private"]=e("./formats/ssh-private"),m.openssh=m["ssh-private"],m.ssh=m["ssh-private"],l.inherits(i,h),i.formats=m,i.prototype.toBuffer=function(e,t){return void 0===e&&(e="pkcs1"),o.string(e,"format"),o.object(m[e],"formats[format]"),o.optionalObject(t,"options"),m[e].write(this,t)},i.prototype.hash=function(e){return this.toPublic().hash(e)},i.prototype.toPublic=function(){if(this._pubCache)return this._pubCache;for(var e=s.info[this.type],t=[],n=0;n20&&0===i[0]&&(i=i.slice(1)),r=this.part.s.data,r.length>20&&0===r[0]&&(r=r.slice(1)),this.hashAlgorithm&&"sha1"!==this.hashAlgorithm||i.length+r.length!==40)throw new Error("OpenSSH only supports DSA signatures with SHA1 hash");return t.writeBuffer(n.concat([i,r])),t.toBuffer()}if("ssh"===e&&"ecdsa"===this.type){var o=new f({});i=this.part.r.data,o.writeBuffer(i),o.writePart(this.part.s),t=new f({});var s;0===i[0]&&(i=i.slice(1));var u=8*i.length;return 256===u?s="nistp256":384===u?s="nistp384":528===u&&(s="nistp521"),t.writeString("ecdsa-sha2-"+s),t.writeBuffer(o.toBuffer()),t.toBuffer()}throw new Error("Invalid signature format");default:throw new Error("Invalid signature data")}},i.prototype.toString=function(e){return c.optionalString(e,"format"),this.toBuffer(e).toString("base64")},i.parse=function(e,t,i){"string"==typeof e&&(e=new n(e,"base64")),c.buffer(e,"data"),c.string(i,"format"),c.string(t,"type");var u={};u.type=t.toLowerCase(),u.parts=[];try{switch(c.ok(e.length>0,"signature must not be empty"),u.type){case"rsa":return r(e,t,i,u,"ssh-rsa");case"ed25519":return r(e,t,i,u,"ssh-ed25519");case"dsa":case"ecdsa":return"asn1"===i?a(e,t,i,u):"dsa"===u.type?o(e,t,i,u):s(e,t,i,u);default:throw new h(t)}}catch(e){if(e instanceof h)throw e;throw new d(t,i,e)}},i.isSignature=function(e,t){return p.isCompatible(e,i,t)},i.prototype._sshpkApiVersion=[2,1],i._oldVersionDetect=function(e){return c.func(e.toBuffer),e.hasOwnProperty("hashAlgorithm")?[2,0]:[1,0]}}).call(this,e("buffer").Buffer)},{"./algs":379,"./errors":383,"./ssh-buffer":400,"./utils":401,asn1:407,"assert-plus":408,buffer:17,crypto:21}],400:[function(e,t,n){(function(n){function i(e){r.object(e,"options"),void 0!==e.buffer&&r.buffer(e.buffer,"options.buffer"),this._size=e.buffer?e.buffer.length:1024,this._buffer=e.buffer||new n(this._size),this._offset=0}t.exports=i;var r=e("assert-plus");i.prototype.toBuffer=function(){return this._buffer.slice(0,this._offset)},i.prototype.atEnd=function(){return this._offset>=this._buffer.length},i.prototype.remainder=function(){return this._buffer.slice(this._offset)},i.prototype.skip=function(e){this._offset+=e},i.prototype.expand=function(){this._size*=2;var e=new n(this._size);this._buffer.copy(e,0),this._buffer=e},i.prototype.readPart=function(){return{data:this.readBuffer()}},i.prototype.readBuffer=function(){var e=this._buffer.readUInt32BE(this._offset);this._offset+=4,r.ok(this._offset+e<=this._buffer.length,"length out of bounds at +0x"+this._offset.toString(16)+" (data truncated?)");var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},i.prototype.readString=function(){return this.readBuffer().toString()},i.prototype.readCString=function(){for(var e=this._offset;ethis._size;)this.expand();this._buffer.writeUInt32BE(e.length,this._offset),this._offset+=4,e.copy(this._buffer,this._offset),this._offset+=e.length},i.prototype.writeString=function(e){this.writeBuffer(new n(e,"utf8"))},i.prototype.writeCString=function(e){for(;this._offset+1+e.length>this._size;)this.expand();this._buffer.write(e,this._offset),this._offset+=e.length,this._buffer[this._offset++]=0},i.prototype.writeInt=function(e){for(;this._offset+4>this._size;)this.expand();this._buffer.writeUInt32BE(e,this._offset),this._offset+=4},i.prototype.writeInt64=function(e){if(r.buffer(e,"value"),e.length>8){for(var t=e.slice(0,e.length-8),n=0;nthis._size;)this.expand();e.copy(this._buffer,this._offset),this._offset+=8},i.prototype.writeChar=function(e){for(;this._offset+1>this._size;)this.expand();this._buffer[this._offset++]=e},i.prototype.writePart=function(e){this.writeBuffer(e.data)},i.prototype.write=function(e){for(;this._offset+e.length>this._size;)this.expand();e.copy(this._buffer,this._offset),this._offset+=e.length}}).call(this,e("buffer").Buffer)},{"assert-plus":408,buffer:17}],401:[function(e,t,n){(function(n){function i(e,t,n){if(null===e||"object"!=typeof e)return!1;if(void 0===n&&(n=t.prototype._sshpkApiVersion),e instanceof t&&t.prototype._sshpkApiVersion[0]==n[0])return!0;for(var i=Object.getPrototypeOf(e),r=0;i.constructor.name!==t.name;)if(i=Object.getPrototypeOf(i),!i||++r>b)return!1;if(i.constructor.name!==t.name)return!1;var a=i._sshpkApiVersion;return void 0===a&&(a=t._oldVersionDetect(e)),!(a[0]!=n[0]||a[1]=n[1],i+" must be compatible with "+t.name+" klass version "+n[0]+"."+n[1])}}function a(e,t,i,r){d.buffer(t,"salt"),d.buffer(i,"passphrase"),d.number(r,"iteration count");var a=v[e];d.object(a,"supported cipher"),t=t.slice(0,y);for(var o,s,c,u=new n(0);u.length=t.length){var o=a+1;n.push(e.slice(i,o-r)),i=o,r=0}return i<=e.length&&n.push(e.slice(i,e.length)),n}function c(e,t){if(d.buffer(e),0===e[0]&&4===e[1])return t?e:e.slice(1);if(4===e[0]){if(!t)return e}else{for(;0===e[0];)e=e.slice(1);if(2===e[0]||3===e[0])throw new Error("Compressed elliptic curve points are not supported");if(4!==e[0])throw new Error("Not a valid elliptic curve point");if(!t)return e}var i=new n(e.length+1);return i[0]=0,e.copy(i,1),i}function u(e){for(d.buffer(e);e.length>1&&0===e[0]&&0===(128&e[1]);)e=e.slice(1);if(128===(128&e[0])){var t=new n(e.length+1);t[0]=0,e.copy(t,1),e=t}return e}function p(e){var t=new n(e.toByteArray());return t=u(t)}function l(t,n,i){d.buffer(t),d.buffer(n),d.buffer(i);try{var r=e("jsbn").BigInteger}catch(e){throw new Error("To load a PKCS#8 format DSA private key, the node jsbn library is required.")}t=new r(t),n=new r(n),i=new r(i);var a=t.modPow(i,n),o=p(a);return o}function f(t){d.object(t),r(t,m,[1,1]);try{var n=e("jsbn").BigInteger}catch(e){throw new Error("To write a PEM private key from this source, the node jsbn lib is required.")}var i,a=new n(t.part.d.data);if(!t.part.dmodp){var o=new n(t.part.p.data),s=a.mod(o.subtract(1));i=p(s),t.part.dmodp={name:"dmodp",data:i},t.parts.push(t.part.dmodp)}if(!t.part.dmodq){var c=new n(t.part.q.data),u=a.mod(c.subtract(1));i=p(u),t.part.dmodq={name:"dmodq",data:i},t.parts.push(t.part.dmodq)}}function h(e){var t={};switch(e){case"3des-cbc":t.keySize=24,t.blockSize=8,t.opensslName="des-ede3-cbc";break;case"blowfish-cbc":t.keySize=16,t.blockSize=8,t.opensslName="bf-cbc";break;case"aes128-cbc":case"aes128-ctr":case"aes128-gcm@openssh.com":t.keySize=16,t.blockSize=16,t.opensslName="aes-128-"+e.slice(7,10);break;case"aes192-cbc":case"aes192-ctr":case"aes192-gcm@openssh.com":t.keySize=24,t.blockSize=16,t.opensslName="aes-192-"+e.slice(7,10);break;case"aes256-cbc":case"aes256-ctr":case"aes256-gcm@openssh.com":t.keySize=32,t.blockSize=16,t.opensslName="aes-256-"+e.slice(7,10);break;default:throw new Error('Unsupported openssl cipher "'+e+'"')}return t}t.exports={bufferSplit:s,addRSAMissing:f,calculateDSAPublic:l,mpNormalize:u,ecNormalize:c,countZeros:o,assertCompatible:r,isCompatible:i,opensslKeyDeriv:a,opensshCipherInfo:h};var d=e("assert-plus"),m=e("./private-key"),g=e("crypto"),b=3,v={"des-ede3-cbc":{key:7,iv:8},"aes-128-cbc":{key:16,iv:16}},y=8}).call(this,e("buffer").Buffer)},{"./private-key":398,"assert-plus":408,buffer:17,crypto:21,jsbn:419}],402:[function(e,t,n){t.exports={newInvalidAsn1Error:function(e){var t=new Error;return t.name="InvalidAsn1Error",t.message=e||"",t}}},{}],403:[function(e,t,n){var i=e("./errors"),r=e("./types"),a=e("./reader"),o=e("./writer");t.exports={Reader:a,Writer:o};for(var s in r)r.hasOwnProperty(s)&&(t.exports[s]=r[s]);for(var c in i)i.hasOwnProperty(c)&&(t.exports[c]=i[c])},{"./errors":402,"./reader":404,"./types":405,"./writer":406}],404:[function(e,t,n){(function(n){function i(e){if(!e||!n.isBuffer(e))throw new TypeError("data must be a node Buffer");this._buf=e,this._size=e.length,this._len=0,this._offset=0}var r=e("assert"),a=e("./types"),o=e("./errors"),s=o.newInvalidAsn1Error;Object.defineProperty(i.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(i.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(i.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(i.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),i.prototype.readByte=function(e){if(this._size-this._offset<1)return null;var t=255&this._buf[this._offset];return e||(this._offset+=1),t},i.prototype.peek=function(){return this.readByte(!0)},i.prototype.readLength=function(e){if(void 0===e&&(e=this._offset),e>=this._size)return null;var t=255&this._buf[e++];if(null===t)return null;if(128==(128&t)){if(t&=127,0==t)throw s("Indefinite length not supported");if(t>4)throw s("encoding too long");if(this._size-ethis._size-r)return null;if(this._offset=r,0===this.length)return t?new n(0):"";var o=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,t?o:o.toString("utf8")},i.prototype.readOID=function(e){e||(e=a.OID);var t=this.readString(e,!0);if(null===t)return null;for(var n=[],i=0,r=0;r>0),n.join(".")},i.prototype._readTag=function(e){r.ok(void 0!==e);var t=this.peek();if(null===t)return null;if(t!==e)throw s("Expected 0x"+e.toString(16)+": got 0x"+t.toString(16));var n=this.readLength(this._offset+1);if(null===n)return null;if(this.length>4)throw s("Integer too long: "+this.length);if(this.length>this._size-n)return null;this._offset=n;for(var i=this._buf[this._offset],a=0,o=0;o>0},t.exports=i}).call(this,e("buffer").Buffer)},{"./errors":402,"./types":405,assert:2,buffer:17}],405:[function(e,t,n){t.exports={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128}},{}],406:[function(e,t,n){(function(n){function i(e,t){a.ok(e),a.equal(typeof e,"object"),a.ok(t),a.equal(typeof t,"object");var n=Object.getOwnPropertyNames(e);return n.forEach(function(n){if(!t[n]){var i=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,i)}}),t}function r(e){e=i(c,e||{}),this._buf=new n(e.size||1024),this._size=this._buf.length,this._offset=0,this._options=e,this._seq=[]}var a=e("assert"),o=e("./types"),s=e("./errors"),c=(s.newInvalidAsn1Error,{size:1024,growthFactor:8});Object.defineProperty(r.prototype,"buffer",{get:function(){if(this._seq.length)throw new InvalidAsn1Error(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),r.prototype.writeByte=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=e},r.prototype.writeInt=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");"number"!=typeof t&&(t=o.Integer);for(var n=4;(0===(4286578688&e)||(4286578688&e)===-8388608)&&n>1;)n--,e<<=8;if(n>4)throw new InvalidAsn1Error("BER ints cannot be > 0xffffffff");for(this._ensure(2+n),this._buf[this._offset++]=t,this._buf[this._offset++]=n;n-- >0;)this._buf[this._offset++]=(4278190080&e)>>>24,e<<=8},r.prototype.writeNull=function(){this.writeByte(o.Null),this.writeByte(0)},r.prototype.writeEnumeration=function(e,t){if("number"!=typeof e)throw new TypeError("argument must be a Number");return"number"!=typeof t&&(t=o.Enumeration),this.writeInt(e,t)},r.prototype.writeBoolean=function(e,t){if("boolean"!=typeof e)throw new TypeError("argument must be a Boolean");"number"!=typeof t&&(t=o.Boolean),this._ensure(3),this._buf[this._offset++]=t,this._buf[this._offset++]=1,this._buf[this._offset++]=e?255:0},r.prototype.writeString=function(e,t){if("string"!=typeof e)throw new TypeError("argument must be a string (was: "+typeof e+")");"number"!=typeof t&&(t=o.OctetString);var i=n.byteLength(e);this.writeByte(t),this.writeLength(i),i&&(this._ensure(i),this._buf.write(e,this._offset),this._offset+=i)},r.prototype.writeBuffer=function(e,t){if("number"!=typeof t)throw new TypeError("tag must be a number");if(!n.isBuffer(e))throw new TypeError("argument must be a buffer");this.writeByte(t),this.writeLength(e.length),this._ensure(e.length),e.copy(this._buf,this._offset,0,e.length),this._offset+=e.length},r.prototype.writeStringArray=function(e){if(!e instanceof Array)throw new TypeError("argument must be an Array[String]");var t=this;e.forEach(function(e){t.writeString(e)})},r.prototype.writeOID=function(e,t){function n(e,t){t<128?e.push(t):t<16384?(e.push(t>>>7|128),e.push(127&t)):t<2097152?(e.push(t>>>14|128),e.push(255&(t>>>7|128)),e.push(127&t)):t<268435456?(e.push(t>>>21|128),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)),e.push(127&t)):(e.push(255&(t>>>28|128)),e.push(255&(t>>>21|128)),e.push(255&(t>>>14|128)),e.push(255&(t>>>7|128)), +e.push(127&t))}if("string"!=typeof e)throw new TypeError("argument must be a string");if("number"!=typeof t&&(t=o.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(e))throw new Error("argument is not a valid OID string");var i=e.split("."),r=[];r.push(40*parseInt(i[0],10)+parseInt(i[1],10)),i.slice(2).forEach(function(e){n(r,parseInt(e,10))});var a=this;this._ensure(2+r.length),this.writeByte(t),this.writeLength(r.length),r.forEach(function(e){a.writeByte(e)})},r.prototype.writeLength=function(e){if("number"!=typeof e)throw new TypeError("argument must be a Number");if(this._ensure(4),e<=127)this._buf[this._offset++]=e;else if(e<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=e;else if(e<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e;else{if(!(e<=16777215))throw new InvalidAsn1ERror("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=e>>16,this._buf[this._offset++]=e>>8,this._buf[this._offset++]=e}},r.prototype.startSequence=function(e){"number"!=typeof e&&(e=o.Sequence|o.Constructor),this.writeByte(e),this._seq.push(this._offset),this._ensure(3),this._offset+=3},r.prototype.endSequence=function(){var e=this._seq.pop(),t=e+3,n=this._offset-t;if(n<=127)this._shift(t,n,-2),this._buf[e]=n;else if(n<=255)this._shift(t,n,-1),this._buf[e]=129,this._buf[e+1]=n;else if(n<=65535)this._buf[e]=130,this._buf[e+1]=n>>8,this._buf[e+2]=n;else{if(!(n<=16777215))throw new InvalidAsn1Error("Sequence too long");this._shift(t,n,1),this._buf[e]=131,this._buf[e+1]=n>>16,this._buf[e+2]=n>>8,this._buf[e+3]=n}},r.prototype._shift=function(e,t,n){a.ok(void 0!==e),a.ok(void 0!==t),a.ok(n),this._buf.copy(this._buf,e+n,e,e+t),this._offset+=n},r.prototype._ensure=function(e){if(a.ok(e),this._size-this._offset=t&&(c=0),i=i<<8|e[c];return i}function a(e,t,n){var i,a=new u,o=new Uint32Array(p),s=new Uint8Array([79,120,121,99,104,114,111,109,97,116,105,99,66,108,111,119,102,105,115,104,83,119,97,116,68,121,110,97,109,105,116,101]);for(a.expandstate(t,64,e,64),i=0;i<64;i++)a.expand0state(t,64),a.expand0state(e,64);for(i=0;i>>24,n[4*i+2]=o[i]>>>16,n[4*i+1]=o[i]>>>8,n[4*i+0]=o[i]}function o(e,t,n,i,r,o,c){var u,p,f,h,d,m,g=new Uint8Array(64),b=new Uint8Array(64),v=new Uint8Array(l),y=new Uint8Array(l),w=new Uint8Array(i+4),x=o;if(c<1)return-1;if(0===t||0===i||0===o||o>v.byteLength*v.byteLength||i>1<<20)return-1;for(h=Math.floor((o+v.byteLength-1)/v.byteLength),f=Math.floor((o+h-1)/h),u=0;u0;m++){for(w[i+0]=m>>>24,w[i+1]=m>>>16,w[i+2]=m>>>8,w[i+3]=m,s(b,w,i+4),a(g,b,y),u=v.byteLength;u--;)v[u]=y[u];for(u=1;u=x));u++)r[d]=v[u];o-=u}return 0}var s=e("tweetnacl").lowlevel.crypto_hash,c=0,u=function(){this.S=[new Uint32Array([3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946]),new Uint32Array([1266315497,3048417604,3681880366,3289982499,290971e4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055]),new Uint32Array([3913112168,2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504]),new Uint32Array([976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409e3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462])],this.P=new Uint32Array([608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,3041331479,2450970073,2306472731])};u.prototype.encipher=function(e,t){void 0===t&&(t=new Uint8Array(e.buffer),0!==e.byteOffset&&(t=t.subarray(e.byteOffset))),e[0]^=this.P[0];for(var n=1;n<16;n+=2)e[1]^=i(this.S,t,0)^this.P[n],e[0]^=i(this.S,t,4)^this.P[n+1];var r=e[0];e[0]=e[1]^this.P[17],e[1]=r},u.prototype.decipher=function(e){var t=new Uint8Array(e.buffer);0!==e.byteOffset&&(t=t.subarray(e.byteOffset)),e[0]^=this.P[17];for(var n=16;n>0;n-=2)e[1]^=i(this.S,t,0)^this.P[n],e[0]^=i(this.S,t,4)^this.P[n-1];var r=e[0];e[0]=e[1]^this.P[0],e[1]=r},u.prototype.expand0state=function(e,t){var n,i,a=new Uint32Array(2),o=new Uint8Array(a.buffer);for(n=0,c=0;n<18;n++)this.P[n]^=r(e,t);for(c=0,n=0;n<18;n+=2)this.encipher(a,o),this.P[n]=a[0],this.P[n+1]=a[1];for(n=0;n<4;n++)for(i=0;i<256;i+=2)this.encipher(a,o),this.S[n][i]=a[0],this.S[n][i+1]=a[1]},u.prototype.expandstate=function(e,t,n,i){var a,o,s=new Uint32Array(2);for(a=0,c=0;a<18;a++)this.P[a]^=r(n,i);for(a=0,c=0;a<18;a+=2)s[0]^=r(e,t),s[1]^=r(e,t),this.encipher(s),this.P[a]=s[0],this.P[a+1]=s[1];for(a=0;a<4;a++)for(o=0;o<256;o+=2)s[0]^=r(e,t),s[1]^=r(e,t),this.encipher(s),this.S[a][o]=s[0],this.S[a][o+1]=s[1];c=0},u.prototype.enc=function(e,t){for(var n=0;n=t?e:i("0"+e,t)}var r=e("crypto"),a=e("jsbn").BigInteger;e("./lib/ec.js").ECPointFp;n.ECCurves=e("./lib/sec.js"),n.ECKey=function(e,n,o){var s,c=e(),u=c.getN(),p=Math.floor(u.bitLength()/8);if(n)if(o){var e=c.getCurve();this.P=e.decodePointHex(n.toString("hex"))}else{if(n.length!=p)return!1;s=new a(n.toString("hex"),16)}else{var l=u.subtract(a.ONE),f=new a(r.randomBytes(u.bitLength()));s=f.mod(l).add(a.ONE),this.P=c.getG().multiply(s)}this.P&&(this.PublicKey=new t(c.getCurve().encodeCompressedPointHex(this.P),"hex")),s&&(this.PrivateKey=new t(i(s.toString(16),2*p),"hex"),this.deriveSharedSecret=function(e){if(!e||!e.P)return!1;var n=e.P.multiply(s);return new t(i(n.getX().toBigInteger().toString(16),2*p),"hex")})}}).call(this,e("buffer").Buffer)},{"./lib/ec.js":411,"./lib/sec.js":412,buffer:17,crypto:21,jsbn:419}],411:[function(e,t,n){function i(e,t){this.x=t,this.q=e}function r(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)}function a(){return this.x}function o(){return new i(this.q,this.x.negate().mod(this.q))}function s(e){return new i(this.q,this.x.add(e.toBigInteger()).mod(this.q))}function c(e){return new i(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))}function u(e){return new i(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))}function p(){return new i(this.q,this.x.square().mod(this.q))}function l(e){return new i(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))}function f(e,t,n,i){this.curve=e,this.x=t,this.y=n,null==i?this.z=O.ONE:this.z=i,this.zinv=null}function h(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.x.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function d(){null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q));var e=this.y.toBigInteger().multiply(this.zinv);return this.curve.reduce(e),this.curve.fromBigInteger(e)}function m(e){if(e==this)return!0;if(this.isInfinity())return e.isInfinity();if(e.isInfinity())return this.isInfinity();var t,n;return t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),!!t.equals(O.ZERO)&&(n=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q),n.equals(O.ZERO))}function g(){return null==this.x&&null==this.y||this.z.equals(O.ZERO)&&!this.y.toBigInteger().equals(O.ZERO)}function b(){return new f(this.curve,this.x,this.y.negate(),this.z)}function v(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),n=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(O.ZERO.equals(n))return O.ZERO.equals(t)?this.twice():this.curve.getInfinity();var i=new O("3"),r=this.x.toBigInteger(),a=this.y.toBigInteger(),o=(e.x.toBigInteger(),e.y.toBigInteger(),n.square()),s=o.multiply(n),c=r.multiply(o),u=t.square().multiply(this.z),p=u.subtract(c.shiftLeft(1)).multiply(e.z).subtract(s).multiply(n).mod(this.curve.q),l=c.multiply(i).multiply(t).subtract(a.multiply(s)).subtract(u.multiply(t)).multiply(e.z).add(t.multiply(s)).mod(this.curve.q),h=s.multiply(this.z).multiply(e.z).mod(this.curve.q);return new f(this.curve,this.curve.fromBigInteger(p),this.curve.fromBigInteger(l),h)}function y(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new O("3"),t=this.x.toBigInteger(),n=this.y.toBigInteger(),i=n.multiply(this.z),r=i.multiply(n).mod(this.curve.q),a=this.curve.a.toBigInteger(),o=t.square().multiply(e);O.ZERO.equals(a)||(o=o.add(this.z.square().multiply(a))),o=o.mod(this.curve.q);var s=o.square().subtract(t.shiftLeft(3).multiply(r)).shiftLeft(1).multiply(i).mod(this.curve.q),c=o.multiply(e).multiply(t).subtract(r.shiftLeft(1)).shiftLeft(2).multiply(r).subtract(o.square().multiply(o)).mod(this.curve.q),u=i.square().multiply(i).shiftLeft(3).mod(this.curve.q);return new f(this.curve,this.curve.fromBigInteger(s),this.curve.fromBigInteger(c),u)}function w(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,n=e,i=n.multiply(new O("3")),r=this.negate(),a=this;for(t=i.bitLength()-2;t>0;--t){a=a.twice();var o=i.testBit(t),s=n.testBit(t);o!=s&&(a=a.add(o?this:r))}return a}function x(e,t,n){var i;i=e.bitLength()>n.bitLength()?e.bitLength()-1:n.bitLength()-1;for(var r=this.curve.getInfinity(),a=this.add(t);i>=0;)r=r.twice(),e.testBit(i)?r=n.testBit(i)?r.add(a):r.add(this):n.testBit(i)&&(r=r.add(t)),--i;return r}function k(e,t,n){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(n),this.infinity=new f(this,null,null),this.reducer=new D(this.q)}function _(){return this.q}function j(){return this.a}function S(){return this.b}function E(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)}function A(){return this.infinity}function C(e){return new i(this.q,e)}function T(e){this.reducer.reduce(e)}function I(e){if(e.isInfinity())return"00";var t=e.getX().toBigInteger().toString(16),n=e.getY().toBigInteger().toString(16),i=this.getQ().toString(16).length;for(i%2!=0&&i++;t.length128){var t=this.q.shiftRight(e-64);t.intValue()==-1&&(this.r=O.ONE.shiftLeft(e).subtract(this.q))}return this.r},i.prototype.modMult=function(e,t){return this.modReduce(e.multiply(t))},i.prototype.modReduce=function(e){if(null!=this.getR()){for(var t=q.bitLength();e.bitLength()>t+1;){var n=e.shiftRight(t),i=e.subtract(n.shiftLeft(t));this.getR().equals(O.ONE)||(n=n.multiply(this.getR())),e=n.add(i)}for(;e.compareTo(q)>=0;)e=e.subtract(q)}else e=e.mod(q);return e},i.prototype.sqrt=function(){if(!this.q.testBit(0))throw"unsupported";if(this.q.testBit(1)){var e=new i(this.q,this.x.modPow(this.q.shiftRight(2).add(O.ONE),this.q));return e.square().equals(this)?e:null}var t=this.q.subtract(O.ONE),n=t.shiftRight(1);if(!this.x.modPow(n,this.q).equals(O.ONE))return null;var r,a,o=t.shiftRight(2),s=o.shiftLeft(1).add(O.ONE),c=this.x,u=modDouble(modDouble(c));do{var p;do p=new O(this.q.bitLength(),new SecureRandom);while(p.compareTo(this.q)>=0||!p.multiply(p).subtract(u).modPow(n,this.q).equals(t));var l=this.lucasSequence(p,c,s);if(r=l[0],a=l[1],this.modMult(a,a).equals(u))return a.testBit(0)&&(a=a.add(q)),a=a.shiftRight(1),new i(q,a)}while(r.equals(O.ONE)||r.equals(t));return null},i.prototype.lucasSequence=function(e,t,n){for(var i=n.bitLength(),r=n.getLowestSetBit(),a=O.ONE,o=O.TWO,s=e,c=O.ONE,u=O.ONE,p=i-1;p>=r+1;--p)c=this.modMult(c,u),n.testBit(p)?(u=this.modMult(c,t),a=this.modMult(a,s),o=this.modReduce(s.multiply(o).subtract(e.multiply(c))),s=this.modReduce(s.multiply(s).subtract(u.shiftLeft(1)))):(u=c,a=this.modReduce(a.multiply(o).subtract(c)),s=this.modReduce(s.multiply(o).subtract(e.multiply(c))),o=this.modReduce(o.multiply(o).subtract(c.shiftLeft(1))));c=this.modMult(c,u),u=this.modMult(c,t),a=this.modReduce(a.multiply(o).subtract(c)),o=this.modReduce(s.multiply(o).subtract(e.multiply(c))),c=this.modMult(c,u);for(var p=1;p<=r;++p)a=this.modMult(a,o),o=this.modReduce(o.multiply(o).subtract(c.shiftLeft(1))),c=this.modMult(c,c);return[a,o]};var n={ECCurveFp:k,ECPointFp:f,ECFieldElementFp:i};t.exports=n},{jsbn:419}],412:[function(e,t,n){function i(e,t,n,i){this.curve=e,this.g=t,this.n=n,this.h=i}function r(){return this.curve}function a(){return this.g}function o(){return this.n}function s(){return this.h}function c(e){return new g(e,16)}function u(){var e=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC"),n=c("E87579C11079F43DD824993C2CEE5ED3"),r=c("FFFFFFFE0000000075A30D1B9038A115"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("04161FF7528B899B2D0C28607CA52C5B86CF5AC8395BAFEB13C02DA292DDED7A83");return new i(o,s,r,a)}function p(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73"),t=g.ZERO,n=c("7"),r=c("0100000000000000000001B8FA16DFAB9ACA16B6B3"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("043B4C382CE37AA192A4019E763036F4F5DD4D7EBB938CF935318FDCED6BC28286531733C3F03C4FEE");return new i(o,s,r,a)}function l(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC"),n=c("1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45"),r=c("0100000000000000000001F4C8F927AED3CA752257"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("044A96B5688EF573284664698968C38BB913CBFC8223A628553168947D59DCC912042351377AC5FB32");return new i(o,s,r,a)}function f(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37"),t=g.ZERO,n=c("3"),r=c("FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("04DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D");return new i(o,s,r,a)}function h(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC"),n=c("64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1"),r=c("FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("04188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF101207192B95FFC8DA78631011ED6B24CDD573F977A11E794811");return new i(o,s,r,a)}function d(){var e=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001"),t=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE"),n=c("B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4"),r=c("FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("04B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34");return new i(o,s,r,a)}function m(){var e=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF"),t=c("FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC"),n=c("5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B"),r=c("FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551"),a=g.ONE,o=new b(e,t,n),s=o.decodePointHex("046B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C2964FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5");return new i(o,s,r,a)}var g=e("jsbn").BigInteger,b=e("./ec.js").ECCurveFp;i.prototype.getCurve=r,i.prototype.getG=a,i.prototype.getN=o,i.prototype.getH=s,t.exports={secp128r1:u,secp160k1:p,secp160r1:l,secp192k1:f,secp192r1:h,secp224r1:d,secp256r1:m}},{"./ec.js":411,jsbn:419}],413:[function(e,t,n){"use strict";var i=e("./lib/dh"),r=e("./lib/eddsa"),a=e("./lib/curve255"),o=e("./lib/utils"),s={};s.VERSION="0.7.1",s.dh=i,s.eddsa=r,s.curve255=a,s.utils=o,t.exports=s},{"./lib/curve255":415,"./lib/dh":416,"./lib/eddsa":417,"./lib/utils":418}],414:[function(e,t,n){"use strict";function i(e,t,n){var i=t>>4,r=e[i];r+=(1<<(15&t))*n,e[i]=r}function r(e,t){return e[t>>4]>>(15&t)&1}function a(){return[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function o(){return[1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function s(){return[9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}function c(e,t){var n,i,r,a=0;for(n=15;n>=0;n--){var o=e[n],s=t[n];a+=(o-s)*(1-a*a),r=a>>31,i=a+r^r,a=~~((a<<1)/(i+1))}return a}function u(e,t){var n,i=[];return i[0]=65535&(n=e[0]+t[0]),i[1]=65535&(n=(n>>>16)+e[1]+t[1]),i[2]=65535&(n=(n>>>16)+e[2]+t[2]),i[3]=65535&(n=(n>>>16)+e[3]+t[3]),i[4]=65535&(n=(n>>>16)+e[4]+t[4]),i[5]=65535&(n=(n>>>16)+e[5]+t[5]),i[6]=65535&(n=(n>>>16)+e[6]+t[6]),i[7]=65535&(n=(n>>>16)+e[7]+t[7]),i[8]=65535&(n=(n>>>16)+e[8]+t[8]),i[9]=65535&(n=(n>>>16)+e[9]+t[9]),i[10]=65535&(n=(n>>>16)+e[10]+t[10]), +i[11]=65535&(n=(n>>>16)+e[11]+t[11]),i[12]=65535&(n=(n>>>16)+e[12]+t[12]),i[13]=65535&(n=(n>>>16)+e[13]+t[13]),i[14]=65535&(n=(n>>>16)+e[14]+t[14]),i[15]=(n>>>16)+e[15]+t[15],i}function p(e,t){var n,i=[];return i[0]=65535&(n=524288+e[0]-t[0]),i[1]=65535&(n=(n>>>16)+524280+e[1]-t[1]),i[2]=65535&(n=(n>>>16)+524280+e[2]-t[2]),i[3]=65535&(n=(n>>>16)+524280+e[3]-t[3]),i[4]=65535&(n=(n>>>16)+524280+e[4]-t[4]),i[5]=65535&(n=(n>>>16)+524280+e[5]-t[5]),i[6]=65535&(n=(n>>>16)+524280+e[6]-t[6]),i[7]=65535&(n=(n>>>16)+524280+e[7]-t[7]),i[8]=65535&(n=(n>>>16)+524280+e[8]-t[8]),i[9]=65535&(n=(n>>>16)+524280+e[9]-t[9]),i[10]=65535&(n=(n>>>16)+524280+e[10]-t[10]),i[11]=65535&(n=(n>>>16)+524280+e[11]-t[11]),i[12]=65535&(n=(n>>>16)+524280+e[12]-t[12]),i[13]=65535&(n=(n>>>16)+524280+e[13]-t[13]),i[14]=65535&(n=(n>>>16)+524280+e[14]-t[14]),i[15]=(n>>>16)-8+e[15]-t[15],i}function l(e,t,n,i,r,a,o,s){var c,u=[];return u[0]=65535&(c=s*s),u[1]=65535&(c=(0|c/65536)+2*s*o),u[2]=65535&(c=(0|c/65536)+2*s*a+o*o),u[3]=65535&(c=(0|c/65536)+2*s*r+2*o*a),u[4]=65535&(c=(0|c/65536)+2*s*i+2*o*r+a*a),u[5]=65535&(c=(0|c/65536)+2*s*n+2*o*i+2*a*r),u[6]=65535&(c=(0|c/65536)+2*s*t+2*o*n+2*a*i+r*r),u[7]=65535&(c=(0|c/65536)+2*s*e+2*o*t+2*a*n+2*r*i),u[8]=65535&(c=(0|c/65536)+2*o*e+2*a*t+2*r*n+i*i),u[9]=65535&(c=(0|c/65536)+2*a*e+2*r*t+2*i*n),u[10]=65535&(c=(0|c/65536)+2*r*e+2*i*t+n*n),u[11]=65535&(c=(0|c/65536)+2*i*e+2*n*t),u[12]=65535&(c=(0|c/65536)+2*n*e+t*t),u[13]=65535&(c=(0|c/65536)+2*t*e),u[14]=65535&(c=(0|c/65536)+e*e),u[15]=0|c/65536,u}function f(e){var t,n=l(e[15],e[14],e[13],e[12],e[11],e[10],e[9],e[8]),i=l(e[7],e[6],e[5],e[4],e[3],e[2],e[1],e[0]),r=l(e[15]+e[7],e[14]+e[6],e[13]+e[5],e[12]+e[4],e[11]+e[3],e[10]+e[2],e[9]+e[1],e[8]+e[0]),a=[];return a[0]=65535&(t=8388608+i[0]+38*(r[8]-n[8]-i[8]+n[0]-128)),a[1]=65535&(t=8388480+(t>>>16)+i[1]+38*(r[9]-n[9]-i[9]+n[1])),a[2]=65535&(t=8388480+(t>>>16)+i[2]+38*(r[10]-n[10]-i[10]+n[2])),a[3]=65535&(t=8388480+(t>>>16)+i[3]+38*(r[11]-n[11]-i[11]+n[3])),a[4]=65535&(t=8388480+(t>>>16)+i[4]+38*(r[12]-n[12]-i[12]+n[4])),a[5]=65535&(t=8388480+(t>>>16)+i[5]+38*(r[13]-n[13]-i[13]+n[5])),a[6]=65535&(t=8388480+(t>>>16)+i[6]+38*(r[14]-n[14]-i[14]+n[6])),a[7]=65535&(t=8388480+(t>>>16)+i[7]+38*(r[15]-n[15]-i[15]+n[7])),a[8]=65535&(t=8388480+(t>>>16)+i[8]+r[0]-n[0]-i[0]+38*n[8]),a[9]=65535&(t=8388480+(t>>>16)+i[9]+r[1]-n[1]-i[1]+38*n[9]),a[10]=65535&(t=8388480+(t>>>16)+i[10]+r[2]-n[2]-i[2]+38*n[10]),a[11]=65535&(t=8388480+(t>>>16)+i[11]+r[3]-n[3]-i[3]+38*n[11]),a[12]=65535&(t=8388480+(t>>>16)+i[12]+r[4]-n[4]-i[4]+38*n[12]),a[13]=65535&(t=8388480+(t>>>16)+i[13]+r[5]-n[5]-i[5]+38*n[13]),a[14]=65535&(t=8388480+(t>>>16)+i[14]+r[6]-n[6]-i[6]+38*n[14]),a[15]=8388480+(t>>>16)+i[15]+r[7]-n[7]-i[7]+38*n[15],m(a),a}function h(e,t,n,i,r,a,o,s,c,u,p,l,f,h,d,m){var g,b=[];return b[0]=65535&(g=s*m),b[1]=65535&(g=(0|g/65536)+s*d+o*m),b[2]=65535&(g=(0|g/65536)+s*h+o*d+a*m),b[3]=65535&(g=(0|g/65536)+s*f+o*h+a*d+r*m),b[4]=65535&(g=(0|g/65536)+s*l+o*f+a*h+r*d+i*m),b[5]=65535&(g=(0|g/65536)+s*p+o*l+a*f+r*h+i*d+n*m),b[6]=65535&(g=(0|g/65536)+s*u+o*p+a*l+r*f+i*h+n*d+t*m),b[7]=65535&(g=(0|g/65536)+s*c+o*u+a*p+r*l+i*f+n*h+t*d+e*m),b[8]=65535&(g=(0|g/65536)+o*c+a*u+r*p+i*l+n*f+t*h+e*d),b[9]=65535&(g=(0|g/65536)+a*c+r*u+i*p+n*l+t*f+e*h),b[10]=65535&(g=(0|g/65536)+r*c+i*u+n*p+t*l+e*f),b[11]=65535&(g=(0|g/65536)+i*c+n*u+t*p+e*l),b[12]=65535&(g=(0|g/65536)+n*c+t*u+e*p),b[13]=65535&(g=(0|g/65536)+t*c+e*u),b[14]=65535&(g=(0|g/65536)+e*c),b[15]=0|g/65536,b}function d(e,t){var n,i=h(e[15],e[14],e[13],e[12],e[11],e[10],e[9],e[8],t[15],t[14],t[13],t[12],t[11],t[10],t[9],t[8]),r=h(e[7],e[6],e[5],e[4],e[3],e[2],e[1],e[0],t[7],t[6],t[5],t[4],t[3],t[2],t[1],t[0]),a=h(e[15]+e[7],e[14]+e[6],e[13]+e[5],e[12]+e[4],e[11]+e[3],e[10]+e[2],e[9]+e[1],e[8]+e[0],t[15]+t[7],t[14]+t[6],t[13]+t[5],t[12]+t[4],t[11]+t[3],t[10]+t[2],t[9]+t[1],t[8]+t[0]),o=[];return o[0]=65535&(n=8388608+r[0]+38*(a[8]-i[8]-r[8]+i[0]-128)),o[1]=65535&(n=8388480+(n>>>16)+r[1]+38*(a[9]-i[9]-r[9]+i[1])),o[2]=65535&(n=8388480+(n>>>16)+r[2]+38*(a[10]-i[10]-r[10]+i[2])),o[3]=65535&(n=8388480+(n>>>16)+r[3]+38*(a[11]-i[11]-r[11]+i[3])),o[4]=65535&(n=8388480+(n>>>16)+r[4]+38*(a[12]-i[12]-r[12]+i[4])),o[5]=65535&(n=8388480+(n>>>16)+r[5]+38*(a[13]-i[13]-r[13]+i[5])),o[6]=65535&(n=8388480+(n>>>16)+r[6]+38*(a[14]-i[14]-r[14]+i[6])),o[7]=65535&(n=8388480+(n>>>16)+r[7]+38*(a[15]-i[15]-r[15]+i[7])),o[8]=65535&(n=8388480+(n>>>16)+r[8]+a[0]-i[0]-r[0]+38*i[8]),o[9]=65535&(n=8388480+(n>>>16)+r[9]+a[1]-i[1]-r[1]+38*i[9]),o[10]=65535&(n=8388480+(n>>>16)+r[10]+a[2]-i[2]-r[2]+38*i[10]),o[11]=65535&(n=8388480+(n>>>16)+r[11]+a[3]-i[3]-r[3]+38*i[11]),o[12]=65535&(n=8388480+(n>>>16)+r[12]+a[4]-i[4]-r[4]+38*i[12]),o[13]=65535&(n=8388480+(n>>>16)+r[13]+a[5]-i[5]-r[5]+38*i[13]),o[14]=65535&(n=8388480+(n>>>16)+r[14]+a[6]-i[6]-r[6]+38*i[14]),o[15]=8388480+(n>>>16)+r[15]+a[7]-i[7]-r[7]+38*i[15],m(o),o}function m(e){var t=e.slice(0),n=[e,t],i=e[15],r=n[i<32768&1];r[15]=32767&i,i=19*(0|i/32768),r[0]=65535&(i+=r[0]),i>>>=16,r[1]=65535&(i+=r[1]),i>>>=16,r[2]=65535&(i+=r[2]),i>>>=16,r[3]=65535&(i+=r[3]),i>>>=16,r[4]=65535&(i+=r[4]),i>>>=16,r[5]=65535&(i+=r[5]),i>>>=16,r[6]=65535&(i+=r[6]),i>>>=16,r[7]=65535&(i+=r[7]),i>>>=16,r[8]=65535&(i+=r[8]),i>>>=16,r[9]=65535&(i+=r[9]),i>>>=16,r[10]=65535&(i+=r[10]),i>>>=16,r[11]=65535&(i+=r[11]),i>>>=16,r[12]=65535&(i+=r[12]),i>>>=16,r[13]=65535&(i+=r[13]),i>>>=16,r[14]=65535&(i+=r[14]),i>>>=16,r[15]+=i}function g(e,t){var n,i=[];return i[0]=65535&(n=19*((0|e[15]>>>15)+(0|t[15]>>>15))+e[0]+t[0]),i[1]=65535&(n=(n>>>16)+e[1]+t[1]),i[2]=65535&(n=(n>>>16)+e[2]+t[2]),i[3]=65535&(n=(n>>>16)+e[3]+t[3]),i[4]=65535&(n=(n>>>16)+e[4]+t[4]),i[5]=65535&(n=(n>>>16)+e[5]+t[5]),i[6]=65535&(n=(n>>>16)+e[6]+t[6]),i[7]=65535&(n=(n>>>16)+e[7]+t[7]),i[8]=65535&(n=(n>>>16)+e[8]+t[8]),i[9]=65535&(n=(n>>>16)+e[9]+t[9]),i[10]=65535&(n=(n>>>16)+e[10]+t[10]),i[11]=65535&(n=(n>>>16)+e[11]+t[11]),i[12]=65535&(n=(n>>>16)+e[12]+t[12]),i[13]=65535&(n=(n>>>16)+e[13]+t[13]),i[14]=65535&(n=(n>>>16)+e[14]+t[14]),i[15]=(n>>>16)+(32767&e[15])+(32767&t[15]),i}function b(e,t){var n,i=[];return i[0]=65535&(n=524288+19*((0|e[15]>>>15)-(0|t[15]>>>15)-1)+e[0]-t[0]),i[1]=65535&(n=(n>>>16)+524280+e[1]-t[1]),i[2]=65535&(n=(n>>>16)+524280+e[2]-t[2]),i[3]=65535&(n=(n>>>16)+524280+e[3]-t[3]),i[4]=65535&(n=(n>>>16)+524280+e[4]-t[4]),i[5]=65535&(n=(n>>>16)+524280+e[5]-t[5]),i[6]=65535&(n=(n>>>16)+524280+e[6]-t[6]),i[7]=65535&(n=(n>>>16)+524280+e[7]-t[7]),i[8]=65535&(n=(n>>>16)+524280+e[8]-t[8]),i[9]=65535&(n=(n>>>16)+524280+e[9]-t[9]),i[10]=65535&(n=(n>>>16)+524280+e[10]-t[10]),i[11]=65535&(n=(n>>>16)+524280+e[11]-t[11]),i[12]=65535&(n=(n>>>16)+524280+e[12]-t[12]),i[13]=65535&(n=(n>>>16)+524280+e[13]-t[13]),i[14]=65535&(n=(n>>>16)+524280+e[14]-t[14]),i[15]=(n>>>16)+32760+(32767&e[15])-(32767&t[15]),i}function v(e){for(var t=e,n=250;--n;)e=f(e),e=d(e,t);return e=f(e),e=f(e),e=d(e,t),e=f(e),e=f(e),e=d(e,t),e=f(e),e=d(e,t)}function y(e){var t,n=121665,i=[];return i[0]=65535&(t=e[0]*n),i[1]=65535&(t=(0|t/65536)+e[1]*n),i[2]=65535&(t=(0|t/65536)+e[2]*n),i[3]=65535&(t=(0|t/65536)+e[3]*n),i[4]=65535&(t=(0|t/65536)+e[4]*n),i[5]=65535&(t=(0|t/65536)+e[5]*n),i[6]=65535&(t=(0|t/65536)+e[6]*n),i[7]=65535&(t=(0|t/65536)+e[7]*n),i[8]=65535&(t=(0|t/65536)+e[8]*n),i[9]=65535&(t=(0|t/65536)+e[9]*n),i[10]=65535&(t=(0|t/65536)+e[10]*n),i[11]=65535&(t=(0|t/65536)+e[11]*n),i[12]=65535&(t=(0|t/65536)+e[12]*n),i[13]=65535&(t=(0|t/65536)+e[13]*n),i[14]=65535&(t=(0|t/65536)+e[14]*n),i[15]=(0|t/65536)+e[15]*n,m(i),i}function w(e,t){var n,i,r,a,o;return r=f(g(e,t)),a=f(b(e,t)),o=b(r,a),n=d(a,r),i=d(g(y(o),r),o),[n,i]}function x(e,t,n,i,r){var a,o,s,c;return s=d(b(e,t),g(n,i)),c=d(g(e,t),b(n,i)),a=f(g(s,c)),o=d(f(b(s,c)),r),[a,o]}function k(e){var t=_.randomBytes(32);e===!0&&(t[0]&=248,t[31]=127&t[31]|64);for(var n=[],i=0;i=0;){var c,u,p=s.getbit(e,a);c=s.sum(o[0][0],o[0][1],o[1][0],o[1][1],i),u=s.dbl(o[1-p][0],o[1-p][1]),o[1-p]=u,o[p]=c,a--}return r=o[1],r[1]=s.invmodp(r[1]),r[0]=s.mulmodp(r[0],r[1]),s.reduce(r[0]),r[0]}function r(e,t){return t||(t=s.BASE()),e[0]&=65528,e[15]=32767&e[15]|16384,i(e,t)}function a(e){var t=c.hexEncode(e);return t=new Array(65-t.length).join("0")+t,t.split(/(..)/).reverse().join("")}function o(e){var t=e.split(/(..)/).reverse().join("");return c.hexDecode(t)}var s=e("./core"),c=e("./utils"),u={};u.curve25519=r,u.curve25519_raw=i,u.hexEncodeVector=a,u.hexDecodeVector=o,u.hexencode=c.hexEncode,u.hexdecode=c.hexDecode,u.base32encode=c.base32encode,u.base32decode=c.base32decode,t.exports=u},{"./core":414,"./utils":418}],416:[function(e,t,n){(function(n){"use strict";function i(e){var t=new Uint16Array(e);return new n(new Uint8Array(t.buffer))}function r(e){if(n.isBuffer(e)){var t=new Uint8Array(e);return new Uint16Array(t.buffer)}for(var i=new Array(16),r=0,a=0;r>16,0,0,0,0,0,0,0,0,0,0,0,0,0,0];else{if(!(e instanceof i))throw"Bad argument for bignum: "+e;this.n=e.n.slice(0)}else this.n=e}function r(e,t){for(var n=0,i=0;i<16;i++){var r=e[i]>>16-t;e[i]=e[i]<=0;i--){var r=e[i]<<16-t&65535;e[i]=e[i]>>t|n,n=r}return e}function o(e){e=i(e);for(var t=new Array(32),n=31;n>=0;n--)t[n]=255&e.n[0],e.shiftRight(8);return t}function s(e){for(var t=U,n=0;n<32;n++)t.shiftLeft(8),t=t.plus(i(e[n]));return t}function c(e,t){for(var n=F.ONE(),i=0;i<256;i++)1===F.getbit(t,i)&&(n=F.mulmodp(n,e)),e=F.sqrmodp(e);return n}function u(e){return F.reduce(e.n),e.cmp(V)>=0?u(e.minus(V)):e.cmp(U)===-1?u(e.plus(V)):e}function p(e){var t=e[0],n=e[1],i=t.sqr(),r=n.sqr(),a=X.times(i).times(r);return r.minus(i).minus(H).minus(a).modq().equals(U)}function l(e){var t=e.sqr(),n=t.minus(H).divide(H.plus(X.times(t))),i=n.pow(G);return i.times(i).minus(n).equals(U)||(i=i.times(W)),i.isOdd()&&(i=V.minus(i)),i}function f(e,t){var n=e[0],i=e[1],r=e[2],a=e[3],o=t[0],s=t[1],c=t[2],u=t[3],p=i.minus(n).times(s.plus(o)),l=i.plus(n).times(s.minus(o)),f=r.times(K).times(u),h=a.times(K).times(c),d=h.plus(f),m=l.minus(p),g=l.plus(p),b=h.minus(f);return[d.times(m),g.times(b),m.times(g),d.times(b)]}function h(e){var t=e[0],n=e[1],i=e[2],r=t.times(t),a=n.times(n),o=K.times(i).times(i),s=V.minus(r),c=t.plus(n),u=c.times(c).minus(r).minus(a),p=s.plus(a),l=p.minus(o),f=s.minus(a);return[u.times(l),p.times(f),l.times(p),u.times(f)]}function d(e,t){if(t.equals(U))return[U,H,H,U];var n=t.isOdd();t.shiftRight(1);var i=h(d(e,t));return n?f(i,e):i}function m(e){var t=e[0],n=e[1];return[t,n,H,t.times(n)]}function g(e){var t=e[0],n=e[1],i=e[2],r=i.inv();return[t.times(r),n.times(r)]}function b(e,t){return g(d(m(e),t))}function v(e,t){return e[e.length-(t>>>3)-1]>>(7&t)&1}function y(e,t){for(var n=[U,H,H,U],i=(t.length<<3)-1;i>=0;i--)n=h(n),1===v(t,i)&&(n=f(n,e));return n}function w(e,t){return g(y(m(e),t))}function x(e){return e.bytes(32).reverse()}function k(e){return i(e.slice(0).reverse())}function _(e){var t=x(e[1]);return e[0].isOdd()&&(t[31]|=128),t}function j(e){e=e.slice(0);var t=e[31]>>7;e[31]&=127;var n=k(e),i=l(n);(1&i.n[0])!==t&&(i=V.minus(i));var r=[i,n];if(!p(r))throw"Point is not on curve";return r}function S(e,t){if(void 0!==t)return 256===t?S(R.string2bytes(e)):new N(e,t);if("string"==typeof e)return new N(e,10);if(e instanceof Array||e instanceof Uint8Array||n.isBuffer(e))return new N(e);if("number"==typeof e)return new N(e.toString(),10);throw"Can't convert "+e+" to BigInteger"}function E(e,t){void 0===t&&(t=e.bitLength()+7>>>3);for(var n=new Array(t),i=t-1;i>=0;i--)n[i]=255&e[0],e=e.shiftRight(8);return n}function A(e){var t=P.createHash("sha512").update(e).digest();return E(S(t),64).reverse()}function C(e){var t=P.createHash("sha512").update(e).digest();return q(B,E(S(t),64)).join("")}function T(e){return S([0].concat(A(e)))}function I(e){return i(A(e).slice(32,64))}function O(e){return T(e).mod(J)}function D(e){var t=I(e);return t.n[0]&=65528,t.n[15]&=16383,t.n[15]|=16384,t}function M(e){return _(b(Q,D(e)))}function q(e,t){for(var n=new Array(t.length),i=0;i=0;n--){var i=e[n];t.push(d.substr(i>>>12&15,1)),t.push(d.substr(i>>>8&15,1)),t.push(d.substr(i>>>4&15,1)),t.push(d.substr(15&i,1))}return t.join("")}function r(e){for(var t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],n=e.length-1,i=0;n>=0;n-=4)t[i]=d.indexOf(e.charAt(n))|d.indexOf(e.charAt(n-1))<<4|d.indexOf(e.charAt(n-2))<<8|d.indexOf(e.charAt(n-3))<<12,i++;return t}function a(e){var t,n="";for(t=0;t<255;t+=5)n=m.substr(f.getbit(e,t)+(f.getbit(e,t+1)<<1)+(f.getbit(e,t+2)<<2)+(f.getbit(e,t+3)<<3)+(f.getbit(e,t+4)<<4),1)+n;return n}function o(e){var t=0,n=f.ZERO(),i=e.length;for(t=0;i>0&&t<255;t+=5){i--;var r=g[e.substr(i,1)];f.setbit(n,t,1&r),r>>=1,f.setbit(n,t+1,1&r),r>>=1,f.setbit(n,t+2,1&r),r>>=1,f.setbit(n,t+3,1&r),r>>=1,f.setbit(n,t+4,1&r)}return n}function s(e,t){for(var n=new Array(t.length),i=0;i=0;){var o=t*this[e++]+n[i]+r;r=Math.floor(o/67108864),n[i++]=67108863&o}return r}function a(e,t,n,i,r,a){for(var o=32767&t,s=t>>15;--a>=0;){var c=32767&this[e],u=this[e++]>>15,p=s*c+u*o;c=o*c+((32767&p)<<15)+n[i]+(1073741823&r),r=(c>>>30)+(p>>>15)+s*u+(r>>>30),n[i++]=1073741823&c}return r}function o(e,t,n,i,r,a){for(var o=16383&t,s=t>>14;--a>=0;){var c=16383&this[e],u=this[e++]>>14,p=s*c+u*o;c=o*c+((16383&p)<<14)+n[i]+r,r=(c>>28)+(p>>14)+s*u,n[i++]=268435455&c}return r}function s(e){return gt.charAt(e)}function c(e,t){var n=bt[e.charCodeAt(t)];return null==n?-1:n}function u(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s}function p(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0}function l(e){var t=i();return t.fromInt(e),t}function f(t,n){var i;if(16==n)i=4;else if(8==n)i=3;else if(256==n)i=8;else if(2==n)i=1;else if(32==n)i=5;else{if(4!=n)return void this.fromRadix(t,n);i=2}this.t=0,this.s=0;for(var r=t.length,a=!1,o=0;--r>=0;){var s=8==i?255&t[r]:c(t,r);s<0?"-"==t.charAt(r)&&(a=!0):(a=!1,0==o?this[this.t++]=s:o+i>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==i&&0!=(128&t[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t}function d(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,i=(1<0)for(c>c)>0&&(r=!0,a=s(n));o>=0;)c>(c+=this.DB-t)):(n=this[o]>>(c-=t)&i,c<=0&&(c+=this.DB,--o)),n>0&&(r=!0),r&&(a+=s(n));return r?a:"0"}function m(){var t=i();return e.ZERO.subTo(this,t),t}function g(){return this.s<0?this.negate():this}function b(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(t=n-e.t,0!=t)return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0}function v(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function y(){return this.t<=0?0:this.DB*(this.t-1)+v(this[this.t-1]^this.s&this.DM)}function w(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s}function x(e,t){for(var n=e;n=0;--n)t[n+o+1]=this[n]>>r|s,s=(this[n]&a)<=0;--n)t[n]=0;t[o]=s,t.t=this.t+o+1,t.s=this.s,t.clamp()}function _(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)return void(t.t=0);var i=e%this.DB,r=this.DB-i,a=(1<>i;for(var o=n+1;o>i;i>0&&(t[this.t-n-1]|=(this.s&a)<>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i-=e.s}t.s=i<0?-1:0,i<-1?t[n++]=this.DV+i:i>0&&(t[n++]=i),t.t=n,t.clamp()}function S(t,n){var i=this.abs(),r=t.abs(),a=i.t;for(n.t=a+r.t;--a>=0;)n[a]=0;for(a=0;a=0;)e[n]=0;for(n=0;n=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()}function A(t,n,r){var a=t.abs();if(!(a.t<=0)){var o=this.abs();if(o.t0?(a.lShiftTo(p,s),o.lShiftTo(p,r)):(a.copyTo(s),o.copyTo(r));var l=s.t,f=s[l-1];if(0!=f){var h=f*(1<1?s[l-2]>>this.F2:0),d=this.FV/h,m=(1<=0&&(r[r.t++]=1,r.subTo(w,r)),e.ONE.dlShiftTo(l,w),w.subTo(s,s);s.t=0;){var x=r[--b]==f?this.DM:Math.floor(r[b]*d+(r[b-1]+g)*m);if((r[b]+=s.am(0,x,r,y,0,l))0&&r.rShiftTo(p,r),c<0&&e.ZERO.subTo(r,r)}}}function C(t){var n=i();return this.abs().divRemTo(t,null,n),this.s<0&&n.compareTo(e.ZERO)>0&&t.subTo(n,n),n}function T(e){this.m=e}function I(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e}function O(e){return e}function D(e){e.divRemTo(this.m,null,e)}function M(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function q(e,t){e.squareTo(t),this.reduce(t)}function B(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return t=t*(2-(15&e)*t)&15,t=t*(2-(255&e)*t)&255,t=t*(2-((65535&e)*t&65535))&65535,t=t*(2-e*t%this.DV)%this.DV,t>0?this.DV-t:-t}function z(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<0&&this.m.subTo(n,n),n}function R(e){var t=i();return e.copyTo(t),this.reduce(t),t}function N(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(n=t+this.m.t,e[n]+=this.m.am(0,i,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)}function P(e,t){e.squareTo(t),this.reduce(t)}function L(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function U(){return 0==(this.t>0?1&this[0]:this.s)}function H(t,n){if(t>4294967295||t<1)return e.ONE;var r=i(),a=i(),o=n.convert(this),s=v(t)-1;for(o.copyTo(r);--s>=0;)if(n.sqrTo(r,a),(t&1<0)n.mulTo(a,o,r);else{var c=r;r=a,a=c}return n.revert(r)}function K(e,t){var n;return n=e<256||t.isEven()?new T(t):new z(t),this.exp(e,n)}function V(){var e=i();return this.copyTo(e),e}function G(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24}function W(){return 0==this.t?this.s:this[0]<<16>>16}function J(e){return Math.floor(Math.LN2*this.DB/Math.log(e))}function Z(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1}function $(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=l(n),a=i(),o=i(),s="";for(this.divRemTo(r,a,o);a.signum()>0;)s=(n+o.intValue()).toString(e).substr(1)+s,a.divRemTo(r,a,o);return o.intValue().toString(e)+s}function Q(t,n){this.fromInt(0),null==n&&(n=10);for(var i=this.chunkSize(n),r=Math.pow(n,i),a=!1,o=0,s=0,u=0;u=i&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(n,o)),this.dAddOffset(s,0)),a&&e.ZERO.subTo(this,this)}function Y(t,n,i){if("number"==typeof n)if(t<2)this.fromInt(1);else for(this.fromNumber(t,i),this.testBit(t-1)||this.bitwiseTo(e.ONE.shiftLeft(t-1),se,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(n);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(e.ONE.shiftLeft(t-1),this);else{var r=new Array,a=7&t;r.length=(t>>3)+1,n.nextBytes(r),a>0?r[0]&=(1<0)for(i>i)!=(this.s&this.DM)>>i&&(t[r++]=n|this.s<=0;)i<8?(n=(this[e]&(1<>(i+=this.DB-8)):(n=this[e]>>(i-=8)&255,i<=0&&(i+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==r&&(128&this.s)!=(128&n)&&++r,(r>0||n!=this.s)&&(t[r++]=n);return t}function te(e){return 0==this.compareTo(e)}function ne(e){return this.compareTo(e)<0?this:e}function ie(e){return this.compareTo(e)>0?this:e}function re(e,t,n){var i,r,a=Math.min(e.t,this.t);for(i=0;i>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function be(){for(var e=0;e=this.t?0!=this.s:0!=(this[t]&1<>=this.DB;if(e.t>=this.DB;i+=this.s}else{for(i+=this.s;n>=this.DB;i+=e.s}t.s=i<0?-1:0,i>0?t[n++]=i:i<-1&&(t[n++]=this.DV+i),t.t=n,t.clamp()}function Ee(e){var t=i();return this.addTo(e,t),t}function Ae(e){var t=i();return this.subTo(e,t),t}function Ce(e){var t=i();return this.multiplyTo(e,t),t}function Te(){var e=i();return this.squareTo(e),e}function Ie(e){var t=i();return this.divRemTo(e,t,null),t}function Oe(e){var t=i();return this.divRemTo(e,null,t),t}function De(e){var t=i(),n=i();return this.divRemTo(e,t,n),new Array(t,n)}function Me(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()}function qe(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}}function Be(){}function ze(e){return e}function Fe(e,t,n){e.multiplyTo(t,n)}function Re(e,t){e.squareTo(t)}function Ne(e){return this.exp(e,new Be)}function Pe(e,t,n){var i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;var r;for(r=n.t-this.t;i=0;)n[i]=0;for(i=Math.max(t-this.t,0);i2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=i();return e.copyTo(t),this.reduce(t),t}function Ke(e){return e}function Ve(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)}function Ge(e,t){e.squareTo(t),this.reduce(t)}function Xe(e,t,n){e.multiplyTo(t,n),this.reduce(n)}function We(e,t){var n,r,a=e.bitLength(),o=l(1);if(a<=0)return o;n=a<18?1:a<48?3:a<144?4:a<768?5:6,r=a<8?new T(t):t.isEven()?new Ue(t):new z(t);var s=new Array,c=3,u=n-1,p=(1<1){var f=i();for(r.sqrTo(s[1],f);c<=p;)s[c]=i(),r.mulTo(f,s[c-2],s[c]),c+=2}var h,d,m=e.t-1,g=!0,b=i();for(a=v(e[m])-1;m>=0;){for(a>=u?h=e[m]>>a-u&p:(h=(e[m]&(1<0&&(h|=e[m-1]>>this.DB+a-u)),c=n;0==(1&h);)h>>=1,--c;if((a-=c)<0&&(a+=this.DB,--m),g)s[h].copyTo(o),g=!1;else{for(;c>1;)r.sqrTo(o,b),r.sqrTo(b,o),c-=2;c>0?r.sqrTo(o,b):(d=o,o=b,b=d),r.mulTo(b,s[h],o)}for(;m>=0&&0==(e[m]&1<0&&(t.rShiftTo(a,t),n.rShiftTo(a,n));t.signum()>0;)(r=t.getLowestSetBit())>0&&t.rShiftTo(r,t),(r=n.getLowestSetBit())>0&&n.rShiftTo(r,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return a>0&&n.lShiftTo(a,n),n}function Ze(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(this.t>0)if(0==t)n=this[0]%e;else for(var i=this.t-1;i>=0;--i)n=(t*n+this[i])%e;return n}function $e(t){var n=t.isEven();if(this.isEven()&&n||0==t.signum())return e.ZERO;for(var i=t.clone(),r=this.clone(),a=l(1),o=l(0),s=l(0),c=l(1);0!=i.signum();){for(;i.isEven();)i.rShiftTo(1,i),n?(a.isEven()&&o.isEven()||(a.addTo(this,a),o.subTo(t,o)),a.rShiftTo(1,a)):o.isEven()||o.subTo(t,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),n?(s.isEven()&&c.isEven()||(s.addTo(this,s),c.subTo(t,c)),s.rShiftTo(1,s)):c.isEven()||c.subTo(t,c),c.rShiftTo(1,c);i.compareTo(r)>=0?(i.subTo(r,i),n&&a.subTo(s,a),o.subTo(c,o)):(r.subTo(i,r),n&&s.subTo(a,s),c.subTo(o,c))}return 0!=r.compareTo(e.ONE)?e.ZERO:c.compareTo(t)>=0?c.subtract(t):c.signum()<0?(c.addTo(t,c),c.signum()<0?c.add(t):c):c}function Qe(e){var t,n=this.abs();if(1==n.t&&n[0]<=vt[vt.length-1]){for(t=0;t>1,t>vt.length&&(t=vt.length);for(var o=i(),s=0;s>8&255,xt[kt++]^=e>>16&255,xt[kt++]^=e>>24&255,kt>=Et&&(kt-=Et)}function tt(){et((new Date).getTime())}function nt(){if(null==wt){for(tt(),wt=ct(),wt.init(xt),kt=0;kt>>8,xt[kt++]=255&_t;kt=0,tt()}rt.prototype.nextBytes=it,at.prototype.init=ot,at.prototype.next=st;var Et=256;"undefined"!=typeof n?n=t.exports={BigInteger:e,SecureRandom:rt}:(this.BigInteger=e,this.SecureRandom=rt)}).call(this)},{}],420:[function(e,t,n){!function(t){"use strict";function n(e,t,n,i){e[t]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n,e[t+4]=i>>24&255,e[t+5]=i>>16&255,e[t+6]=i>>8&255,e[t+7]=255&i}function i(e,t,n,i,r){var a,o=0;for(a=0;a>>8)-1}function r(e,t,n,r){return i(e,t,n,r,16)}function a(e,t,n,r){return i(e,t,n,r,32)}function o(e,t,n,i){for(var r,a=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,p=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,y=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,x=a,k=o,_=s,j=c,S=u,E=p,A=l,C=f,T=h,I=d,O=m,D=g,M=b,q=v,B=y,z=w,F=0;F<20;F+=2)r=x+M|0,S^=r<<7|r>>>25,r=S+x|0,T^=r<<9|r>>>23,r=T+S|0,M^=r<<13|r>>>19,r=M+T|0,x^=r<<18|r>>>14,r=E+k|0,I^=r<<7|r>>>25,r=I+E|0,q^=r<<9|r>>>23,r=q+I|0,k^=r<<13|r>>>19,r=k+q|0,E^=r<<18|r>>>14,r=O+A|0,B^=r<<7|r>>>25,r=B+O|0,_^=r<<9|r>>>23,r=_+B|0,A^=r<<13|r>>>19,r=A+_|0,O^=r<<18|r>>>14,r=z+D|0,j^=r<<7|r>>>25,r=j+z|0,C^=r<<9|r>>>23,r=C+j|0,D^=r<<13|r>>>19,r=D+C|0,z^=r<<18|r>>>14,r=x+j|0,k^=r<<7|r>>>25,r=k+x|0,_^=r<<9|r>>>23,r=_+k|0,j^=r<<13|r>>>19,r=j+_|0,x^=r<<18|r>>>14,r=E+S|0,A^=r<<7|r>>>25,r=A+E|0,C^=r<<9|r>>>23,r=C+A|0,S^=r<<13|r>>>19,r=S+C|0,E^=r<<18|r>>>14,r=O+I|0,D^=r<<7|r>>>25,r=D+O|0,T^=r<<9|r>>>23,r=T+D|0,I^=r<<13|r>>>19,r=I+T|0,O^=r<<18|r>>>14,r=z+B|0,M^=r<<7|r>>>25,r=M+z|0,q^=r<<9|r>>>23,r=q+M|0,B^=r<<13|r>>>19,r=B+q|0,z^=r<<18|r>>>14;x=x+a|0,k=k+o|0,_=_+s|0,j=j+c|0,S=S+u|0,E=E+p|0,A=A+l|0,C=C+f|0,T=T+h|0,I=I+d|0,O=O+m|0,D=D+g|0,M=M+b|0,q=q+v|0,B=B+y|0,z=z+w|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=j>>>0&255,e[13]=j>>>8&255,e[14]=j>>>16&255,e[15]=j>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=E>>>0&255,e[21]=E>>>8&255,e[22]=E>>>16&255,e[23]=E>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=C>>>0&255,e[29]=C>>>8&255,e[30]=C>>>16&255,e[31]=C>>>24&255,e[32]=T>>>0&255,e[33]=T>>>8&255,e[34]=T>>>16&255,e[35]=T>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=O>>>0&255,e[41]=O>>>8&255,e[42]=O>>>16&255,e[43]=O>>>24&255,e[44]=D>>>0&255,e[45]=D>>>8&255,e[46]=D>>>16&255,e[47]=D>>>24&255,e[48]=M>>>0&255,e[49]=M>>>8&255,e[50]=M>>>16&255,e[51]=M>>>24&255,e[52]=q>>>0&255,e[53]=q>>>8&255,e[54]=q>>>16&255,e[55]=q>>>24&255,e[56]=B>>>0&255,e[57]=B>>>8&255,e[58]=B>>>16&255,e[59]=B>>>24&255,e[60]=z>>>0&255,e[61]=z>>>8&255,e[62]=z>>>16&255,e[63]=z>>>24&255}function s(e,t,n,i){for(var r,a=255&i[0]|(255&i[1])<<8|(255&i[2])<<16|(255&i[3])<<24,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,c=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,u=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,p=255&i[4]|(255&i[5])<<8|(255&i[6])<<16|(255&i[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&i[8]|(255&i[9])<<8|(255&i[10])<<16|(255&i[11])<<24,g=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,b=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,v=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,y=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,w=255&i[12]|(255&i[13])<<8|(255&i[14])<<16|(255&i[15])<<24,x=a,k=o,_=s,j=c,S=u,E=p,A=l,C=f,T=h,I=d,O=m,D=g,M=b,q=v,B=y,z=w,F=0;F<20;F+=2)r=x+M|0,S^=r<<7|r>>>25,r=S+x|0,T^=r<<9|r>>>23,r=T+S|0,M^=r<<13|r>>>19,r=M+T|0,x^=r<<18|r>>>14,r=E+k|0,I^=r<<7|r>>>25,r=I+E|0,q^=r<<9|r>>>23,r=q+I|0,k^=r<<13|r>>>19,r=k+q|0,E^=r<<18|r>>>14,r=O+A|0,B^=r<<7|r>>>25,r=B+O|0,_^=r<<9|r>>>23,r=_+B|0,A^=r<<13|r>>>19,r=A+_|0,O^=r<<18|r>>>14,r=z+D|0,j^=r<<7|r>>>25,r=j+z|0,C^=r<<9|r>>>23,r=C+j|0,D^=r<<13|r>>>19,r=D+C|0,z^=r<<18|r>>>14,r=x+j|0,k^=r<<7|r>>>25,r=k+x|0,_^=r<<9|r>>>23,r=_+k|0,j^=r<<13|r>>>19,r=j+_|0,x^=r<<18|r>>>14,r=E+S|0,A^=r<<7|r>>>25,r=A+E|0,C^=r<<9|r>>>23,r=C+A|0,S^=r<<13|r>>>19,r=S+C|0,E^=r<<18|r>>>14,r=O+I|0,D^=r<<7|r>>>25,r=D+O|0,T^=r<<9|r>>>23,r=T+D|0,I^=r<<13|r>>>19,r=I+T|0,O^=r<<18|r>>>14,r=z+B|0,M^=r<<7|r>>>25,r=M+z|0,q^=r<<9|r>>>23,r=q+M|0,B^=r<<13|r>>>19,r=B+q|0,z^=r<<18|r>>>14;e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=O>>>0&255,e[9]=O>>>8&255,e[10]=O>>>16&255,e[11]=O>>>24&255,e[12]=z>>>0&255,e[13]=z>>>8&255,e[14]=z>>>16&255,e[15]=z>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255}function c(e,t,n,i){o(e,t,n,i)}function u(e,t,n,i){s(e,t,n,i)}function p(e,t,n,i,r,a,o){var s,u,p=new Uint8Array(16),l=new Uint8Array(64);for(u=0;u<16;u++)p[u]=0;for(u=0;u<8;u++)p[u]=a[u];for(;r>=64;){for(c(l,p,o,fe),u=0;u<64;u++)e[t+u]=n[i+u]^l[u];for(s=1,u=8;u<16;u++)s=s+(255&p[u])|0,p[u]=255&s,s>>>=8;r-=64,t+=64,i+=64}if(r>0)for(c(l,p,o,fe),u=0;u=64;){for(c(u,s,r,fe),o=0;o<64;o++)e[t+o]=u[o];for(a=1,o=8;o<16;o++)a=a+(255&s[o])|0,s[o]=255&a,a>>>=8;n-=64,t+=64}if(n>0)for(c(u,s,r,fe),o=0;o>16&1),a[n-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),r=a[15]>>16&1,a[14]&=65535,w(o,a,1-r)}for(n=0;n<16;n++)e[2*n]=255&o[n],e[2*n+1]=o[n]>>8}function k(e,t){var n=new Uint8Array(32),i=new Uint8Array(32);return x(n,e),x(i,t),a(n,0,i,0)}function _(e){var t=new Uint8Array(32);return x(t,e),1&t[0]}function j(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function S(e,t,n){for(var i=0;i<16;i++)e[i]=t[i]+n[i]}function E(e,t,n){for(var i=0;i<16;i++)e[i]=t[i]-n[i]}function A(e,t,n){var i,r,a=0,o=0,s=0,c=0,u=0,p=0,l=0,f=0,h=0,d=0,m=0,g=0,b=0,v=0,y=0,w=0,x=0,k=0,_=0,j=0,S=0,E=0,A=0,C=0,T=0,I=0,O=0,D=0,M=0,q=0,B=0,z=n[0],F=n[1],R=n[2],N=n[3],P=n[4],L=n[5],U=n[6],H=n[7],K=n[8],V=n[9],G=n[10],X=n[11],W=n[12],J=n[13],Z=n[14],$=n[15];i=t[0],a+=i*z,o+=i*F,s+=i*R,c+=i*N,u+=i*P,p+=i*L,l+=i*U,f+=i*H,h+=i*K,d+=i*V,m+=i*G,g+=i*X,b+=i*W,v+=i*J,y+=i*Z,w+=i*$,i=t[1],o+=i*z,s+=i*F,c+=i*R,u+=i*N,p+=i*P,l+=i*L,f+=i*U,h+=i*H,d+=i*K,m+=i*V,g+=i*G,b+=i*X,v+=i*W,y+=i*J,w+=i*Z,x+=i*$,i=t[2],s+=i*z,c+=i*F,u+=i*R,p+=i*N,l+=i*P,f+=i*L,h+=i*U,d+=i*H,m+=i*K,g+=i*V,b+=i*G,v+=i*X,y+=i*W,w+=i*J,x+=i*Z,k+=i*$,i=t[3],c+=i*z,u+=i*F,p+=i*R,l+=i*N,f+=i*P,h+=i*L,d+=i*U,m+=i*H,g+=i*K,b+=i*V,v+=i*G,y+=i*X,w+=i*W,x+=i*J,k+=i*Z,_+=i*$,i=t[4],u+=i*z,p+=i*F,l+=i*R,f+=i*N,h+=i*P,d+=i*L,m+=i*U,g+=i*H,b+=i*K,v+=i*V,y+=i*G,w+=i*X,x+=i*W,k+=i*J,_+=i*Z,j+=i*$,i=t[5],p+=i*z,l+=i*F,f+=i*R,h+=i*N,d+=i*P,m+=i*L,g+=i*U,b+=i*H,v+=i*K,y+=i*V,w+=i*G,x+=i*X,k+=i*W,_+=i*J,j+=i*Z,S+=i*$,i=t[6],l+=i*z,f+=i*F,h+=i*R,d+=i*N,m+=i*P,g+=i*L,b+=i*U,v+=i*H,y+=i*K,w+=i*V,x+=i*G,k+=i*X,_+=i*W,j+=i*J,S+=i*Z,E+=i*$,i=t[7],f+=i*z,h+=i*F,d+=i*R,m+=i*N,g+=i*P,b+=i*L,v+=i*U,y+=i*H,w+=i*K,x+=i*V,k+=i*G,_+=i*X,j+=i*W,S+=i*J,E+=i*Z,A+=i*$,i=t[8],h+=i*z,d+=i*F,m+=i*R,g+=i*N,b+=i*P,v+=i*L,y+=i*U,w+=i*H,x+=i*K,k+=i*V,_+=i*G,j+=i*X,S+=i*W,E+=i*J,A+=i*Z,C+=i*$,i=t[9],d+=i*z,m+=i*F,g+=i*R,b+=i*N,v+=i*P,y+=i*L,w+=i*U,x+=i*H,k+=i*K,_+=i*V,j+=i*G,S+=i*X,E+=i*W,A+=i*J,C+=i*Z,T+=i*$,i=t[10],m+=i*z,g+=i*F,b+=i*R,v+=i*N,y+=i*P,w+=i*L,x+=i*U,k+=i*H,_+=i*K,j+=i*V,S+=i*G,E+=i*X,A+=i*W,C+=i*J,T+=i*Z,I+=i*$,i=t[11],g+=i*z,b+=i*F,v+=i*R,y+=i*N,w+=i*P,x+=i*L,k+=i*U,_+=i*H,j+=i*K,S+=i*V,E+=i*G,A+=i*X;C+=i*W;T+=i*J,I+=i*Z,O+=i*$,i=t[12],b+=i*z,v+=i*F,y+=i*R,w+=i*N,x+=i*P,k+=i*L,_+=i*U,j+=i*H,S+=i*K,E+=i*V,A+=i*G,C+=i*X,T+=i*W,I+=i*J,O+=i*Z,D+=i*$,i=t[13],v+=i*z,y+=i*F,w+=i*R,x+=i*N,k+=i*P,_+=i*L,j+=i*U,S+=i*H,E+=i*K,A+=i*V,C+=i*G,T+=i*X,I+=i*W,O+=i*J,D+=i*Z,M+=i*$,i=t[14],y+=i*z,w+=i*F,x+=i*R,k+=i*N,_+=i*P,j+=i*L,S+=i*U,E+=i*H,A+=i*K,C+=i*V,T+=i*G,I+=i*X,O+=i*W,D+=i*J,M+=i*Z,q+=i*$,i=t[15],w+=i*z,x+=i*F,k+=i*R,_+=i*N,j+=i*P,S+=i*L,E+=i*U,A+=i*H,C+=i*K,T+=i*V,I+=i*G,O+=i*X,D+=i*W,M+=i*J,q+=i*Z,B+=i*$,a+=38*x,o+=38*k,s+=38*_,c+=38*j,u+=38*S,p+=38*E,l+=38*A,f+=38*C,h+=38*T,d+=38*I,m+=38*O,g+=38*D,b+=38*M,v+=38*q,y+=38*B,r=1,i=a+r+65535,r=Math.floor(i/65536),a=i-65536*r,i=o+r+65535,r=Math.floor(i/65536),o=i-65536*r,i=s+r+65535,r=Math.floor(i/65536),s=i-65536*r,i=c+r+65535,r=Math.floor(i/65536),c=i-65536*r,i=u+r+65535,r=Math.floor(i/65536),u=i-65536*r,i=p+r+65535,r=Math.floor(i/65536),p=i-65536*r,i=l+r+65535,r=Math.floor(i/65536),l=i-65536*r,i=f+r+65535,r=Math.floor(i/65536),f=i-65536*r,i=h+r+65535,r=Math.floor(i/65536),h=i-65536*r,i=d+r+65535,r=Math.floor(i/65536),d=i-65536*r,i=m+r+65535,r=Math.floor(i/65536),m=i-65536*r,i=g+r+65535,r=Math.floor(i/65536),g=i-65536*r,i=b+r+65535,r=Math.floor(i/65536),b=i-65536*r,i=v+r+65535,r=Math.floor(i/65536),v=i-65536*r,i=y+r+65535,r=Math.floor(i/65536),y=i-65536*r,i=w+r+65535,r=Math.floor(i/65536),w=i-65536*r,a+=r-1+37*(r-1),r=1,i=a+r+65535,r=Math.floor(i/65536),a=i-65536*r,i=o+r+65535,r=Math.floor(i/65536),o=i-65536*r,i=s+r+65535,r=Math.floor(i/65536),s=i-65536*r,i=c+r+65535,r=Math.floor(i/65536),c=i-65536*r,i=u+r+65535,r=Math.floor(i/65536),u=i-65536*r,i=p+r+65535,r=Math.floor(i/65536),p=i-65536*r,i=l+r+65535,r=Math.floor(i/65536),l=i-65536*r,i=f+r+65535,r=Math.floor(i/65536),f=i-65536*r,i=h+r+65535,r=Math.floor(i/65536),h=i-65536*r,i=d+r+65535,r=Math.floor(i/65536),d=i-65536*r,i=m+r+65535,r=Math.floor(i/65536),m=i-65536*r,i=g+r+65535,r=Math.floor(i/65536),g=i-65536*r,i=b+r+65535,r=Math.floor(i/65536),b=i-65536*r,i=v+r+65535,r=Math.floor(i/65536),v=i-65536*r,i=y+r+65535,r=Math.floor(i/65536),y=i-65536*r,i=w+r+65535,r=Math.floor(i/65536),w=i-65536*r,a+=r-1+37*(r-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=p,e[6]=l,e[7]=f,e[8]=h,e[9]=d,e[10]=m,e[11]=g,e[12]=b,e[13]=v;e[14]=y;e[15]=w}function C(e,t){A(e,t,t)}function T(e,t){var n,i=ee();for(n=0;n<16;n++)i[n]=t[n];for(n=253;n>=0;n--)C(i,i),2!==n&&4!==n&&A(i,i,t);for(n=0;n<16;n++)e[n]=i[n]}function I(e,t){var n,i=ee();for(n=0;n<16;n++)i[n]=t[n];for(n=250;n>=0;n--)C(i,i),1!==n&&A(i,i,t);for(n=0;n<16;n++)e[n]=i[n]}function O(e,t,n){var i,r,a=new Uint8Array(32),o=new Float64Array(80),s=ee(),c=ee(),u=ee(),p=ee(),l=ee(),f=ee();for(r=0;r<31;r++)a[r]=t[r];for(a[31]=127&t[31]|64,a[0]&=248,j(o,n),r=0;r<16;r++)c[r]=o[r],p[r]=s[r]=u[r]=0;for(s[0]=p[0]=1,r=254;r>=0;--r)i=a[r>>>3]>>>(7&r)&1,w(s,c,i),w(u,p,i),S(l,s,u),E(s,s,u),S(u,c,p),E(c,c,p),C(p,l),C(f,s),A(s,u,s),A(u,c,l),S(l,s,u),E(s,s,u),C(c,s),E(u,p,f),A(s,u,oe),S(s,s,p),A(u,u,s),A(s,p,f),A(p,c,o),C(c,l),w(s,c,i),w(u,p,i);for(r=0;r<16;r++)o[r+16]=s[r],o[r+32]=u[r],o[r+48]=c[r],o[r+64]=p[r];var h=o.subarray(32),d=o.subarray(16);return T(h,h),A(d,d,h),x(e,d),0}function D(e,t){return O(e,t,ie)}function M(e,t){return te(t,32),D(e,t)}function q(e,t,n){var i=new Uint8Array(32);return O(i,n,t),u(e,ne,i,fe)}function B(e,t,n,i,r,a){var o=new Uint8Array(32);return q(o,r,a),de(e,t,n,i,o)}function z(e,t,n,i,r,a){var o=new Uint8Array(32);return q(o,r,a),me(e,t,n,i,o)}function F(e,t,n,i){for(var r,a,o,s,c,u,p,l,f,h,d,m,g,b,v,y,w,x,k,_,j,S,E,A,C,T,I=new Int32Array(16),O=new Int32Array(16),D=e[0],M=e[1],q=e[2],B=e[3],z=e[4],F=e[5],R=e[6],N=e[7],P=t[0],L=t[1],U=t[2],H=t[3],K=t[4],V=t[5],G=t[6],X=t[7],W=0;i>=128;){for(k=0;k<16;k++)_=8*k+W,I[k]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],O[k]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(k=0;k<80;k++)if(r=D,a=M,o=q,s=B,c=z,u=F,p=R,l=N,f=P,h=L,d=U,m=H,g=K,b=V,v=G,y=X,j=N,S=X,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=(z>>>14|K<<18)^(z>>>18|K<<14)^(K>>>9|z<<23),S=(K>>>14|z<<18)^(K>>>18|z<<14)^(z>>>9|K<<23),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=z&F^~z&R,S=K&V^~K&G,E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=ge[2*k],S=ge[2*k+1],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=I[k%16],S=O[k%16],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,w=65535&C|T<<16,x=65535&E|A<<16,j=w,S=x,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=(D>>>28|P<<4)^(P>>>2|D<<30)^(P>>>7|D<<25),S=(P>>>28|D<<4)^(D>>>2|P<<30)^(D>>>7|P<<25),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=D&M^D&q^M&q,S=P&L^P&U^L&U,E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,l=65535&C|T<<16,y=65535&E|A<<16,j=s,S=m,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=w,S=x,E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,s=65535&C|T<<16,m=65535&E|A<<16,M=r,q=a,B=o,z=s,F=c,R=u,N=p,D=l,L=f,U=h,H=d,K=m,V=g,G=b,X=v,P=y,k%16===15)for(_=0;_<16;_++)j=I[_],S=O[_],E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=I[(_+9)%16],S=O[(_+9)%16],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,w=I[(_+1)%16],x=O[(_+1)%16],j=(w>>>1|x<<31)^(w>>>8|x<<24)^w>>>7,S=(x>>>1|w<<31)^(x>>>8|w<<24)^(x>>>7|w<<25),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,w=I[(_+14)%16],x=O[(_+14)%16],j=(w>>>19|x<<13)^(x>>>29|w<<3)^w>>>6,S=(x>>>19|w<<13)^(w>>>29|x<<3)^(x>>>6|w<<26),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,I[_]=65535&C|T<<16,O[_]=65535&E|A<<16;j=D,S=P,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[0],S=t[0],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[0]=D=65535&C|T<<16,t[0]=P=65535&E|A<<16,j=M,S=L,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[1],S=t[1],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[1]=M=65535&C|T<<16,t[1]=L=65535&E|A<<16,j=q,S=U,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[2],S=t[2],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[2]=q=65535&C|T<<16,t[2]=U=65535&E|A<<16,j=B,S=H,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[3],S=t[3],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[3]=B=65535&C|T<<16,t[3]=H=65535&E|A<<16,j=z,S=K,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[4],S=t[4],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[4]=z=65535&C|T<<16,t[4]=K=65535&E|A<<16,j=F,S=V,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[5],S=t[5],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[5]=F=65535&C|T<<16,t[5]=V=65535&E|A<<16,j=R,S=G,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[6],S=t[6],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[6]=R=65535&C|T<<16,t[6]=G=65535&E|A<<16,j=N,S=X,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[7],S=t[7],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[7]=N=65535&C|T<<16,t[7]=X=65535&E|A<<16,W+=128,i-=128}return i}function R(e,t,i){var r,a=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),c=i;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,F(a,o,t,i),i%=128,r=0;r=0;--r)i=n[r/8|0]>>(7&r)&1,P(e,t,i),N(t,e),N(e,e),P(e,t,i)}function H(e,t){var n=[ee(),ee(),ee(),ee()];v(n[0],ue),v(n[1],pe),v(n[2],ae),A(n[3],ue,pe),U(e,n,t)}function K(e,t,n){var i,r=new Uint8Array(64),a=[ee(),ee(),ee(),ee()];for(n||te(t,32),R(r,t,32),r[0]&=248,r[31]&=127,r[31]|=64,H(a,r),L(e,a),i=0;i<32;i++)t[i+32]=e[i];return 0}function V(e,t){var n,i,r,a;for(i=63;i>=32;--i){for(n=0,r=i-32,a=i-12;r>8,t[r]-=256*n;t[r]+=n,t[i]=0}for(n=0,r=0;r<32;r++)t[r]+=n-(t[31]>>4)*be[r],n=t[r]>>8,t[r]&=255;for(r=0;r<32;r++)t[r]-=n*be[r];for(i=0;i<32;i++)t[i+1]+=t[i]>>8,e[i]=255&t[i]}function G(e){var t,n=new Float64Array(64);for(t=0;t<64;t++)n[t]=e[t];for(t=0;t<64;t++)e[t]=0;V(e,n)}function X(e,t,n,i){var r,a,o=new Uint8Array(64),s=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),p=[ee(),ee(),ee(),ee()];R(o,i,32),o[0]&=248,o[31]&=127,o[31]|=64;var l=n+64;for(r=0;r>7&&E(e[0],re,e[0]),A(e[3],e[0],e[1]),0)}function J(e,t,n,i){var r,o,s=new Uint8Array(32),c=new Uint8Array(64),u=[ee(),ee(),ee(),ee()],p=[ee(),ee(),ee(),ee()];if(o=-1,n<64)return-1;if(W(p,i))return-1;for(r=0;r>>13|n<<3),i=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(n>>>10|i<<6),r=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(i>>>7|r<<9),a=255&e[8]|(255&e[9])<<8,this.r[4]=255&(r>>>4|a<<12),this.r[5]=a>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(a>>>14|o<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};he.prototype.blocks=function(e,t,n){for(var i,r,a,o,s,c,u,p,l,f,h,d,m,g,b,v,y,w,x,k=this.fin?0:2048,_=this.h[0],j=this.h[1],S=this.h[2],E=this.h[3],A=this.h[4],C=this.h[5],T=this.h[6],I=this.h[7],O=this.h[8],D=this.h[9],M=this.r[0],q=this.r[1],B=this.r[2],z=this.r[3],F=this.r[4],R=this.r[5],N=this.r[6],P=this.r[7],L=this.r[8],U=this.r[9];n>=16;)i=255&e[t+0]|(255&e[t+1])<<8,_+=8191&i,r=255&e[t+2]|(255&e[t+3])<<8,j+=8191&(i>>>13|r<<3),a=255&e[t+4]|(255&e[t+5])<<8,S+=8191&(r>>>10|a<<6),o=255&e[t+6]|(255&e[t+7])<<8,E+=8191&(a>>>7|o<<9),s=255&e[t+8]|(255&e[t+9])<<8,A+=8191&(o>>>4|s<<12),C+=s>>>1&8191,c=255&e[t+10]|(255&e[t+11])<<8,T+=8191&(s>>>14|c<<2),u=255&e[t+12]|(255&e[t+13])<<8,I+=8191&(c>>>11|u<<5),p=255&e[t+14]|(255&e[t+15])<<8,O+=8191&(u>>>8|p<<8),D+=p>>>5|k,l=0,f=l,f+=_*M,f+=j*(5*U),f+=S*(5*L),f+=E*(5*P),f+=A*(5*N),l=f>>>13,f&=8191,f+=C*(5*R),f+=T*(5*F),f+=I*(5*z),f+=O*(5*B),f+=D*(5*q),l+=f>>>13,f&=8191,h=l,h+=_*q,h+=j*M,h+=S*(5*U),h+=E*(5*L),h+=A*(5*P),l=h>>>13,h&=8191,h+=C*(5*N),h+=T*(5*R),h+=I*(5*F),h+=O*(5*z),h+=D*(5*B),l+=h>>>13,h&=8191,d=l,d+=_*B,d+=j*q,d+=S*M,d+=E*(5*U),d+=A*(5*L),l=d>>>13,d&=8191,d+=C*(5*P),d+=T*(5*N),d+=I*(5*R),d+=O*(5*F),d+=D*(5*z),l+=d>>>13,d&=8191,m=l,m+=_*z,m+=j*B,m+=S*q,m+=E*M,m+=A*(5*U),l=m>>>13,m&=8191,m+=C*(5*L),m+=T*(5*P),m+=I*(5*N),m+=O*(5*R),m+=D*(5*F),l+=m>>>13,m&=8191,g=l,g+=_*F,g+=j*z,g+=S*B,g+=E*q,g+=A*M,l=g>>>13,g&=8191,g+=C*(5*U),g+=T*(5*L),g+=I*(5*P),g+=O*(5*N),g+=D*(5*R),l+=g>>>13,g&=8191,b=l,b+=_*R,b+=j*F,b+=S*z,b+=E*B,b+=A*q,l=b>>>13,b&=8191,b+=C*M,b+=T*(5*U),b+=I*(5*L),b+=O*(5*P),b+=D*(5*N),l+=b>>>13,b&=8191,v=l,v+=_*N,v+=j*R,v+=S*F,v+=E*z,v+=A*B,l=v>>>13,v&=8191,v+=C*q,v+=T*M,v+=I*(5*U),v+=O*(5*L),v+=D*(5*P),l+=v>>>13,v&=8191,y=l,y+=_*P,y+=j*N,y+=S*R,y+=E*F,y+=A*z,l=y>>>13,y&=8191,y+=C*B,y+=T*q,y+=I*M,y+=O*(5*U),y+=D*(5*L),l+=y>>>13,y&=8191,w=l,w+=_*L,w+=j*P,w+=S*N,w+=E*R,w+=A*F,l=w>>>13,w&=8191,w+=C*z,w+=T*B,w+=I*q,w+=O*M,w+=D*(5*U),l+=w>>>13,w&=8191,x=l,x+=_*U,x+=j*L,x+=S*P,x+=E*N,x+=A*R,l=x>>>13,x&=8191,x+=C*F,x+=T*z,x+=I*B,x+=O*q,x+=D*M,l+=x>>>13,x&=8191,l=(l<<2)+l|0,l=l+f|0,f=8191&l,l>>>=13,h+=l,_=f,j=h,S=d,E=m,A=g,C=b,T=v,I=y,O=w,D=x,t+=16,n-=16;this.h[0]=_,this.h[1]=j,this.h[2]=S,this.h[3]=E,this.h[4]=A,this.h[5]=C,this.h[6]=T,this.h[7]=I,this.h[8]=O,this.h[9]=D},he.prototype.finish=function(e,t){var n,i,r,a,o=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=n,n=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,o[0]=this.h[0]+5,n=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this.h[a]+n,n=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,i=(1^n)-1,a=0;a<10;a++)o[a]&=i;for(i=~i,a=0;a<10;a++)this.h[a]=this.h[a]&i|o[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),r=this.h[0]+this.pad[0],this.h[0]=65535&r,a=1;a<8;a++)r=(this.h[a]+this.pad[a]|0)+(r>>>16)|0,this.h[a]=65535&r;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},he.prototype.update=function(e,t,n){var i,r;if(this.leftover){for(r=16-this.leftover,r>n&&(r=n),i=0;i=16&&(r=n-n%16,this.blocks(e,t,r),t+=r,n-=r),n){for(i=0;i=0},t.sign.keyPair=function(){var e=new Uint8Array(Oe),t=new Uint8Array(De);return K(e,t),{publicKey:e,secretKey:t}},t.sign.keyPair.fromSecretKey=function(e){if(Q(e),e.length!==De)throw new Error("bad secret key size");for(var t=new Uint8Array(Oe),n=0;n0){var o=n.indexOf(this);~o?n.splice(o+1):n.push(this),~o?i.splice(o,1/0,r):i.push(r),~n.indexOf(a)&&(a=t.call(this,r,a))}else n.push(a);return null==e?a:e.call(this,r,a)}}n=t.exports=i,n.getSerialize=r},{}],424:[function(e,t,n){"use strict";function i(e){if(!e||"string"!=typeof e)return!1;var t=p.exec(e),n=t&&c[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!l.test(t[1]))&&"UTF-8"}function r(e){if(!e||"string"!=typeof e)return!1;var t=e.indexOf("/")===-1?n.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var i=n.charset(t);i&&(t+="; charset="+i.toLowerCase())}return t}function a(e){if(!e||"string"!=typeof e)return!1;var t=p.exec(e),i=t&&n.extensions[t[1].toLowerCase()];return!(!i||!i.length)&&i[0]}function o(e){if(!e||"string"!=typeof e)return!1;var t=u("x."+e).toLowerCase().substr(1);return!!t&&(n.types[t]||!1)}function s(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(c).forEach(function(i){var r=c[i],a=r.extensions;if(a&&a.length){e[i]=a;for(var o=0;op||u===p&&"application/"===t[s].substr(0,12))continue}t[s]=i}}})}var c=e("mime-db"),u=e("path").extname,p=/^\s*([^;\s]*)(?:;|\s|$)/,l=/^text\//i;n.charset=i,n.charsets={lookup:i},n.contentType=r,n.extension=a,n.extensions=Object.create(null),n.lookup=o,n.types=Object.create(null),s(n.extensions,n.types)},{"mime-db":426,path:218}],425:[function(e,t,n){t.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana"},"application/3gpp-ims+xml":{source:"iana"},"application/a2l":{source:"iana"},"application/activemessage":{source:"iana"},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana"},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",extensions:["atomsvc"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana"},"application/bacnet-xdd+zip":{source:"iana"},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana"},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana"},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/cbor":{source:"iana"},"application/ccmp+xml":{source:"iana"},"application/ccxml+xml":{source:"iana",extensions:["ccxml"]},"application/cdfx+xml":{source:"iana"},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana"},"application/cellml+xml":{source:"iana"},"application/cfw":{source:"iana"},"application/clue_info+xml":{source:"iana"},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana"},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana"},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana"},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana"},"application/cstadata+xml":{source:"iana"},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",extensions:["mpd"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana"},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana"},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/docbook+xml":{source:"apache",extensions:["dbk"]},"application/dskpp+xml":{source:"iana"},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/emergencycalldata.comment+xml":{source:"iana"},"application/emergencycalldata.deviceinfo+xml":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana"},"application/emergencycalldata.serviceinfo+xml":{source:"iana"},"application/emergencycalldata.subscriberinfo+xml":{source:"iana"},"application/emma+xml":{source:"iana",extensions:["emma"]},"application/emotionml+xml":{source:"iana"},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana"},"application/epub+zip":{source:"iana",extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana"},"application/fits":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1,extensions:["woff"]},"application/font-woff2":{compressible:!1,extensions:["woff2"]},"application/framework-attributes+xml":{source:"iana"},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/gml+xml":{source:"iana",extensions:["gml"]},"application/gpx+xml":{source:"apache",extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1},"application/h224":{source:"iana"},"application/held+xml":{source:"iana"},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana"},"application/ibe-pkg-reply+xml":{source:"iana"},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana"},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana"},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js"]},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana"},"application/kpml-response+xml":{source:"iana"},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana"},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana"},"application/lost+xml":{source:"iana",extensions:["lostxml"]},"application/lostsync+xml":{source:"iana"},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",extensions:["mads"]},"application/manifest+json":{charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",extensions:["mathml"]},"application/mathml-content+xml":{source:"iana"},"application/mathml-presentation+xml":{source:"iana"},"application/mbms-associated-procedure-description+xml":{source:"iana"},"application/mbms-deregister+xml":{source:"iana"},"application/mbms-envelope+xml":{source:"iana"},"application/mbms-msk+xml":{source:"iana"},"application/mbms-msk-response+xml":{source:"iana"},"application/mbms-protection-description+xml":{source:"iana"},"application/mbms-reception-report+xml":{source:"iana"},"application/mbms-register+xml":{source:"iana"},"application/mbms-register-response+xml":{source:"iana"},"application/mbms-schedule+xml":{source:"iana"},"application/mbms-user-service-description+xml":{source:"iana"},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana"},"application/media_control+xml":{source:"iana"},"application/mediaservercontrol+xml":{source:"iana",extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",extensions:["metalink"]},"application/metalink4+xml":{source:"iana",extensions:["meta4"]},"application/mets+xml":{source:"iana",extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mods+xml":{source:"iana",extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana"},"application/mrb-publish+xml":{source:"iana"},"application/msc-ivr+xml":{source:"iana"},"application/msc-mixer+xml":{source:"iana"},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/mxf":{source:"iana",extensions:["mxf"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana"},"application/news-groupinfo":{source:"iana"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana"},"application/nss":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p2p-overlay+xml":{source:"iana"},"application/parityfec":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana"},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana"},"application/pidf-diff+xml":{source:"iana"},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",extensions:["pls"]},"application/poc-settings+xml":{source:"iana"},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana"},"application/provenance+xml":{source:"iana"},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.hpub+zip":{source:"iana"},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana"},"application/pskc+xml":{source:"iana",extensions:["pskcxml"]},"application/qsig":{source:"iana"},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf"]},"application/reginfo+xml":{source:"iana",extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",extensions:["rld"]},"application/rfc+xml":{source:"iana"},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana"},"application/rls-services+xml":{source:"iana",extensions:["rs"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana"},"application/samlmetadata+xml":{source:"iana"},"application/sbml+xml":{source:"iana",extensions:["sbml"]},"application/scaip+xml":{source:"iana"},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/sep+xml":{source:"iana"},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",extensions:["shf"]},"application/sieve":{source:"iana"},"application/simple-filter+xml":{source:"iana"},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",extensions:["srx"]},"application/spirits-event+xml":{source:"iana"},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",extensions:["grxml"]},"application/sru+xml":{source:"iana",extensions:["sru"]},"application/ssdl+xml":{source:"apache",extensions:["ssdl"]},"application/ssml+xml":{source:"iana",extensions:["ssml"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/tei+xml":{source:"iana",extensions:["tei","teicorpus"]},"application/thraud+xml":{source:"iana",extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/trig":{source:"iana"},"application/ttml+xml":{source:"iana"},"application/tve-trigger":{source:"iana"},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana"},"application/urc-ressheet+xml":{source:"iana"},"application/urc-targetdesc+xml":{source:"iana"},"application/urc-uisocketdesc+xml":{source:"iana"},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana"},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.3gpp-prose+xml":{source:"iana"},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana"},"application/vnd.3gpp.bsf+xml":{source:"iana"},"application/vnd.3gpp.mid-call+xml":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana"},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana"},"application/vnd.3gpp.srvcc-info+xml":{source:"iana"},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana"},"application/vnd.3gpp.ussd+xml":{source:"iana"},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana"},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",extensions:["mpkg"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avistar+xml":{source:"iana"},"application/vnd.balsamiq.bmml+xml":{source:"iana"},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.biopax.rdf+xml":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana"},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"] },"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",extensions:["wbs"]},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana"},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana"},"application/vnd.cybank":{source:"iana"},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume-movie":{source:"iana"},"application/vnd.desmume.movie":{source:"apache"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana"},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana"},"application/vnd.dvb.notif-container+xml":{source:"iana"},"application/vnd.dvb.notif-generic+xml":{source:"iana"},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana"},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana"},"application/vnd.dvb.notif-init+xml":{source:"iana"},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana"},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana"},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana"},"application/vnd.eszigno3+xml":{source:"iana",extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana"},"application/vnd.etsi.asic-e+zip":{source:"iana"},"application/vnd.etsi.asic-s+zip":{source:"iana"},"application/vnd.etsi.cug+xml":{source:"iana"},"application/vnd.etsi.iptvcommand+xml":{source:"iana"},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana"},"application/vnd.etsi.iptvprofile+xml":{source:"iana"},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana"},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana"},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana"},"application/vnd.etsi.iptvservice+xml":{source:"iana"},"application/vnd.etsi.iptvsync+xml":{source:"iana"},"application/vnd.etsi.iptvueprofile+xml":{source:"iana"},"application/vnd.etsi.mcid+xml":{source:"iana"},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana"},"application/vnd.etsi.pstn+xml":{source:"iana"},"application/vnd.etsi.sci+xml":{source:"iana"},"application/vnd.etsi.simservs+xml":{source:"iana"},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana"},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eudora.data":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana"},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana"},"application/vnd.gov.sk.e-form+zip":{source:"iana"},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana"},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana"},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana"},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana"},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana"},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsitem+xml":{source:"iana"},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana"},"application/vnd.iptc.g2.packageitem+xml":{source:"iana"},"application/vnd.iptc.g2.planningitem+xml":{source:"iana"},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las.las+xml":{source:"iana",extensions:["lasxml"]},"application/vnd.liberty-request+xml":{source:"iana"},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",extensions:["lbe"]},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana"},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana"},"application/vnd.marlin.drm.conftoken+xml":{source:"iana"},"application/vnd.marlin.drm.license+xml":{source:"iana"},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana"},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana"},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana"},"application/vnd.ms-printing.printticket+xml":{source:"apache"},"application/vnd.ms-printschematicket+xml":{source:"iana"},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana"},"application/vnd.nokia.iptv.config+xml":{source:"iana"},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana"},"application/vnd.nokia.landmarkcollection+xml":{source:"iana"},"application/vnd.nokia.n-gage.ac+xml":{source:"iana"},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana"},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana"},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana"},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana"},"application/vnd.oipf.dae.xhtml+xml":{source:"iana"},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana"},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana"},"application/vnd.oipf.spdlist+xml":{source:"iana"},"application/vnd.oipf.ueprofile+xml":{source:"iana"},"application/vnd.oipf.userprofile+xml":{source:"iana"},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana"},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.imd+xml":{source:"iana"},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana"},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana"},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana"},"application/vnd.oma.bcast.sprov+xml":{source:"iana"},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana"},"application/vnd.oma.cab-feature-handler+xml":{source:"iana"},"application/vnd.oma.cab-pcc+xml":{source:"iana"},"application/vnd.oma.cab-subs-invite+xml":{source:"iana"},"application/vnd.oma.cab-user-prefs+xml":{source:"iana"},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana"},"application/vnd.oma.group-usage-list+xml":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana"},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana"},"application/vnd.oma.poc.final-report+xml":{source:"iana"},"application/vnd.oma.poc.groups+xml":{source:"iana"},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana"},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana"},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana"},"application/vnd.oma.xcap-directory+xml":{source:"iana"},"application/vnd.omads-email+xml":{source:"iana"},"application/vnd.omads-file+xml":{source:"iana"},"application/vnd.omads-folder+xml":{source:"iana"},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana"},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml-template":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{ source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"apache",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml-template":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"apache",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml-template":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"apache",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana"},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana"},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana"},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana"},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana"},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos+xml":{source:"iana"},"application/vnd.paos.xml":{source:"apache"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana"},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana"},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana"},"application/vnd.radisys.msml+xml":{source:"iana"},"application/vnd.radisys.msml-audit+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana"},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana"},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana"},"application/vnd.radisys.msml-conf+xml":{source:"iana"},"application/vnd.radisys.msml-dialog+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana"},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana"},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana"},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.software602.filler.form+xml":{source:"iana"},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana"},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana"},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana"},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.tmd.mediaflex.api+xml":{source:"iana"},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana"},"application/vnd.wv.ssp+xml":{source:"iana"},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana"},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",extensions:["zaz"]},"application/voicexml+xml":{source:"iana",extensions:["vxml"]},"application/vq-rtcpxr":{source:"iana"},"application/watcherinfo+xml":{source:"iana"},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-otf":{source:"apache",compressible:!0,extensions:["otf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-ttf":{source:"apache",compressible:!0,extensions:["ttf","ttc"]},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"apache",extensions:["der","crt","pem"]},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana"},"application/xaml+xml":{source:"apache",extensions:["xaml"]},"application/xcap-att+xml":{source:"iana"},"application/xcap-caps+xml":{source:"iana"},"application/xcap-diff+xml":{source:"iana",extensions:["xdf"]},"application/xcap-el+xml":{source:"iana"},"application/xcap-error+xml":{source:"iana"},"application/xcap-ns+xml":{source:"iana"},"application/xcon-conference-info+xml":{source:"iana"},"application/xcon-conference-info-diff+xml":{source:"iana"},"application/xenc+xml":{source:"iana",extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache"},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana"},"application/xmpp+xml":{source:"iana"},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",extensions:["xpl"]},"application/xslt+xml":{source:"iana",extensions:["xslt"]},"application/xspf+xml":{source:"apache",extensions:["xspf"]},"application/xv+xml":{source:"iana",extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana"},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana"},"application/yin+xml":{source:"iana",extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana"},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana"},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]}, -"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tone":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/opentype":{compressible:!0,extensions:["otf"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana"},"image/emf":{source:"iana"},"image/fits":{source:"iana"},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana"},"image/jp2":{source:"iana"},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jpm":{source:"iana"},"image/jpx":{source:"iana"},"image/ktx":{source:"iana",extensions:["ktx"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana"},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana"},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/tiff-fx":{source:"iana"},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana"},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana"},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana"},"image/vnd.valve.source.texture":{source:"iana"},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana"},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana"},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana"},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana"},"message/global-delivery-status":{source:"iana"},"message/global-disposition-notification":{source:"iana"},"message/global-headers":{source:"iana"},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/vnd.collada+xml":{source:"iana",extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana"},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana"},"model/vnd.parasolid.transmit.binary":{source:"iana"},"model/vnd.parasolid.transmit.text":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.valve.source.compiled-map":{source:"iana"},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana"},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana"},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana",compressible:!1},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/css":{source:"iana",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fwdred":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/hjson":{extensions:["hjson"]},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{extensions:["less"]},"text/markdown":{source:"iana"},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/slim":{extensions:["slim","slm"]},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["markdown","md","mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"apache"},"video/3gpp":{source:"apache",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"apache"},"video/3gpp2":{source:"apache",extensions:["3g2"]},"video/bmpeg":{source:"apache"},"video/bt656":{source:"apache"},"video/celb":{source:"apache"},"video/dv":{source:"apache"},"video/encaprtp":{source:"apache"},"video/h261":{source:"apache",extensions:["h261"]},"video/h263":{source:"apache",extensions:["h263"]},"video/h263-1998":{source:"apache"},"video/h263-2000":{source:"apache"},"video/h264":{source:"apache",extensions:["h264"]},"video/h264-rcdo":{source:"apache"},"video/h264-svc":{source:"apache"},"video/h265":{source:"apache"},"video/iso.segment":{source:"apache"},"video/jpeg":{source:"apache",extensions:["jpgv"]},"video/jpeg2000":{source:"apache"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/mj2":{source:"apache",extensions:["mj2","mjp2"]},"video/mp1s":{source:"apache"},"video/mp2p":{source:"apache"},"video/mp2t":{source:"apache",extensions:["ts"]},"video/mp4":{source:"apache",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"apache"},"video/mpeg":{source:"apache",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"apache"},"video/mpv":{source:"apache"},"video/nv":{source:"apache"},"video/ogg":{source:"apache",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"apache"},"video/pointer":{source:"apache"},"video/quicktime":{source:"apache",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"apache"},"video/raw":{source:"apache"},"video/rtp-enc-aescm128":{source:"apache"},"video/rtploopback":{source:"apache"},"video/rtx":{source:"apache"},"video/smpte292m":{source:"apache"},"video/ulpfec":{source:"apache"},"video/vc1":{source:"apache"},"video/vnd.cctv":{source:"apache"},"video/vnd.dece.hd":{source:"apache",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"apache",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"apache"},"video/vnd.dece.pd":{source:"apache",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"apache",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"apache",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"apache"},"video/vnd.directv.mpeg-tts":{source:"apache"},"video/vnd.dlna.mpeg-tts":{source:"apache"},"video/vnd.dvb.file":{source:"apache",extensions:["dvb"]},"video/vnd.fvt":{source:"apache",extensions:["fvt"]},"video/vnd.hns.video":{source:"apache"},"video/vnd.iptvforum.1dparityfec-1010":{source:"apache"},"video/vnd.iptvforum.1dparityfec-2005":{source:"apache"},"video/vnd.iptvforum.2dparityfec-1010":{source:"apache"},"video/vnd.iptvforum.2dparityfec-2005":{source:"apache"},"video/vnd.iptvforum.ttsavc":{source:"apache"},"video/vnd.iptvforum.ttsmpeg2":{source:"apache"},"video/vnd.motorola.video":{source:"apache"},"video/vnd.motorola.videop":{source:"apache"},"video/vnd.mpegurl":{source:"apache",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"apache",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"apache"},"video/vnd.nokia.videovoip":{source:"apache"},"video/vnd.objectvideo":{source:"apache"},"video/vnd.radgamettools.bink":{source:"apache"},"video/vnd.radgamettools.smacker":{source:"apache"},"video/vnd.sealed.mpeg1":{source:"apache"},"video/vnd.sealed.mpeg4":{source:"apache"},"video/vnd.sealed.swf":{source:"apache"},"video/vnd.sealedmedia.softseal.mov":{source:"apache"},"video/vnd.uvvu.mp4":{source:"apache",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"apache",extensions:["viv"]},"video/vp8":{source:"apache"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}},{}],391:[function(e,t,r){t.exports=e("./db.json")},{"./db.json":390}],392:[function(e,t,r){"use strict";function n(e){if(!e||"string"!=typeof e)return!1;var t=l.exec(e),r=t&&c[t[1].toLowerCase()];return r&&r.charset?r.charset:!(!t||!p.test(t[1]))&&"UTF-8"}function i(e){if(!e||"string"!=typeof e)return!1;var t=e.indexOf("/")===-1?r.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=r.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}function a(e){if(!e||"string"!=typeof e)return!1;var t=l.exec(e),n=t&&r.extensions[t[1].toLowerCase()];return!(!n||!n.length)&&n[0]}function o(e){if(!e||"string"!=typeof e)return!1;var t=u("x."+e).toLowerCase().substr(1);return!!t&&(r.types[t]||!1)}function s(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(c).forEach(function(n){var i=c[n],a=i.extensions;if(a&&a.length){e[n]=a;for(var o=0;ol||u===l&&"application/"===t[s].substr(0,12))continue}t[s]=n}}})}var c=e("mime-db"),u=e("path").extname,l=/^\s*([^;\s]*)(?:;|\s|$)/,p=/^text\//i;r.charset=n,r.charsets={lookup:n},r.contentType=i,r.extension=a,r.extensions=Object.create(null),r.lookup=o,r.types=Object.create(null),s(r.extensions,r.types)},{"mime-db":391,path:426}],393:[function(e,t,r){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}t.exports=n,n.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},{}],394:[function(e,t,r){"use strict";function n(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n>8,o=255&i;a?r.push(a,o):r.push(o)}return r}function i(e){return 1===e.length?"0"+e:e}function a(e){for(var t="",r=0;r1e4)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*p;case"days":case"day":case"d":return r*l;case"hours":case"hour":case"hrs":case"hr":case"h":return r*u;case"minutes":case"minute":case"mins":case"min":case"m":return r*c;case"seconds":case"second":case"secs":case"sec":case"s":return r*s;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function i(e){return e>=l?Math.round(e/l)+"d":e>=u?Math.round(e/u)+"h":e>=c?Math.round(e/c)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function a(e){return o(e,l,"day")||o(e,u,"hour")||o(e,c,"minute")||o(e,s,"second")||e+" ms"}function o(e,t,r){if(!(e0)return n(e);if("number"===r&&isNaN(e)===!1)return t.long?a(e):i(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],396:[function(e,t,r){"use strict";var n=e("./lib/Client"),i=e("./lib/sasl"),a=e("node-xmpp-core");t.exports=n,t.exports.Client=n,t.exports.SASL=i,a.exportCoreUtils(t.exports)},{"./lib/Client":397,"./lib/sasl":405,"node-xmpp-core":408}],397:[function(e,t,r){(function(r){"use strict";function n(e){this.options={},e&&(this.options=e),this.availableSaslMechanisms=[v,b,g,m,d],this.options.autostart!==!1&&this.connect()}var i,a,o,s=e("./session"),c=e("node-xmpp-core"),u=c.JID,l=c.Stanza,p=c.Element,f=c.inherits,h=e("./sasl"),d=e("./authentication/anonymous"),m=e("./authentication/plain"),g=e("./authentication/digestmd5"),v=e("./authentication/xoauth2"),b=e("./authentication/external"),y=e("child_process").exec,w=e("debug")("xmpp:client"),x=e("path"),k="jabber:client",_="jabber:iq:register",j="urn:ietf:params:xml:ns:xmpp-sasl",S="urn:ietf:params:xml:ns:xmpp-bind",E="urn:ietf:params:xml:ns:xmpp-session",A=0,C=1,T=2,I=3,P=4,O=5,D="sess",M="bind";if("undefined"==typeof q)var q=null,R=null;"function"==typeof q?i=function(e){return R(e)}:(o=e("buffer").Buffer,i=function(e){return new o(e,"base64").toString("utf8")}),"function"==typeof R?a=function(e){return q(e)}:(o=e("buffer").Buffer,a=function(e){return new o(e,"utf8").toString("base64")}),f(n,s),n.NS_CLIENT=k,n.prototype.connect=function(){return this.options.bosh&&this.options.bosh.prebind?this._connectViaBosh():void this._useStandardConnect()},n.prototype._useStandardConnect=function(){this.options.xmlns=k,delete this.did_bind,delete this.did_session,this.state=A,this.on("end",function(){this.state=A,delete this.did_bind,delete this.did_session}),s.call(this,this.options),this.options.jid=this.jid,this.connection.on("disconnect",function(e){this.state=A,this.connection.reconnect||(e&&this.emit("error",e),this.emit("offline")),delete this.did_bind,delete this.did_session}.bind(this)),this.options.preferred?this.preferredSaslMechanism=this.options.preferred:this.preferredSaslMechanism="DIGEST-MD5";var e=h.detectMechanisms(this.options,this.availableSaslMechanisms);this.availableSaslMechanisms=e},n.prototype._connectViaBosh=function(){w("load bosh prebind");var e=this.options.bosh.prebind;delete this.options.bosh.prebind;var t="node "+x.join(r,"prebind.js")+" "+encodeURI(JSON.stringify(this.options));y(t,function(t,r,n){if(t)e(t,null);else{var i=r.match(/rid:+[ 0-9]*/i),a=r.match(/sid:+[ a-z+'"-_A-Z+0-9]*/i);if(!i||!a)return e(n);if(i=i[0].split(":")[1].trim(),a=a[0].split(":")[1].replace("'","").replace("'","").trim(),i&&a)return e(null,{rid:i,sid:a});e(n)}})},n.prototype.onStanza=function(e){return"stream:error"===e.name?this._handleStreamError(e):this.state!==O&&e.is("features")?(this.streamFeatures=e,this.useFeatures()):void this._handleStanza(e)},n.prototype._handleStanza=function(e){switch(this.state){case O:this.emit("stanza",e);break;case A:this.emit("stanza:preauth",e);break;case C:this._handleAuthState(e);break;case I:e.is("iq")&&e.attrs.id===M&&this._handleBindState(e);break;case P:e.is("iq")===!0&&e.attrs.id===D&&this._handleSessionState(e)}},n.prototype._handleStreamError=function(e){this.reconnect||this.emit("error",e)},n.prototype._handleSessionState=function(e){"result"===e.attrs.type?(this.state=T,this.did_session=!0,this.useFeatures()):this.emit("error","Cannot bind resource")},n.prototype._handleBindState=function(e){if("result"===e.attrs.type){this.state=T,this.did_bind=!0;var t=e.getChild("bind",S);t&&t.getChild("jid")&&(this.jid=new u(t.getChild("jid").getText())),this.useFeatures()}else this.emit("error","Cannot bind resource")},n.prototype._handleAuthState=function(e){if(e.is("challenge",j)){var t=i(e.getText()),r=a(this.mech.challenge(t)),n=new p("response",{xmlns:j}).t(r);this.send(n)}else e.is("success",j)?(this.mech=null,this.state=T,this.emit("auth")):this.emit("error","XMPP authentication failure")},n.prototype._handlePreAuthState=function(){this.state=C;var e=this.streamFeatures.getChild("mechanisms",j).getChildren("mechanism",j).map(function(e){return e.getText()});if(this.mech=h.selectMechanism(e,this.preferredSaslMechanism,this.availableSaslMechanisms),this.mech){this.mech.authzid=this.jid.bare().toString(),this.mech.authcid=this.jid.local,this.mech.password=this.password,this.mech.api_key=this.api_key,this.mech.access_token=this.access_token,this.mech.oauth2_token=this.oauth2_token,this.mech.oauth2_auth=this.oauth2_auth,this.mech.realm=this.jid.domain,this.actAs&&(this.mech.actAs=this.actAs.user),this.mech.digest_uri="xmpp/"+this.jid.domain;var t=a(this.mech.auth()),r=this.mech.authAttrs();r.xmlns=j,r.mechanism=this.mech.name,this.send(new p("auth",r).t(t))}else this.emit("error",new Error("No usable SASL mechanism"))},n.prototype.useFeatures=function(){if(this.state===A&&this.register)delete this.register,this.doRegister();else if(this.state===A&&this.streamFeatures.getChild("mechanisms",j))this._handlePreAuthState();else if(this.state===T&&!this.did_bind&&this.streamFeatures.getChild("bind",S)){this.state=I;var e=new l("iq",{type:"set",id:M}).c("bind",{xmlns:S});this.jid.resource&&e.c("resource").t(this.jid.resource),this.send(e)}else if(this.state===T&&!this.did_session&&this.streamFeatures.getChild("session",E)){this.state=P;var t=new l("iq",{type:"set",to:this.jid.domain,id:D}).c("session",{xmlns:E});this.send(t)}else this.state===T&&(this.state=O,this.emit("online",{jid:this.jid}))},n.prototype.doRegister=function(){var e="register"+Math.ceil(99999*Math.random()),t=new l("iq",{type:"set",id:e,to:this.jid.domain}).c("query",{xmlns:_}).c("username").t(this.jid.local).up().c("password").t(this.password);this.send(t);var r=this,n=function(t){t.is("iq")&&t.attrs.id===e&&(r.removeListener("stanza",n),"result"===t.attrs.type?r.useFeatures():r.emit("error",new Error("Registration error")))};this.on("stanza:preauth",n)},n.prototype.getSaslMechanisms=function(){return this.availableSaslMechanisms},n.prototype.clearSaslMechanism=function(){this.availableSaslMechanisms=[]},n.prototype.registerSaslMechanism=function(e){this.availableSaslMechanisms.indexOf(e)===-1&&this.availableSaslMechanisms.push(e)},n.prototype.unregisterSaslMechanism=function(e){var t=this.availableSaslMechanisms.indexOf(e);t>=0&&(this.availableSaslMechanisms=this.availableSaslMechanisms.splice(t,1))},t.exports=n}).call(this,"/node_modules/node-xmpp-client/lib")},{"./authentication/anonymous":398,"./authentication/digestmd5":399,"./authentication/external":400,"./authentication/plain":402,"./authentication/xoauth2":403,"./sasl":405,"./session":406,buffer:122,child_process:119,debug:139,"node-xmpp-core":408,path:92}],398:[function(e,t,r){"use strict";function n(){}var i=e("./mechanism"),a=e("node-xmpp-core").inherits;a(n,i),n.prototype.name="ANONYMOUS",n.prototype.auth=function(){return this.authzid},n.prototype.match=function(){return!0},t.exports=n},{"./mechanism":401,"node-xmpp-core":408}],399:[function(e,t,r){"use strict";function n(e,t){var r=f.createHash?f.createHash("md5"):new h;return r.update(e,"binary").digest(t||"binary")}function i(e){return n(e,"hex")}function a(e){for(var t={};e;){var r;(r=/^(.+?)=(.*?[^\\]),\s*(.*)/.exec(e))?(t[r[1]]=r[2].replace(/"/g,""),e=r[3]):(r=/^(.+?)=(.+?),\s*(.*)/.exec(e))?(t[r[1]]=r[2],e=r[3]):(r=/^(.+?)="(.*?[^\\])"$/.exec(e))?(t[r[1]]=r[2],e=r[3]):(r=/^(.+?)=(.+?)$/.exec(e))?(t[r[1]]=r[2],e=r[3]):e=null}return t}function o(e){var t="";for(var r in e){var n=e[r];n&&(t+=","+r+'="'+n+'"')}return t.substr(1)}function s(e,t,r){for(;e.length0?(t.emit("connect"),t.processResponse(n),r.nextTick(t.mayRequest.bind(t))):t.emit("error","Invalid parameters"))})}var i=e("events").EventEmitter,a=e("node-xmpp-core"),o=a.inherits,s=a.ltx,c=e("request"),u=e("debug")("xmpp:client:bosh");o(n,i),n.prototype.contentType="text/xml; charset=utf-8",n.prototype.send=function(e){this.queue.push(e.root()),r.nextTick(this.mayRequest.bind(this))},n.prototype.startStream=function(){var e=this;this.rid++,this.request({to:this.jid.domain,"xmpp:restart":"true"},[],function(t,n){t?(e.emit("error",t),e.emit("disconnect"),e.emit("end"),delete e.sid,e.emit("close")):(e.streamOpened=!0,n&&e.processResponse(n),r.nextTick(e.mayRequest.bind(e)))})},n.prototype.processResponse=function(e){if(u("process bosh server response "+e.toString()),e&&e.children)for(var t=0;t0&&this.currentRequests=400)return r(new Error("HTTP status "+o.statusCode));var u;try{u=s.parse(c)}catch(e){return r(e)}u&&"terminate"===u.attrs.type&&u.attrs.condition?r(new Error(u.attrs.condition)):u?r(null,u):r(new Error("no "))}),this.currentRequests++},t.exports=n}).call(this,e("_process"))},{_process:431,debug:139,events:171,"node-xmpp-core":408,request:91}],405:[function(e,t,r){"use strict";function n(e,t,r){var n,i=[],a={};return Array.isArray(r)&&(i=i.concat(r)),i.forEach(function(e){a[e.prototype.name]=e}),a[t]&&e.indexOf(t)>=0&&(n=a[t]),i.forEach(function(t){!n&&e.indexOf(t.prototype.name)>=0&&(n=t)}),n?new n:null}function i(e,t){var r=t||[],n=[];return r.forEach(function(t){var r=t.prototype.match;r(e)&&n.push(t)}),n}var a=e("./authentication/mechanism");r.selectMechanism=n,r.detectMechanisms=i,r.AbstractMechanism=a},{"./authentication/mechanism":401}],406:[function(e,t,r){(function(r){"use strict";function n(e){a.call(this),this.setOptions(e),e.websocket&&e.websocket.url?(h("start websocket connection"),this._setupWebsocketConnection(e)):e.bosh&&e.bosh.url?(h("start bosh connection"),this._setupBoshConnection(e)):(h("start socket connection"),this._setupSocketConnection(e))}var i=e("tls"),a=e("events").EventEmitter,o=e("node-xmpp-core"),s=o.inherits,c=o.Connection,u=o.JID,l=o.SRV,p=e("./bosh"),f=e("./websockets"),h=e("debug")("xmpp:client:session");s(n,a),n.prototype._setupSocketConnection=function(e){var t={xmlns:{"":e.xmlns},streamAttrs:{version:"1.0",to:this.jid.domain},serialized:e.serialized};for(var r in e)r in t||(t[r]=e[r]);if(this.connection=new c(t),this._addConnectionListeners(),e.host||e.port)this._socketConnectionToHost(e);else{if(!l)throw new Error("Cannot load SRV");this._performSrvLookup(e)}},n.prototype._socketConnectionToHost=function(e){var t=this;e.legacySSL?(this.connection.allowTLS=!1,this.connection.connect({socket:function(){return i.connect(e.port||5223,e.host||"localhost",e.credentials||{},function(){this.socket.authorized?t.emit("connect",this.socket):t.emit("error","unauthorized")}.bind(this))}})):(e.credentials&&(this.connection.credentials=i.createSecureContext(e.credentials)),e.disallowTLS&&(this.connection.allowTLS=!1),this.connection.listen({socket:function(){r.nextTick(function(){this.socket.connect(e.port||5222,e.host)}.bind(this));var t=e.socket;return e.socket=null,t}}))},n.prototype._performSrvLookup=function(e){if(e.legacySSL)throw new Error("LegacySSL mode does not support DNS lookups");e.credentials&&(this.connection.credentials=i.createSecureContext(e.credentials)),e.disallowTLS&&(this.connection.allowTLS=!1),this.connection.listen({socket:l.connect({socket:e.socket,services:["_xmpp-client._tcp"],domain:this.jid.domain,defaultPort:5222})})},n.prototype._setupBoshConnection=function(e){this.connection=new p({jid:this.jid,bosh:e.bosh}),this._addConnectionListeners(),this.connection.on("connected",function(){this.connection.startStream&&this.connection.startStream()}.bind(this))},n.prototype._setupWebsocketConnection=function(e){this.connection=new f({jid:this.jid,websocket:e.websocket}),this._addConnectionListeners(),this.connection.on("connected",function(){this.connection.startStream&&this.connection.startStream()}.bind(this))},n.prototype.setOptions=function(e){this.jid="string"==typeof e.jid?new u(e.jid):e.jid,this.password=e.password,this.preferredSaslMechanism=e.preferredSaslMechanism,this.api_key=e.api_key,this.access_token=e.access_token,this.oauth2_token=e.oauth2_token,this.oauth2_auth=e.oauth2_auth,this.register=e.register,"string"==typeof e.actAs?this.actAs=new u(e.actAs):this.actAs=e.actAs},n.prototype._addConnectionListeners=function(e){e=e||this.connection,e.on("stanza",this.onStanza.bind(this)),e.on("drain",this.emit.bind(this,"drain")),e.on("end",this.emit.bind(this,"end")),e.on("close",this.emit.bind(this,"close")),e.on("error",this.emit.bind(this,"error")),e.on("connect",this.emit.bind(this,"connect")),e.on("reconnect",this.emit.bind(this,"reconnect")),e.on("disconnect",this.emit.bind(this,"disconnect")),e.startStream&&(e.on("connect",function(){e.startStream()}),this.on("auth",function(){e.startStream()}))},n.prototype.pause=function(){this.connection&&this.connection.pause&&this.connection.pause()},n.prototype.resume=function(){this.connection&&this.connection.resume&&this.connection.resume()},n.prototype.send=function(e){return!!this.connection&&this.connection.send(e)},n.prototype.end=function(){this.connection&&this.connection.end()},n.prototype.onStanza=function(){},t.exports=n}).call(this,e("_process"))},{"./bosh":404,"./websockets":407,_process:431,debug:139,events:171,"node-xmpp-core":408,tls:119}],407:[function(e,t,r){"use strict";function n(e){i.call(this),this.url=e.websocket.url,this.jid=e.jid,this.xmlns={"":h},this.websocket=new p(this.url,["xmpp"],e.websocket.options),this.websocket.onopen=this.onopen.bind(this),this.websocket.onmessage=this.onmessage.bind(this),this.websocket.onclose=this.onclose.bind(this),this.websocket.onerror=this.onerror.bind(this)}var i=e("events").EventEmitter,a=e("node-xmpp-core"),o=a.Element,s=a.StreamParser,c=a.Connection,u=a.inherits,l=e("ws"),p=l.Server?l:window.WebSocket,f=e("debug")("xmpp:client:websocket"),h="urn:ietf:params:xml:ns:xmpp-framing";u(n,i),n.prototype.maxStanzaSize=65535,n.prototype.xmppVersion="1.0",n.prototype.onopen=function(){this.startParser(),this.emit("connected")},n.prototype.startParser=function(){var e=this;this.parser=new s(this.maxStanzaSize),this.parser.on("start",function(t){e.streamAttrs=t,e.streamNsAttrs={};for(var r in t)"xmlns"!==r&&"xmlns:"!==r.substr(0,6)||(e.streamNsAttrs[r]=t[r]);e.emit("streamStart",t)}),this.parser.on("stanza",function(t){e.onStanza(t)}),this.parser.on("error",this.onerror.bind(this)),this.parser.on("end",function(){e.stopParser(),e.end()})},n.prototype.stopParser=function(){this.parser&&delete this.parser},n.prototype.onmessage=function(e){f("ws msg <--",e.data),e&&e.data&&this.parser&&this.parser.write(e.data)},n.prototype.onStanza=function(e){e.is("error",c.NS_STREAM)?this.emit("error",e):this.emit("stanza",e)},n.prototype.startStream=function(){var e={};for(var t in this.xmlns)this.xmlns.hasOwnProperty(t)&&(t?e["xmlns:"+t]=this.xmlns[t]:e.xmlns=this.xmlns[t]);this.xmppVersion&&(e.version=this.xmppVersion),this.streamTo&&(e.to=this.streamTo),this.jid&&(e.to=this.jid.domain),this.send(new o("open",e)),this.streamOpened=!0},n.prototype.send=function(e){e.root&&(e=e.root()),!e.attrs.xmlns&&(e.is("iq")||e.is("presence")||e.is("message"))&&(e.attrs.xmlns="jabber:client"),e=e.toString(),f("ws send -->",e),this.websocket.send(e)},n.prototype.onclose=function(){this.emit("disconnect"),this.emit("close")},n.prototype.end=function(){this.send(new o("close",{xmlns:h})),this.emit("disconnect"),this.emit("end"),this.websocket&&this.websocket.close()},n.prototype.onerror=function(e){this.emit("error",e)},t.exports=n},{debug:139,events:171,"node-xmpp-core":408,ws:92}],408:[function(e,t,r){"use strict";var n=e("./lib/Connection"),i=e("@xmpp/streamparser"),a=e("@xmpp/jid"),o=e("@xmpp/xml"),s=e("inherits");r.SRV=e("./lib/SRV"),r.exportCoreUtils=function(e){e.Connection=n,e.StreamParser=i,e.JID=a,e.inherits=s,e.stanza=o,e.Stanza=o.Stanza,e.createStanza=o.createStanza,e.IQ=o.IQ,e.Presence=o.Presence,e.Message=o.Message,e.Parser=o.Parser,e.parse=o.parse,e.ltx=o.ltx,e.createElement=o.createElement,e.Element=o.Element,e.escapeXML=o.escapeXML,e.escapeXMLText=o.escapeXMLText},r.exportCoreUtils(r)},{"./lib/Connection":409,"./lib/SRV":92,"@xmpp/jid":1,"@xmpp/streamparser":5,"@xmpp/xml":6,inherits:215}],409:[function(e,t,r){"use strict";function n(e,t){var r=d({},t);return r.initialDelay=t&&(t.initialReconnectDelay||t.reconnectDelay)||b,r.maxDelay=t&&t.maxReconnectDelay||y,r.immediate=t&&t.socket&&"function"!=typeof t.socket,r.type=t&&t.delayType,r.emitter=e,r}function i(e){s.call(this),this.streamAttrs=e&&e.streamAttrs||{},this.xmlns=e&&e.xmlns||{},this.xmlns.stream=g,this.streamOpen=e&&e.streamOpen||w,this.streamClose=e&&e.streamClose||x,this.rejectUnauthorized=!(!e||!e.rejectUnauthorized),this.serialized=!(!e||!e.serialized),this.requestCert=!(!e||!e.requestCert),this.servername=e&&e.servername,this.boundOnData=this.onData.bind(this),this.boundOnClose=this.onClose.bind(this),this.boundEmitData=this.emit.bind(this,"data"),this.boundEmitDrain=this.emit.bind(this,"drain"),this._setupSocket(n(this,e)),this.once("reconnect",function(){this.reconnect=e&&e.reconnect})}function a(e){return e.children?e.children.reduce(function(e,t){return e+a(t)},""):e}var o=e("net"),s=e("events").EventEmitter,c=e("inherits"),u=e("@xmpp/xml").Element,l=e("reconnect-core"),p=e("@xmpp/streamparser"),f=e("node-xmpp-tls-connect"),h=e("debug")("xmpp:connection"),d=e("lodash.assign"),m="urn:ietf:params:xml:ns:xmpp-tls",g="http://etherx.jabber.org/streams",v="urn:ietf:params:xml:ns:xmpp-streams",b=1e3,y=3e4,w="stream:stream",x="";c(i,s),i.prototype.NS_XMPP_TLS=m,i.NS_STREAM=g,i.prototype.NS_XMPP_STREAMS=v,i.prototype.allowTLS=!0,i.prototype._setupSocket=function(e){h("setup socket");var t={},r=l(function(e){var n=this.socket;return"on"===e.preserve?(e.preserve=t,t=e):e=t=e.preserve?e.preserve:e||t,"function"==typeof e.socket?(h("use lazy socket"),this.socket=e.socket.call(this)):(h("use standard socket"),this.socket=e.socket,e.socket=null,this.socket&&this.once("connect",function(){r.options.immediate=!1})),this.socket=this.socket||new o.Socket,n!==this.socket&&this.setupStream(),this.socket}.bind(this));r(r.options=e);var n=this.end;this.end=this.disconnect=function(){this.closeStream(),n()},this.on("connection",function(){this.parser||this.startParser()}),this.on("end",function(){t={}})},i.prototype.setupStream=function(){h("setup stream"),this.socket.on("end",this.onEnd.bind(this)),this.socket.on("data",this.boundOnData),this.socket.on("close",this.boundOnClose),this.socket.on("data",this.boundEmitData),this.socket.on("drain",this.boundEmitDrain),this.socket.on("error",function(){}),this.socket.serializeStanza||(this.serialized?this.socket.serializeStanza=function(e,t){e.write(function(e){t(e)})}:this.socket.serializeStanza=function(e,t){t(e.toString())})},i.prototype.pause=function(){this.socket.pause&&this.socket.pause()},i.prototype.resume=function(){this.socket.resume&&this.socket.resume()},i.prototype.send=function(e){if(this.socket&&this.streamOpened){if(!this.socket.writable)return void this.socket.end();h("send: "+e.toString());var t=!0;if(e.root){var r=this.rmXmlns(e.root());this.socket.serializeStanza(r,function(e){t=this.write(e)}.bind(this.socket))}else t=this.socket.write(e);return t}},i.prototype.startParser=function(){var e=this;this.parser=new p(this.maxStanzaSize),this.parser.on("streamStart",function(t){e.streamNsAttrs={};for(var r in t)"xmlns"!==r&&"xmlns:"!==r.substr(0,6)||(e.streamNsAttrs[r]=t[r]);e.emit("streamStart",t)}),this.parser.on("stanza",function(t){e.onStanza(e.addStreamNs(t))}),this.parser.on("error",function(t){e.error(t.condition||"internal-server-error",t.message)}),this.parser.once("end",function(){e.stopParser(),e.reconnect?e.once("reconnect",e.startParser.bind(e)):e.end()})},i.prototype.stopParser=function(){if(this.parser){var e=this.parser;this.parser=null,e.end()}},i.prototype.openStream=function(){var e={};for(var t in this.xmlns)this.xmlns.hasOwnProperty(t)&&(t?e["xmlns:"+t]=this.xmlns[t]:e.xmlns=this.xmlns[t]);for(t in this.streamAttrs)this.streamAttrs.hasOwnProperty(t)&&(e[t]=this.streamAttrs[t]);this.streamTo&&(e.to=this.streamTo);var r,n=new u(this.streamOpen,e);if("stream:stream"===n.name){n.t(" ");var i=n.toString();r=i.substr(0,i.indexOf(" "))}else r=n.toString();this.streamOpened=!0,this.send(r)},i.prototype.startStream=i.prototype.openStream,i.prototype.closeStream=function(){this.send(this.streamClose),this.streamOpened=!1},i.prototype.endStream=i.prototype.closeStream,i.prototype.onData=function(e){h("receive: "+e.toString("utf8")),this.parser&&this.parser.write(e)},i.prototype.setSecure=function(e,t,r){this.socket.removeListener("data",this.boundOnData),this.socket.removeListener("data",this.boundEmitData),this.socket.removeListener("drain",this.boundEmitDrain),this.socket.removeListener("close",this.boundOnClose),this.socket.clearTimer&&this.socket.clearTimer();var n=f({socket:this.socket,rejectUnauthorized:this.rejectUnauthorized,credentials:e||this.credentials,requestCert:this.requestCert,isServer:!!t,servername:t&&r},function(){this.isSecure=!0,this.once("disconnect",function(){this.isSecure=!1}),n.emit("connect",n)}.bind(this));n.on("clientError",this.emit.bind(this,"error")),this.reconnect||(this.reconnect=!0,this.once("reconnect",function(){this.reconnect=!1})),this.stopParser(),this.listen({socket:n,preserve:"on"})},i.prototype.onStanza=function(e){if(e.is("error",g)){var t=new Error(""+a(e));t.stanza=e,this.socket.emit("error",t)}else e.is("features",this.NS_STREAM)&&this.allowTLS&&!this.isSecure&&e.getChild("starttls",this.NS_XMPP_TLS)?this.send(new u("starttls",{xmlns:this.NS_XMPP_TLS})):this.allowTLS&&e.is("proceed",this.NS_XMPP_TLS)?this.setSecure():this.emit("stanza",e)},i.prototype.addStreamNs=function(e){for(var t in this.streamNsAttrs)e.attrs[t]||"xmlns"===t&&this.streamNsAttrs[t]===this.xmlns[""]||(e.attrs[t]=this.streamNsAttrs[t]);return e},i.prototype.rmXmlns=function(e){for(var t in this.xmlns){var r=t?"xmlns:"+t:"xmlns";e.attrs[r]===this.xmlns[t]&&(e.attrs[r]=null)}return e},i.prototype.onEnd=function(){this.closeStream(),this.reconnect||this.emit("end")},i.prototype.onClose=function(){this.reconnect||this.emit("close")},i.prototype.error=function(e,t){if(this.emit("error",new Error(t)),this.socket&&this.socket.writable){this.streamOpened||this.openStream();var r=new u("stream:error");r.c(e,{xmlns:v}),t&&r.c("text",{xmlns:v,"xml:lang":"en"}).t(t),this.send(r),this.end()}},t.exports=i},{"@xmpp/streamparser":5,"@xmpp/xml":6,debug:139,events:171,inherits:215,"lodash.assign":234,net:119,"node-xmpp-tls-connect":92,"reconnect-core":459}],410:[function(e,t,r){function n(e,t){return h.createHmac("sha1",e).update(t).digest("base64")}function i(e,t){return h.createSign("RSA-SHA1").update(t).sign(e,"base64")}function a(e){return encodeURIComponent(e).replace(/!/g,"%21").replace(/\*/g,"%2A").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}function o(e){var t,r,n=[];for(t in e)if(r=e[t],Array.isArray(r))for(var i=0;it?1:e>>16&65535|0,o=0;0!==r;){o=r>2e3?2e3:r,r-=o;do i=i+t[n++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0}t.exports=n},{}],413:[function(e,t,r){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],414:[function(e,t,r){"use strict";function n(){for(var e,t=[],r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t}function i(e,t,r,n){var i=a,o=n+r;e^=-1;for(var s=n;s>>8^i[255&(e^t[s])];return e^-1}var a=n();t.exports=i},{}],415:[function(e,t,r){"use strict";function n(e,t){return e.msg=M[t],t}function i(e){return(e<<1)-(e>4?9:0)}function a(e){for(var t=e.length;--t>=0;)e[t]=0}function o(e){var t=e.state,r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(I.arraySet(e.output,t.pending_buf,t.pending_out,r,e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))}function s(e,t){P._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,o(e.strm)}function c(e,t){e.pending_buf[e.pending++]=t}function u(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function l(e,t,r,n){var i=e.avail_in;return i>n&&(i=n),0===i?0:(e.avail_in-=i,I.arraySet(t,e.input,e.next_in,i,r),1===e.state.wrap?e.adler=O(e.adler,t,i,r):2===e.state.wrap&&(e.adler=D(e.adler,t,i,r)),e.next_in+=i,e.total_in+=i,i)}function p(e,t){var r,n,i=e.max_chain_length,a=e.strstart,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-pe?e.strstart-(e.w_size-pe):0,u=e.window,l=e.w_mask,p=e.prev,f=e.strstart+le,h=u[a+o-1],d=u[a+o];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do if(r=t,u[r+o]===d&&u[r+o-1]===h&&u[r]===u[a]&&u[++r]===u[a+1]){a+=2,r++;do;while(u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&u[++a]===u[++r]&&ao){if(e.match_start=t,o=n,n>=s)break;h=u[a+o-1],d=u[a+o]}}while((t=p[t&l])>c&&0!==--i);return o<=e.lookahead?o:e.lookahead}function f(e){var t,r,n,i,a,o=e.w_size;do{if(i=e.window_size-e.lookahead-e.strstart,e.strstart>=o+(o-pe)){I.arraySet(e.window,e.window,o,o,0),e.match_start-=o,e.strstart-=o,e.block_start-=o,r=e.hash_size,t=r;do n=e.head[--t],e.head[t]=n>=o?n-o:0;while(--r);r=o,t=r;do n=e.prev[--t],e.prev[t]=n>=o?n-o:0;while(--r);i+=o}if(0===e.strm.avail_in)break;if(r=l(e.strm,e.window,e.strstart+e.lookahead,i),e.lookahead+=r,e.lookahead+e.insert>=ue)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=(e.ins_h<e.pending_buf_size-5&&(r=e.pending_buf_size-5);;){if(e.lookahead<=1){if(f(e),0===e.lookahead&&t===q)return we;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var n=e.block_start+r;if((0===e.strstart||e.strstart>=n)&&(e.lookahead=e.strstart-n,e.strstart=n,s(e,!1),0===e.strm.avail_out))return we;if(e.strstart-e.block_start>=e.w_size-pe&&(s(e,!1),0===e.strm.avail_out))return we}return e.insert=0,t===B?(s(e,!0),0===e.strm.avail_out?ke:_e):e.strstart>e.block_start&&(s(e,!1),0===e.strm.avail_out)?we:we}function d(e,t){for(var r,n;;){if(e.lookahead=ue&&(e.ins_h=(e.ins_h<=ue)if(n=P._tr_tally(e,e.strstart-e.match_start,e.match_length-ue),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ue){e.match_length--;do e.strstart++,e.ins_h=(e.ins_h<=ue&&(e.ins_h=(e.ins_h<4096)&&(e.match_length=ue-1)),e.prev_length>=ue&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-ue,n=P._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ue),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=(e.ins_h<=ue&&e.strstart>0&&(i=e.strstart-1,n=o[i],n===o[++i]&&n===o[++i]&&n===o[++i])){a=e.strstart+le;do;while(n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&n===o[++i]&&ie.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ue?(r=P._tr_tally(e,1,e.match_length-ue),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=P._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(s(e,!1),0===e.strm.avail_out))return we}return e.insert=0,t===B?(s(e,!0),0===e.strm.avail_out?ke:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?we:xe}function v(e,t){for(var r;;){if(0===e.lookahead&&(f(e),0===e.lookahead)){if(t===q)return we;break}if(e.match_length=0,r=P._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(s(e,!1),0===e.strm.avail_out))return we}return e.insert=0,t===B?(s(e,!0),0===e.strm.avail_out?ke:_e):e.last_lit&&(s(e,!1),0===e.strm.avail_out)?we:xe}function b(e,t,r,n,i){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=i}function y(e){e.window_size=2*e.w_size,a(e.head),e.max_lazy_match=T[e.level].max_lazy,e.good_match=T[e.level].good_length,e.nice_match=T[e.level].nice_length,e.max_chain_length=T[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=ue-1,e.match_available=0,e.ins_h=0}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Z,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new I.Buf16(2*se),this.dyn_dtree=new I.Buf16(2*(2*ae+1)),this.bl_tree=new I.Buf16(2*(2*oe+1)),a(this.dyn_ltree),a(this.dyn_dtree),a(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new I.Buf16(ce+1),this.heap=new I.Buf16(2*ie+1),a(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new I.Buf16(2*ie+1),a(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function x(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=J,t=e.state,t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?he:be,e.adler=2===t.wrap?0:1,t.last_flush=q,P._tr_init(t),N):n(e,U)}function k(e){var t=x(e);return t===N&&y(e.state),t}function _(e,t){return e&&e.state?2!==e.state.wrap?U:(e.state.gzhead=t,N):U}function j(e,t,r,i,a,o){if(!e)return U;var s=1;if(t===$&&(t=6),i<0?(s=0,i=-i):i>15&&(s=2,i-=16),a<1||a>Y||r!==Z||i<8||i>15||t<0||t>9||o<0||o>Q)return n(e,U); -8===i&&(i=9);var c=new w;return e.state=c,c.strm=e,c.wrap=s,c.gzhead=null,c.w_bits=i,c.w_size=1<F||t<0)return e?n(e,U):U;if(s=e.state,!e.output||!e.input&&0!==e.avail_in||s.status===ye&&t!==B)return n(e,0===e.avail_out?K:U);if(s.strm=e,r=s.last_flush,s.last_flush=t,s.status===he)if(2===s.wrap)e.adler=0,c(s,31),c(s,139),c(s,8),s.gzhead?(c(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(s.gzhead.extra?4:0)+(s.gzhead.name?8:0)+(s.gzhead.comment?16:0)),c(s,255&s.gzhead.time),c(s,s.gzhead.time>>8&255),c(s,s.gzhead.time>>16&255),c(s,s.gzhead.time>>24&255),c(s,9===s.level?2:s.strategy>=G||s.level<2?4:0),c(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(c(s,255&s.gzhead.extra.length),c(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(e.adler=D(e.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=de):(c(s,0),c(s,0),c(s,0),c(s,0),c(s,0),c(s,9===s.level?2:s.strategy>=G||s.level<2?4:0),c(s,je),s.status=be);else{var f=Z+(s.w_bits-8<<4)<<8,h=-1;h=s.strategy>=G||s.level<2?0:s.level<6?1:6===s.level?2:3,f|=h<<6,0!==s.strstart&&(f|=fe),f+=31-f%31,s.status=be,u(s,f),0!==s.strstart&&(u(s,e.adler>>>16),u(s,65535&e.adler)),e.adler=1}if(s.status===de)if(s.gzhead.extra){for(l=s.pending;s.gzindex<(65535&s.gzhead.extra.length)&&(s.pending!==s.pending_buf_size||(s.gzhead.hcrc&&s.pending>l&&(e.adler=D(e.adler,s.pending_buf,s.pending-l,l)),o(e),l=s.pending,s.pending!==s.pending_buf_size));)c(s,255&s.gzhead.extra[s.gzindex]),s.gzindex++;s.gzhead.hcrc&&s.pending>l&&(e.adler=D(e.adler,s.pending_buf,s.pending-l,l)),s.gzindex===s.gzhead.extra.length&&(s.gzindex=0,s.status=me)}else s.status=me;if(s.status===me)if(s.gzhead.name){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(e.adler=D(e.adler,s.pending_buf,s.pending-l,l)),o(e),l=s.pending,s.pending===s.pending_buf_size)){p=1;break}p=s.gzindexl&&(e.adler=D(e.adler,s.pending_buf,s.pending-l,l)),0===p&&(s.gzindex=0,s.status=ge)}else s.status=ge;if(s.status===ge)if(s.gzhead.comment){l=s.pending;do{if(s.pending===s.pending_buf_size&&(s.gzhead.hcrc&&s.pending>l&&(e.adler=D(e.adler,s.pending_buf,s.pending-l,l)),o(e),l=s.pending,s.pending===s.pending_buf_size)){p=1;break}p=s.gzindexl&&(e.adler=D(e.adler,s.pending_buf,s.pending-l,l)),0===p&&(s.status=ve)}else s.status=ve;if(s.status===ve&&(s.gzhead.hcrc?(s.pending+2>s.pending_buf_size&&o(e),s.pending+2<=s.pending_buf_size&&(c(s,255&e.adler),c(s,e.adler>>8&255),e.adler=0,s.status=be)):s.status=be),0!==s.pending){if(o(e),0===e.avail_out)return s.last_flush=-1,N}else if(0===e.avail_in&&i(t)<=i(r)&&t!==B)return n(e,K);if(s.status===ye&&0!==e.avail_in)return n(e,K);if(0!==e.avail_in||0!==s.lookahead||t!==q&&s.status!==ye){var d=s.strategy===G?v(s,t):s.strategy===X?g(s,t):T[s.level].func(s,t);if(d!==ke&&d!==_e||(s.status=ye),d===we||d===ke)return 0===e.avail_out&&(s.last_flush=-1),N;if(d===xe&&(t===R?P._tr_align(s):t!==F&&(P._tr_stored_block(s,0,0,!1),t===z&&(a(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),o(e),0===e.avail_out))return s.last_flush=-1,N}return t!==B?N:s.wrap<=0?L:(2===s.wrap?(c(s,255&e.adler),c(s,e.adler>>8&255),c(s,e.adler>>16&255),c(s,e.adler>>24&255),c(s,255&e.total_in),c(s,e.total_in>>8&255),c(s,e.total_in>>16&255),c(s,e.total_in>>24&255)):(u(s,e.adler>>>16),u(s,65535&e.adler)),o(e),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?N:L)}function A(e){var t;return e&&e.state?(t=e.state.status,t!==he&&t!==de&&t!==me&&t!==ge&&t!==ve&&t!==be&&t!==ye?n(e,U):(e.state=null,t===be?n(e,H):N)):U}function C(e,t){var r,n,i,o,s,c,u,l,p=t.length;if(!e||!e.state)return U;if(r=e.state,o=r.wrap,2===o||1===o&&r.status!==he||r.lookahead)return U;for(1===o&&(e.adler=O(e.adler,t,p,0)),r.wrap=0,p>=r.w_size&&(0===o&&(a(r.head),r.strstart=0,r.block_start=0,r.insert=0),l=new I.Buf8(r.w_size),I.arraySet(l,t,p-r.w_size,r.w_size,0),t=l,p=r.w_size),s=e.avail_in,c=e.next_in,u=e.input,e.avail_in=p,e.next_in=0,e.input=t,f(r);r.lookahead>=ue;){n=r.strstart,i=r.lookahead-(ue-1);do r.ins_h=(r.ins_h<>>24,m>>>=k,g-=k,k=x>>>16&255,0===k)C[s++]=65535&x;else{if(!(16&k)){if(0===(64&k)){x=v[(65535&x)+(m&(1<>>=k,g-=k),g<15&&(m+=A[a++]<>>24,m>>>=k,g-=k,k=x>>>16&255,!(16&k)){if(0===(64&k)){x=b[(65535&x)+(m&(1<l){e.msg="invalid distance too far back",r.mode=n;break e}if(m>>>=k,g-=k,k=s-c,j>k){if(k=j-k,k>f&&r.sane){e.msg="invalid distance too far back",r.mode=n;break e}if(S=0,E=d,0===h){if(S+=p-k,k<_){_-=k;do C[s++]=d[S++];while(--k);S=s-j,E=C}}else if(h2;)C[s++]=E[S++],C[s++]=E[S++],C[s++]=E[S++],_-=3;_&&(C[s++]=E[S++],_>1&&(C[s++]=E[S++]))}else{S=s-j;do C[s++]=C[S++],C[s++]=C[S++],C[s++]=C[S++],_-=3;while(_>2);_&&(C[s++]=C[S++],_>1&&(C[s++]=C[S++]))}break}}break}}while(a>3,a-=_,g-=_<<3,m&=(1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function i(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new b.Buf16(320),this.work=new b.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function a(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=z,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new b.Buf32(me),t.distcode=t.distdyn=new b.Buf32(ge),t.sane=1,t.back=-1,T):O}function o(e){var t;return e&&e.state?(t=e.state,t.wsize=0,t.whave=0,t.wnext=0,a(e)):O}function s(e,t){var r,n;return e&&e.state?(n=e.state,t<0?(r=0,t=-t):(r=(t>>4)+1,t<48&&(t&=15)),t&&(t<8||t>15)?O:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,o(e))):O}function c(e,t){var r,n;return e?(n=new i,e.state=n,n.window=null,r=s(e,t),r!==T&&(e.state=null),r):O}function u(e){return c(e,be)}function l(e){if(ye){var t;for(g=new b.Buf32(512),v=new b.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(k(j,e.lens,0,288,g,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;k(S,e.lens,0,32,v,0,e.work,{bits:5}),ye=!1}e.lencode=g,e.lenbits=9,e.distcode=v,e.distbits=5}function p(e,t,r,n){var i,a=e.state;return null===a.window&&(a.wsize=1<=a.wsize?(b.arraySet(a.window,t,r-a.wsize,a.wsize,0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>n&&(i=n),b.arraySet(a.window,t,r-n,i,a.wnext),n-=i,n?(b.arraySet(a.window,t,r-n,n,0),a.wnext=n,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave>>8&255,r.check=w(r.check,Ae,2,0),f=0,h=0,r.mode=B;break}if(r.flags=0,r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&f)<<8)+(f>>8))%31){e.msg="incorrect header check",r.mode=fe;break}if((15&f)!==R){e.msg="unknown compression method",r.mode=fe;break}if(f>>>=4,h-=4,ke=(15&f)+8,0===r.wbits)r.wbits=ke;else if(ke>r.wbits){e.msg="invalid window size",r.mode=fe;break}r.dmax=1<>8&1),512&r.flags&&(Ae[0]=255&f,Ae[1]=f>>>8&255,r.check=w(r.check,Ae,2,0)),f=0,h=0,r.mode=F;case F:for(;h<32;){if(0===c)break e;c--,f+=i[o++]<>>8&255,Ae[2]=f>>>16&255,Ae[3]=f>>>24&255,r.check=w(r.check,Ae,4,0)),f=0,h=0,r.mode=N;case N:for(;h<16;){if(0===c)break e;c--,f+=i[o++]<>8),512&r.flags&&(Ae[0]=255&f,Ae[1]=f>>>8&255,r.check=w(r.check,Ae,2,0)),f=0,h=0,r.mode=L;case L:if(1024&r.flags){for(;h<16;){if(0===c)break e;c--,f+=i[o++]<>>8&255,r.check=w(r.check,Ae,2,0)),f=0,h=0}else r.head&&(r.head.extra=null);r.mode=U;case U:if(1024&r.flags&&(g=r.length,g>c&&(g=c),g&&(r.head&&(ke=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Array(r.head.extra_len)),b.arraySet(r.head.extra,i,o,g,ke)),512&r.flags&&(r.check=w(r.check,i,g,o)),c-=g,o+=g,r.length-=g),r.length))break e;r.length=0,r.mode=H;case H:if(2048&r.flags){if(0===c)break e;g=0;do ke=i[o+g++],r.head&&ke&&r.length<65536&&(r.head.name+=String.fromCharCode(ke));while(ke&&g>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=X;break;case V:for(;h<32;){if(0===c)break e;c--,f+=i[o++]<>>=7&h,h-=7&h,r.mode=ue;break}for(;h<3;){if(0===c)break e;c--,f+=i[o++]<>>=1,h-=1,3&f){case 0:r.mode=W;break;case 1:if(l(r),r.mode=re,t===C){f>>>=2,h-=2;break e}break;case 2:r.mode=Y;break;case 3:e.msg="invalid block type",r.mode=fe}f>>>=2,h-=2;break;case W:for(f>>>=7&h,h-=7&h;h<32;){if(0===c)break e;c--,f+=i[o++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=fe;break}if(r.length=65535&f,f=0,h=0,r.mode=J,t===C)break e;case J:r.mode=Z;case Z:if(g=r.length){if(g>c&&(g=c),g>u&&(g=u),0===g)break e;b.arraySet(a,i,o,g,s),c-=g,o+=g,u-=g,s+=g,r.length-=g;break}r.mode=X;break;case Y:for(;h<14;){if(0===c)break e;c--,f+=i[o++]<>>=5,h-=5,r.ndist=(31&f)+1,f>>>=5,h-=5,r.ncode=(15&f)+4,f>>>=4,h-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=fe;break}r.have=0,r.mode=ee;case ee:for(;r.have>>=3,h-=3}for(;r.have<19;)r.lens[Ce[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,je={bits:r.lenbits},_e=k(_,r.lens,0,19,r.lencode,0,r.work,je),r.lenbits=je.bits,_e){e.msg="invalid code lengths set",r.mode=fe;break}r.have=0,r.mode=te;case te:for(;r.have>>24,ve=Ee>>>16&255,be=65535&Ee,!(ge<=h);){if(0===c)break e;c--,f+=i[o++]<>>=ge,h-=ge,r.lens[r.have++]=be;else{if(16===be){for(Se=ge+2;h>>=ge,h-=ge,0===r.have){e.msg="invalid bit length repeat",r.mode=fe;break}ke=r.lens[r.have-1],g=3+(3&f),f>>>=2,h-=2}else if(17===be){for(Se=ge+3;h>>=ge,h-=ge,ke=0,g=3+(7&f),f>>>=3,h-=3}else{for(Se=ge+7;h>>=ge,h-=ge,ke=0,g=11+(127&f),f>>>=7,h-=7}if(r.have+g>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=fe;break}for(;g--;)r.lens[r.have++]=ke}}if(r.mode===fe)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=fe;break}if(r.lenbits=9,je={bits:r.lenbits},_e=k(j,r.lens,0,r.nlen,r.lencode,0,r.work,je),r.lenbits=je.bits,_e){e.msg="invalid literal/lengths set",r.mode=fe;break}if(r.distbits=6,r.distcode=r.distdyn,je={bits:r.distbits},_e=k(S,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,je),r.distbits=je.bits,_e){e.msg="invalid distances set",r.mode=fe;break}if(r.mode=re,t===C)break e;case re:r.mode=ne;case ne:if(c>=6&&u>=258){e.next_out=s,e.avail_out=u,e.next_in=o,e.avail_in=c,r.hold=f,r.bits=h,x(e,m),s=e.next_out,a=e.output,u=e.avail_out,o=e.next_in,i=e.input,c=e.avail_in,f=r.hold,h=r.bits,r.mode===X&&(r.back=-1);break}for(r.back=0;Ee=r.lencode[f&(1<>>24,ve=Ee>>>16&255,be=65535&Ee,!(ge<=h);){if(0===c)break e;c--,f+=i[o++]<>ye)],ge=Ee>>>24,ve=Ee>>>16&255,be=65535&Ee,!(ye+ge<=h);){if(0===c)break e;c--,f+=i[o++]<>>=ye,h-=ye,r.back+=ye}if(f>>>=ge,h-=ge,r.back+=ge,r.length=be,0===ve){r.mode=ce;break}if(32&ve){r.back=-1,r.mode=X;break}if(64&ve){e.msg="invalid literal/length code",r.mode=fe;break}r.extra=15&ve,r.mode=ie;case ie:if(r.extra){for(Se=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=ae;case ae:for(;Ee=r.distcode[f&(1<>>24,ve=Ee>>>16&255,be=65535&Ee,!(ge<=h);){if(0===c)break e;c--,f+=i[o++]<>ye)],ge=Ee>>>24,ve=Ee>>>16&255,be=65535&Ee,!(ye+ge<=h);){if(0===c)break e;c--,f+=i[o++]<>>=ye,h-=ye,r.back+=ye}if(f>>>=ge,h-=ge,r.back+=ge,64&ve){e.msg="invalid distance code",r.mode=fe;break}r.offset=be,r.extra=15&ve,r.mode=oe;case oe:if(r.extra){for(Se=r.extra;h>>=r.extra,h-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=fe;break}r.mode=se;case se:if(0===u)break e;if(g=m-u,r.offset>g){if(g=r.offset-g,g>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=fe;break}g>r.wnext?(g-=r.wnext,v=r.wsize-g):v=r.wnext-g,g>r.length&&(g=r.length),me=r.window}else me=a,v=s-r.offset,g=r.length;g>u&&(g=u),u-=g,r.length-=g;do a[s++]=me[v++];while(--g);0===r.length&&(r.mode=ne);break;case ce:if(0===u)break e;a[s++]=r.length,u--,r.mode=ne;break;case ue:if(r.wrap){for(;h<32;){if(0===c)break e;c--,f|=i[o++]<=1&&0===L[O];O--);if(D>O&&(D=O),0===O)return m[g++]=20971520,m[g++]=20971520,b.bits=1,0;for(P=1;P0&&(e===s||1!==O))return-1;for(U[1]=0,T=1;Ta||e===u&&z>o)return 1;for(var $=0;;){$++,S=T-q,v[I]j?(E=H[K+v[I]],A=F[N+v[I]]):(E=96,A=0),y=1<>q)+w]=S<<24|E<<16|A|0;while(0!==w);for(y=1<>=1;if(0!==y?(B&=y-1,B+=y):B=0,I++,0===--L[T]){if(T===O)break;T=t[r+v[I]]}if(T>D&&(B&k)!==x){for(0===q&&(q=D),_+=P,M=T-q,R=1<a||e===u&&z>o)return 1;x=B&k,m[x]=D<<24|M<<16|_-g|0}}return 0!==B&&(m[_+B]=T-q<<24|64<<16|0),b.bits=D,0}},{"../utils/common":411}],419:[function(e,t,r){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],420:[function(e,t,r){"use strict";function n(e){for(var t=e.length;--t>=0;)e[t]=0}function i(e,t,r,n,i){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=i,this.has_stree=e&&e.length}function a(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function o(e){return e<256?ce[e]:ce[256+(e>>>7)]}function s(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function c(e,t,r){e.bi_valid>Q-r?(e.bi_buf|=t<>Q-e.bi_valid,e.bi_valid+=r-Q):(e.bi_buf|=t<>>=1,r<<=1;while(--t>0);return r>>>1}function p(e){16===e.bi_valid?(s(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}function f(e,t){var r,n,i,a,o,s,c=t.dyn_tree,u=t.max_code,l=t.stat_desc.static_tree,p=t.stat_desc.has_stree,f=t.stat_desc.extra_bits,h=t.stat_desc.extra_base,d=t.stat_desc.max_length,m=0;for(a=0;a<=X;a++)e.bl_count[a]=0;for(c[2*e.heap[e.heap_max]+1]=0,r=e.heap_max+1;rd&&(a=d,m++),c[2*n+1]=a,n>u||(e.bl_count[a]++,o=0,n>=h&&(o=f[n-h]),s=c[2*n],e.opt_len+=s*(a+o),p&&(e.static_len+=s*(l[2*n+1]+o)));if(0!==m){do{for(a=d-1;0===e.bl_count[a];)a--;e.bl_count[a]--,e.bl_count[a+1]+=2,e.bl_count[d]--,m-=2}while(m>0);for(a=d;0!==a;a--)for(n=e.bl_count[a];0!==n;)i=e.heap[--r],i>u||(c[2*i+1]!==a&&(e.opt_len+=(a-c[2*i+1])*c[2*i],c[2*i+1]=a),n--)}}function h(e,t,r){var n,i,a=new Array(X+1),o=0;for(n=1;n<=X;n++)a[n]=o=o+r[n-1]<<1;for(i=0;i<=t;i++){var s=e[2*i+1];0!==s&&(e[2*i]=l(a[s]++,s))}}function d(){var e,t,r,n,a,o=new Array(X+1);for(r=0,n=0;n>=7;n<$;n++)for(pe[n]=a<<7,e=0;e<1<8?s(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function v(e,t,r,n){g(e),n&&(s(e,r),s(e,~r)),O.arraySet(e.pending_buf,e.window,t,r,e.pending),e.pending+=r}function b(e,t,r,n){var i=2*t,a=2*r;return e[i]>1;r>=1;r--)y(e,a,r);i=c;do r=e.heap[1],e.heap[1]=e.heap[e.heap_len--],y(e,a,1),n=e.heap[1],e.heap[--e.heap_max]=r,e.heap[--e.heap_max]=n,a[2*i]=a[2*r]+a[2*n],e.depth[i]=(e.depth[r]>=e.depth[n]?e.depth[r]:e.depth[n])+1,a[2*r+1]=a[2*n+1]=i,e.heap[1]=i++,y(e,a,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],f(e,t),h(a,u,e.bl_count)}function k(e,t,r){var n,i,a=-1,o=t[1],s=0,c=7,u=4;for(0===o&&(c=138,u=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)i=o,o=t[2*(n+1)+1],++s=3&&0===e.bl_tree[2*ie[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}function S(e,t,r,n){var i;for(c(e,t-257,5),c(e,r-1,5),c(e,n-4,4),i=0;i>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return M;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return q;for(t=32;t0?(e.strm.data_type===R&&(e.strm.data_type=E(e)),x(e,e.l_desc),x(e,e.d_desc),o=j(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=r+5,r+4<=i&&t!==-1?C(e,t,r,n):e.strategy===D||a===i?(c(e,(B<<1)+(n?1:0),3),w(e,oe,se)):(c(e,(F<<1)+(n?1:0),3),S(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),w(e,e.dyn_ltree,e.dyn_dtree)),m(e),n&&g(e)}function P(e,t,r){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&r,e.last_lit++,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(ue[r]+H+1)]++,e.dyn_dtree[2*o(t)]++),e.last_lit===e.lit_bufsize-1}var O=e("../utils/common"),D=4,M=0,q=1,R=2,z=0,B=1,F=2,N=3,L=258,U=29,H=256,K=H+1+U,$=30,V=19,G=2*K+1,X=15,Q=16,W=7,J=256,Z=16,Y=17,ee=18,te=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],re=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],ne=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ae=512,oe=new Array(2*(K+2));n(oe);var se=new Array(2*$);n(se);var ce=new Array(ae);n(ce);var ue=new Array(L-N+1);n(ue);var le=new Array(U);n(le);var pe=new Array($);n(pe);var fe,he,de,me=!1;r._tr_init=A,r._tr_stored_block=C,r._tr_flush_block=I,r._tr_tally=P,r._tr_align=T},{"../utils/common":411}],421:[function(e,t,r){"use strict";function n(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}t.exports=n},{}],422:[function(e,t,r){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],423:[function(e,t,r){var n=e("asn1.js"),i=n.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});r.RSAPrivateKey=i;var a=n.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});r.RSAPublicKey=a;var o=n.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())});r.PublicKey=o;var s=n.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),c=n.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())});r.PrivateKey=c;var u=n.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});r.EncryptedPrivateKey=u;var l=n.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});r.DSAPrivateKey=l,r.DSAparam=n.define("DSAparam",function(){this.int()});var p=n.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())});r.ECPrivateKey=p;var f=n.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});r.signature=n.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},{"asn1.js":56}],424:[function(e,t,r){(function(r){var n=/Proc-Type: 4,ENCRYPTED\r?\nDEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)\r?\n\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n/m,i=/^-----BEGIN (.*) KEY-----\r?\n/m,a=/^-----BEGIN (.*) KEY-----\r?\n([0-9A-z\n\r\+\/\=]+)\r?\n-----END \1 KEY-----$/m,o=e("evp_bytestokey"),s=e("browserify-aes");t.exports=function(e,t){var c,u=e.toString(),l=u.match(n);if(l){var p="aes"+l[1],f=new r(l[2],"hex"),h=new r(l[3].replace(/\r?\n/g,""),"base64"),d=o(t,f.slice(0,8),parseInt(l[1],10)).key,m=[],g=s.createDecipheriv(p,d,f);m.push(g.update(h)),m.push(g.final()),c=r.concat(m)}else{var v=u.match(a);c=new r(v[2].replace(/\r?\n/g,""),"base64")}var b=u.match(i)[1]+" KEY";return{tag:b,data:c}}}).call(this,e("buffer").Buffer)},{"browserify-aes":95,buffer:122,evp_bytestokey:172}],425:[function(e,t,r){(function(r){function n(e){var t;"object"!=typeof e||r.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=new r(e)); -var n,o,c=s(e,t),u=c.tag,l=c.data;switch(u){case"PUBLIC KEY":switch(o=a.PublicKey.decode(l,"der"),n=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPublicKey.decode(o.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return o.subjectPrivateKey=o.subjectPublicKey,{type:"ec",data:o};case"1.2.840.10040.4.1":return o.algorithm.params.pub_key=a.DSAparam.decode(o.subjectPublicKey.data,"der"),{type:"dsa",data:o.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+u);case"ENCRYPTED PRIVATE KEY":l=a.EncryptedPrivateKey.decode(l,"der"),l=i(l,t);case"PRIVATE KEY":switch(o=a.PrivateKey.decode(l,"der"),n=o.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return a.RSAPrivateKey.decode(o.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:o.algorithm.curve,privateKey:a.ECPrivateKey.decode(o.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return o.algorithm.params.priv_key=a.DSAparam.decode(o.subjectPrivateKey,"der"),{type:"dsa",params:o.algorithm.params};default:throw new Error("unknown key id "+n)}throw new Error("unknown key type "+u);case"RSA PUBLIC KEY":return a.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return a.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:a.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return l=a.ECPrivateKey.decode(l,"der"),{curve:l.parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+u)}}function i(e,t){var n=e.algorithm.decrypt.kde.kdeparams.salt,i=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),a=o[e.algorithm.decrypt.cipher.algo.join(".")],s=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,p=parseInt(a.split("-")[1],10)/8,f=u.pbkdf2Sync(t,n,i,p),h=c.createDecipheriv(a,f,s),d=[];return d.push(h.update(l)),d.push(h.final()),r.concat(d)}var a=e("./asn1"),o=e("./aesid.json"),s=e("./fixProc"),c=e("browserify-aes"),u=e("pbkdf2");t.exports=n,n.signature=a.signature}).call(this,e("buffer").Buffer)},{"./aesid.json":422,"./asn1":423,"./fixProc":424,"browserify-aes":95,buffer:122,pbkdf2:427}],426:[function(e,t,r){(function(e){function t(e,t){for(var r=0,n=e.length-1;n>=0;n--){var i=e[n];"."===i?e.splice(n,1):".."===i?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r--;r)e.unshift("..");return e}function n(e,t){if(e.filter)return e.filter(t);for(var r=[],n=0;n=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(r=o+"/"+r,i="/"===o.charAt(0))}return r=t(n(r.split("/"),function(e){return!!e}),!i).join("/"),(i?"/":"")+r||"."},r.normalize=function(e){var i=r.isAbsolute(e),a="/"===o(e,-1);return e=t(n(e.split("/"),function(e){return!!e}),!i).join("/"),e||i||(e="."),e&&a&&(e+="/"),(i?"/":"")+e},r.isAbsolute=function(e){return"/"===e.charAt(0)},r.join=function(){var e=Array.prototype.slice.call(arguments,0);return r.normalize(n(e,function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e}).join("/"))},r.relative=function(e,t){function n(e){for(var t=0;t=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=r.resolve(e).substr(1),t=r.resolve(t).substr(1);for(var i=n(e.split("/")),a=n(t.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c=6?"utf-8":"binary"}r.pbkdf2Sync=function(e,t,r,s,c){n.isBuffer(e)||(e=new n(e,o)),n.isBuffer(t)||(t=new n(t,o)),a(r,s),c=c||"sha1";var u,l=1,p=new n(s),f=new n(t.length+4);t.copy(f,0,0,t.length);for(var h,d,m=1;m<=l;m++){f.writeUInt32BE(m,t.length);var g=i(c,e).update(f).digest();u||(u=g.length,d=new n(u),l=Math.ceil(s/u),h=s-(l-1)*u),g.copy(d,0,0,u);for(var v=1;vn||t!==t)throw new TypeError("Bad key length")}},{}],429:[function(e,t,r){(function(e){(function(){var r,n,i;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof e&&null!==e&&e.hrtime?(t.exports=function(){return(r()-i)/1e6},n=e.hrtime,r=function(){var e;return e=n(),1e9*e[0]+e[1]},i=r()):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}).call(this,e("_process"))},{_process:431}],430:[function(e,t,r){(function(e){"use strict";function r(t,r,n,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick(function(){t.call(null,r)});case 3:return e.nextTick(function(){t.call(null,r,n)});case 4:return e.nextTick(function(){t.call(null,r,n,i)});default:for(a=new Array(s-1),o=0;o1)for(var r=1;r=t.length){a++;break}var o=t.slice(2,i-1);t.slice(i-1,i);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&a++,o.length<8&&a++,a)throw new Error("decryption error");return t.slice(i)}function a(e,t){e=new r(e),t=new r(t);var n=0,i=e.length;e.length!==t.length&&(n++,i=Math.min(e.length,t.length));for(var a=-1;++ap||new u(t).cmp(c.modulus)>=0)throw new Error("decryption error");var h;h=a?f(new u(t),c):l(t,c);var d=new r(p-h.length);if(d.fill(0),h=r.concat([d,h],p),4===s)return n(c,h);if(1===s)return i(c,h,a);if(3===s)return h;throw new Error("unknown padding")}}).call(this,e("buffer").Buffer)},{"./mgf":433,"./withPublic":436,"./xor":437,"bn.js":89,"browserify-rsa":111,buffer:122,"create-hash":130,"parse-asn1":425}],435:[function(e,t,r){(function(r){function n(e,t){var n=e.modulus.byteLength(),i=t.length,a=c("sha1").update(new r("")).digest(),o=a.length,f=2*o;if(i>n-f-2)throw new Error("message too long");var h=new r(n-i-f-2);h.fill(0);var d=n-o-1,m=s(o),g=l(r.concat([a,h,new r([1]),t],d),u(m,d)),v=l(m,u(g,o));return new p(r.concat([new r([0]),v,g],n))}function i(e,t,n){var i=t.length,o=e.modulus.byteLength();if(i>o-11)throw new Error("message too long");var s;return n?(s=new r(o-i-3),s.fill(255)):s=a(o-i-3),new p(r.concat([new r([0,n?1:2]),s,new r([0]),t],o))}function a(e,t){for(var n,i=new r(e),a=0,o=s(2*e),c=0;a=0)throw new Error("data too long for modulus")}return r?h(s,c):f(s,c)}}).call(this,e("buffer").Buffer)},{"./mgf":433,"./withPublic":436,"./xor":437,"bn.js":89,"browserify-rsa":111,buffer:122,"create-hash":130,"parse-asn1":425,randombytes:447}],436:[function(e,t,r){(function(r){function n(e,t){return new r(e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed().toArray())}var i=e("bn.js");t.exports=n}).call(this,e("buffer").Buffer)},{"bn.js":89,buffer:122}],437:[function(e,t,r){t.exports=function(e,t){for(var r=e.length,n=-1;++n1&&(n=r[0]+"@",e=r[1]),e=e.replace(O,".");var i=e.split("."),o=a(i,t).join(".");return n+o}function s(e){for(var t,r,n=[],i=0,a=e.length;i=55296&&t<=56319&&i65535&&(e-=65536,t+=R(e>>>10&1023|55296),e=56320|1023&e),t+=R(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:k}function l(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function p(e,t,r){var n=0;for(e=r?q(e/E):e>>1,e+=q(e/t);e>M*j>>1;n+=k)e=q(e/M);return q(n+(M+1)*e/(e+S))}function f(e){var t,r,n,a,o,s,l,f,h,d,m=[],g=e.length,v=0,b=C,y=A;for(r=e.lastIndexOf(T),r<0&&(r=0),n=0;n=128&&i("not-basic"),m.push(e.charCodeAt(n));for(a=r>0?r+1:0;a=g&&i("invalid-input"),f=u(e.charCodeAt(a++)),(f>=k||f>q((x-v)/s))&&i("overflow"),v+=f*s,h=l<=y?_:l>=y+j?j:l-y,!(fq(x/d)&&i("overflow"),s*=d;t=m.length+1,y=p(v-o,t,0==o),q(v/t)>x-b&&i("overflow"),b+=q(v/t),v%=t,m.splice(v++,0,b)}return c(m)}function h(e){var t,r,n,a,o,c,u,f,h,d,m,g,v,b,y,w=[];for(e=s(e),g=e.length,t=C,r=0,o=A,c=0;c=t&&mq((x-r)/v)&&i("overflow"),r+=(u-t)*v,t=u,c=0;cx&&i("overflow"),m==t){for(f=r,h=k;d=h<=o?_:h>=o+j?j:h-o,!(f= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=k-_,q=Math.floor,R=String.fromCharCode;if(y={version:"1.4.1",ucs2:{decode:s,encode:c},decode:f,encode:h,toASCII:m,toUnicode:d},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return y});else if(g&&v)if(t.exports==g)v.exports=y;else for(w in y)y.hasOwnProperty(w)&&(g[w]=y[w]);else n.punycode=y}(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],439:[function(e,t,r){"use strict";var n=String.prototype.replace,i=/%20/g;t.exports={default:"RFC3986",formatters:{RFC1738:function(e){return n.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},{}],440:[function(e,t,r){"use strict";var n=e("./stringify"),i=e("./parse"),a=e("./formats");t.exports={formats:a,parse:i,stringify:n}},{"./formats":439,"./parse":441,"./stringify":442}],441:[function(e,t,r){"use strict";var n=e("./utils"),i=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:n.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},o=function(e,t){for(var r={},n=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),a=0;a=0&&r.parseArrays&&o<=r.arrayLimit?(n=[],n[o]=s(e,t,r)):n[a]=s(e,t,r)}return n},c=function(e,t,r){if(e){var n=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,c=a.exec(n),u=c?n.slice(0,c.index):n,l=[];if(u){if(!r.plainObjects&&i.call(Object.prototype,u)&&!r.allowPrototypes)return;l.push(u)}for(var p=0;null!==(c=o.exec(n))&&p=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?r+=t.charAt(n):a<128?r+=i[a]:a<2048?r+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?r+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(n+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(n)),r+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return r},r.compact=function(e,t){if("object"!=typeof e||null===e)return e;var n=t||[],i=n.indexOf(e);if(i!==-1)return n[i];if(n.push(e),Array.isArray(e)){for(var a=[],o=0;o0&&u>c&&(u=c);for(var l=0;l=0?(p=m.substr(0,g),f=m.substr(g+1)):(p=m,f=""),h=decodeURIComponent(p),d=decodeURIComponent(f),n(o,h)?i(o[h])?o[h].push(d):o[h]=[o[h],d]:o[h]=d}return o};var i=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],445:[function(e,t,r){"use strict";function n(e,t){if(e.map)return e.map(t);for(var r=[],n=0;n65536)throw new Error("requested too many random bytes");var a=new r.Uint8Array(t);t>0&&o.getRandomValues(a);var s=new n(a.buffer);return"function"==typeof i?e.nextTick(function(){i(null,s)}):s}var o=r.crypto||r.msCrypto;o&&o.getRandomValues?t.exports=a:t.exports=i}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{_process:431,buffer:122}],448:[function(e,t,r){t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":449}],449:[function(e,t,r){"use strict";function n(e){return this instanceof n?(u.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),void this.once("end",i)):new n(e)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=n;var s=e("process-nextick-args"),c=e("core-util-is");c.inherits=e("inherits");var u=e("./_stream_readable"),l=e("./_stream_writable");c.inherits(n,u);for(var p=o(l.prototype),f=0;f0)if(t.ended&&!i){var o=new Error("stream.push() after EOF");e.emit("error",o)}else if(t.endEmitted&&i){var c=new Error("stream.unshift() after end event");e.emit("error",c)}else{var u;!t.decoder||i||n||(r=t.decoder.write(r),u=!t.objectMode&&0===r.length),i||(t.reading=!1),u||(t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,i?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&f(e))),d(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length=L?e=L:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function u(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=c(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e,t){var r=null;return M.isBuffer(t)||"string"==typeof t||null===t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}function p(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(B("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?I(h,e):h(e))}function h(e){B("emit readable"),e.emit("readable"),w(e)}function d(e,t){t.readingMore||(t.readingMore=!0,I(m,e,t))}function m(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=k(e,t.buffer,t.decoder),r}function k(e,t,r){var n;return ea.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),e-=o,0===e){o===a.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++n}return t.length-=n,i}function j(e,t){var r=q.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(a.copy(r,r.length-e,0,o),e-=o,0===e){o===a.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++i}return t.length-=i,r}function S(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,I(E,t,e))}function E(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function A(e,t){for(var r=0,n=e.length;r=t.highWaterMark||t.ended))return B("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?S(this):f(this),null;if(e=u(e,t),0===e&&t.ended)return 0===t.length&&S(this),null;var n=t.needReadable;B("need readable",n),(0===t.length||t.length-e0?x(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e, -0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&S(this)),null!==i&&this.emit("data",i),i},a.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},a.prototype.pipe=function(e,t){function i(e){B("onunpipe"),e===f&&o()}function a(){B("onend"),e.end()}function o(){B("cleanup"),e.removeListener("close",u),e.removeListener("finish",l),e.removeListener("drain",v),e.removeListener("error",c),e.removeListener("unpipe",i),f.removeListener("end",a),f.removeListener("end",o),f.removeListener("data",s),b=!0,!h.awaitDrain||e._writableState&&!e._writableState.needDrain||v()}function s(t){B("ondata"),y=!1;var r=e.write(t);!1!==r||y||((1===h.pipesCount&&h.pipes===e||h.pipesCount>1&&C(h.pipes,e)!==-1)&&!b&&(B("false write response, pause",f._readableState.awaitDrain),f._readableState.awaitDrain++,y=!0),f.pause())}function c(t){B("onerror",t),p(),e.removeListener("error",c),0===D(e,"error")&&e.emit("error",t)}function u(){e.removeListener("finish",l),p()}function l(){B("onfinish"),e.removeListener("close",u),p()}function p(){B("unpipe"),f.unpipe(e)}var f=this,h=this._readableState;switch(h.pipesCount){case 0:h.pipes=e;break;case 1:h.pipes=[h.pipes,e];break;default:h.pipes.push(e)}h.pipesCount+=1,B("pipe count=%d opts=%j",h.pipesCount,t);var d=(!t||t.end!==!1)&&e!==r.stdout&&e!==r.stderr,m=d?a:o;h.endEmitted?I(m):f.once("end",m),e.on("unpipe",i);var v=g(f);e.on("drain",v);var b=!1,y=!1;return f.on("data",s),n(e,"error",c),e.once("close",u),e.once("finish",l),e.emit("pipe",f),h.flowing||(B("pipe resume"),f.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this),this);if(!e){var r=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i-1?setImmediate:j;o.WritableState=a;var E=e("core-util-is");E.inherits=e("inherits");var A,C={deprecate:e("util-deprecate")};!function(){try{A=e("stream")}catch(e){}finally{A||(A=e("events").EventEmitter)}}();var T=e("buffer").Buffer,I=e("buffer-shims");E.inherits(o,A),a.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(a.prototype,"buffer",{get:C.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.")})}catch(e){}}();var P;"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(P=Function.prototype[Symbol.hasInstance],Object.defineProperty(o,Symbol.hasInstance,{value:function(e){return!!P.call(this,e)||e&&e._writableState instanceof a}})):P=function(e){return e instanceof this},o.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},o.prototype.write=function(e,t,r){var i=this._writableState,a=!1;return"function"==typeof t&&(r=t,t=null),T.isBuffer(e)?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=n),i.ended?s(this,r):c(this,i,e,r)&&(i.pendingcb++,a=l(this,i,e,t,r)),a},o.prototype.cork=function(){var e=this._writableState;e.corked++},o.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},o.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},o.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},o.prototype._writev=null,o.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!==e&&void 0!==e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||x(this,n,r)}}).call(this,e("_process"))},{"./_stream_duplex":449,_process:431,buffer:122,"buffer-shims":120,"core-util-is":128,events:171,inherits:215,"process-nextick-args":430,"util-deprecate":528}],454:[function(e,t,r){"use strict";function n(){this.head=null,this.tail=null,this.length=0}var i=(e("buffer").Buffer,e("buffer-shims"));t.exports=n,n.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},n.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},n.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},n.prototype.clear=function(){this.head=this.tail=null,this.length=0},n.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},n.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),r=this.head,n=0;r;)r.data.copy(t,n),n+=r.data.length,r=r.next;return t}},{buffer:122,"buffer-shims":120}],455:[function(e,t,r){t.exports=e("./lib/_stream_passthrough.js")},{"./lib/_stream_passthrough.js":450}],456:[function(e,t,r){(function(n){var i=function(){try{return e("stream")}catch(e){}}();r=t.exports=e("./lib/_stream_readable.js"),r.Stream=i||r,r.Readable=r,r.Writable=e("./lib/_stream_writable.js"),r.Duplex=e("./lib/_stream_duplex.js"),r.Transform=e("./lib/_stream_transform.js"),r.PassThrough=e("./lib/_stream_passthrough.js"),!n.browser&&"disable"===n.env.READABLE_STREAM&&i&&(t.exports=i)}).call(this,e("_process"))},{"./lib/_stream_duplex.js":449,"./lib/_stream_passthrough.js":450,"./lib/_stream_readable.js":451,"./lib/_stream_transform.js":452,"./lib/_stream_writable.js":453,_process:431}],457:[function(e,t,r){t.exports=e("./lib/_stream_transform.js")},{"./lib/_stream_transform.js":452}],458:[function(e,t,r){t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":453}],459:[function(e,t,r){var n=e("events").EventEmitter,i=e("backoff"),a=function(){};t.exports=function(e){return function(t,r){function o(n,i){function o(e){l=a,h.removeListener("connect",f),h.removeListener("error",p),h.removeListener("close",p),h.removeListener("end",p),"Request"==h.constructor.name&&h.on("error",a)}function p(e){if(s.connected=!1,o(e),s.emit("disconnect",e),s.reconnect)try{c.backoff()}catch(e){}}function f(){c.reset(),s.connected=!0,r&&h.removeListener("connect",r),s.emit("connect",h)}if(s.reconnect){l(),s.emit("reconnect",n,i);var h=e.apply(null,u);h!==s._connection&&s.emit("connection",h),s._connection=h,l=o,h.on("error",p).on("close",p).on("end",p),t.immediate||"Request"==h.constructor.name?(s.connected=!0,s.emit("connect",h),h.once("data",function(){c.reset()})):h.on("connect",f)}}r="function"==typeof t?t:r,t="object"==typeof t?t:{initialDelay:1e3,maxDelay:3e4},r||(r=t.onConnect);var s=t.emitter||new n;s.connected=!1,s.reconnect=!0,r&&s.on("connect",r);var c=(i[t.type]||i.fibonacci)(t);c.on("backoff",function(e,t){s.emit("backoff",e,t)});var u,l=a;return c.on("ready",o),s.connect=s.listen=function(){return this.reconnect=!0,c.reset(),u=[].slice.call(arguments),o(0,0),s},s.end=s.disconnect=function(){return s.reconnect=!1,s._connection&&s._connection.end(),s.emit("disconnect"),s},s}}},{backoff:81,events:171}],460:[function(e,t,r){"use strict";function n(e,t,r){"function"==typeof t&&(r=t);var n={};return"object"==typeof t?s(n,t,{uri:e}):"string"==typeof e?s(n,{uri:e}):s(n,e),n.callback=r||n.callback,n}function i(e,t,r){if("undefined"==typeof e)throw new Error("undefined is not a valid uri or options object.");var a=n(e,t,r);if("HEAD"===a.method&&l(a))throw new Error("HTTP HEAD requests MUST NOT include a request body.");return new i.Request(a)}function a(e){var t=e.toUpperCase();return function(e,r,a){var o=n(e,r,a);return o.method=t,i(o,o.callback)}}function o(e,t,r,i){return function(a,o,c){var u=n(a,o,c),l={};return s(!0,l,t,u),l.pool=u.pool||t.pool,i&&(l.method=i.toUpperCase()),"function"==typeof r&&(e=r),e(l,l.callback)}}var s=e("extend"),c=e("./lib/cookies"),u=e("./lib/helpers"),l=u.paramsHaveRequestBody;i.get=a("get"),i.head=a("head"),i.post=a("post"),i.put=a("put"),i.patch=a("patch"),i.del=a("delete"),i.delete=a("delete"),i.jar=function(e){return c.jar(e)},i.cookie=function(e){return c.parse(e)},i.defaults=function(e,t){var r=this;e=e||{},"function"==typeof e&&(t=e,e={});var n=o(r,e,t),i=["get","head","post","put","patch","del","delete"];return i.forEach(function(i){n[i]=o(r[i],e,t,i)}),n.cookie=o(r.cookie,e,t),n.jar=r.jar,n.defaults=r.defaults,n},i.forever=function(e,t){var r={};return t&&s(r,t),e&&(r.agentOptions=e),r.forever=!0,i.defaults(r)},t.exports=i,i.Request=e("./request"),i.initParams=n,Object.defineProperty(i,"debug",{enumerable:!0,get:function(){return i.Request.debug},set:function(e){i.Request.debug=e}})},{"./lib/cookies":462,"./lib/helpers":465,"./request":471,extend:173}],461:[function(e,t,r){"use strict";function n(e){this.request=e,this.hasAuth=!1,this.sentAuth=!1,this.bearerToken=null,this.user=null,this.pass=null}var i=e("caseless"),a=e("uuid"),o=e("./helpers"),s=o.md5,c=o.toBase64;n.prototype.basic=function(e,t,r){var n=this;("string"!=typeof e||void 0!==t&&"string"!=typeof t)&&n.request.emit("error",new Error("auth() received invalid user or password")),n.user=e,n.pass=t,n.hasAuth=!0;var i=e+":"+(t||"");if(r||"undefined"==typeof r){var a="Basic "+c(i);return n.sentAuth=!0,a}},n.prototype.bearer=function(e,t){var r=this;if(r.bearerToken=e,r.hasAuth=!0,t||"undefined"==typeof t){"function"==typeof e&&(e=e());var n="Bearer "+(e||"");return r.sentAuth=!0,n}},n.prototype.digest=function(e,t,r){for(var n=this,i={},o=/([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi;;){var c=o.exec(r);if(!c)break;i[c[1]]=c[2]||c[3]}var u=function(e,t,r,n,i,a){var o=s(t+":"+r+":"+n);return e&&"md5-sess"===e.toLowerCase()?s(o+":"+i+":"+a):o},l=/(^|,)\s*auth\s*($|,)/.test(i.qop)&&"auth",p=l&&"00000001",f=l&&a().replace(/-/g,""),h=u(i.algorithm,n.user,i.realm,n.pass,i.nonce,f),d=s(e+":"+t),m=s(l?h+":"+i.nonce+":"+p+":"+f+":"+l+":"+d:h+":"+i.nonce+":"+d),g={username:n.user,realm:i.realm,nonce:i.nonce,uri:t,qop:l,response:m,nc:p,cnonce:f,algorithm:i.algorithm,opaque:i.opaque};r=[];for(var v in g)g[v]&&("qop"===v||"nc"===v||"algorithm"===v?r.push(v+"="+g[v]):r.push(v+'="'+g[v]+'"'));return r="Digest "+r.join(", "),n.sentAuth=!0,r},n.prototype.onRequest=function(e,t,r,n){var i,a=this,o=a.request;void 0===n&&void 0===e?a.request.emit("error",new Error("no auth mechanism defined")):i=void 0!==n?a.bearer(n,r):a.basic(e,t,r),i&&o.setHeader("authorization",i)},n.prototype.onResponse=function(e){var t=this,r=t.request;if(!t.hasAuth||t.sentAuth)return null;var n=i(e.headers),a=n.get("www-authenticate"),o=a&&a.split(" ")[0].toLowerCase();switch(r.debug("reauth",o),o){case"basic":return t.basic(t.user,t.pass,!0);case"bearer":return t.bearer(t.bearerToken,!0);case"digest":return t.digest(r.method,r.path,a)}},r.Auth=n},{"./helpers":465,caseless:124,uuid:532}],462:[function(e,t,r){"use strict";function n(e){var t=this;t._jar=new o(e,{looseMode:!0})}var i=e("tough-cookie"),a=i.Cookie,o=i.CookieJar;r.parse=function(e){if(e&&e.uri&&(e=e.uri),"string"!=typeof e)throw new Error("The cookie function only accepts STRING as param");return a.parse(e,{loose:!0})},n.prototype.setCookie=function(e,t,r){var n=this;return n._jar.setCookieSync(e,t,r||{})},n.prototype.getCookieString=function(e){var t=this;return t._jar.getCookieStringSync(e)},n.prototype.getCookies=function(e){var t=this;return t._jar.getCookiesSync(e)},r.jar=function(e){return new n(e)}},{"tough-cookie":517}],463:[function(e,t,r){(function(e){"use strict";function r(e){return e.replace(/^\.*/,".").toLowerCase()}function n(e){e=e.trim().toLowerCase();var t=e.split(":",2),n=r(t[0]),i=t[1],a=e.indexOf(":")>-1;return{hostname:n,port:i,hasPort:a}}function i(e,t){var i=e.port||("https:"===e.protocol?"443":"80"),a=r(e.hostname),o=t.split(",");return o.map(n).some(function(e){var t=a.indexOf(e.hostname),r=t>-1&&t===a.length-e.hostname.length;return e.hasPort?i===e.port&&r:r})}function a(t){var r=e.env.NO_PROXY||e.env.no_proxy||"";return"*"===r?null:""!==r&&i(t,r)?null:"http:"===t.protocol?e.env.HTTP_PROXY||e.env.http_proxy||null:"https:"===t.protocol?e.env.HTTPS_PROXY||e.env.https_proxy||e.env.HTTP_PROXY||e.env.http_proxy||null:null}t.exports=a}).call(this,e("_process"))},{_process:431}],464:[function(e,t,r){"use strict";function n(e){this.request=e}var i=e("fs"),a=e("querystring"),o=e("har-validator"),s=e("extend");n.prototype.reducer=function(e,t){if(void 0===e[t.name])return e[t.name]=t.value,e;var r=[e[t.name],t.value];return e[t.name]=r,e},n.prototype.prep=function(e){function t(t){return t.some(function(t){return 0===e.postData.mimeType.indexOf(t)})}if(e.queryObj={},e.headersObj={},e.postData.jsonObj=!1,e.postData.paramsObj=!1,e.queryString&&e.queryString.length&&(e.queryObj=e.queryString.reduce(this.reducer,{})),e.headers&&e.headers.length&&(e.headersObj=e.headers.reduceRight(function(e,t){return e[t.name]=t.value,e},{})),e.cookies&&e.cookies.length){var r=e.cookies.map(function(e){return e.name+"="+e.value});r.length&&(e.headersObj.cookie=r.join("; "))}if(t(["multipart/mixed","multipart/related","multipart/form-data","multipart/alternative"]))e.postData.mimeType="multipart/form-data";else if(t(["application/x-www-form-urlencoded"]))e.postData.params?(e.postData.paramsObj=e.postData.params.reduce(this.reducer,{}),e.postData.text=a.stringify(e.postData.paramsObj)):e.postData.text="";else if(t(["text/json","text/x-json","application/json","application/x-json"])&&(e.postData.mimeType="application/json",e.postData.text))try{e.postData.jsonObj=JSON.parse(e.postData.text)}catch(t){this.request.debug(t),e.postData.mimeType="text/plain"}return e},n.prototype.options=function(e){function t(e){return 0===n.postData.mimeType.indexOf(e)}if(!e.har)return e;var r={};if(s(r,e.har),r.log&&r.log.entries&&(r=r.log.entries[0]),r.url=r.url||e.url||e.uri||e.baseUrl||"/",r.httpVersion=r.httpVersion||"HTTP/1.1",r.queryString=r.queryString||[],r.headers=r.headers||[],r.cookies=r.cookies||[],r.postData=r.postData||{},r.postData.mimeType=r.postData.mimeType||"application/octet-stream",r.bodySize=0,r.headersSize=0,r.postData.size=0,!o.request(r))return e;var n=this.prep(r);return n.url&&(e.url=n.url),n.method&&(e.method=n.method),Object.keys(n.queryObj).length&&(e.qs=n.queryObj),Object.keys(n.headersObj).length&&(e.headers=n.headersObj),t("application/x-www-form-urlencoded")?e.form=n.postData.paramsObj:t("application/json")?n.postData.jsonObj&&(e.body=n.postData.jsonObj,e.json=!0):t("multipart/form-data")?(e.formData={},n.postData.params.forEach(function(t){var r={};return t.fileName||t.fileName||t.contentType?(t.fileName&&!t.value?r.value=i.createReadStream(t.fileName):t.value&&(r.value=t.value),t.fileName&&(r.options={filename:t.fileName,contentType:t.contentType?t.contentType:null}),void(e.formData[t.name]=r)):void(e.formData[t.name]=t.value)})):n.postData.text&&(e.body=n.postData.text),e},r.Har=n},{extend:173,fs:119,"har-validator":197,querystring:446}],465:[function(e,t,r){(function(t,n){"use strict";function i(e){return e.body||e.requestBodyStream||e.json&&"boolean"!=typeof e.json||e.multipart}function a(e,t){var r;try{r=JSON.stringify(e,t)}catch(n){r=p(e,t)}return r}function o(e){return f.createHash("md5").update(e).digest("hex")}function s(e){return e.readable&&e.path&&e.mode}function c(e){return new n(e||"","utf8").toString("base64")}function u(e){var t={};return Object.keys(e).forEach(function(r){t[r]=e[r]}),t}function l(){var e=t.version.replace("v","").split(".");return{major:parseInt(e[0],10),minor:parseInt(e[1],10),patch:parseInt(e[2],10)}}var p=e("json-stringify-safe"),f=e("crypto"),h="undefined"==typeof setImmediate?t.nextTick:setImmediate;r.paramsHaveRequestBody=i,r.safeStringify=a,r.md5=o,r.isReadStream=s,r.toBase64=c,r.copy=u,r.version=l,r.defer=h}).call(this,e("_process"),e("buffer").Buffer)},{_process:431,buffer:122,crypto:134,"json-stringify-safe":229}],466:[function(e,t,r){(function(t){"use strict";function n(e){this.request=e,this.boundary=i(),this.chunked=!1,this.body=null}var i=e("uuid"),a=e("combined-stream"),o=e("isstream");n.prototype.isChunked=function(e){var t=this,r=!1,n=e.data||e;return n.forEach||t.request.emit("error",new Error("Argument error, options.multipart.")),void 0!==e.chunked&&(r=e.chunked),"chunked"===t.request.getHeader("transfer-encoding")&&(r=!0),r||n.forEach(function(e){"undefined"==typeof e.body&&t.request.emit("error",new Error("Body attribute missing in multipart.")),o(e.body)&&(r=!0)}),r},n.prototype.setHeaders=function(e){var t=this;e&&!t.request.hasHeader("transfer-encoding")&&t.request.setHeader("transfer-encoding","chunked");var r=t.request.getHeader("content-type");r&&r.indexOf("multipart")!==-1?r.indexOf("boundary")!==-1?t.boundary=r.replace(/.*boundary=([^\s;]+).*/,"$1"):t.request.setHeader("content-type",r+"; boundary="+t.boundary):t.request.setHeader("content-type","multipart/related; boundary="+t.boundary)},n.prototype.build=function(e,r){function n(e){return"number"==typeof e&&(e=e.toString()),r?o.append(e):o.push(new t(e))}var i=this,o=r?new a:[];return i.request.preambleCRLF&&n("\r\n"),e.forEach(function(e){var t="--"+i.boundary+"\r\n";Object.keys(e).forEach(function(r){"body"!==r&&(t+=r+": "+e[r]+"\r\n")}),t+="\r\n",n(t),n(e.body),n("\r\n")}),n("--"+i.boundary+"--"),i.request.postambleCRLF&&n("\r\n"),o},n.prototype.onRequest=function(e){var t=this,r=t.isChunked(e),n=e.data||e;t.setHeaders(r),t.chunked=r,t.body=t.build(n,r)},r.Multipart=n}).call(this,e("buffer").Buffer)},{buffer:122,"combined-stream":127,isstream:219,uuid:532}],467:[function(e,t,r){(function(t){"use strict";function n(e){this.request=e,this.params=null}var i=e("url"),a=e("qs"),o=e("caseless"),s=e("uuid"),c=e("oauth-sign"),u=e("crypto");n.prototype.buildParams=function(e,t,r,n,i,a){var o={};for(var u in e)o["oauth_"+u]=e[u];o.oauth_version||(o.oauth_version="1.0"),o.oauth_timestamp||(o.oauth_timestamp=Math.floor(Date.now()/1e3).toString()),o.oauth_nonce||(o.oauth_nonce=s().replace(/-/g,"")),o.oauth_signature_method||(o.oauth_signature_method="HMAC-SHA1");var l=o.oauth_consumer_secret||o.oauth_private_key;delete o.oauth_consumer_secret,delete o.oauth_private_key;var p=o.oauth_token_secret;delete o.oauth_token_secret;var f=o.oauth_realm;delete o.oauth_realm,delete o.oauth_transport_method;var h=t.protocol+"//"+t.host+t.pathname,d=a.parse([].concat(n,i,a.stringify(o)).join("&"));return o.oauth_signature=c.sign(o.oauth_signature_method,r,h,d,l,p),f&&(o.realm=f),o},n.prototype.buildBodyHash=function(e,r){["HMAC-SHA1","RSA-SHA1"].indexOf(e.signature_method||"HMAC-SHA1")<0&&this.request.emit("error",new Error("oauth: "+e.signature_method+" signature_method not supported with body_hash signing."));var n=u.createHash("sha1");n.update(r||"");var i=n.digest("hex");return new t(i).toString("base64")},n.prototype.concatParams=function(e,t,r){r=r||"";var n=Object.keys(e).filter(function(e){return"realm"!==e&&"oauth_signature"!==e}).sort();return e.realm&&n.splice(0,0,"realm"),n.push("oauth_signature"),n.map(function(t){return t+"="+r+c.rfc3986(e[t])+r}).join(t)},n.prototype.onRequest=function(e){var t=this;t.params=e;var r,n,s=t.request.uri||{},c=t.request.method||"",u=o(t.request.headers),l=t.request.body||"",p=t.request.qsLib||a,f=u.get("content-type")||"",h="application/x-www-form-urlencoded",d=e.transport_method||"header";f.slice(0,h.length)===h&&(f=h,r=l),s.query&&(n=s.query),"body"!==d||"POST"===c&&f===h||t.request.emit("error",new Error("oauth: transport_method of body requires POST and content-type "+h)),r||"boolean"!=typeof e.body_hash||(e.body_hash=t.buildBodyHash(e,t.request.body.toString()));var m=t.buildParams(e,s,c,n,r,p);switch(d){case"header":t.request.setHeader("Authorization","OAuth "+t.concatParams(m,",",'"'));break;case"query":var g=t.request.uri.href+=(n?"&":"?")+t.concatParams(m,"&");t.request.uri=i.parse(g),t.request.path=t.request.uri.path;break;case"body":t.request.body=(r?r+"&":"")+t.concatParams(m,"&");break;default:t.request.emit("error",new Error("oauth: transport_method invalid"))}},r.OAuth=n}).call(this,e("buffer").Buffer)},{buffer:122,caseless:124,crypto:134,"oauth-sign":410,qs:440,url:526,uuid:532}],468:[function(e,t,r){"use strict";function n(e){this.request=e,this.lib=null,this.useQuerystring=null,this.parseOptions=null,this.stringifyOptions=null}var i=e("qs"),a=e("querystring");n.prototype.init=function(e){this.lib||(this.useQuerystring=e.useQuerystring,this.lib=this.useQuerystring?a:i,this.parseOptions=e.qsParseOptions||{},this.stringifyOptions=e.qsStringifyOptions||{})},n.prototype.stringify=function(e){return this.useQuerystring?this.rfc3986(this.lib.stringify(e,this.stringifyOptions.sep||null,this.stringifyOptions.eq||null,this.stringifyOptions)):this.lib.stringify(e,this.stringifyOptions)},n.prototype.parse=function(e){return this.useQuerystring?this.lib.parse(e,this.parseOptions.sep||null,this.parseOptions.eq||null,this.parseOptions):this.lib.parse(e,this.parseOptions)},n.prototype.rfc3986=function(e){return e.replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},n.prototype.unescape=a.unescape,r.Querystring=n},{qs:440,querystring:446}],469:[function(e,t,r){"use strict";function n(e){this.request=e,this.followRedirect=!0,this.followRedirects=!0,this.followAllRedirects=!1,this.followOriginalHttpMethod=!1,this.allowRedirect=function(){return!0},this.maxRedirects=10,this.redirects=[],this.redirectsFollowed=0,this.removeRefererHeader=!1}var i=e("url"),a=/^https?:/;n.prototype.onRequest=function(e){var t=this;void 0!==e.maxRedirects&&(t.maxRedirects=e.maxRedirects),"function"==typeof e.followRedirect&&(t.allowRedirect=e.followRedirect),void 0!==e.followRedirect&&(t.followRedirects=!!e.followRedirect),void 0!==e.followAllRedirects&&(t.followAllRedirects=e.followAllRedirects),(t.followRedirects||t.followAllRedirects)&&(t.redirects=t.redirects||[]),void 0!==e.removeRefererHeader&&(t.removeRefererHeader=e.removeRefererHeader),void 0!==e.followOriginalHttpMethod&&(t.followOriginalHttpMethod=e.followOriginalHttpMethod)},n.prototype.redirectTo=function(e){var t=this,r=t.request,n=null;if(e.statusCode>=300&&e.statusCode<400&&e.caseless.has("location")){var i=e.caseless.get("location");if(r.debug("redirect",i),t.followAllRedirects)n=i;else if(t.followRedirects)switch(r.method){case"PATCH":case"PUT":case"POST":case"DELETE":break;default:n=i}}else if(401===e.statusCode){var a=r._auth.onResponse(e);a&&(r.setHeader("authorization",a),n=r.uri)}return n},n.prototype.onResponse=function(e){var t=this,r=t.request,n=t.redirectTo(e);if(!n||!t.allowRedirect.call(r,e))return!1;if(r.debug("redirect to",n),e.resume&&e.resume(),t.redirectsFollowed>=t.maxRedirects)return r.emit("error",new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+r.uri.href)),!1;t.redirectsFollowed+=1,a.test(n)||(n=i.resolve(r.uri.href,n));var o=r.uri;return r.uri=i.parse(n),r.uri.protocol!==o.protocol&&delete r.agent,t.redirects.push({statusCode:e.statusCode,redirectUri:n}),t.followAllRedirects&&"HEAD"!==r.method&&401!==e.statusCode&&307!==e.statusCode&&(r.method=t.followOriginalHttpMethod?r.method:"GET"),delete r.src,delete r.req,delete r._started,401!==e.statusCode&&307!==e.statusCode&&(delete r.body,delete r._form,r.headers&&(r.removeHeader("host"),r.removeHeader("content-type"),r.removeHeader("content-length"),r.uri.hostname!==r.originalHost.split(":")[0]&&r.removeHeader("authorization"))),t.removeRefererHeader||r.setHeader("referer",o.href),r.emit("redirect"),r.init(),!0},r.Redirect=n},{url:526}],470:[function(e,t,r){"use strict";function n(e){var t=e.port,r=e.protocol,n=e.hostname+":";return n+=t?t:"https:"===r?"443":"80"}function i(e,t){var r=t.reduce(function(e,t){return e[t.toLowerCase()]=!0,e},{});return Object.keys(e).filter(function(e){return r[e.toLowerCase()]}).reduce(function(t,r){return t[r]=e[r],t},{})}function a(e,t){var r=e.proxy,n={proxy:{host:r.hostname,port:+r.port,proxyAuth:r.auth,headers:t},headers:e.headers,ca:e.ca,cert:e.cert, -key:e.key,passphrase:e.passphrase,pfx:e.pfx,ciphers:e.ciphers,rejectUnauthorized:e.rejectUnauthorized,secureOptions:e.secureOptions,secureProtocol:e.secureProtocol};return n}function o(e,t){var r="https:"===e.protocol?"https":"http",n="https:"===t.protocol?"Https":"Http";return[r,n].join("Over")}function s(e){var t=e.uri,r=e.proxy,n=o(t,r);return l[n]}function c(e){this.request=e,this.proxyHeaderWhiteList=p,this.proxyHeaderExclusiveList=[],"undefined"!=typeof e.tunnel&&(this.tunnelOverride=e.tunnel)}var u=e("url"),l=e("tunnel-agent"),p=["accept","accept-charset","accept-encoding","accept-language","accept-ranges","cache-control","content-encoding","content-language","content-location","content-md5","content-range","content-type","connection","date","expect","max-forwards","pragma","referer","te","user-agent","via"],f=["proxy-authorization"];c.prototype.isEnabled=function(){var e=this,t=e.request;return"undefined"!=typeof e.tunnelOverride?e.tunnelOverride:"https:"===t.uri.protocol},c.prototype.setup=function(e){var t=this,r=t.request;if(e=e||{},"string"==typeof r.proxy&&(r.proxy=u.parse(r.proxy)),!r.proxy||!r.tunnel)return!1;e.proxyHeaderWhiteList&&(t.proxyHeaderWhiteList=e.proxyHeaderWhiteList),e.proxyHeaderExclusiveList&&(t.proxyHeaderExclusiveList=e.proxyHeaderExclusiveList);var o=t.proxyHeaderExclusiveList.concat(f),c=t.proxyHeaderWhiteList.concat(o),l=i(r.headers,c);l.host=n(r.uri),o.forEach(r.removeHeader,r);var p=s(r),h=a(r,l);return r.agent=p(h),!0},c.defaultProxyHeaderWhiteList=p,c.defaultProxyHeaderExclusiveList=f,r.Tunnel=c},{"tunnel-agent":524,url:526}],471:[function(e,t,r){(function(r,n){"use strict";function i(e,t){var r={};for(var n in t){var i=e.indexOf(n)===-1;i&&(r[n]=t[n])}return r}function a(e,t){var r={};for(var n in t){var i=!(e.indexOf(n)===-1),a="function"==typeof t[n];i&&a||(r[n]=t[n])}return r}function o(){var e=this;return{uri:e.uri,method:e.method,headers:e.headers}}function s(){var e=this;return{statusCode:e.statusCode,body:e.body,headers:e.headers,request:o.call(e.request)}}function c(e){var t=this;e.har&&(t._har=new O(t),e=t._har.options(e)),d.Stream.call(t);var r=Object.keys(c.prototype),n=i(r,e);S(t,n),e=a(r,e),t.readable=!0,t.writable=!0,e.method&&(t.explicitMethod=!0),t._qs=new P(t),t._auth=new D(t),t._oauth=new M(t),t._multipart=new q(t),t._redirect=new R(t),t._tunnel=new z(t),t.init(e)}function u(){c.debug&&console.error("REQUEST %s",h.format.apply(h,arguments))}var l=e("http"),p=e("https"),f=e("url"),h=e("util"),d=e("stream"),m=e("zlib"),g=e("hawk"),v=e("aws-sign2"),b=e("aws4"),y=e("http-signature"),w=e("mime-types"),x=e("stringstream"),k=e("caseless"),_=e("forever-agent"),j=e("form-data"),S=e("extend"),E=e("isstream"),A=e("is-typedarray").strict,C=e("./lib/helpers"),T=e("./lib/cookies"),I=e("./lib/getProxyFromURI"),P=e("./lib/querystring").Querystring,O=e("./lib/har").Har,D=e("./lib/auth").Auth,M=e("./lib/oauth").OAuth,q=e("./lib/multipart").Multipart,R=e("./lib/redirect").Redirect,z=e("./lib/tunnel").Tunnel,B=e("performance-now"),F=C.safeStringify,N=C.isReadStream,L=C.toBase64,U=C.defer,H=C.copy,K=C.version,$=T.jar(),V={};h.inherits(c,d.Stream),c.debug=r.env.NODE_DEBUG&&/\brequest\b/.test(r.env.NODE_DEBUG),c.prototype.debug=u,c.prototype.init=function(e){function t(){if(A(r.body)&&(r.body=new n(r.body)),!r.hasHeader("content-length")){var e;e="string"==typeof r.body?n.byteLength(r.body):Array.isArray(r.body)?r.body.reduce(function(e,t){return e+t.length},0):r.body.length,e?r.setHeader("content-length",e):r.emit("error",new Error("Argument error, options.body."))}}var r=this;e||(e={}),r.headers=r.headers?H(r.headers):{};for(var i in r.headers)"undefined"==typeof r.headers[i]&&delete r.headers[i];if(k.httpify(r,r.headers),r.method||(r.method=e.method||"GET"),r.localAddress||(r.localAddress=e.localAddress),r._qs.init(e),u(e),r.pool||r.pool===!1||(r.pool=V),r.dests=r.dests||[],r.__isRequestRequest=!0,!r._callback&&r.callback&&(r._callback=r.callback,r.callback=function(){r._callbackCalled||(r._callbackCalled=!0,r._callback.apply(r,arguments))},r.on("error",r.callback.bind()),r.on("complete",r.callback.bind(r,null))),!r.uri&&r.url&&(r.uri=r.url,delete r.url),r.baseUrl){if("string"!=typeof r.baseUrl)return r.emit("error",new Error("options.baseUrl must be a string"));if("string"!=typeof r.uri)return r.emit("error",new Error("options.uri must be a string when using options.baseUrl"));if(0===r.uri.indexOf("//")||r.uri.indexOf("://")!==-1)return r.emit("error",new Error("options.uri must be a path when using options.baseUrl"));var a=r.baseUrl.lastIndexOf("/")===r.baseUrl.length-1,o=0===r.uri.indexOf("/");a&&o?r.uri=r.baseUrl+r.uri.slice(1):a||o?r.uri=r.baseUrl+r.uri:""===r.uri?r.uri=r.baseUrl:r.uri=r.baseUrl+"/"+r.uri,delete r.baseUrl}if(!r.uri)return r.emit("error",new Error("options.uri is a required argument"));if("string"==typeof r.uri&&(r.uri=f.parse(r.uri)),r.uri.href||(r.uri.href=f.format(r.uri)),"unix:"===r.uri.protocol)return r.emit("error",new Error("`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`"));if("unix"===r.uri.host&&r.enableUnixSocket(),r.strictSSL===!1&&(r.rejectUnauthorized=!1),r.uri.pathname||(r.uri.pathname="/"),!(r.uri.host||r.uri.hostname&&r.uri.port||r.uri.isUnix)){var s=f.format(r.uri),c='Invalid URI "'+s+'"';return 0===Object.keys(e).length&&(c+=". This can be caused by a crappy redirection."),r.abort(),r.emit("error",new Error(c))}if(r.hasOwnProperty("proxy")||(r.proxy=I(r.uri)),r.tunnel=r._tunnel.isEnabled(),r.proxy&&r._tunnel.setup(e),r._redirect.onRequest(e),r.setHost=!1,!r.hasHeader("host")){var h=r.originalHostHeaderName||"host";r.setHeader(h,r.uri.host),r.setHost=!0}if(r.jar(r._jar||e.jar),r.uri.port||("http:"===r.uri.protocol?r.uri.port=80:"https:"===r.uri.protocol&&(r.uri.port=443)),r.proxy&&!r.tunnel?(r.port=r.proxy.port,r.host=r.proxy.hostname):(r.port=r.uri.port,r.host=r.uri.hostname),e.form&&r.form(e.form),e.formData){var d=e.formData,m=r.form(),g=function(e,t){t&&t.hasOwnProperty("value")&&t.hasOwnProperty("options")?m.append(e,t.value,t.options):m.append(e,t)};for(var v in d)if(d.hasOwnProperty(v)){var b=d[v];if(b instanceof Array)for(var y=0;y=100&&e<200||204===e||304===e};if(t.gzip&&!c(e.statusCode)){var l=e.headers["content-encoding"]||"identity";l=l.trim().toLowerCase();var f={flush:m.Z_SYNC_FLUSH,finishFlush:m.Z_SYNC_FLUSH};"gzip"===l?(o=m.createGunzip(f),e.pipe(o)):"deflate"===l?(o=m.createInflate(f),e.pipe(o)):("identity"!==l&&u("ignoring unrecognized Content-Encoding "+l),o=e)}else o=e;t.encoding&&(0!==t.dests.length?console.error("Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid."):o.setEncoding?o.setEncoding(t.encoding):o=o.pipe(x(t.encoding))),t._paused&&o.pause(),t.responseContent=o,t.emit("response",e),t.dests.forEach(function(e){t.pipeDest(e)}),o.on("data",function(r){t.timing&&!t.responseStarted&&(t.responseStartTime=(new Date).getTime(),e.responseStartTime=t.responseStartTime),t._destdata=!0,t.emit("data",r)}),o.once("end",function(e){t.emit("end",e)}),o.on("error",function(e){t.emit("error",e)}),o.on("close",function(){t.emit("close")}),t.callback?t.readResponseBody(e):t.on("end",function(){return t._aborted?void u("aborted",t.uri.href):void t.emit("complete",e)}),u("finish init function",t.uri.href)}},c.prototype.readResponseBody=function(e){var t=this;u("reading response's body");var r=[],i=0,a=[];t.on("data",function(e){n.isBuffer(e)?e.length&&(i+=e.length,r.push(e)):a.push(e)}),t.on("end",function(){if(u("end event",t.uri.href),t._aborted)return u("aborted",t.uri.href),r=[],void(i=0);if(i?(u("has body",t.uri.href,i),e.body=n.concat(r,i),null!==t.encoding&&(e.body=e.body.toString(t.encoding)),r=[],i=0):a.length&&("utf8"===t.encoding&&a[0].length>0&&"\ufeff"===a[0][0]&&(a[0]=a[0].substring(1)),e.body=a.join("")),t._json)try{e.body=JSON.parse(e.body,t._jsonReviver)}catch(e){u("invalid JSON received",t.uri.href)}u("emitting complete",t.uri.href),"undefined"!=typeof e.body||t._json||(e.body=null===t.encoding?new n(0):""),t.emit("complete",e,e.body)})},c.prototype.abort=function(){var e=this;e._aborted=!0,e.req?e.req.abort():e.response&&e.response.destroy(),e.emit("abort")},c.prototype.pipeDest=function(e){var t=this,r=t.response;if(e.headers&&!e.headersSent){if(r.caseless.has("content-type")){var n=r.caseless.has("content-type");e.setHeader?e.setHeader(n,r.headers[n]):e.headers[n]=r.headers[n]}if(r.caseless.has("content-length")){var i=r.caseless.has("content-length");e.setHeader?e.setHeader(i,r.headers[i]):e.headers[i]=r.headers[i]}}if(e.setHeader&&!e.headersSent){for(var a in r.headers)t.gzip&&"content-encoding"===a||e.setHeader(a,r.headers[a]);e.statusCode=r.statusCode}t.pipefilter&&t.pipefilter(r,e)},c.prototype.qs=function(e,t){var r,n=this;r=!t&&n.uri.query?n._qs.parse(n.uri.query):{};for(var i in e)r[i]=e[i];var a=n._qs.stringify(r);return""===a?n:(n.uri=f.parse(n.uri.href.split("?")[0]+"?"+a),n.url=n.uri,n.path=n.uri.path,"unix"===n.uri.host&&n.enableUnixSocket(),n)},c.prototype.form=function(e){var t=this;return e?(/^application\/x-www-form-urlencoded\b/.test(t.getHeader("content-type"))||t.setHeader("content-type","application/x-www-form-urlencoded"),t.body="string"==typeof e?t._qs.rfc3986(e.toString("utf8")):t._qs.stringify(e).toString("utf8"),t):(t._form=new j,t._form.on("error",function(e){e.message="form-data: "+e.message,t.emit("error",e),t.abort()}),t._form)},c.prototype.multipart=function(e){var t=this;return t._multipart.onRequest(e),t._multipart.chunked||(t.body=t._multipart.body),t},c.prototype.json=function(e){var t=this;return t.hasHeader("accept")||t.setHeader("accept","application/json"),"function"==typeof t.jsonReplacer&&(t._jsonReplacer=t.jsonReplacer),t._json=!0,"boolean"==typeof e?void 0!==t.body&&(/^application\/x-www-form-urlencoded\b/.test(t.getHeader("content-type"))?t.body=t._qs.rfc3986(t.body):t.body=F(t.body,t._jsonReplacer),t.hasHeader("content-type")||t.setHeader("content-type","application/json")):(t.body=F(e,t._jsonReplacer),t.hasHeader("content-type")||t.setHeader("content-type","application/json")),"function"==typeof t.jsonReviver&&(t._jsonReviver=t.jsonReviver),t},c.prototype.getHeader=function(e,t){var r,n,i,a=this;return t||(t=a.headers),Object.keys(t).forEach(function(a){a.length===e.length&&(n=new RegExp(e,"i"),i=a.match(n),i&&(r=t[a]))}),r},c.prototype.enableUnixSocket=function(){var e=this.uri.path.split(":"),t=e[0],r=e[1];this.socketPath=t,this.uri.pathname=r,this.uri.path=r,this.uri.host=t,this.uri.hostname=t,this.uri.isUnix=!0},c.prototype.auth=function(e,t,r,n){var i=this;return i._auth.onRequest(e,t,r,n),i},c.prototype.aws=function(e,t){var r=this;if(!t)return r._aws=e,r;if(4==e.sign_version||"4"==e.sign_version){var n={host:r.uri.host,path:r.uri.path,method:r.method,headers:{"content-type":r.getHeader("content-type")||""},body:r.body},i=b.sign(n,{accessKeyId:e.key,secretAccessKey:e.secret,sessionToken:e.session});r.setHeader("authorization",i.headers.Authorization),r.setHeader("x-amz-date",i.headers["X-Amz-Date"]),i.headers["X-Amz-Security-Token"]&&r.setHeader("x-amz-security-token",i.headers["X-Amz-Security-Token"])}else{var a=new Date;r.setHeader("date",a.toUTCString());var o={key:e.key,secret:e.secret,verb:r.method.toUpperCase(),date:a,contentType:r.getHeader("content-type")||"",md5:r.getHeader("content-md5")||"",amazonHeaders:v.canonicalizeHeaders(r.headers)},s=r.uri.path;e.bucket&&s?o.resource="/"+e.bucket+s:e.bucket&&!s?o.resource="/"+e.bucket:!e.bucket&&s?o.resource=s:e.bucket||s||(o.resource="/"),o.resource=v.canonicalizeResource(o.resource),r.setHeader("authorization",v.authorization(o))}return r},c.prototype.httpSignature=function(e){var t=this;return y.signRequest({getHeader:function(e){return t.getHeader(e,t.headers)},setHeader:function(e,r){t.setHeader(e,r)},method:t.method,path:t.path},e),u("httpSignature authorization",t.getHeader("authorization")),t},c.prototype.hawk=function(e){var t=this;t.setHeader("Authorization",g.client.header(t.uri,t.method,e).field)},c.prototype.oauth=function(e){var t=this;return t._oauth.onRequest(e),t},c.prototype.jar=function(e){var t,r=this;if(0===r._redirect.redirectsFollowed&&(r.originalCookieHeader=r.getHeader("cookie")),e){var n=e&&e.getCookieString?e:$,i=r.uri.href;n&&(t=n.getCookieString(i))}else t=!1,r._disableCookies=!0;return t&&t.length&&(r.originalCookieHeader?r.setHeader("cookie",r.originalCookieHeader+"; "+t):r.setHeader("cookie",t)),r._jar=e,r},c.prototype.pipe=function(e,t){var r=this;if(!r.response)return r.dests.push(e),d.Stream.prototype.pipe.call(r,e,t),e;if(r._destdata)r.emit("error",new Error("You cannot pipe after data has been emitted from the response."));else{if(!r._ended)return d.Stream.prototype.pipe.call(r,e,t),r.pipeDest(e),e;r.emit("error",new Error("You cannot pipe after the response has been ended."))}},c.prototype.write=function(){var e=this;if(!e._aborted)return e._started||e.start(),e.req?e.req.write.apply(e.req,arguments):void 0},c.prototype.end=function(e){var t=this;t._aborted||(e&&t.write(e),t._started||t.start(),t.req&&t.req.end())},c.prototype.pause=function(){var e=this;e.responseContent?e.responseContent.pause.apply(e.responseContent,arguments):e._paused=!0},c.prototype.resume=function(){var e=this;e.responseContent?e.responseContent.resume.apply(e.responseContent,arguments):e._paused=!1},c.prototype.destroy=function(){var e=this;e._ended?e.response&&e.response.destroy():e.end()},c.defaultProxyHeaderWhiteList=z.defaultProxyHeaderWhiteList.slice(),c.defaultProxyHeaderExclusiveList=z.defaultProxyHeaderExclusiveList.slice(),c.prototype.toJSON=o,t.exports=c}).call(this,e("_process"),e("buffer").Buffer)},{"./lib/auth":461,"./lib/cookies":462,"./lib/getProxyFromURI":463,"./lib/har":464,"./lib/helpers":465,"./lib/multipart":466,"./lib/oauth":467,"./lib/querystring":468,"./lib/redirect":469,"./lib/tunnel":470,_process:431,"aws-sign2":78,aws4:79,buffer:122,caseless:124,extend:173,"forever-agent":175,"form-data":176,hawk:205,http:508,"http-signature":207,https:212,"is-typedarray":217,isstream:219,"mime-types":392,"performance-now":429,stream:507,stringstream:513,url:526,util:531,zlib:118}],472:[function(e,t,r){(function(e){function r(e){for(var t=[],r=0,n=0;r>>5]|=e[r]<<24-n%32;return t}function n(e){for(var t=[],r=0;r<32*e.length;r+=8)t.push(e[r>>>5]>>>24-r%32&255);return t}function i(e,t,r){for(var n=0;n<16;n++){var i=r+n,p=t[i];t[i]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8)}var b,y,w,x,k,_,j,S,E,A;_=b=e[0],j=y=e[1],S=w=e[2],E=x=e[3],A=k=e[4];var C;for(n=0;n<80;n+=1)C=b+t[r+f[n]]|0,C+=n<16?a(y,w,x)+g[0]:n<32?o(y,w,x)+g[1]:n<48?s(y,w,x)+g[2]:n<64?c(y,w,x)+g[3]:u(y,w,x)+g[4],C|=0,C=l(C,d[n]),C=C+k|0,b=k,k=x,x=l(w,10),w=y,y=C,C=_+t[r+h[n]]|0,C+=n<16?u(j,S,E)+v[0]:n<32?c(j,S,E)+v[1]:n<48?s(j,S,E)+v[2]:n<64?o(j,S,E)+v[3]:a(j,S,E)+v[4],C|=0,C=l(C,m[n]),C=C+A|0,_=A,A=E,E=l(S,10),S=j,j=C;C=e[1]+w+E|0,e[1]=e[2]+x+A|0,e[2]=e[3]+k+_|0,e[3]=e[4]+b+j|0,e[4]=e[0]+y+S|0,e[0]=C}function a(e,t,r){return e^t^r}function o(e,t,r){return e&t|~e&r}function s(e,t,r){return(e|~t)^r}function c(e,t,r){return e&r|t&~r}function u(e,t,r){return e^(t|~r)}function l(e,t){return e<>>32-t}function p(t){var a=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=r(t),s=8*t.length,c=8*t.length;o[s>>>5]|=128<<24-s%32,o[(s+64>>>9<<4)+14]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8);for(var u=0;u>>24)|4278255360&(l<<24|l>>>8)}var p=n(a);return new e(p)}var f=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],g=[0,1518500249,1859775393,2400959708,2840853838],v=[1352829926,1548603684,1836072691,2053994217,0];t.exports=p}).call(this,e("buffer").Buffer)},{buffer:122}],473:[function(e,t,r){(function(t){!function(r){function n(e,t){if(!(this instanceof n))return new n(e,t);var i=this;a(i),i.q=i.c="",i.bufferCheckPosition=r.MAX_BUFFER_LENGTH,i.opt=t||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?"toLowerCase":"toUpperCase",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=$.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(r.XML_ENTITIES):Object.create(r.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(N)),i.trackPosition=i.opt.position!==!1,i.trackPosition&&(i.position=i.line=i.column=0),d(i,"onready")}function i(e){for(var t=Math.max(r.MAX_BUFFER_LENGTH,10),n=0,i=0,a=I.length;it)switch(I[i]){case"textNode":g(e);break;case"cdata":m(e,"oncdata",e.cdata),e.cdata="";break;case"script":m(e,"onscript",e.script),e.script="";break;default:b(e,"Max buffer length exceeded: "+I[i])}n=Math.max(n,o)}var s=r.MAX_BUFFER_LENGTH-n;e.bufferCheckPosition=s+e.position}function a(e){for(var t=0,r=I.length;t",e.tagName="",void(e.state=$.SCRIPT);m(e,"onscript",e.script),e.script=""}var t=e.tags.length,r=e.tagName;e.strict||(r=r[e.looseCase]());for(var n=r;t--;){var i=e.tags[t];if(i.name===n)break;w(e,"Unexpected close tag")}if(t<0)return w(e,"Unmatched closing tag: "+e.tagName),e.textNode+="",void(e.state=$.TEXT);e.tagName=r;for(var a=e.tags.length;a-- >t;){var o=e.tag=e.tags.pop();e.tagName=e.tag.name,m(e,"onclosetag",e.tagName);var s={};for(var c in o.ns)s[c]=o.ns[c];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&o.ns!==u.ns&&Object.keys(o.ns).forEach(function(t){var r=o.ns[t];m(e,"onclosenamespace",{prefix:t,uri:r})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName="",e.attribList.length=0,e.state=$.TEXT}function E(e){var t,r=e.entity,n=r.toLowerCase(),i="";return e.ENTITIES[r]?e.ENTITIES[r]:e.ENTITIES[n]?e.ENTITIES[n]:(r=n,"#"===r.charAt(0)&&("x"===r.charAt(1)?(r=r.slice(2),t=parseInt(r,16),i=t.toString(16)):(r=r.slice(1),t=parseInt(r,10),i=t.toString(10))),r=r.replace(/^0+/,""),i.toLowerCase()!==r?(w(e,"Invalid character entity"),"&"+e.entity+";"):String.fromCodePoint(t))}function A(e,t){"<"===t?(e.state=$.OPEN_WAKA,e.startTagPosition=e.position):h(D,t)&&(w(e,"Non-whitespace before first tag."),e.textNode=t,e.state=$.TEXT)}function C(e,t){var r="";return t"===n?(m(t,"onsgmldeclaration",t.sgmlDecl),t.sgmlDecl="",t.state=$.TEXT):p(M,n)?(t.state=$.SGML_DECL_QUOTED,t.sgmlDecl+=n):t.sgmlDecl+=n;continue;case $.SGML_DECL_QUOTED:n===t.q&&(t.state=$.SGML_DECL,t.q=""),t.sgmlDecl+=n;continue;case $.DOCTYPE:">"===n?(t.state=$.TEXT,m(t,"ondoctype",t.doctype),t.doctype=!0):(t.doctype+=n,"["===n?t.state=$.DOCTYPE_DTD:p(M,n)&&(t.state=$.DOCTYPE_QUOTED,t.q=n));continue;case $.DOCTYPE_QUOTED:t.doctype+=n,n===t.q&&(t.q="",t.state=$.DOCTYPE);continue;case $.DOCTYPE_DTD:t.doctype+=n,"]"===n?t.state=$.DOCTYPE:p(M,n)&&(t.state=$.DOCTYPE_DTD_QUOTED,t.q=n);continue;case $.DOCTYPE_DTD_QUOTED:t.doctype+=n,n===t.q&&(t.state=$.DOCTYPE_DTD,t.q="");continue;case $.COMMENT:"-"===n?t.state=$.COMMENT_ENDING:t.comment+=n;continue;case $.COMMENT_ENDING:"-"===n?(t.state=$.COMMENT_ENDED,t.comment=v(t.opt,t.comment),t.comment&&m(t,"oncomment",t.comment),t.comment=""):(t.comment+="-"+n,t.state=$.COMMENT);continue;case $.COMMENT_ENDED:">"!==n?(w(t,"Malformed comment"),t.comment+="--"+n,t.state=$.COMMENT):t.state=$.TEXT;continue;case $.CDATA:"]"===n?t.state=$.CDATA_ENDING:t.cdata+=n;continue;case $.CDATA_ENDING:"]"===n?t.state=$.CDATA_ENDING_2:(t.cdata+="]"+n,t.state=$.CDATA);continue;case $.CDATA_ENDING_2:">"===n?(t.cdata&&m(t,"oncdata",t.cdata),m(t,"onclosecdata"),t.cdata="",t.state=$.TEXT):"]"===n?t.cdata+="]":(t.cdata+="]]"+n,t.state=$.CDATA);continue;case $.PROC_INST:"?"===n?t.state=$.PROC_INST_ENDING:p(D,n)?t.state=$.PROC_INST_BODY:t.procInstName+=n;continue;case $.PROC_INST_BODY:if(!t.procInstBody&&p(D,n))continue;"?"===n?t.state=$.PROC_INST_ENDING:t.procInstBody+=n;continue;case $.PROC_INST_ENDING:">"===n?(m(t,"onprocessinginstruction",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody="",t.state=$.TEXT):(t.procInstBody+="?"+n,t.state=$.PROC_INST_BODY);continue;case $.OPEN_TAG:l(U,n)?t.tagName+=n:(x(t),">"===n?j(t):"/"===n?t.state=$.OPEN_TAG_SLASH:(h(D,n)&&w(t,"Invalid character in tag name"),t.state=$.ATTRIB));continue;case $.OPEN_TAG_SLASH:">"===n?(j(t,!0),S(t)):(w(t,"Forward-slash in opening tag not followed by >"),t.state=$.ATTRIB);continue;case $.ATTRIB:if(p(D,n))continue;">"===n?j(t):"/"===n?t.state=$.OPEN_TAG_SLASH:l(L,n)?(t.attribName=n,t.attribValue="",t.state=$.ATTRIB_NAME):w(t,"Invalid attribute name");continue;case $.ATTRIB_NAME:"="===n?t.state=$.ATTRIB_VALUE:">"===n?(w(t,"Attribute without value"),t.attribValue=t.attribName,_(t),j(t)):p(D,n)?t.state=$.ATTRIB_NAME_SAW_WHITE:l(U,n)?t.attribName+=n:w(t,"Invalid attribute name");continue;case $.ATTRIB_NAME_SAW_WHITE:if("="===n)t.state=$.ATTRIB_VALUE;else{if(p(D,n))continue;w(t,"Attribute without value"),t.tag.attributes[t.attribName]="",t.attribValue="",m(t,"onattribute",{name:t.attribName,value:""}),t.attribName="",">"===n?j(t):l(L,n)?(t.attribName=n,t.state=$.ATTRIB_NAME):(w(t,"Invalid attribute name"),t.state=$.ATTRIB)}continue;case $.ATTRIB_VALUE:if(p(D,n))continue;p(M,n)?(t.q=n,t.state=$.ATTRIB_VALUE_QUOTED):(w(t,"Unquoted attribute value"),t.state=$.ATTRIB_VALUE_UNQUOTED,t.attribValue=n);continue;case $.ATTRIB_VALUE_QUOTED:if(n!==t.q){"&"===n?t.state=$.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=n;continue}_(t),t.q="",t.state=$.ATTRIB_VALUE_CLOSED;continue;case $.ATTRIB_VALUE_CLOSED:p(D,n)?t.state=$.ATTRIB:">"===n?j(t):"/"===n?t.state=$.OPEN_TAG_SLASH:l(L,n)?(w(t,"No whitespace between attributes"),t.attribName=n,t.attribValue="",t.state=$.ATTRIB_NAME):w(t,"Invalid attribute name");continue;case $.ATTRIB_VALUE_UNQUOTED:if(h(q,n)){"&"===n?t.state=$.ATTRIB_VALUE_ENTITY_U:t.attribValue+=n;continue}_(t),">"===n?j(t):t.state=$.ATTRIB;continue;case $.CLOSE_TAG:if(t.tagName)">"===n?S(t):l(U,n)?t.tagName+=n:t.script?(t.script+=""===n?S(t):w(t,"Invalid characters in closing tag");continue;case $.TEXT_ENTITY:case $.ATTRIB_VALUE_ENTITY_Q:case $.ATTRIB_VALUE_ENTITY_U:var s,c;switch(t.state){case $.TEXT_ENTITY:s=$.TEXT,c="textNode";break;case $.ATTRIB_VALUE_ENTITY_Q:s=$.ATTRIB_VALUE_QUOTED,c="attribValue";break;case $.ATTRIB_VALUE_ENTITY_U:s=$.ATTRIB_VALUE_UNQUOTED,c="attribValue"}";"===n?(t[c]+=E(t),t.entity="",t.state=s):l(t.entity.length?K:H,n)?t.entity+=n:(w(t,"Invalid character in entity name"),t[c]+="&"+t.entity+n,t.entity="",t.state=s);continue;default:throw new Error(t,"Unknown state: "+t.state)}}return t.position>=t.bufferCheckPosition&&i(t),t}r.parser=function(e,t){return new n(e,t)},r.SAXParser=n,r.SAXStream=c,r.createStream=s,r.MAX_BUFFER_LENGTH=65536;var I=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];r.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(e){function t(){}t.prototype=e;var r=new t;return r}),Object.keys||(Object.keys=function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&t.push(r);return t}),n.prototype={end:function(){y(this)},write:T,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var P;try{P=e("stream").Stream}catch(e){P=function(){}}var O=r.EVENTS.filter(function(e){return"error"!==e&&"end"!==e});c.prototype=Object.create(P.prototype,{constructor:{value:c}}),c.prototype.write=function(r){if("function"==typeof t&&"function"==typeof t.isBuffer&&t.isBuffer(r)){if(!this._decoder){var n=e("string_decoder").StringDecoder;this._decoder=new n("utf8")}r=this._decoder.write(r)}return this._parser.write(r.toString()),this.emit("data",r),!0},c.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},c.prototype.on=function(e,t){var r=this;return r._parser["on"+e]||O.indexOf(e)===-1||(r._parser["on"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),r.emit.apply(r,t)}),P.prototype.on.call(r,e,t)};var D="\r\n\t ",M="'\"",q=D+">",R="[CDATA[",z="DOCTYPE",B="http://www.w3.org/XML/1998/namespace",F="http://www.w3.org/2000/xmlns/",N={xml:B,xmlns:F};D=u(D);var L=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,U=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,H=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,K=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;M=u(M),q=u(q);var $=0;r.STATE={BEGIN:$++,BEGIN_WHITESPACE:$++,TEXT:$++,TEXT_ENTITY:$++,OPEN_WAKA:$++,SGML_DECL:$++,SGML_DECL_QUOTED:$++,DOCTYPE:$++,DOCTYPE_QUOTED:$++,DOCTYPE_DTD:$++,DOCTYPE_DTD_QUOTED:$++,COMMENT_STARTING:$++,COMMENT:$++,COMMENT_ENDING:$++,COMMENT_ENDED:$++,CDATA:$++,CDATA_ENDING:$++,CDATA_ENDING_2:$++,PROC_INST:$++,PROC_INST_BODY:$++,PROC_INST_ENDING:$++,OPEN_TAG:$++,OPEN_TAG_SLASH:$++,ATTRIB:$++,ATTRIB_NAME:$++,ATTRIB_NAME_SAW_WHITE:$++,ATTRIB_VALUE:$++,ATTRIB_VALUE_QUOTED:$++,ATTRIB_VALUE_CLOSED:$++,ATTRIB_VALUE_UNQUOTED:$++,ATTRIB_VALUE_ENTITY_Q:$++,ATTRIB_VALUE_ENTITY_U:$++,CLOSE_TAG:$++,CLOSE_TAG_SAW_WHITE:$++,SCRIPT:$++,SCRIPT_ENDING:$++},r.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},r.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(r.ENTITIES).forEach(function(e){var t=r.ENTITIES[e],n="number"==typeof t?String.fromCharCode(t):t;r.ENTITIES[e]=n});for(var V in r.STATE)r.STATE[r.STATE[V]]=V;$=r.STATE,String.fromCodePoint||!function(){var e=String.fromCharCode,t=Math.floor,r=function(){var r,n,i=16384,a=[],o=-1,s=arguments.length;if(!s)return"";for(var c="";++o1114111||t(u)!==u)throw RangeError("Invalid code point: "+u);u<=65535?a.push(u):(u-=65536,r=(u>>10)+55296,n=u%1024+56320,a.push(r,n)),(o+1===s||a.length>i)&&(c+=e.apply(null,a),a.length=0)}return c};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:r,configurable:!0,writable:!0}):String.fromCodePoint=r}()}("undefined"==typeof r?this.sax={}:r)}).call(this,e("buffer").Buffer)},{buffer:122,stream:507,string_decoder:512}],474:[function(e,t,r){"use strict";var n={};n.generateIdentifier=function(){return Math.random().toString(36).substr(2,10)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},n.splitSections=function(e){var t=e.split("\nm=");return t.map(function(e,t){return(t>0?"m="+e:e).trim()+"\r\n"})},n.matchPrefix=function(e,t){return n.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},n.parseCandidate=function(e){var t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");for(var r={foundation:t[0],component:t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],port:parseInt(t[5],10),type:t[7]},n=8;n-1?(r.attribute=e.substr(t+1,n-t-1),r.value=e.substr(n+1)):r.attribute=e.substr(t+1),r},n.getDtlsParameters=function(e,t){var r=n.splitLines(e);r=r.concat(n.splitLines(t));var i=r.filter(function(e){return 0===e.indexOf("a=fingerprint:")})[0].substr(14),a={role:"auto",fingerprints:[{algorithm:i.split(" ")[0],value:i.split(" ")[1]}]};return a},n.writeDtlsParameters=function(e,t){var r="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),r},n.getIceParameters=function(e,t){var r=n.splitLines(e);r=r.concat(n.splitLines(t));var i={usernameFragment:r.filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:r.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)};return i},n.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},n.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},r=n.splitLines(e),i=r[0].split(" "),a=3;a0?"9":"0",r+=" UDP/TLS/RTP/SAVPF ",r+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",r+="c=IN IP4 0.0.0.0\r\n",r+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){r+=n.writeRtpMap(e),r+=n.writeFmtp(e),r+=n.writeRtcpFb(e)});var i=0;return t.codecs.forEach(function(e){e.maxptime>i&&(i=e.maxptime)}),i>0&&(r+="a=maxptime:"+i+"\r\n"),r+="a=rtcp-mux\r\n",t.headerExtensions.forEach(function(e){r+=n.writeExtmap(e)}),r},n.parseRtpEncodingParameters=function(e){var t,r=[],i=n.parseRtpParameters(e),a=i.fecMechanisms.indexOf("RED")!==-1,o=i.fecMechanisms.indexOf("ULPFEC")!==-1,s=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),c=s.length>0&&s[0].ssrc,u=n.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});u.length>0&&u[0].length>1&&u[0][0]===c&&(t=u[0][1]),i.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var n={ssrc:c,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:t}};r.push(n),a&&(n=JSON.parse(JSON.stringify(n)),n.fec={ssrc:t,mechanism:o?"red+ulpfec":"red"},r.push(n))}}),0===r.length&&c&&r.push({ssrc:c});var l=n.matchPrefix(e,"b=");return l.length&&(0===l[0].indexOf("b=TIAS:")?l=parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")&&(l=parseInt(l[0].substr(5),10)),r.forEach(function(e){e.maxBitrate=l})),r},n.parseRtcpParameters=function(e){var t={},r=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];r&&(t.cname=r.value,t.ssrc=r.ssrc);var i=n.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=i.length>0,t.compound=0===i.length;var a=n.matchPrefix(e,"a=rtcp-mux");return t.mux=a.length>0,t},n.parseMsid=function(e){var t,r=n.matchPrefix(e,"a=msid:");if(1===r.length)return t=r[0].substr(7).split(" "),{stream:t[0],track:t[1]};var i=n.matchPrefix(e,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return i.length>0?(t=i[0].value.split(" "),{stream:t[0],track:t[1]}):void 0},n.writeSessionBoilerplate=function(){return"v=0\r\no=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.writeMediaSection=function(e,t,r,i){var a=n.writeRtpDescription(e.kind,t);if(a+=n.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=n.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===r?"actpass":"active"),a+="a=mid:"+e.mid+"\r\n",a+=e.rtpSender&&e.rtpReceiver?"a=sendrecv\r\n":e.rtpSender?"a=sendonly\r\n":e.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",e.rtpSender){var o="msid:"+i.id+" "+e.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+o,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+n.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+n.localCName+"\r\n"),a},n.getDirection=function(e,t){for(var r=n.splitLines(e),i=0;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(t,this._blockSize-4);var r=this._update(this._block)||this._hash();return e?r.toString(e):r},r.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=r}).call(this,e("buffer").Buffer)},{buffer:122}],476:[function(e,t,r){var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":477,"./sha1":478,"./sha224":479,"./sha256":480,"./sha384":481,"./sha512":482}],477:[function(e,t,r){(function(r){function n(){this.init(),this._w=l,c.call(this,64,56)}function i(e){return e<<5|e>>>27}function a(e){return e<<30|e>>>2}function o(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var s=e("inherits"),c=e("./hash"),u=[1518500249,1859775393,-1894007588,-899497514],l=new Array(80);s(n,c),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,s=0|this._c,c=0|this._d,l=0|this._e,p=0;p<16;++p)t[p]=e.readInt32BE(4*p);for(;p<80;++p)t[p]=t[p-3]^t[p-8]^t[p-14]^t[p-16];for(var f=0;f<80;++f){var h=~~(f/20),d=i(r)+o(h,n,s,c)+l+t[f]+u[h]|0;l=c,c=s,s=a(n),n=r,r=d}this._a=r+this._a|0,this._b=n+this._b|0,this._c=s+this._c|0,this._d=c+this._d|0,this._e=l+this._e|0},n.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":475,buffer:122,inherits:215}],478:[function(e,t,r){(function(r){function n(){this.init(),this._w=p,u.call(this,64,56)}function i(e){return e<<1|e>>>31}function a(e){return e<<5|e>>>27}function o(e){return e<<30|e>>>2}function s(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}var c=e("inherits"),u=e("./hash"),l=[1518500249,1859775393,-1894007588,-899497514],p=new Array(80);c(n,u),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,c=0|this._c,u=0|this._d,p=0|this._e,f=0;f<16;++f)t[f]=e.readInt32BE(4*f);for(;f<80;++f)t[f]=i(t[f-3]^t[f-8]^t[f-14]^t[f-16]);for(var h=0;h<80;++h){var d=~~(h/20),m=a(r)+s(d,n,c,u)+p+t[h]+l[d]|0;p=u,u=c,c=o(n),n=r,r=m}this._a=r+this._a|0,this._b=n+this._b|0,this._c=c+this._c|0,this._d=u+this._d|0,this._e=p+this._e|0},n.prototype._hash=function(){var e=new r(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":475,buffer:122,inherits:215}],479:[function(e,t,r){(function(r){function n(){this.init(),this._w=s,o.call(this,64,56)}var i=e("inherits"),a=e("./sha256"),o=e("./hash"),s=new Array(64);i(n,a),n.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},n.prototype._hash=function(){var e=new r(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":475,"./sha256":480,buffer:122,inherits:215}],480:[function(e,t,r){(function(r){function n(){this.init(),this._w=h,p.call(this,64,56)}function i(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function o(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function s(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function c(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}function u(e){return(e>>>17|e<<15)^(e>>>19|e<<13)^e>>>10}var l=e("inherits"),p=e("./hash"),f=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=new Array(64);l(n,p),n.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._a,n=0|this._b,l=0|this._c,p=0|this._d,h=0|this._e,d=0|this._f,m=0|this._g,g=0|this._h,v=0;v<16;++v)t[v]=e.readInt32BE(4*v);for(;v<64;++v)t[v]=u(t[v-2])+t[v-7]+c(t[v-15])+t[v-16]|0;for(var b=0;b<64;++b){var y=g+s(h)+i(h,d,m)+f[b]+t[b]|0,w=o(r)+a(r,n,l)|0;g=m,m=d,d=h,h=p+y|0,p=l,l=n,n=r,r=y+w|0}this._a=r+this._a|0,this._b=n+this._b|0,this._c=l+this._c|0,this._d=p+this._d|0,this._e=h+this._e|0,this._f=d+this._f|0,this._g=m+this._g|0,this._h=g+this._h|0},n.prototype._hash=function(){var e=new r(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":475,buffer:122,inherits:215}],481:[function(e,t,r){(function(r){function n(){this.init(),this._w=s,o.call(this,128,112)}var i=e("inherits"),a=e("./sha512"),o=e("./hash"),s=new Array(160);i(n,a),n.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},n.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=new r(48);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":475,"./sha512":482,buffer:122,inherits:215}],482:[function(e,t,r){(function(r){function n(){this.init(),this._w=g,d.call(this,128,112)}function i(e,t,r){return r^e&(t^r)}function a(e,t,r){return e&t|r&(e|t)}function o(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function s(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function c(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function u(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function l(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function p(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function f(e,t){return e>>>0>>0?1:0}var h=e("inherits"),d=e("./hash"),m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],g=new Array(160);h(n,d),n.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},n.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,h=0|this._ch,d=0|this._dh,g=0|this._eh,v=0|this._fh,b=0|this._gh,y=0|this._hh,w=0|this._al,x=0|this._bl,k=0|this._cl,_=0|this._dl,j=0|this._el,S=0|this._fl,E=0|this._gl,A=0|this._hl,C=0;C<32;C+=2)t[C]=e.readInt32BE(4*C),t[C+1]=e.readInt32BE(4*C+4);for(;C<160;C+=2){var T=t[C-30],I=t[C-30+1],P=c(T,I),O=u(I,T);T=t[C-4],I=t[C-4+1];var D=l(T,I),M=p(I,T),q=t[C-14],R=t[C-14+1],z=t[C-32],B=t[C-32+1],F=O+R|0,N=P+q+f(F,O)|0;F=F+M|0,N=N+D+f(F,M)|0,F=F+B|0,N=N+z+f(F,B)|0,t[C]=N,t[C+1]=F}for(var L=0;L<160;L+=2){N=t[L],F=t[L+1];var U=a(r,n,h),H=a(w,x,k),K=o(r,w),$=o(w,r),V=s(g,j),G=s(j,g),X=m[L],Q=m[L+1],W=i(g,v,b),J=i(j,S,E),Z=A+G|0,Y=y+V+f(Z,A)|0;Z=Z+J|0,Y=Y+W+f(Z,J)|0,Z=Z+Q|0,Y=Y+X+f(Z,Q)|0,Z=Z+F|0,Y=Y+N+f(Z,F)|0;var ee=$+H|0,te=K+U+f(ee,$)|0;y=b,A=E,b=v,E=S,v=g,S=j,j=_+Z|0,g=d+Y+f(j,_)|0,d=h,_=k,h=n,k=x,n=r,x=w,w=Z+ee|0,r=Y+te+f(w,Z)|0}this._al=this._al+w|0,this._bl=this._bl+x|0,this._cl=this._cl+k|0,this._dl=this._dl+_|0,this._el=this._el+j|0,this._fl=this._fl+S|0,this._gl=this._gl+E|0,this._hl=this._hl+A|0,this._ah=this._ah+r+f(this._al,w)|0,this._bh=this._bh+n+f(this._bl,x)|0,this._ch=this._ch+h+f(this._cl,k)|0,this._dh=this._dh+d+f(this._dl,_)|0,this._eh=this._eh+g+f(this._el,j)|0,this._fh=this._fh+v+f(this._fl,S)|0,this._gh=this._gh+b+f(this._gl,E)|0,this._hh=this._hh+y+f(this._hl,A)|0},n.prototype._hash=function(){function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}var t=new r(64);return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=n}).call(this,e("buffer").Buffer)},{"./hash":475,buffer:122,inherits:215}],483:[function(e,t,r){(function(e){var r={dsa:{parts:["p","q","g","y"],sizePart:"p"},rsa:{parts:["e","n"],sizePart:"n"},ecdsa:{parts:["curve","Q"],sizePart:"Q"},ed25519:{parts:["R"],normalize:!1,sizePart:"R"}};r.curve25519=r.ed25519;var n={dsa:{parts:["p","q","g","y","x"]},rsa:{parts:["n","e","d","iqmp","p","q"]},ecdsa:{parts:["curve","Q","d"] -},ed25519:{parts:["R","r"],normalize:!1}};n.curve25519=n.ed25519;var i={md5:!0,sha1:!0,sha256:!0,sha384:!0,sha512:!0},a={nistp256:{size:256,pkcs8oid:"1.2.840.10045.3.1.7",p:new e("00ffffffff 00000001 00000000 0000000000000000 ffffffff ffffffff ffffffff".replace(/ /g,""),"hex"),a:new e("00FFFFFFFF 00000001 00000000 0000000000000000 FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g,""),"hex"),b:new e("5ac635d8 aa3a93e7 b3ebbd55 769886bc651d06b0 cc53b0f6 3bce3c3e 27d2604b".replace(/ /g,""),"hex"),s:new e("00c49d3608 86e70493 6a6678e1 139d26b7819f7e90".replace(/ /g,""),"hex"),n:new e("00ffffffff 00000000 ffffffff ffffffffbce6faad a7179e84 f3b9cac2 fc632551".replace(/ /g,""),"hex"),G:new e("046b17d1f2 e12c4247 f8bce6e5 63a440f277037d81 2deb33a0 f4a13945 d898c2964fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e162bce3357 6b315ece cbb64068 37bf51f5".replace(/ /g,""),"hex")},nistp384:{size:384,pkcs8oid:"1.3.132.0.34",p:new e("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffeffffffff 00000000 00000000 ffffffff".replace(/ /g,""),"hex"),a:new e("00FFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFEFFFFFFFF 00000000 00000000 FFFFFFFC".replace(/ /g,""),"hex"),b:new e("b3312fa7 e23ee7e4 988e056b e3f82d19181d9c6e fe814112 0314088f 5013875ac656398d 8a2ed19d 2a85c8ed d3ec2aef".replace(/ /g,""),"hex"),s:new e("00a335926a a319a27a 1d00896a 6773a4827acdac73".replace(/ /g,""),"hex"),n:new e("00ffffffff ffffffff ffffffff ffffffffffffffff ffffffff c7634d81 f4372ddf581a0db2 48b0a77a ecec196a ccc52973".replace(/ /g,""),"hex"),G:new e("04aa87ca22 be8b0537 8eb1c71e f320ad746e1d3b62 8ba79b98 59f741e0 82542a385502f25d bf55296c 3a545e38 72760ab73617de4a 96262c6f 5d9e98bf 9292dc29f8f41dbd 289a147c e9da3113 b5f0b8c00a60b1ce 1d7e819d 7a431d7c 90ea0e5f".replace(/ /g,""),"hex")},nistp521:{size:521,pkcs8oid:"1.3.132.0.35",p:new e("01ffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff ffffffffffff".replace(/ /g,""),"hex"),a:new e("01FFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFFFFFFFFFF FFFFFFFF FFFFFFFF FFFFFFFC".replace(/ /g,""),"hex"),b:new e("51953eb961 8e1c9a1f 929a21a0 b68540eea2da725b 99b315f3 b8b48991 8ef109e156193951 ec7e937b 1652c0bd 3bb1bf073573df88 3d2c34f1 ef451fd4 6b503f00".replace(/ /g,""),"hex"),s:new e("00d09e8800 291cb853 96cc6717 393284aaa0da64ba".replace(/ /g,""),"hex"),n:new e("01ffffffffff ffffffff ffffffff ffffffffffffffff ffffffff ffffffff fffffffa51868783 bf2f966b 7fcc0148 f709a5d03bb5c9b8 899c47ae bb6fb71e 91386409".replace(/ /g,""),"hex"),G:new e("0400c6 858e06b7 0404e9cd 9e3ecb66 2395b4429c648139 053fb521 f828af60 6b4d3dbaa14b5e77 efe75928 fe1dc127 a2ffa8de3348b3c1 856a429b f97e7e31 c2e5bd660118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd998f54449 579b4468 17afbd17 273e662c97ee7299 5ef42640 c550b901 3fad0761353c7086 a272c240 88be9476 9fd16650".replace(/ /g,""),"hex")}};t.exports={info:r,privInfo:n,hashAlgs:i,curves:a}}).call(this,e("buffer").Buffer)},{buffer:122}],484:[function(e,t,r){(function(r){function n(e){i.object(e,"options"),i.arrayOfObject(e.subjects,"options.subjects"),u.assertCompatible(e.subjects[0],f,[1,0],"options.subjects"),u.assertCompatible(e.subjectKey,l,[1,0],"options.subjectKey"),u.assertCompatible(e.issuer,f,[1,0],"options.issuer"),void 0!==e.issuerKey&&u.assertCompatible(e.issuerKey,l,[1,0],"options.issuerKey"),i.object(e.signatures,"options.signatures"),i.buffer(e.serial,"options.serial"),i.date(e.validFrom,"options.validFrom"),i.date(e.validUntil,"optons.validUntil"),i.optionalArrayOfString(e.purposes,"options.purposes"),this._hashCache={},this.subjects=e.subjects,this.issuer=e.issuer,this.subjectKey=e.subjectKey,this.issuerKey=e.issuerKey,this.signatures=e.signatures,this.serial=e.serial,this.validFrom=e.validFrom,this.validUntil=e.validUntil,this.purposes=e.purposes}t.exports=n;var i=e("assert-plus"),a=e("./algs"),o=e("crypto"),s=e("./fingerprint"),c=(e("./signature"),e("./errors")),u=(e("util"),e("./utils")),l=e("./key"),p=e("./private-key"),f=e("./identity"),h={};h.openssh=e("./formats/openssh-cert"),h.x509=e("./formats/x509"),h.pem=e("./formats/x509-pem");var d=c.CertificateParseError,m=c.InvalidAlgorithmError;n.formats=h,n.prototype.toBuffer=function(e,t){return void 0===e&&(e="x509"),i.string(e,"format"),i.object(h[e],"formats[format]"),i.optionalObject(t,"options"),h[e].write(this,t)},n.prototype.toString=function(e,t){return void 0===e&&(e="pem"),this.toBuffer(e,t).toString()},n.prototype.fingerprint=function(e){void 0===e&&(e="sha256"),i.string(e,"algorithm");var t={type:"certificate",hash:this.hash(e),algorithm:e};return new s(t)},n.prototype.hash=function(e){if(i.string(e,"algorithm"),e=e.toLowerCase(),void 0===a.hashAlgs[e])throw new m(e);if(this._hashCache[e])return this._hashCache[e];var t=o.createHash(e).update(this.toBuffer("x509")).digest();return this._hashCache[e]=t,t},n.prototype.isExpired=function(e){return void 0===e&&(e=new Date),!(e.getTime()>=this.validFrom.getTime()&&e.getTime()0&&this.issuer.purposes.indexOf("ca")===-1)&&this.isSignedByKey(e.subjectKey))},n.prototype.isSignedByKey=function(e){if(u.assertCompatible(e,l,[1,2],"issuerKey"),void 0!==this.issuerKey)return this.issuerKey.fingerprint("sha512").matches(e);var t=Object.keys(this.signatures)[0],r=h[t].verify(this,e);return r&&(this.issuerKey=e),r},n.prototype.signWith=function(e){u.assertCompatible(e,p,[1,2],"key");for(var t=Object.keys(h),r=!1,n=0;n0&&d.indexOf("serverAuth")===-1&&d.push("serverAuth"),g.length>0&&d.indexOf("clientAuth")===-1&&d.push("clientAuth"),(g.length>0||m.length>0)&&(d.indexOf("keyAgreement")===-1&&d.push("keyAgreement"),"rsa"===t.type&&d.indexOf("encryption")===-1&&d.push("encryption"))}var v=new n({subjects:o,issuer:o[0],subjectKey:t.toPublic(),issuerKey:t.toPublic(),signatures:{},serial:h,validFrom:s,validUntil:c,purposes:d});return v.signWith(t),v},n.create=function(e,t,a,o,s){var c;c=Array.isArray(e)?e:[e],i.arrayOfObject(c),c.forEach(function(e){u.assertCompatible(e,f,[1,0],"subject")}),u.assertCompatible(t,l,[1,0],"key"),p.isPrivateKey(t)&&(t=t.toPublic()),u.assertCompatible(a,f,[1,0],"issuer"),u.assertCompatible(o,p,[1,2],"issuer key"),i.optionalObject(s,"options"),void 0===s&&(s={}),i.optionalObject(s.validFrom,"options.validFrom"),i.optionalObject(s.validUntil,"options.validUntil");var h=s.validFrom,d=s.validUntil;if(void 0===h&&(h=new Date),void 0===d){i.optionalNumber(s.lifetime,"options.lifetime");var m=s.lifetime;void 0===m&&(m=31536e4),d=new Date,d.setTime(d.getTime()+1e3*m)}i.optionalBuffer(s.serial,"options.serial");var g=s.serial;void 0===g&&(g=new r("0000000000000001","hex"));var v=s.purposes;void 0===v&&(v=[]),v.indexOf("signature")===-1&&v.push("signature"),s.ca===!0&&(v.indexOf("ca")===-1&&v.push("ca"),v.indexOf("crl")===-1&&v.push("crl"));var b=c.filter(function(e){return"host"===e.type}),y=c.filter(function(e){return"user"===e.type});b.length>0&&v.indexOf("serverAuth")===-1&&v.push("serverAuth"),y.length>0&&v.indexOf("clientAuth")===-1&&v.push("clientAuth"),(y.length>0||b.length>0)&&(v.indexOf("keyAgreement")===-1&&v.push("keyAgreement"),"rsa"===t.type&&v.indexOf("encryption")===-1&&v.push("encryption"));var w=new n({subjects:c,issuer:a,subjectKey:t,issuerKey:o.toPublic(),signatures:{},serial:g,validFrom:h,validUntil:d,purposes:v});return w.signWith(o),w},n.parse=function(e,t,r){"string"!=typeof e&&i.buffer(e,"data"),void 0===t&&(t="auto"),i.string(t,"format"),"string"==typeof r&&(r={filename:r}),i.optionalObject(r,"options"),void 0===r&&(r={}),i.optionalString(r.filename,"options.filename"),void 0===r.filename&&(r.filename="(unnamed)"),i.object(h[t],"formats[format]");try{var n=h[t].read(e,r);return n}catch(e){throw new d(r.filename,t,e)}},n.isCertificate=function(e,t){return u.isCompatible(e,n,t)},n.prototype._sshpkApiVersion=[1,0],n._oldVersionDetect=function(e){return[1,0]}}).call(this,e("buffer").Buffer)},{"./algs":483,"./errors":487,"./fingerprint":488,"./formats/openssh-cert":490,"./formats/x509":498,"./formats/x509-pem":497,"./identity":499,"./key":501,"./private-key":502,"./signature":503,"./utils":505,"assert-plus":506,buffer:122,crypto:134,util:531}],485:[function(e,t,r){(function(r){function n(t){if(d.assertCompatible(t,m,[1,4],"key"),this._isPriv=g.isPrivateKey(t,[1,3]),this._algo=t.type,this._curve=t.curve,this._key=t,"dsa"===t.type){if(!v)throw new Error("Due to bugs in the node 0.10 crypto API, node 0.12.x or later is required to use DH");this._dh=f.createDiffieHellman(t.part.p.data,void 0,t.part.g.data,void 0),this._p=t.part.p,this._g=t.part.g,this._isPriv&&this._dh.setPrivateKey(t.part.x.data),this._dh.setPublicKey(t.part.y.data)}else if("ecdsa"===t.type){if(!v)return void 0===c&&(c=e("ecc-jsbn")),void 0===u&&(u=e("ecc-jsbn/lib/ec")),void 0===l&&(l=e("jsbn").BigInteger),this._ecParams=new i(this._curve),void(this._isPriv&&(this._priv=new o(this._ecParams,t.part.d.data)));var r={nistp256:"prime256v1",nistp384:"secp384r1",nistp521:"secp521r1"}[t.curve];if(this._dh=f.createECDH(r),"object"!=typeof this._dh||"function"!=typeof this._dh.setPrivateKey)return v=!1,void n.call(this,t);this._isPriv&&this._dh.setPrivateKey(t.part.d.data),this._dh.setPublicKey(t.part.Q.data)}else{if("curve25519"!==t.type)throw new Error("DH not supported for "+t.type+" keys");void 0===s&&(s=e("jodid25519")),this._isPriv&&(this._priv=t.part.r.data,0===this._priv[0]&&(this._priv=this._priv.slice(1)),this._priv=this._priv.slice(0,32))}}function i(e){var t=h.curves[e];p.object(t);var r=new l(t.p),n=new l(t.a),i=new l(t.b),a=new l(t.n),o=l.ONE,s=new u.ECCurveFp(r,n,i),c=s.decodePointHex(t.G.toString("hex"));this.curve=s,this.g=c,this.n=a,this.h=o}function a(e,t){this._params=e,0===t[0]&&(t=t.slice(1)),this._pub=e.getCurve().decodePointHex(t.toString("hex"))}function o(e,t){this._params=e,this._priv=new l(d.mpNormalize(t))}t.exports=n;var s,c,u,l,p=e("assert-plus"),f=e("crypto"),h=e("./algs"),d=e("./utils"),m=e("./key"),g=e("./private-key"),v=void 0!==f.createECDH;n.prototype.getPublicKey=function(){return this._isPriv?this._key.toPublic():this._key},n.prototype.getPrivateKey=function(){return this._isPriv?this._key:void 0},n.prototype.getKey=n.prototype.getPrivateKey,n.prototype._keyCheck=function(e,t){if(p.object(e,"key"),t||d.assertCompatible(e,g,[1,3],"key"),d.assertCompatible(e,m,[1,4],"key"),e.type!==this._algo)throw new Error("A "+e.type+" key cannot be used in "+this._algo+" Diffie-Hellman");if(e.curve!==this._curve)throw new Error("A key from the "+e.curve+" curve cannot be used with a "+this._curve+" Diffie-Hellman");"dsa"===e.type&&(p.deepEqual(e.part.p,this._p,"DSA key prime does not match"),p.deepEqual(e.part.g,this._g,"DSA key generator does not match"))},n.prototype.setKey=function(e){this._keyCheck(e),"dsa"===e.type?(this._dh.setPrivateKey(e.part.x.data),this._dh.setPublicKey(e.part.y.data)):"ecdsa"===e.type?v?(this._dh.setPrivateKey(e.part.d.data),this._dh.setPublicKey(e.part.Q.data)):this._priv=new o(this._ecParams,e.part.d.data):"curve25519"===e.type&&(this._priv=e.part.r.data,0===this._priv[0]&&(this._priv=this._priv.slice(1)),this._priv=this._priv.slice(0,32)),this._key=e,this._isPriv=!0},n.prototype.setPrivateKey=n.prototype.setKey,n.prototype.computeSecret=function(e){if(this._keyCheck(e,!0),!this._isPriv)throw new Error("DH exchange has not been initialized with a private key yet");var t;if("dsa"===this._algo)return this._dh.computeSecret(e.part.y.data);if("ecdsa"===this._algo)return v?this._dh.computeSecret(e.part.Q.data):(t=new a(this._ecParams,e.part.Q.data),this._priv.deriveSharedSecret(t));if("curve25519"===this._algo){t=e.part.R.data,0===t[0]&&(t=t.slice(1));var n=s.dh.computeKey(this._priv.toString("binary"),t.toString("binary"));return new r(n,"binary")}throw new Error("Invalid algorithm: "+this._algo)},n.prototype.generateKey=function(){var e,t,n=[];if("dsa"===this._algo)return this._dh.generateKeys(),n.push({name:"p",data:this._p.data}),n.push({name:"q",data:this._key.part.q.data}),n.push({name:"g",data:this._g.data}),n.push({name:"y",data:this._dh.getPublicKey()}),n.push({name:"x",data:this._dh.getPrivateKey()}),this._key=new g({type:"dsa",parts:n}),this._isPriv=!0,this._key;if("ecdsa"===this._algo){if(v)return this._dh.generateKeys(),n.push({name:"curve",data:new r(this._curve)}),n.push({name:"Q",data:this._dh.getPublicKey()}),n.push({name:"d",data:this._dh.getPrivateKey()}),this._key=new g({type:"ecdsa",curve:this._curve,parts:n}),this._isPriv=!0,this._key;var i=this._ecParams.getN(),a=new l(f.randomBytes(i.bitLength())),c=i.subtract(l.ONE);return e=a.mod(c).add(l.ONE),t=this._ecParams.getG().multiply(e),e=new r(e.toByteArray()),t=new r(this._ecParams.getCurve().encodePointHex(t),"hex"),this._priv=new o(this._ecParams,e),n.push({name:"curve",data:new r(this._curve)}),n.push({name:"Q",data:t}),n.push({name:"d",data:e}),this._key=new g({type:"ecdsa",curve:this._curve,parts:n}),this._isPriv=!0,this._key}if("curve25519"===this._algo)return e=s.dh.generateKey(),t=s.dh.publicKey(e),this._priv=e=new r(e,"binary"),t=new r(t,"binary"),n.push({name:"R",data:t}),n.push({name:"r",data:r.concat([e,t])}),this._key=new g({type:"curve25519",parts:n}),this._isPriv=!0,this._key;throw new Error("Invalid algorithm: "+this._algo)},n.prototype.generateKeys=n.prototype.generateKey,i.prototype.getCurve=function(){return this.curve},i.prototype.getG=function(){return this.g},i.prototype.getN=function(){return this.n},i.prototype.getH=function(){return this.h},o.prototype.deriveSharedSecret=function(e){p.ok(e instanceof a);var t=e._pub.multiply(this._priv);return new r(t.getX().toBigInteger().toByteArray())}}).call(this,e("buffer").Buffer)},{"./algs":483,"./key":501,"./private-key":502,"./utils":505,"assert-plus":506,buffer:122,crypto:134,"ecc-jsbn":152,"ecc-jsbn/lib/ec":153,jodid25519:220,jsbn:226}],486:[function(e,t,r){(function(r){function n(t,r){if(void 0===a&&(a=e("tweetnacl")),"sha512"!==r.toLowerCase())throw new Error("ED25519 only supports the use of SHA-512 hashes");this.key=t,this.chunks=[],o.Writable.call(this,{})}function i(t,r){if(void 0===a&&(a=e("tweetnacl")),"sha512"!==r.toLowerCase())throw new Error("ED25519 only supports the use of SHA-512 hashes");this.key=t,this.chunks=[],o.Writable.call(this,{})}t.exports={Verifier:n,Signer:i};var a,o=e("stream"),s=e("util"),c=e("assert-plus"),u=e("./signature");s.inherits(n,o.Writable),n.prototype._write=function(e,t,r){this.chunks.push(e),r()},n.prototype.update=function(e){"string"==typeof e&&(e=new r(e,"binary")),this.chunks.push(e)},n.prototype.verify=function(e,t){var n;if(u.isSignature(e,[2,0])){if("ed25519"!==e.type)return!1;n=e.toBuffer("raw")}else if("string"==typeof e)n=new r(e,"base64");else if(u.isSignature(e,[1,0]))throw new Error("signature was created by too old a version of sshpk and cannot be verified");return c.buffer(n),a.sign.detached.verify(new Uint8Array(r.concat(this.chunks)),new Uint8Array(n),new Uint8Array(this.key.part.R.data))},s.inherits(i,o.Writable),i.prototype._write=function(e,t,r){this.chunks.push(e),r()},i.prototype.update=function(e){"string"==typeof e&&(e=new r(e,"binary")),this.chunks.push(e)},i.prototype.sign=function(){var e=a.sign.detached(new Uint8Array(r.concat(this.chunks)),new Uint8Array(this.key.part.r.data)),t=new r(e),n=u.parse(t,"ed25519","raw");return n.hashAlgorithm="sha512",n}}).call(this,e("buffer").Buffer)},{"./signature":503,"assert-plus":506,buffer:122,stream:507,tweetnacl:525,util:531}],487:[function(e,t,r){function n(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,n),this.name="FingerprintFormatError",this.fingerprint=e,this.format=t,this.message="Fingerprint format is not supported, or is invalid: ",void 0!==e&&(this.message+=" fingerprint = "+e),void 0!==t&&(this.message+=" format = "+t)}function i(e){Error.captureStackTrace&&Error.captureStackTrace(this,i),this.name="InvalidAlgorithmError",this.algorithm=e,this.message='Algorithm "'+e+'" is not supported'}function a(e,t,r){Error.captureStackTrace&&Error.captureStackTrace(this,a),this.name="KeyParseError",this.format=t,this.keyName=e,this.innerErr=r,this.message="Failed to parse "+e+" as a valid "+t+" format key: "+r.message}function o(e,t,r){Error.captureStackTrace&&Error.captureStackTrace(this,o),this.name="SignatureParseError",this.type=e,this.format=t,this.innerErr=r,this.message="Failed to parse the given data as a "+e+" signature in "+t+" format: "+r.message}function s(e,t,r){Error.captureStackTrace&&Error.captureStackTrace(this,s),this.name="CertificateParseError",this.format=t,this.certName=e,this.innerErr=r,this.message="Failed to parse "+e+" as a valid "+t+" format certificate: "+r.message}function c(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,c),this.name="KeyEncryptedError",this.format=t,this.keyName=e,this.message="The "+t+" format key "+e+" is encrypted (password-protected), and no passphrase was provided in `options`"}var u=(e("assert-plus"),e("util"));u.inherits(n,Error),u.inherits(i,Error),u.inherits(a,Error),u.inherits(o,Error),u.inherits(s,Error),u.inherits(c,Error),t.exports={FingerprintFormatError:n,InvalidAlgorithmError:i,KeyParseError:a,SignatureParseError:o,KeyEncryptedError:c,CertificateParseError:s}},{"assert-plus":506,util:531}],488:[function(e,t,r){(function(r){function n(e){if(s.object(e,"options"),s.string(e.type,"options.type"),s.buffer(e.hash,"options.hash"),s.string(e.algorithm,"options.algorithm"),this.algorithm=e.algorithm.toLowerCase(),c.hashAlgs[this.algorithm]!==!0)throw new m(this.algorithm);this.hash=e.hash,this.type=e.type}function i(e){return e.replace(/(.{2})(?=.)/g,"$1:")}function a(e){return e.replace(/=*$/,"")}function o(e,t){return e.toUpperCase()+":"+a(t)}t.exports=n;var s=e("assert-plus"),c=e("./algs"),u=e("crypto"),l=e("./errors"),p=e("./key"),f=e("./certificate"),h=e("./utils"),d=l.FingerprintFormatError,m=l.InvalidAlgorithmError;n.prototype.toString=function(e){switch(void 0===e&&(e="md5"===this.algorithm?"hex":"base64"),s.string(e),e){case"hex":return i(this.hash.toString("hex"));case"base64":return o(this.algorithm,this.hash.toString("base64"));default:throw new d(void 0,e)}},n.prototype.matches=function(e){s.object(e,"key or certificate"),"key"===this.type?h.assertCompatible(e,p,[1,0],"key"):h.assertCompatible(e,f,[1,0],"certificate");var t=e.hash(this.algorithm),r=u.createHash(this.algorithm).update(t).digest("base64");return void 0===this.hash2&&(this.hash2=u.createHash(this.algorithm).update(this.hash).digest("base64")),this.hash2===r},n.parse=function(e,t){s.string(e,"fingerprint");var i,a,o;Array.isArray(t)&&(o=t,t={}),s.optionalObject(t,"options"),void 0===t&&(t={}),void 0!==t.enAlgs&&(o=t.enAlgs),s.optionalArrayOfString(o,"algorithms");var u=e.split(":");if(2==u.length){i=u[0].toLowerCase();var l=/^[A-Za-z0-9+\/=]+$/;if(!l.test(u[1]))throw new d(e);try{a=new r(u[1],"base64")}catch(t){throw new d(e)}}else if(u.length>2){i="md5","md5"===u[0].toLowerCase()&&(u=u.slice(1)),u=u.join("");var p=/^[a-fA-F0-9]+$/;if(!p.test(u))throw new d(e);try{a=new r(u,"hex")}catch(t){throw new d(e)}}if(void 0===i)throw new d(e);if(void 0===c.hashAlgs[i])throw new m(i);if(void 0!==o&&(o=o.map(function(e){return e.toLowerCase()}),o.indexOf(i)===-1))throw new m(i);return new n({algorithm:i,hash:a,type:t.type||"key"})},n.isFingerprint=function(e,t){return h.isCompatible(e,n,t)},n.prototype._sshpkApiVersion=[1,1],n._oldVersionDetect=function(e){return s.func(e.toString),s.func(e.matches),[1,0]}}).call(this,e("buffer").Buffer)},{"./algs":483,"./certificate":484,"./errors":487,"./key":501,"./utils":505,"assert-plus":506,buffer:122,crypto:134}],489:[function(e,t,r){(function(r){function n(e,t){if("string"==typeof e){if(e.trim().match(/^[-]+[ ]*BEGIN/))return c.read(e,t);if(e.match(/^\s*ssh-[a-z]/))return u.read(e,t);if(e.match(/^\s*ecdsa-/))return u.read(e,t);e=new r(e,"binary")}else{if(s.buffer(e),a(e))return c.read(e,t);if(i(e))return u.read(e,t)}if(e.readUInt32BE(0)e.length||"BEGIN"!==e.slice(t,t+5).toString("ascii"))}function o(e,t){throw new Error('"auto" format cannot be used for writing')}t.exports={read:n,write:o};var s=e("assert-plus"),c=(e("../utils"),e("../key"),e("../private-key"),e("./pem")),u=e("./ssh"),l=e("./rfc4253")}).call(this,e("buffer").Buffer)},{"../key":501,"../private-key":502,"../utils":505,"./pem":491,"./rfc4253":494,"./ssh":496,"assert-plus":506,buffer:122}],490:[function(e,t,r){(function(r){function n(e,t){return!1}function i(e,t){r.isBuffer(e)&&(e=e.toString("ascii"));var n=e.trim().split(/[ \t\n]+/g);if(n.length<2||n.length>3)throw new Error("Not a valid SSH certificate line");var i=n[0],o=n[1];return o=new r(o,"base64"),a(o,i)}function a(e,t,r){var n=new d({buffer:e}),i=n.readString();if(void 0!==t&&i!==t)throw new Error("SSH certificate algorithm mismatch");void 0===t&&(t=i);var a={};a.signatures={},a.signatures.openssh={},a.signatures.openssh.nonce=n.readBuffer();var s={},c=s.parts=[];s.type=p(t);for(var u=g.info[s.type].parts.length;c.length=1,"key must have at least one part");var l=g.info[s.type];if("ecdsa"===s.type){var f=j.exec(t);h.ok(null!==f),h.strictEqual(f[1],c[0].data.toString())}for(var m=0;mh.length&&(b=h.length),g+=m.write(h.slice(v,b),g),m[g++]=10,v=b}return g+=m.write("-----END "+i+"-----\n",g),m.slice(0,g)}t.exports={read:n,write:i};var a=e("assert-plus"),o=e("asn1"),s=e("crypto"),c=(e("../algs"),e("../utils")),u=e("../key"),l=e("../private-key"),p=e("./pkcs1"),f=e("./pkcs8"),h=e("./ssh-private"),d=e("./rfc4253"),m=e("../errors")}).call(this,e("buffer").Buffer)},{"../algs":483,"../errors":487,"../key":501,"../private-key":502,"../utils":505,"./pkcs1":492,"./pkcs8":493,"./rfc4253":494,"./ssh-private":495,asn1:75,"assert-plus":506,buffer:122,crypto:134}],492:[function(e,t,r){(function(r){function n(e,t){return E.read(e,t,"pkcs1")}function i(e,t){return E.write(e,t,"pkcs1")}function a(e,t){return w.strictEqual(e.peek(),x.Ber.Integer,t+" is not an Integer"),_.mpNormalize(e.readString(x.Ber.Integer,!0))}function o(e,t,r){switch(e){case"RSA":if("public"===t)return s(r);if("private"===t)return c(r);throw new Error("Unknown key type: "+t);case"DSA":if("public"===t)return l(r);if("private"===t)return u(r);throw new Error("Unknown key type: "+t);case"EC":case"ECDSA":if("private"===t)return f(r);if("public"===t)return p(r);throw new Error("Unknown key type: "+t);default:throw new Error("Unknown key algo: "+e)}}function s(e){var t=a(e,"modulus"),r=a(e,"exponent"),n={type:"rsa",parts:[{name:"e",data:r},{name:"n",data:t}]};return new j(n)}function c(e){var t=a(e,"version");w.strictEqual(t[0],0);var r=a(e,"modulus"),n=a(e,"public exponent"),i=a(e,"private exponent"),o=a(e,"prime1"),s=a(e,"prime2"),c=a(e,"exponent1"),u=a(e,"exponent2"),l=a(e,"iqmp"),p={type:"rsa",parts:[{name:"n",data:r},{name:"e",data:n},{name:"d",data:i},{name:"iqmp",data:l},{name:"p",data:o},{name:"q",data:s},{name:"dmodp",data:c},{name:"dmodq",data:u}]};return new S(p)}function u(e){var t=a(e,"version");w.strictEqual(t.readUInt8(0),0);var r=a(e,"p"),n=a(e,"q"),i=a(e,"g"),o=a(e,"y"),s=a(e,"x"),c={type:"dsa",parts:[{name:"p",data:r},{name:"q",data:n},{name:"g",data:i},{name:"y",data:o},{name:"x",data:s}]};return new S(c)}function l(e){var t=a(e,"y"),r=a(e,"p"),n=a(e,"q"),i=a(e,"g"),o={type:"dsa",parts:[{name:"y",data:t},{name:"p",data:r},{name:"q",data:n},{name:"g",data:i}]};return new j(o)}function p(e){e.readSequence();var t=e.readOID();w.strictEqual(t,"1.2.840.10045.2.1","must be ecPublicKey");for(var n,i=e.readOID(),a=Object.keys(k.curves),o=0;o=1,"key must have at least one part"),s.ok(e||d.atEnd(),"leftover bytes at end of key");var v=l,b=c.info[o.type];if("private"!==t&&b.parts.length===h.length||(b=c.privInfo[o.type],v=p),s.strictEqual(b.parts.length,h.length),"ecdsa"===o.type){var y=/^ecdsa-sha2-(.+)$/.exec(m);s.ok(null!==y),s.strictEqual(y[1],h[0].data.toString())}for(var w=!0,x=0;xM.length&&(B=M.length),R+=O.write(M.slice(z,B),R),O[R++]=10,z=B}return R+=O.write("-----END "+D+"-----\n",R),O.slice(0,R)}t.exports={read:n,readSSHPrivate:i,write:a};var o,s=e("assert-plus"),c=(e("asn1"),e("../algs"),e("../utils")),u=e("crypto"),l=(e("../key"),e("../private-key")),p=e("./pem"),f=e("./rfc4253"),h=e("../ssh-buffer"),d=e("../errors"),m="openssh-key-v1"}).call(this,e("buffer").Buffer)},{"../algs":483,"../errors":487,"../key":501,"../private-key":502,"../ssh-buffer":504,"../utils":505,"./pem":491,"./rfc4253":494,asn1:75,"assert-plus":506,"bcrypt-pbkdf":88,buffer:122,crypto:134}],496:[function(e,t,r){(function(r){function n(e,t){"string"!=typeof e&&(a.buffer(e,"buf"),e=e.toString("ascii"));var n=e.trim().replace(/[\\\r]/g,""),i=n.match(c);i||(i=n.match(u)),a.ok(i,"key must match regex");var s,l=o.algToKeyType(i[1]),p=new r(i[2],"base64"),f={};if(i[4])try{s=o.read(p)}catch(e){i=n.match(u),a.ok(i,"key must match regex"),p=new r(i[2],"base64"),s=o.readInternal(f,"public",p)}else s=o.readInternal(f,"public",p);if(a.strictEqual(l,s.type),i[4]&&i[4].length>0)s.comment=i[4];else if(f.consumed){var h=i[2]+i[3],d=4*Math.ceil(f.consumed/3);h=h.slice(0,d-2).replace(/[^a-zA-Z0-9+\/=]/g,"")+h.slice(d-2);var m=f.consumed%3;for(m>0&&"="!==h.slice(d-1,d)&&d--;"="===h.slice(d,d+1);)d++;var g=h.slice(d);g=g.replace(/[\r\n]/g," ").replace(/^\s+/,""),g.match(/^[a-zA-Z0-9]/)&&(s.comment=g)}return s}function i(e,t){if(a.object(e),!s.isKey(e))throw new Error("Must be a public key");var n=[],i=o.keyTypeToAlg(e);n.push(i);var c=o.write(e);return n.push(c.toString("base64")),e.comment&&n.push(e.comment),new r(n.join(" "))}t.exports={read:n,write:i};var a=e("assert-plus"),o=e("./rfc4253"),s=(e("../utils"),e("../key")),c=(e("../private-key"),e("./ssh-private"),/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/]+[=]*)([\n \t]+([^\n]+))?$/),u=/^([a-z0-9-]+)[ \t]+([a-zA-Z0-9+\/ \t\n]+[=]*)(.*)$/}).call(this,e("buffer").Buffer)},{"../key":501,"../private-key":502,"../utils":505,"./rfc4253":494,"./ssh-private":495,"assert-plus":506,buffer:122}],497:[function(e,t,r){(function(r){function n(e,t){"string"!=typeof e&&(o.buffer(e,"buf"),e=e.toString("ascii"));var n=e.trim().split(/[\r\n]+/g),i=n[0].match(/[-]+[ ]*BEGIN CERTIFICATE[ ]*[-]+/);o.ok(i,"invalid PEM header");var s=n[n.length-1].match(/[-]+[ ]*END CERTIFICATE[ ]*[-]+/);o.ok(s,"invalid PEM footer");for(var c={};;){if(n=n.slice(1),i=n[0].match(/^([A-Za-z0-9-]+): (.+)$/),!i)break;c[i[1].toLowerCase()]=i[2]}return n=n.slice(0,-1).join(""),e=new r(n,"base64"),a.read(e,t)}function i(e,t){var n=a.write(e,t),i="CERTIFICATE",o=n.toString("base64"),s=o.length+o.length/64+18+16+2*i.length+10,c=new r(s),u=0;u+=c.write("-----BEGIN "+i+"-----\n",u);for(var l=0;lo.length&&(p=o.length),u+=c.write(o.slice(l,p),u),c[u++]=10,l=p}return u+=c.write("-----END "+i+"-----\n",u),c.slice(0,u)}var a=e("./x509");t.exports={read:n,verify:a.verify,sign:a.sign,write:i};var o=e("assert-plus");e("asn1"),e("../algs"),e("../utils"),e("../key"),e("../private-key"),e("./pem"),e("../identity"),e("../signature"),e("../certificate")}).call(this,e("buffer").Buffer)},{"../algs":483,"../certificate":484,"../identity":499,"../key":501,"../private-key":502,"../signature":503,"../utils":505,"./pem":491,"./x509":498,asn1:75,"assert-plus":506,buffer:122}],498:[function(e,t,r){(function(r){function n(e,t){return y.strictEqual(e.peek(),w.Ber.Integer,t+" is not an Integer"),x.mpNormalize(e.readString(w.Ber.Integer,!0))}function i(e,t){var r=e.signatures.x509;y.object(r,"x509 signature");var n=r.algo.split("-");if(n[0]!==t.type)return!1;var i=r.cache;if(void 0===i){var a=new w.BerWriter;g(e,a),i=a.buffer}var o=t.createVerify(n[1]);return o.write(i),o.verify(r.signature)}function a(e){return w.Ber.Context|w.Ber.Constructor|e}function o(e){return w.Ber.Context|e}function s(e,t){"string"==typeof e&&(e=new r(e,"binary")),y.buffer(e,"buf");var i=new w.BerReader(e);if(i.readSequence(),Math.abs(i.length-i.remain)>1)throw new Error("DER sequence does not contain whole byte stream");var o=i.offset;i.readSequence();var s=i.offset+i.length,l=s;if(i.peek()===a(0)){i.readSequence(a(0));var p=i.readInt();y.ok(p<=3,"only x.509 versions up to v3 supported")}var f={};f.signatures={};var h=f.signatures.x509={};h.extras={},f.serial=n(i,"serial"),i.readSequence();var d=i.offset+i.length,m=i.readOID(),g=E[m];if(void 0===g)throw new Error("unknown signature algorithm "+m);if(i._offset=d,f.issuer=k.parseAsn1(i),i.readSequence(),f.validFrom=c(i),f.validUntil=c(i),f.subjects=[k.parseAsn1(i)],i.readSequence(),d=i.offset+i.length,f.subjectKey=S.readPkcs8(void 0,"public",i),i._offset=d,i.peek()===a(1)&&(i.readSequence(a(1)),h.extras.issuerUniqueID=e.slice(i.offset,i.offset+i.length),i._offset+=i.length),i.peek()===a(2)&&(i.readSequence(a(2)),h.extras.subjectUniqueID=e.slice(i.offset,i.offset+i.length),i._offset+=i.length),i.peek()===a(3)){i.readSequence(a(3));var v=i.offset+i.length;for(i.readSequence();i.offset=60?i-1:i,r.setUTCFullYear(a,parseInt(t[2],10)-1,parseInt(t[3],10)),r.setUTCHours(parseInt(t[4],10),parseInt(t[5],10)),t[6]&&t[6].length>0&&r.setUTCSeconds(parseInt(t[6],10)),r}function p(e){var t=e.match(D);y.ok(t);var r=new Date;return r.setUTCFullYear(parseInt(t[1],10),parseInt(t[2],10)-1,parseInt(t[3],10)),r.setUTCHours(parseInt(t[4],10),parseInt(t[5],10)),t[6]&&t[6].length>0&&r.setUTCSeconds(parseInt(t[6],10)),r}function f(e){for(var t=""+e;t.length<2;)t="0"+t;return t}function h(e){var t="";return t+=f(e.getUTCFullYear()%100),t+=f(e.getUTCMonth()+1),t+=f(e.getUTCDate()),t+=f(e.getUTCHours()),t+=f(e.getUTCMinutes()),t+=f(e.getUTCSeconds()),t+="Z"}function d(e,t){void 0===e.signatures.x509&&(e.signatures.x509={});var r=e.signatures.x509;if(r.algo=t.type+"-"+t.defaultHashAlgorithm(),void 0===E[r.algo])return!1;var n=new w.BerWriter;g(e,n);var i=n.buffer;r.cache=i;var a=t.createSign();return a.write(i),e.signatures.x509.signature=a.sign(),!0}function m(e,t){var n=e.signatures.x509;y.object(n,"x509 signature");var i=new w.BerWriter;i.startSequence(),n.cache?(i._ensure(n.cache.length),n.cache.copy(i._buf,i._offset),i._offset+=n.cache.length):g(e,i),i.startSequence(),i.writeOID(E[n.algo]),n.algo.match(/^rsa-/)&&i.writeNull(),i.endSequence();var a=n.signature.toBuffer("asn1"),o=new r(a.length+1);return o[0]=0,a.copy(o,1),i.writeBuffer(o,w.Ber.BitString),i.endSequence(),i.buffer}function g(e,t){var r=e.signatures.x509;y.object(r,"x509 signature"),t.startSequence(),t.startSequence(a(0)),t.writeInt(2),t.endSequence(),t.writeBuffer(x.mpNormalize(e.serial),w.Ber.Integer),t.startSequence(),t.writeOID(E[r.algo]),t.endSequence(),e.issuer.toAsn1(t),t.startSequence(),t.writeString(h(e.validFrom),w.Ber.UTCTime),t.writeString(h(e.validUntil),w.Ber.UTCTime),t.endSequence();var n=e.subjects[0],i=e.subjects.slice(1);if(n.toAsn1(t),S.writePkcs8(t,e.subjectKey),r.extras&&r.extras.issuerUniqueID&&t.writeBuffer(r.extras.issuerUniqueID,a(1)),r.extras&&r.extras.subjectUniqueID&&t.writeBuffer(r.extras.subjectUniqueID,a(2)),i.length>0||"host"===n.type||void 0!==e.purposes&&e.purposes.length>0||r.extras&&r.extras.exts){t.startSequence(a(3)),t.startSequence();var s=[];void 0!==e.purposes&&e.purposes.length>0&&(s.push({oid:A.basicConstraints,critical:!0}),s.push({oid:A.keyUsage,critical:!0}),s.push({oid:A.extKeyUsage,critical:!0})),s.push({oid:A.altName}),r.extras&&r.extras.exts&&(s=r.extras.exts);for(var c=0;c0&&(this.cn=this.componentLookup.cn[0].value),a.optionalString(e.type,"options.type"),void 0===e.type)1===this.components.length&&this.componentLookup.cn&&1===this.componentLookup.cn.length&&this.componentLookup.cn[0].value.match(c)?(this.type="host",this.hostname=this.componentLookup.cn[0].value):this.componentLookup.dc&&this.components.length===this.componentLookup.dc.length?(this.type="host",this.hostname=this.componentLookup.dc.map(function(e){return e.value}).join(".")):this.componentLookup.uid&&this.components.length===this.componentLookup.uid.length?(this.type="user",this.uid=this.componentLookup.uid[0].value):this.componentLookup.cn&&1===this.componentLookup.cn.length&&this.componentLookup.cn[0].value.match(c)?(this.type="host",this.hostname=this.componentLookup.cn[0].value):this.componentLookup.uid&&1===this.componentLookup.uid.length?(this.type="user",this.uid=this.componentLookup.uid[0].value):this.componentLookup.mail&&1===this.componentLookup.mail.length?(this.type="email",this.email=this.componentLookup.mail[0].value):this.componentLookup.cn&&1===this.componentLookup.cn.length?(this.type="user",this.uid=this.componentLookup.cn[0].value):this.type="unknown";else if(this.type=e.type,"host"===this.type)this.hostname=e.hostname;else if("user"===this.type)this.uid=e.uid;else{if("email"!==this.type)throw new Error("Unknown type "+this.type);this.email=e.email}}function i(e,t){if("**"===e||"**"===t)return!0;var r=e.split("."),n=t.split(".");if(r.length!==n.length)return!1;for(var i=0;i1024&&(e="sha256"),"ed25519"===this.type&&(e="sha512"),"ecdsa"===this.type&&(e=this.size<=256?"sha256":this.size<=384?"sha384":"sha512"),e},n.prototype.createVerify=function(e){if(void 0===e&&(e=this.defaultHashAlgorithm()),a.string(e,"hash algorithm"),"ed25519"===this.type&&void 0!==i)return new i.Verifier(this,e);if("curve25519"===this.type)throw new Error("Curve25519 keys are not suitable for signing or verification");var t,n,o;try{n=e.toUpperCase(),t=s.createVerify(n)}catch(e){o=e}(void 0===t||o instanceof Error&&o.message.match(/Unknown message digest/))&&(n="RSA-",n+=e.toUpperCase(),t=s.createVerify(n)),a.ok(t,"failed to create verifier");var c=t.verify.bind(t),l=this.toBuffer("pkcs8"),p=this;return t.verify=function(t,n){if(u.isSignature(t,[2,0]))return t.type===p.type&&((!t.hashAlgorithm||t.hashAlgorithm===e)&&c(l,t.toBuffer("asn1")));if("string"==typeof t||r.isBuffer(t))return c(l,t,n);throw u.isSignature(t,[1,0])?new Error("signature was created by too old a version of sshpk and cannot be verified"):new TypeError("signature must be a string, Buffer, or Signature object")},t},n.prototype.createDiffieHellman=function(){if("rsa"===this.type)throw new Error("RSA keys do not support Diffie-Hellman");return new l(this)},n.prototype.createDH=n.prototype.createDiffieHellman,n.parse=function(e,t,r){"string"!=typeof e&&a.buffer(e,"data"),void 0===t&&(t="auto"),a.string(t,"format"),"string"==typeof r&&(r={filename:r}),a.optionalObject(r,"options"),void 0===r&&(r={}),a.optionalString(r.filename,"options.filename"),void 0===r.filename&&(r.filename="(unnamed)"),a.object(g[t],"formats[format]");try{var n=g[t].read(e,r);return n instanceof h&&(n=n.toPublic()),n.comment||(n.comment=r.filename),n}catch(e){if("KeyEncryptedError"===e.name)throw e;throw new m(r.filename,t,e)}},n.isKey=function(e,t){return f.isCompatible(e,n,t)},n.prototype._sshpkApiVersion=[1,5],n._oldVersionDetect=function(e){return a.func(e.toBuffer),a.func(e.fingerprint),e.createDH?[1,4]:e.defaultHashAlgorithm?[1,3]:e.formats.auto?[1,2]:e.formats.pkcs1?[1,1]:[1,0]}}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":216,"./algs":483,"./dhe":485,"./ed-compat":486,"./errors":487,"./fingerprint":488,"./formats/auto":489,"./formats/pem":491,"./formats/pkcs1":492,"./formats/pkcs8":493,"./formats/rfc4253":494,"./formats/ssh":496,"./formats/ssh-private":495,"./private-key":502,"./signature":503,"./utils":505,"assert-plus":506,crypto:134}],502:[function(e,t,r){(function(r){function n(e){o.object(e,"options"),h.call(this,e),this._pubCache=void 0}t.exports=n;var i,a,o=e("assert-plus"),s=e("./algs"),c=e("crypto"),u=(e("./fingerprint"),e("./signature")),l=e("./errors"),p=e("util"),f=e("./utils");try{i=e("./ed-compat")}catch(e){}var h=e("./key"),d=(l.InvalidAlgorithmError,l.KeyParseError),m=(l.KeyEncryptedError,{});m.auto=e("./formats/auto"),m.pem=e("./formats/pem"),m.pkcs1=e("./formats/pkcs1"),m.pkcs8=e("./formats/pkcs8"),m.rfc4253=e("./formats/rfc4253"),m["ssh-private"]=e("./formats/ssh-private"),m.openssh=m["ssh-private"],m.ssh=m["ssh-private"],p.inherits(n,h),n.formats=m,n.prototype.toBuffer=function(e,t){return void 0===e&&(e="pkcs1"),o.string(e,"format"),o.object(m[e],"formats[format]"),o.optionalObject(t,"options"),m[e].write(this,t)},n.prototype.hash=function(e){return this.toPublic().hash(e)},n.prototype.toPublic=function(){if(this._pubCache)return this._pubCache;for(var e=s.info[this.type],t=[],r=0;r20&&0===n[0]&&(n=n.slice(1)),i=this.part.s.data,i.length>20&&0===i[0]&&(i=i.slice(1)),this.hashAlgorithm&&"sha1"!==this.hashAlgorithm||n.length+i.length!==40)throw new Error("OpenSSH only supports DSA signatures with SHA1 hash");return t.writeBuffer(r.concat([n,i])),t.toBuffer()}if("ssh"===e&&"ecdsa"===this.type){var o=new f({});n=this.part.r.data,o.writeBuffer(n),o.writePart(this.part.s),t=new f({});var s;0===n[0]&&(n=n.slice(1));var u=8*n.length;return 256===u?s="nistp256":384===u?s="nistp384":528===u&&(s="nistp521"),t.writeString("ecdsa-sha2-"+s),t.writeBuffer(o.toBuffer()),t.toBuffer()}throw new Error("Invalid signature format");default:throw new Error("Invalid signature data")}},n.prototype.toString=function(e){return c.optionalString(e,"format"),this.toBuffer(e).toString("base64")},n.parse=function(e,t,n){"string"==typeof e&&(e=new r(e,"base64")),c.buffer(e,"data"),c.string(n,"format"),c.string(t,"type");var u={};u.type=t.toLowerCase(),u.parts=[];try{switch(c.ok(e.length>0,"signature must not be empty"),u.type){case"rsa":return i(e,t,n,u,"ssh-rsa");case"ed25519":return i(e,t,n,u,"ssh-ed25519");case"dsa":case"ecdsa":return"asn1"===n?a(e,t,n,u):"dsa"===u.type?o(e,t,n,u):s(e,t,n,u);default:throw new h(t)}}catch(e){if(e instanceof h)throw e;throw new d(t,n,e)}},n.isSignature=function(e,t){return l.isCompatible(e,n,t)},n.prototype._sshpkApiVersion=[2,1],n._oldVersionDetect=function(e){return c.func(e.toBuffer),e.hasOwnProperty("hashAlgorithm")?[2,0]:[1,0]}}).call(this,e("buffer").Buffer)},{"./algs":483,"./errors":487,"./ssh-buffer":504,"./utils":505,asn1:75,"assert-plus":506,buffer:122,crypto:134}],504:[function(e,t,r){(function(r){function n(e){i.object(e,"options"),void 0!==e.buffer&&i.buffer(e.buffer,"options.buffer"),this._size=e.buffer?e.buffer.length:1024,this._buffer=e.buffer||new r(this._size),this._offset=0}t.exports=n;var i=e("assert-plus");n.prototype.toBuffer=function(){return this._buffer.slice(0,this._offset)},n.prototype.atEnd=function(){return this._offset>=this._buffer.length},n.prototype.remainder=function(){return this._buffer.slice(this._offset)},n.prototype.skip=function(e){this._offset+=e},n.prototype.expand=function(){this._size*=2;var e=new r(this._size);this._buffer.copy(e,0),this._buffer=e},n.prototype.readPart=function(){return{data:this.readBuffer()}},n.prototype.readBuffer=function(){var e=this._buffer.readUInt32BE(this._offset);this._offset+=4,i.ok(this._offset+e<=this._buffer.length,"length out of bounds at +0x"+this._offset.toString(16)+" (data truncated?)");var t=this._buffer.slice(this._offset,this._offset+e);return this._offset+=e,t},n.prototype.readString=function(){return this.readBuffer().toString()},n.prototype.readCString=function(){for(var e=this._offset;ethis._size;)this.expand();this._buffer.writeUInt32BE(e.length,this._offset),this._offset+=4,e.copy(this._buffer,this._offset),this._offset+=e.length},n.prototype.writeString=function(e){this.writeBuffer(new r(e,"utf8"))},n.prototype.writeCString=function(e){for(;this._offset+1+e.length>this._size;)this.expand();this._buffer.write(e,this._offset),this._offset+=e.length,this._buffer[this._offset++]=0},n.prototype.writeInt=function(e){for(;this._offset+4>this._size;)this.expand();this._buffer.writeUInt32BE(e,this._offset),this._offset+=4},n.prototype.writeInt64=function(e){if(i.buffer(e,"value"),e.length>8){for(var t=e.slice(0,e.length-8),r=0;rthis._size;)this.expand();e.copy(this._buffer,this._offset),this._offset+=8},n.prototype.writeChar=function(e){for(;this._offset+1>this._size;)this.expand();this._buffer[this._offset++]=e},n.prototype.writePart=function(e){this.writeBuffer(e.data)},n.prototype.write=function(e){for(;this._offset+e.length>this._size;)this.expand();e.copy(this._buffer,this._offset),this._offset+=e.length}}).call(this,e("buffer").Buffer)},{"assert-plus":506,buffer:122}],505:[function(e,t,r){(function(r){function n(e,t,r){if(null===e||"object"!=typeof e)return!1;if(void 0===r&&(r=t.prototype._sshpkApiVersion),e instanceof t&&t.prototype._sshpkApiVersion[0]==r[0])return!0;for(var n=Object.getPrototypeOf(e),i=0;n.constructor.name!==t.name;)if(n=Object.getPrototypeOf(n),!n||++i>v)return!1;if(n.constructor.name!==t.name)return!1;var a=n._sshpkApiVersion;return void 0===a&&(a=t._oldVersionDetect(e)),!(a[0]!=r[0]||a[1]=r[1],n+" must be compatible with "+t.name+" klass version "+r[0]+"."+r[1])}}function a(e,t,n,i){d.buffer(t,"salt"),d.buffer(n,"passphrase"),d.number(i,"iteration count");var a=b[e];d.object(a,"supported cipher"),t=t.slice(0,y);for(var o,s,c,u=new r(0);u.length=t.length){var o=a+1;r.push(e.slice(n,o-i)),n=o,i=0}return n<=e.length&&r.push(e.slice(n,e.length)),r}function c(e,t){if(d.buffer(e),0===e[0]&&4===e[1])return t?e:e.slice(1);if(4===e[0]){if(!t)return e}else{for(;0===e[0];)e=e.slice(1);if(2===e[0]||3===e[0])throw new Error("Compressed elliptic curve points are not supported");if(4!==e[0])throw new Error("Not a valid elliptic curve point");if(!t)return e}var n=new r(e.length+1);return n[0]=0,e.copy(n,1),n}function u(e){for(d.buffer(e);e.length>1&&0===e[0]&&0===(128&e[1]);)e=e.slice(1);if(128===(128&e[0])){var t=new r(e.length+1);t[0]=0,e.copy(t,1),e=t}return e}function l(e){var t=new r(e.toByteArray());return t=u(t)}function p(t,r,n){d.buffer(t),d.buffer(r),d.buffer(n);try{var i=e("jsbn").BigInteger}catch(e){throw new Error("To load a PKCS#8 format DSA private key, the node jsbn library is required.")}t=new i(t),r=new i(r),n=new i(n);var a=t.modPow(n,r),o=l(a);return o}function f(t){d.object(t),i(t,m,[1,1]);try{var r=e("jsbn").BigInteger}catch(e){throw new Error("To write a PEM private key from this source, the node jsbn lib is required.")}var n,a=new r(t.part.d.data);if(!t.part.dmodp){var o=new r(t.part.p.data),s=a.mod(o.subtract(1));n=l(s),t.part.dmodp={name:"dmodp",data:n},t.parts.push(t.part.dmodp)}if(!t.part.dmodq){var c=new r(t.part.q.data),u=a.mod(c.subtract(1));n=l(u),t.part.dmodq={name:"dmodq",data:n},t.parts.push(t.part.dmodq)}}function h(e){var t={};switch(e){case"3des-cbc":t.keySize=24,t.blockSize=8,t.opensslName="des-ede3-cbc";break;case"blowfish-cbc":t.keySize=16,t.blockSize=8,t.opensslName="bf-cbc";break;case"aes128-cbc":case"aes128-ctr":case"aes128-gcm@openssh.com":t.keySize=16,t.blockSize=16,t.opensslName="aes-128-"+e.slice(7,10);break;case"aes192-cbc":case"aes192-ctr":case"aes192-gcm@openssh.com":t.keySize=24,t.blockSize=16,t.opensslName="aes-192-"+e.slice(7,10);break;case"aes256-cbc":case"aes256-ctr":case"aes256-gcm@openssh.com":t.keySize=32,t.blockSize=16,t.opensslName="aes-256-"+e.slice(7,10);break;default:throw new Error('Unsupported openssl cipher "'+e+'"')}return t}t.exports={bufferSplit:s,addRSAMissing:f,calculateDSAPublic:p,mpNormalize:u,ecNormalize:c,countZeros:o,assertCompatible:i,isCompatible:n,opensslKeyDeriv:a,opensshCipherInfo:h};var d=e("assert-plus"),m=e("./private-key"),g=e("crypto"),v=3,b={"des-ede3-cbc":{key:7,iv:8},"aes-128-cbc":{key:16,iv:16}},y=8}).call(this,e("buffer").Buffer)},{"./private-key":502,"assert-plus":506,buffer:122,crypto:134,jsbn:226}],506:[function(e,t,r){(function(r,n){function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function a(e,t,r,n,i){throw new u.AssertionError({message:p.format("%s (%s) is required",e,t),actual:void 0===i?typeof n:i(n),expected:t,operator:r||"===",stackStartFunction:a.caller})}function o(e){return Object.prototype.toString.call(e).slice(8,-1)}function s(){}function c(e){var t,r=Object.keys(h);return t=n.env.NODE_NDEBUG?s:function(e,t){e||a(t,"true",e)},r.forEach(function(r){if(e)return void(t[r]=s);var n=h[r];t[r]=function(e,t){n.check(e)||a(t,r,n.operator,e,n.actual)}}),r.forEach(function(r){var n="optional"+i(r);if(e)return void(t[n]=s);var o=h[r];t[n]=function(e,t){void 0!==e&&null!==e&&(o.check(e)||a(t,r,o.operator,e,o.actual))}}),r.forEach(function(r){var n="arrayOf"+i(r);if(e)return void(t[n]=s);var o=h[r],c="["+r+"]";t[n]=function(e,t){Array.isArray(e)||a(t,c,o.operator,e,o.actual);var r;for(r=0;re._pos){var a=r.substr(e._pos);if("x-user-defined"===e._charset){for(var o=new i(a.length),s=0;se._pos&&(e.push(new i(new Uint8Array(u.result.slice(e._pos)))),e._pos=u.result.byteLength)},u.onload=function(){e.push(null)},u.readAsArrayBuffer(r)}e._xhr.readyState===c.DONE&&"ms-stream"!==e._mode&&e.push(null)}}).call(this,e("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer)},{"./capability":509,_process:431,buffer:122,inherits:215,"readable-stream":456}],512:[function(e,t,r){function n(e){if(e&&!c(e))throw new Error("Unknown encoding: "+e)}function i(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=e("buffer").Buffer,c=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},u=r.StringDecoder=function(e){switch(this.encoding=(e||"utf8").toLowerCase().replace(/[-_]/,""),n(e),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};u.prototype.write=function(e){for(var t="";this.charLength;){var r=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=""}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,n=t.charCodeAt(i);if(n>=55296&&n<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},u.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var r=e[e.length-t];if(1==t&&r>>5==6){this.charLength=2;break}if(t<=2&&r>>4==14){this.charLength=3;break}if(t<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=t},u.prototype.end=function(e){var t="";if(e&&e.length&&(t=this.write(e)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;t+=n.slice(0,r).toString(i)}return t}},{buffer:122}],513:[function(e,t,r){(function(r){function n(e,t){return this instanceof n?(s.call(this),null==e&&(e="utf8"),this.readable=this.writable=!0,this.paused=!1,this.toEncoding=null==t?e:t,this.fromEncoding=null==t?"":e,void(this.decoder=new i(this.toEncoding))):new n(e,t)}function i(e){switch(c.call(this,e),this.encoding){case"base64":this.write=a,this.alignedBuffer=new r(3),this.alignedBytes=0}}function a(e){var t=(this.alignedBytes+e.length)%this.alignedBuffer.length;if(!t&&!this.alignedBytes)return e.toString(this.encoding);var n=new r(this.alignedBytes+e.length-t);return this.alignedBuffer.copy(n,0,0,this.alignedBytes),e.copy(n,this.alignedBytes,0,e.length-t),e.copy(this.alignedBuffer,0,e.length-t,e.length),this.alignedBytes=t,n.toString(this.encoding)}var o=e("util"),s=e("stream"),c=e("string_decoder").StringDecoder;t.exports=n,t.exports.AlignedStringDecoder=i,o.inherits(n,s),n.prototype.write=function(e){if(!this.writable){var t=new Error("stream not writable");return t.code="EPIPE",this.emit("error",t),!1}this.fromEncoding&&(r.isBuffer(e)&&(e=e.toString()),e=new r(e,this.fromEncoding));var n=this.decoder.write(e);return n.length&&this.emit("data",n),!this.paused},n.prototype.flush=function(){if(this.decoder.flush){var e=this.decoder.flush();e.length&&this.emit("data",e)}},n.prototype.end=function(){(this.writable||this.readable)&&(this.flush(),this.emit("end"),this.writable=this.readable=!1,this.destroy())},n.prototype.destroy=function(){this.decoder=null,this.writable=this.readable=!1,this.emit("close")},n.prototype.pause=function(){this.paused=!0},n.prototype.resume=function(){this.paused&&this.emit("drain"),this.paused=!1},o.inherits(i,c),i.prototype.flush=function(){if(!this.alignedBuffer||!this.alignedBytes)return"";var e=this.alignedBuffer.toString(this.encoding,0,this.alignedBytes);return this.alignedBytes=0,e}}).call(this,e("buffer").Buffer)},{buffer:122,stream:507,string_decoder:512,util:531}],514:[function(e,t,r){!function(t){if(function(e,t){"function"==typeof define&&define.amd?define("strophe-base64",function(){return t()}):e.Base64=t()}(this,function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t={encode:function(t){var r,n,i,a,o,s,c,u="",l=0;do r=t.charCodeAt(l++),n=t.charCodeAt(l++),i=t.charCodeAt(l++),a=r>>2,o=(3&r)<<4|n>>4,s=(15&n)<<2|i>>6,c=63&i,isNaN(n)?(o=(3&r)<<4,s=c=64):isNaN(i)&&(c=64),u=u+e.charAt(a)+e.charAt(o)+e.charAt(s)+e.charAt(c);while(l>4,n=(15&o)<<4|s>>2,i=(3&s)<<6|c,u+=String.fromCharCode(r),64!=s&&(u+=String.fromCharCode(n)),64!=c&&(u+=String.fromCharCode(i));while(l>5]|=128<<24-n%32,e[(n+64>>9<<4)+15]=n;var o,s,c,u,l,p,f,h,d=new Array(80),m=1732584193,g=-271733879,v=-1732584194,b=271733878,y=-1009589776;for(o=0;o16&&(n=e(n,8*t.length));for(var i=new Array(16),a=new Array(16),s=0;s<16;s++)i[s]=909522486^n[s],a[s]=1549556828^n[s];var c=e(i.concat(o(r)),512+8*r.length);return e(a.concat(c),672)}function i(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r}function a(e,t){return e<>>32-t}function o(e){for(var t=[],r=255,n=0;n<8*e.length;n+=8)t[n>>5]|=(e.charCodeAt(n/8)&r)<<24-n%32;return t}function s(e){for(var t="",r=255,n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&r);return t}function c(e){for(var t,r,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i="",a=0;a<4*e.length;a+=3)for(t=(e[a>>2]>>8*(3-a%4)&255)<<16|(e[a+1>>2]>>8*(3-(a+1)%4)&255)<<8|e[a+2>>2]>>8*(3-(a+2)%4)&255,r=0;r<4;r++)i+=8*a+6*r>32*e.length?"=":n.charAt(t>>6*(3-r)&63);return i}return{b64_hmac_sha1:function(e,t){return c(n(e,t))},b64_sha1:function(t){return c(e(o(t),8*t.length))},binb2str:s,core_hmac_sha1:n,str_hmac_sha1:function(e,t){return s(n(e,t))},str_sha1:function(t){return s(e(o(t),8*t.length))}}}),function(e,t){"function"==typeof define&&define.amd?define("strophe-md5",function(){return t()}):e.MD5=t()}(this,function(e){var t=function(e,t){var r=(65535&e)+(65535&t),n=(e>>16)+(t>>16)+(r>>16);return n<<16|65535&r},r=function(e,t){return e<>>32-t},n=function(e){for(var t=[],r=0;r<8*e.length;r+=8)t[r>>5]|=(255&e.charCodeAt(r/8))<>5]>>>r%32&255);return t},a=function(e){for(var t="0123456789abcdef",r="",n=0;n<4*e.length;n++)r+=t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15);return r},o=function(e,n,i,a,o,s){return t(r(t(t(n,e),t(a,s)),o),i)},s=function(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)},c=function(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)},u=function(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)},l=function(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)},p=function(e,r){e[r>>5]|=128<>>9<<4)+14]=r;for(var n,i,a,o,p=1732584193,f=-271733879,h=-1732584194,d=271733878,m=0;m=0&&r<=127?n+=e.charAt(t):r>2047?(n+=String.fromCharCode(224|r>>12&15),n+=String.fromCharCode(128|r>>6&63),n+=String.fromCharCode(128|r>>0&63)):(n+=String.fromCharCode(192|r>>6&31),n+=String.fromCharCode(128|r>>0&63));return n},addCookies:function(e){var t,r,n,i,a,o,s;for(t in e||{})a="",o="",s="",r=e[t],n="object"==typeof r,i=escape(unescape(n?r.value:r)),n&&(a=r.expires?";expires="+r.expires:"",o=r.domain?";domain="+r.domain:"",s=r.path?";path="+r.path:""),document.cookie=t+"="+i+a+o+s}};return e}),function(e,t){return"function"==typeof define&&define.amd?void define("strophe-polyfill",[],function(){return t()}):t()}(this,function(){Function.prototype.bind||(Function.prototype.bind=function(e){var t=this,r=Array.prototype.slice,n=Array.prototype.concat,i=r.call(arguments,1);return function(){return t.apply(e?e:this,n.call(i,r.call(arguments,0)))}}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e){var t=this.length,r=Number(arguments[1])||0;for(r=r<0?Math.ceil(r):Math.floor(r),r<0&&(r+=t);r>>0;if("function"!=typeof e)throw new TypeError(e+" is not a function");for(arguments.length>1&&(r=t),n=0;n0)for(var r=0;r/g,">"),e=e.replace(/'/g,"'"),e=e.replace(/"/g,""")},xmlunescape:function(e){return e=e.replace(/\&/g,"&"),e=e.replace(/</g,"<"),e=e.replace(/>/g,">"),e=e.replace(/'/g,"'"),e=e.replace(/"/g,'"')},xmlTextNode:function(e){return c.xmlGenerator().createTextNode(e)},xmlHtmlNode:function(e){var t;if(window.DOMParser){var r=new DOMParser;t=r.parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText:function(e){if(!e)return null;var t="";0===e.childNodes.length&&e.nodeType==c.ElementType.TEXT&&(t+=e.nodeValue);for(var r=0;r0&&(o=s.join("; "),r.setAttribute(a,o))}else r.setAttribute(a,o);for(t=0;t/g,"\\3e").replace(/@/g,"\\40")},unescapeNode:function(e){return"string"!=typeof e?e:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\")},getNodeFromJid:function(e){return e.indexOf("@")<0?null:e.split("@")[0]},getDomainFromJid:function(e){var t=c.getBareJidFromJid(e);if(t.indexOf("@")<0)return t;var r=t.split("@");return r.splice(0,1),r.join("@")},getResourceFromJid:function(e){var t=e.split("/");return t.length<2?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:function(e){return e?e.split("/")[0]:null},_handleError:function(e){"undefined"!=typeof e.stack&&c.fatal(e.stack),e.sourceURL?c.fatal("error: "+this.handler+" "+e.sourceURL+":"+e.line+" - "+e.name+": "+e.message):e.fileName?c.fatal("error: "+this.handler+" "+e.fileName+":"+e.lineNumber+" - "+e.name+": "+e.message):c.fatal("error: "+e.message)},log:function(e,t){},debug:function(e){this.log(this.LogLevel.DEBUG,e)},info:function(e){this.log(this.LogLevel.INFO,e)},warn:function(e){this.log(this.LogLevel.WARN,e)},error:function(e){this.log(this.LogLevel.ERROR,e)},fatal:function(e){this.log(this.LogLevel.FATAL,e)},serialize:function(e){var t;if(!e)return null;"function"==typeof e.tree&&(e=e.tree());var r,n,i=e.nodeName;for(e.getAttribute("_realname")&&(i=e.getAttribute("_realname")),t="<"+i,r=0;r0){for(t+=">",r=0;r"}t+=""}else t+="/>";return t},_requestId:0,_connectionPlugins:{},addConnectionPlugin:function(e,t){c._connectionPlugins[e]=t}},c.Builder=function(e,t){"presence"!=e&&"message"!=e&&"iq"!=e||(t&&!t.xmlns?t.xmlns=c.NS.CLIENT:t||(t={xmlns:c.NS.CLIENT})),this.nodeTree=c.xmlElement(e,t),this.node=this.nodeTree},c.Builder.prototype={tree:function(){return this.nodeTree},toString:function(){return c.serialize(this.nodeTree)},up:function(){return this.node=this.node.parentNode,this},root:function(){return this.node=this.nodeTree,this},attrs:function(e){for(var t in e)e.hasOwnProperty(t)&&(void 0===e[t]?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this},c:function(e,t,r){var n=c.xmlElement(e,t,r);return this.node.appendChild(n),"string"!=typeof r&&"number"!=typeof r&&(this.node=n),this},cnode:function(e){var t,r=c.xmlGenerator();try{t=void 0!==r.importNode}catch(e){t=!1}var n=t?r.importNode(e,!0):c.copyElement(e);return this.node.appendChild(n),this.node=n,this},t:function(e){var t=c.xmlTextNode(e);return this.node.appendChild(t),this},h:function(e){var t=document.createElement("body");t.innerHTML=e;for(var r=c.createHtml(t);r.childNodes.length>0;)this.node.appendChild(r.childNodes[0]);return this}},c.Handler=function(e,t,r,n,i,a,o){this.handler=e,this.ns=t,this.name=r,this.type=n,this.id=i,this.options=o||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(c.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.'),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.options.matchBareFromJid?this.from=a?c.getBareJidFromJid(a):null:this.from=a,this.user=!0},c.Handler.prototype={getNamespace:function(e){var t=e.getAttribute("xmlns");return t&&this.options.ignoreNamespaceFragment&&(t=t.split("#")[0]),t},namespaceMatch:function(e){var t=!1;if(!this.ns)return!0;var r=this;return c.forEachChild(e,null,function(e){r.getNamespace(e)===r.ns&&(t=!0)}),t=t||this.getNamespace(e)===this.ns},isMatch:function(e){var t=e.getAttribute("from");this.options.matchBareFromJid&&(t=c.getBareJidFromJid(t));var r=e.getAttribute("type");return!(!this.namespaceMatch(e)||this.name&&!c.isTagEqual(e,this.name)||this.type&&(Array.isArray(this.type)?this.type.indexOf(r)==-1:r!=this.type)||this.id&&e.getAttribute("id")!=this.id||this.from&&t!=this.from)},run:function(e){var t=null;try{t=this.handler(e)}catch(e){throw c._handleError(e),e}return t},toString:function(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},c.TimedHandler=function(e,t){this.period=e,this.handler=t,this.lastCalled=(new Date).getTime(),this.user=!0},c.TimedHandler.prototype={run:function(){return this.lastCalled=(new Date).getTime(),this.handler()},reset:function(){this.lastCalled=(new Date).getTime()},toString:function(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},c.Connection=function(e,t){this.service=e,this.options=t||{};var r=this.options.protocol||"";0===e.indexOf("ws:")||0===e.indexOf("wss:")||0===r.indexOf("ws")?this._proto=new c.Websocket(this):this._proto=new c.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(function(){this._onIdle()}.bind(this),100),n.addCookies(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms);for(var i in c._connectionPlugins)if(c._connectionPlugins.hasOwnProperty(i)){var a=c._connectionPlugins[i],o=function(){};o.prototype=a,this[i]=new o,this[i].init(this)}},c.Connection.prototype={reset:function(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0},pause:function(){this.paused=!0},resume:function(){this.paused=!1},getUniqueId:function(e){var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,r="x"==e?t:3&t|8;return r.toString(16)});return"string"==typeof e||"number"==typeof e?t+":"+e:t+""},addProtocolErrorHandler:function(e,t,r){this.protocolErrorHandlers[e][t]=r},connect:function(e,t,r,n,i,a,o){this.jid=e,this.authzid=c.getBareJidFromJid(this.jid),this.authcid=o||c.getNodeFromJid(this.jid),this.pass=t,this.servtype="xmpp",this.connect_callback=r,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=c.getDomainFromJid(this.jid),this._changeConnectStatus(c.Status.CONNECTING,null),this._proto._connect(n,i,a)},attach:function(e,t,r,n,i,a,o){if(!(this._proto instanceof c.Bosh))throw{name:"StropheSessionError",message:'The "attach" method can only be used with a BOSH connection.'};this._proto._attach(e,t,r,n,i,a,o)},restore:function(e,t,r,n,i){if(!this._sessionCachingSupported())throw{name:"StropheSessionError",message:'The "restore" method can only be used with a BOSH connection.'};this._proto._restore(e,t,r,n,i)},_sessionCachingSupported:function(){if(this._proto instanceof c.Bosh){if(!JSON)return!1;try{window.sessionStorage.setItem("_strophe_","_strophe_"),window.sessionStorage.removeItem("_strophe_")}catch(e){return!1}return!0}return!1},xmlInput:function(e){},xmlOutput:function(e){},rawInput:function(e){},rawOutput:function(e){},nextValidRid:function(e){},send:function(e){if(null!==e){if("function"==typeof e.sort)for(var t=0;t=0&&this.addHandlers.splice(t,1)},registerSASLMechanisms:function(e){this.mechanisms={},e=e||[c.SASLAnonymous,c.SASLExternal,c.SASLMD5,c.SASLOAuthBearer,c.SASLPlain,c.SASLSHA1],e.forEach(this.registerSASLMechanism.bind(this))},registerSASLMechanism:function(e){this.mechanisms[e.prototype.name]=e},disconnect:function(e){if(this._changeConnectStatus(c.Status.DISCONNECTING,e),c.info("Disconnect was called because: "+e),this.connected){var t=!1;this.disconnecting=!0,this.authenticated&&(t=s({xmlns:c.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(t)}else c.info("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()},_changeConnectStatus:function(e,t){for(var r in c._connectionPlugins)if(c._connectionPlugins.hasOwnProperty(r)){var n=this[r];if(n.statusChanged)try{n.statusChanged(e,t); -}catch(e){c.error(""+r+" plugin caused an exception changing status: "+e)}}if(this.connect_callback)try{this.connect_callback(e,t)}catch(e){c._handleError(e),c.error("User connection callback caused an exception: "+e)}},_doDisconnect:function(e){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),c.info("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(c.Status.DISCONNECTED,e),this.connected=!1},_dataRecv:function(e,t){c.info("_dataRecv called");var r=this._proto._reqToData(e);if(null!==r){this.xmlInput!==c.Connection.prototype.xmlInput&&(r.nodeName===this._proto.strip&&r.childNodes.length?this.xmlInput(r.childNodes[0]):this.xmlInput(r)),this.rawInput!==c.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(c.serialize(r)));for(var n,i;this.removeHandlers.length>0;)i=this.removeHandlers.pop(),n=this.handlers.indexOf(i),n>=0&&this.handlers.splice(n,1);for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();var a,o,s=r.getAttribute("type");if(null!==s&&"terminate"==s){if(this.disconnecting)return;return a=r.getAttribute("condition"),o=r.getElementsByTagName("conflict"),null!==a?("remote-stream-error"==a&&o.length>0&&(a="conflict"),this._changeConnectStatus(c.Status.CONNFAIL,a)):this._changeConnectStatus(c.Status.CONNFAIL,"unknown"),void this._doDisconnect(a)}var u=this;c.forEachChild(r,null,function(e){var t,r;for(r=u.handlers,u.handlers=[],t=0;t0:n.getElementsByTagName("stream:features").length>0||n.getElementsByTagName("features").length>0,!a)return void this._proto._no_auth_received(t);var o,s,u=[],l=n.getElementsByTagName("mechanism");if(l.length>0)for(o=0;oe[n].prototype.priority&&(n=r);n!=t&&(i=e[t],e[t]=e[n],e[n]=i)}return e},_attemptSASLAuth:function(e){e=this.sortMechanismsByPriority(e||[]);var r=0,n=!1;for(r=0;r0&&(t="conflict"),this._changeConnectStatus(c.Status.AUTHFAIL,t),!1}var n,i=e.getElementsByTagName("bind");return i.length>0?(n=i[0].getElementsByTagName("jid"),void(n.length>0&&(this.jid=c.getText(n[0]),this.do_session?(this._addSysHandler(this._sasl_session_cb.bind(this),null,null,null,"_session_auth_2"),this.send(o({type:"set",id:"_session_auth_2"}).c("session",{xmlns:c.NS.SESSION}).tree())):(this.authenticated=!0,this._changeConnectStatus(c.Status.CONNECTED,null))))):(c.info("SASL binding failed."),this._changeConnectStatus(c.Status.AUTHFAIL,null),!1)},_sasl_session_cb:function(e){if("result"==e.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(c.Status.CONNECTED,null);else if("error"==e.getAttribute("type"))return c.info("Session creation failed."),this._changeConnectStatus(c.Status.AUTHFAIL,null),!1;return!1},_sasl_failure_cb:function(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(c.Status.AUTHFAIL,null),!1},_auth2_cb:function(e){return"result"==e.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(c.Status.CONNECTED,null)):"error"==e.getAttribute("type")&&(this._changeConnectStatus(c.Status.AUTHFAIL,null),this.disconnect("authentication failed")),!1},_addSysTimedHandler:function(e,t){var r=new c.TimedHandler(e,t);return r.user=!1,this.addTimeds.push(r),r},_addSysHandler:function(e,t,r,n,i){var a=new c.Handler(e,t,r,n,i);return a.user=!1,this.addHandlers.push(a),a},_onDisconnectTimeout:function(){return c.info("_onDisconnectTimeout was called"),this._changeConnectStatus(c.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1},_onIdle:function(){for(var e,t,r,n;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;)t=this.removeTimeds.pop(),e=this.timedHandlers.indexOf(t),e>=0&&this.timedHandlers.splice(e,1);var i=(new Date).getTime();for(n=[],e=0;e0&&(r="conflict"),this._conn._changeConnectStatus(e.Status.CONNFAIL,r)):this._conn._changeConnectStatus(e.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(r),e.Status.CONNFAIL;this.sid||(this.sid=t.getAttribute("sid"));var a=t.getAttribute("requests");a&&(this.window=parseInt(a,10));var o=t.getAttribute("hold");o&&(this.hold=parseInt(o,10));var s=t.getAttribute("wait");s&&(this.wait=parseInt(s,10));var c=t.getAttribute("inactivity");c&&(this.inactivity=parseInt(c,10))},_disconnect:function(e){this._sendTerminate(e)},_doDisconnect:function(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)},_emptyQueue:function(){return 0===this._requests.length},_callProtocolErrorHandlers:function(e){var t,r=this._getRequestStatus(e);t=this._conn.protocolErrorHandlers.HTTP[r],t&&t.call(this,r)},_hitError:function(t){this.errors++,e.warn("request errored, status: "+t+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()},_no_auth_received:function(t){t=t?t.bind(this._conn):this._conn._connect_cb.bind(this._conn);var r=this._buildBody();this._requests.push(new e.Request(r.tree(),this._onRequestStateChange.bind(this,t.bind(this._conn)),r.tree().getAttribute("rid"))),this._throttledRequestHandler()},_onDisconnectTimeout:function(){this._abortAllRequests()},_abortAllRequests:function(){for(var e;this._requests.length>0;)e=this._requests.pop(),e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}},_onIdle:function(){var t=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===t.length&&!this._conn.disconnecting&&(e.info("no requests during idle cycle, sending blank request"),t.push(null)),!this._conn.paused){if(this._requests.length<2&&t.length>0){for(var r=this._buildBody(),n=0;n0){var i=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(e.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),i>Math.floor(e.TIMEOUT*this.wait)&&(e.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(e.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}},_getRequestStatus:function(t,r){var n;if(4==t.xhr.readyState)try{n=t.xhr.status}catch(t){e.error("Caught an error while retrieving a request's status, reqStatus: "+n)}return"undefined"==typeof n&&(n="number"==typeof r?r:0),n},_onRequestStateChange:function(t,r){if(e.debug("request id "+r.id+"."+r.sends+" state changed to "+r.xhr.readyState),r.abort)return void(r.abort=!1);if(4===r.xhr.readyState){var n=this._getRequestStatus(r);if(this.disconnecting&&n>=400)return this._hitError(n),void this._callProtocolErrorHandlers(r);if((n>0&&n<500||r.sends>5)&&(this._removeRequest(r),e.debug("request id "+r.id+" should now be removed")),200==n){var i=this._requests[0]==r,a=this._requests[1]==r;(a||i&&this._requests.length>0&&this._requests[0].age()>Math.floor(e.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(Number(r.rid)+1),e.debug("request id "+r.id+"."+r.sends+" got 200"),t(r),this.errors=0}else 0===n||n>=400&&n<600||n>=12e3?(e.error("request id "+r.id+"."+r.sends+" error "+n+" happened"),this._hitError(n),this._callProtocolErrorHandlers(r),n>=400&&n<500&&(this._conn._changeConnectStatus(e.Status.DISCONNECTING,null),this._conn._doDisconnect())):e.error("request id "+r.id+"."+r.sends+" error "+n+" happened");n>0&&n<500&&!(r.sends>5)||this._throttledRequestHandler()}},_processRequest:function(t){var r=this,n=this._requests[t],i=this._getRequestStatus(n,-1);if(n.sends>this._conn.maxRetries)return void this._conn._onDisconnectTimeout();var a=n.age(),o=!isNaN(a)&&a>Math.floor(e.TIMEOUT*this.wait),s=null!==n.dead&&n.timeDead()>Math.floor(e.SECONDARY_TIMEOUT*this.wait),c=4==n.xhr.readyState&&(i<1||i>=500);if((o||s||c)&&(s&&e.error("Request "+this._requests[t].id+" timed out (secondary), restarting"),n.abort=!0,n.xhr.abort(),n.xhr.onreadystatechange=function(){},this._requests[t]=new e.Request(n.xmlData,n.origFunc,n.rid,n.sends),n=this._requests[t]),0===n.xhr.readyState){e.debug("request id "+n.id+"."+n.sends+" posting");try{var u=this._conn.options.contentType||"text/xml; charset=utf-8";n.xhr.open("POST",this._conn.service,!this._conn.options.sync),"undefined"!=typeof n.xhr.setRequestHeader&&n.xhr.setRequestHeader("Content-Type",u),this._conn.options.withCredentials&&(n.xhr.withCredentials=!0)}catch(t){return e.error("XHR open failed."),this._conn.connected||this._conn._changeConnectStatus(e.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}var l=function(){if(n.date=new Date,r._conn.options.customHeaders){var e=r._conn.options.customHeaders;for(var t in e)e.hasOwnProperty(t)&&n.xhr.setRequestHeader(t,e[t])}n.xhr.send(n.data)};if(n.sends>1){var p=1e3*Math.min(Math.floor(e.TIMEOUT*this.wait),Math.pow(n.sends,3));setTimeout(function(){l()},p)}else l();n.sends++,this._conn.xmlOutput!==e.Connection.prototype.xmlOutput&&(n.xmlData.nodeName===this.strip&&n.xmlData.childNodes.length?this._conn.xmlOutput(n.xmlData.childNodes[0]):this._conn.xmlOutput(n.xmlData)),this._conn.rawOutput!==e.Connection.prototype.rawOutput&&this._conn.rawOutput(n.data)}else e.debug("_processRequest: "+(0===t?"first":"second")+" request has readyState of "+n.xhr.readyState)},_removeRequest:function(t){e.debug("removing request");var r;for(r=this._requests.length-1;r>=0;r--)t==this._requests[r]&&this._requests.splice(r,1);t.xhr.onreadystatechange=function(){},this._throttledRequestHandler()},_restartRequest:function(e){var t=this._requests[e];null===t.dead&&(t.dead=new Date),this._processRequest(e)},_reqToData:function(e){try{return e.getResponse()}catch(e){if("parsererror"!=e)throw e;this._conn.disconnect("strophe-parsererror")}},_sendTerminate:function(t){e.info("_sendTerminate was called");var r=this._buildBody().attrs({type:"terminate"});t&&r.cnode(t.tree());var n=new e.Request(r.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),r.tree().getAttribute("rid"));this._requests.push(n),this._throttledRequestHandler()},_send:function(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(function(){this._onIdle()}.bind(this._conn),100)},_sendRestart:function(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)},_throttledRequestHandler:function(){this._requests?e.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):e.debug("_throttledRequestHandler called with undefined requests"),this._requests&&0!==this._requests.length&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid): "+n);var i=t.getAttribute("version");return"string"!=typeof i?r="Missing version in ":"1.0"!==i&&(r="Wrong version in : "+i),!r||(this._conn._changeConnectStatus(e.Status.CONNFAIL,r),this._conn._doDisconnect(),!1)},_connect_cb_wrapper:function(t){if(0===t.data.indexOf("\s*)*/,"");if(""===r)return;var n=(new DOMParser).parseFromString(r,"text/xml").documentElement;this._conn.xmlInput(n),this._conn.rawInput(t.data),this._handleStreamStart(n)&&this._connect_cb(n)}else if(0===t.data.indexOf(" tag.")}}this._conn._doDisconnect()},_doDisconnect:function(){e.info("WebSockets _doDisconnect was called"),this._closeSocket()},_streamWrap:function(e){return""+e+""},_closeSocket:function(){if(this.socket)try{this.socket.close()}catch(e){}this.socket=null},_emptyQueue:function(){return!0},_onClose:function(){this._conn.connected&&!this._conn.disconnecting?(e.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):e.info("Websocket closed")},_no_auth_received:function(t){e.error("Server did not send any auth methods"),this._conn._changeConnectStatus(e.Status.CONNFAIL,"Server did not send any auth methods"),t&&(t=t.bind(this._conn))(),this._conn._doDisconnect()},_onDisconnectTimeout:function(){},_abortAllRequests:function(){},_onError:function(t){e.error("Websocket error "+t),this._conn._changeConnectStatus(e.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()},_onIdle:function(){var t=this._conn._data;if(t.length>0&&!this._conn.paused){for(var r=0;r=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},r.setImmediate="function"==typeof setImmediate?setImmediate:function(e){var t=c++,n=!(arguments.length<2)&&o.call(arguments,1);return s[t]=!0,i(function(){s[t]&&(n?e.apply(null,n):e.call(null),r.clearImmediate(t))}),t},r.clearImmediate="function"==typeof clearImmediate?clearImmediate:function(e){delete s[e]}},{"process/browser.js":431}],516:[function(e,t,r){var n=e("buffer").Buffer;t.exports=function(e){if(e instanceof Uint8Array){if(0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;if("function"==typeof e.buffer.slice)return e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}if(n.isBuffer(e)){for(var t=new Uint8Array(e.length),r=e.length,i=0;i23||n>59||i>59)return}else if(null===a&&(l=O.exec(u))){if(a=parseInt(l,10),a<1||a>31)return}else if(null===o&&(l=M.exec(u)))o=q[l[1].toLowerCase()];else if(null===s&&(l=B.exec(u),l&&(s=parseInt(l[0],10),70<=s&&s<=99?s+=1900:0<=s&&s<=69&&(s+=2e3),s<1601)))return}}if(null!==i&&null!==a&&null!==o&&null!==s)return new Date(Date.UTC(s,o,a,r,n,i))}}}function i(e){var t=e.getUTCDate();t=t>=10?t:"0"+t;var r=e.getUTCHours();r=r>=10?r:"0"+r;var n=e.getUTCMinutes();n=n>=10?n:"0"+n;var i=e.getUTCSeconds();return i=i>=10?i:"0"+i,z[e.getUTCDay()]+", "+t+" "+R[e.getUTCMonth()]+" "+e.getUTCFullYear()+" "+r+":"+n+":"+i+" GMT"}function a(e){return null==e?null:(e=e.trim().replace(/^\./,""),v&&/[^\u0001-\u007f]/.test(e)&&(e=v.toASCII(e)),e.toLowerCase())}function o(e,t,r){if(null==e||null==t)return null;if(r!==!1&&(e=a(e),t=a(t)),e==t)return!0;if(b.isIP(e))return!1;var n=e.indexOf(t);return!(n<=0)&&(e.length===t.length+n&&"."===e.substr(n-1,1))}function s(e){if(!e||"/"!==e.substr(0,1))return"/";if("/"===e)return e;var t=e.lastIndexOf("/");return 0===t?"/":e.slice(0,t)}function c(e,t){t&&"object"==typeof t||(t={}),e=e.trim();var r=e.indexOf(";"),i=t.loose?I:T,a=i.exec(r===-1?e:e.substr(0,r));if(a){var o=new d;if(a[1]?o.key=a[2].trim():o.key="",o.value=a[3].trim(),!C.test(o.key)&&!C.test(o.value)){if(r===-1)return o;var s=e.slice(r+1).trim();if(0===s.length)return o;for(var c=s.split(";");c.length;){var u=c.shift().trim();if(0!==u.length){var l,p,f=u.indexOf("=");switch(f===-1?(l=u,p=null):(l=u.substr(0,f),p=u.substr(f+1)),l=l.trim().toLowerCase(),p&&(p=p.trim()),l){case"expires":if(p){var h=n(p);h&&(o.expires=h)}break;case"max-age":if(p&&/^-?[0-9]+$/.test(p)){var m=parseInt(p,10);o.setMaxAge(m)}break;case"domain":if(p){var g=p.trim().replace(/^\./,"");g&&(o.domain=g.toLowerCase())}break;case"path":o.path=p&&"/"===p[0]?p:null;break;case"secure":o.secure=!0;break;case"httponly":o.httpOnly=!0;break;default:o.extensions=o.extensions||[],o.extensions.push(u)}}}return o}}}function u(e){var t;try{t=JSON.parse(e)}catch(e){return e}return t}function l(e){if(!e)return null;var t;if("string"==typeof e){if(t=u(e),t instanceof Error)return null}else t=e;for(var r=new d,n=0;n1;){var r=e.lastIndexOf("/");if(0===r)break;e=e.substr(0,r),t.push(e)}return t.push("/"),t}function h(e){if(e instanceof Object)return e;try{e=decodeURI(e)}catch(e){}return y(e)}function d(e){e=e||{},Object.keys(e).forEach(function(t){d.prototype.hasOwnProperty(t)&&d.prototype[t]!==e[t]&&"_"!==t.substr(0,1)&&(this[t]=e[t])},this),this.creation=this.creation||new Date,Object.defineProperty(this,"creationIndex",{configurable:!1,enumerable:!1,writable:!0,value:++d.cookiesCreated})}function m(e,t){"boolean"==typeof t?t={rejectPublicSuffixes:t}:null==t&&(t={}),null!=t.rejectPublicSuffixes&&(this.rejectPublicSuffixes=t.rejectPublicSuffixes),null!=t.looseMode&&(this.enableLooseMode=t.looseMode),e||(e=new k),this.store=e}function g(e){return function(){if(!this.store.synchronous)throw new Error("CookieJar store is not synchronous; use async API instead.");var t,r,n=Array.prototype.slice.call(arguments);if(n.push(function(e,n){t=e,r=n}),this[e].apply(this,n),t)throw t;return r}}var v,b=e("net"),y=e("url").parse,w=e("./pubsuffix"),x=e("./store").Store,k=e("./memstore").MemoryCookieStore,_=e("./pathMatch").pathMatch,j=e("../package.json").version;try{v=e("punycode")}catch(e){console.warn("cookie: can't load punycode; won't use punycode for domain normalization")}var S=/[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/,E=/[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]/,A=new RegExp("^"+E.source+"+$"),C=/[\x00-\x1F]/,T=/^(([^=;]+))\s*=\s*([^\n\r\0]*)/,I=/^((?:=)?([^=;]*)\s*=\s*)?([^\n\r\0]*)/,P=/[\x20-\x3A\x3C-\x7E]+/,O=/^(\d{1,2})[^\d]*$/,D=/^(\d{1,2})[^\d]*:(\d{1,2})[^\d]*:(\d{1,2})[^\d]*$/,M=/^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)/i,q={jan:0,feb:1,mar:2,apr:3,may:4,jun:5,jul:6,aug:7,sep:8,oct:9,nov:10,dec:11},R=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],z=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],B=/^(\d{2}|\d{4})$/,F=2147483647e3,N=0;d.cookiesCreated=0,d.parse=c,d.fromJSON=l,d.prototype.key="",d.prototype.value="",d.prototype.expires="Infinity",d.prototype.maxAge=null,d.prototype.domain=null,d.prototype.path=null,d.prototype.secure=!1,d.prototype.httpOnly=!1,d.prototype.extensions=null,d.prototype.hostOnly=null,d.prototype.pathIsDefault=null,d.prototype.creation=null,d.prototype.lastAccessed=null,Object.defineProperty(d.prototype,"creationIndex",{configurable:!0,enumerable:!1,writable:!0,value:0}),d.serializableProperties=Object.keys(d.prototype).filter(function(e){return!(d.prototype[e]instanceof Function||"creationIndex"===e||"_"===e.substr(0,1))}),d.prototype.inspect=function(){var e=Date.now();return'Cookie="'+this.toString()+"; hostOnly="+(null!=this.hostOnly?this.hostOnly:"?")+"; aAge="+(this.lastAccessed?e-this.lastAccessed.getTime()+"ms":"?")+"; cAge="+(this.creation?e-this.creation.getTime()+"ms":"?")+'"'},d.prototype.toJSON=function(){for(var e={},t=d.serializableProperties,r=0;rs){var f=a.slice(0,s+1).reverse().join(".");return r?n.toUnicode(f):f}return null};var i=t.exports.index=Object.freeze({ac:!0,"com.ac":!0,"edu.ac":!0,"gov.ac":!0,"net.ac":!0,"mil.ac":!0,"org.ac":!0,ad:!0,"nom.ad":!0,ae:!0,"co.ae":!0,"net.ae":!0,"org.ae":!0,"sch.ae":!0,"ac.ae":!0,"gov.ae":!0,"mil.ae":!0,aero:!0,"accident-investigation.aero":!0,"accident-prevention.aero":!0,"aerobatic.aero":!0,"aeroclub.aero":!0,"aerodrome.aero":!0,"agents.aero":!0,"aircraft.aero":!0,"airline.aero":!0,"airport.aero":!0,"air-surveillance.aero":!0,"airtraffic.aero":!0,"air-traffic-control.aero":!0,"ambulance.aero":!0,"amusement.aero":!0,"association.aero":!0,"author.aero":!0,"ballooning.aero":!0,"broker.aero":!0,"caa.aero":!0,"cargo.aero":!0,"catering.aero":!0,"certification.aero":!0,"championship.aero":!0,"charter.aero":!0,"civilaviation.aero":!0,"club.aero":!0,"conference.aero":!0,"consultant.aero":!0,"consulting.aero":!0,"control.aero":!0,"council.aero":!0,"crew.aero":!0,"design.aero":!0,"dgca.aero":!0,"educator.aero":!0,"emergency.aero":!0,"engine.aero":!0,"engineer.aero":!0,"entertainment.aero":!0,"equipment.aero":!0,"exchange.aero":!0,"express.aero":!0,"federation.aero":!0,"flight.aero":!0,"freight.aero":!0,"fuel.aero":!0,"gliding.aero":!0,"government.aero":!0,"groundhandling.aero":!0,"group.aero":!0,"hanggliding.aero":!0,"homebuilt.aero":!0,"insurance.aero":!0,"journal.aero":!0,"journalist.aero":!0,"leasing.aero":!0,"logistics.aero":!0,"magazine.aero":!0,"maintenance.aero":!0,"marketplace.aero":!0,"media.aero":!0,"microlight.aero":!0,"modelling.aero":!0,"navigation.aero":!0,"parachuting.aero":!0,"paragliding.aero":!0,"passenger-association.aero":!0,"pilot.aero":!0,"press.aero":!0,"production.aero":!0,"recreation.aero":!0,"repbody.aero":!0,"res.aero":!0,"research.aero":!0,"rotorcraft.aero":!0,"safety.aero":!0,"scientist.aero":!0,"services.aero":!0,"show.aero":!0,"skydiving.aero":!0,"software.aero":!0,"student.aero":!0,"taxi.aero":!0,"trader.aero":!0,"trading.aero":!0,"trainer.aero":!0,"union.aero":!0,"workinggroup.aero":!0,"works.aero":!0,af:!0,"gov.af":!0,"com.af":!0,"org.af":!0,"net.af":!0,"edu.af":!0,ag:!0,"com.ag":!0,"org.ag":!0,"net.ag":!0,"co.ag":!0,"nom.ag":!0,ai:!0,"off.ai":!0,"com.ai":!0,"net.ai":!0,"org.ai":!0,al:!0,"com.al":!0,"edu.al":!0,"gov.al":!0,"mil.al":!0,"net.al":!0,"org.al":!0,am:!0,an:!0,"com.an":!0,"net.an":!0,"org.an":!0,"edu.an":!0,ao:!0,"ed.ao":!0,"gv.ao":!0,"og.ao":!0,"co.ao":!0,"pb.ao":!0,"it.ao":!0,aq:!0,ar:!0,"com.ar":!0,"edu.ar":!0,"gob.ar":!0,"gov.ar":!0,"int.ar":!0,"mil.ar":!0,"net.ar":!0,"org.ar":!0,"tur.ar":!0,arpa:!0,"e164.arpa":!0,"in-addr.arpa":!0,"ip6.arpa":!0,"iris.arpa":!0,"uri.arpa":!0,"urn.arpa":!0,as:!0,"gov.as":!0,asia:!0,at:!0,"ac.at":!0,"co.at":!0,"gv.at":!0,"or.at":!0,au:!0,"com.au":!0,"net.au":!0,"org.au":!0,"edu.au":!0,"gov.au":!0,"asn.au":!0,"id.au":!0,"info.au":!0,"conf.au":!0,"oz.au":!0,"act.au":!0,"nsw.au":!0,"nt.au":!0,"qld.au":!0,"sa.au":!0,"tas.au":!0,"vic.au":!0,"wa.au":!0,"act.edu.au":!0,"nsw.edu.au":!0,"nt.edu.au":!0,"qld.edu.au":!0,"sa.edu.au":!0,"tas.edu.au":!0,"vic.edu.au":!0,"wa.edu.au":!0,"qld.gov.au":!0,"sa.gov.au":!0,"tas.gov.au":!0,"vic.gov.au":!0,"wa.gov.au":!0,aw:!0,"com.aw":!0,ax:!0,az:!0,"com.az":!0,"net.az":!0,"int.az":!0,"gov.az":!0,"org.az":!0,"edu.az":!0,"info.az":!0,"pp.az":!0,"mil.az":!0,"name.az":!0,"pro.az":!0,"biz.az":!0,ba:!0,"org.ba":!0,"net.ba":!0,"edu.ba":!0,"gov.ba":!0,"mil.ba":!0,"unsa.ba":!0,"unbi.ba":!0,"co.ba":!0,"com.ba":!0,"rs.ba":!0,bb:!0,"biz.bb":!0,"co.bb":!0,"com.bb":!0,"edu.bb":!0,"gov.bb":!0,"info.bb":!0,"net.bb":!0,"org.bb":!0,"store.bb":!0,"tv.bb":!0,"*.bd":!0,be:!0,"ac.be":!0,bf:!0,"gov.bf":!0,bg:!0,"a.bg":!0,"b.bg":!0,"c.bg":!0,"d.bg":!0,"e.bg":!0,"f.bg":!0,"g.bg":!0,"h.bg":!0,"i.bg":!0,"j.bg":!0,"k.bg":!0,"l.bg":!0,"m.bg":!0,"n.bg":!0,"o.bg":!0,"p.bg":!0,"q.bg":!0,"r.bg":!0,"s.bg":!0,"t.bg":!0,"u.bg":!0,"v.bg":!0,"w.bg":!0,"x.bg":!0,"y.bg":!0,"z.bg":!0,"0.bg":!0,"1.bg":!0,"2.bg":!0,"3.bg":!0,"4.bg":!0,"5.bg":!0,"6.bg":!0,"7.bg":!0,"8.bg":!0,"9.bg":!0,bh:!0,"com.bh":!0,"edu.bh":!0,"net.bh":!0,"org.bh":!0,"gov.bh":!0,bi:!0,"co.bi":!0,"com.bi":!0,"edu.bi":!0,"or.bi":!0,"org.bi":!0,biz:!0,bj:!0,"asso.bj":!0,"barreau.bj":!0,"gouv.bj":!0,bm:!0,"com.bm":!0,"edu.bm":!0,"gov.bm":!0,"net.bm":!0,"org.bm":!0,"*.bn":!0,bo:!0,"com.bo":!0,"edu.bo":!0,"gov.bo":!0,"gob.bo":!0,"int.bo":!0,"org.bo":!0,"net.bo":!0,"mil.bo":!0,"tv.bo":!0,br:!0,"adm.br":!0,"adv.br":!0,"agr.br":!0,"am.br":!0,"arq.br":!0,"art.br":!0,"ato.br":!0,"b.br":!0,"bio.br":!0,"blog.br":!0,"bmd.br":!0,"cim.br":!0,"cng.br":!0,"cnt.br":!0,"com.br":!0,"coop.br":!0,"ecn.br":!0,"eco.br":!0,"edu.br":!0,"emp.br":!0,"eng.br":!0,"esp.br":!0,"etc.br":!0,"eti.br":!0,"far.br":!0,"flog.br":!0,"fm.br":!0,"fnd.br":!0,"fot.br":!0,"fst.br":!0,"g12.br":!0,"ggf.br":!0,"gov.br":!0,"imb.br":!0,"ind.br":!0,"inf.br":!0,"jor.br":!0,"jus.br":!0,"leg.br":!0,"lel.br":!0,"mat.br":!0,"med.br":!0,"mil.br":!0,"mp.br":!0,"mus.br":!0,"net.br":!0,"*.nom.br":!0,"not.br":!0,"ntr.br":!0,"odo.br":!0,"org.br":!0,"ppg.br":!0,"pro.br":!0,"psc.br":!0,"psi.br":!0,"qsl.br":!0,"radio.br":!0,"rec.br":!0,"slg.br":!0,"srv.br":!0,"taxi.br":!0,"teo.br":!0,"tmp.br":!0,"trd.br":!0,"tur.br":!0,"tv.br":!0,"vet.br":!0,"vlog.br":!0,"wiki.br":!0,"zlg.br":!0,bs:!0,"com.bs":!0,"net.bs":!0,"org.bs":!0,"edu.bs":!0,"gov.bs":!0,bt:!0,"com.bt":!0,"edu.bt":!0,"gov.bt":!0,"net.bt":!0,"org.bt":!0,bv:!0,bw:!0,"co.bw":!0,"org.bw":!0,by:!0,"gov.by":!0,"mil.by":!0,"com.by":!0,"of.by":!0,bz:!0,"com.bz":!0,"net.bz":!0,"org.bz":!0,"edu.bz":!0,"gov.bz":!0,ca:!0,"ab.ca":!0,"bc.ca":!0,"mb.ca":!0,"nb.ca":!0,"nf.ca":!0,"nl.ca":!0,"ns.ca":!0,"nt.ca":!0,"nu.ca":!0,"on.ca":!0,"pe.ca":!0,"qc.ca":!0,"sk.ca":!0,"yk.ca":!0,"gc.ca":!0,cat:!0,cc:!0,cd:!0,"gov.cd":!0,cf:!0,cg:!0,ch:!0,ci:!0,"org.ci":!0,"or.ci":!0,"com.ci":!0,"co.ci":!0,"edu.ci":!0,"ed.ci":!0,"ac.ci":!0,"net.ci":!0,"go.ci":!0,"asso.ci":!0,"xn--aroport-bya.ci":!0,"int.ci":!0,"presse.ci":!0,"md.ci":!0,"gouv.ci":!0,"*.ck":!0,"www.ck":!1,cl:!0,"gov.cl":!0,"gob.cl":!0,"co.cl":!0,"mil.cl":!0,cm:!0,"co.cm":!0,"com.cm":!0,"gov.cm":!0,"net.cm":!0,cn:!0,"ac.cn":!0,"com.cn":!0,"edu.cn":!0,"gov.cn":!0,"net.cn":!0,"org.cn":!0,"mil.cn":!0,"xn--55qx5d.cn":!0,"xn--io0a7i.cn":!0,"xn--od0alg.cn":!0,"ah.cn":!0,"bj.cn":!0,"cq.cn":!0,"fj.cn":!0,"gd.cn":!0,"gs.cn":!0,"gz.cn":!0,"gx.cn":!0,"ha.cn":!0,"hb.cn":!0,"he.cn":!0,"hi.cn":!0,"hl.cn":!0,"hn.cn":!0,"jl.cn":!0,"js.cn":!0,"jx.cn":!0,"ln.cn":!0,"nm.cn":!0,"nx.cn":!0,"qh.cn":!0,"sc.cn":!0,"sd.cn":!0,"sh.cn":!0,"sn.cn":!0,"sx.cn":!0,"tj.cn":!0,"xj.cn":!0,"xz.cn":!0,"yn.cn":!0,"zj.cn":!0,"hk.cn":!0,"mo.cn":!0,"tw.cn":!0,co:!0,"arts.co":!0,"com.co":!0,"edu.co":!0,"firm.co":!0,"gov.co":!0,"info.co":!0,"int.co":!0,"mil.co":!0,"net.co":!0,"nom.co":!0,"org.co":!0,"rec.co":!0,"web.co":!0,com:!0,coop:!0,cr:!0,"ac.cr":!0,"co.cr":!0,"ed.cr":!0,"fi.cr":!0,"go.cr":!0,"or.cr":!0,"sa.cr":!0,cu:!0,"com.cu":!0,"edu.cu":!0,"org.cu":!0,"net.cu":!0,"gov.cu":!0,"inf.cu":!0,cv:!0,cw:!0,"com.cw":!0,"edu.cw":!0,"net.cw":!0,"org.cw":!0,cx:!0,"gov.cx":!0,"ac.cy":!0,"biz.cy":!0,"com.cy":!0,"ekloges.cy":!0,"gov.cy":!0,"ltd.cy":!0,"name.cy":!0,"net.cy":!0,"org.cy":!0,"parliament.cy":!0,"press.cy":!0,"pro.cy":!0,"tm.cy":!0,cz:!0,de:!0,dj:!0,dk:!0,dm:!0,"com.dm":!0,"net.dm":!0,"org.dm":!0,"edu.dm":!0,"gov.dm":!0,do:!0,"art.do":!0,"com.do":!0,"edu.do":!0,"gob.do":!0,"gov.do":!0,"mil.do":!0,"net.do":!0,"org.do":!0,"sld.do":!0,"web.do":!0,dz:!0,"com.dz":!0,"org.dz":!0,"net.dz":!0,"gov.dz":!0,"edu.dz":!0,"asso.dz":!0,"pol.dz":!0,"art.dz":!0,ec:!0,"com.ec":!0,"info.ec":!0,"net.ec":!0,"fin.ec":!0,"k12.ec":!0,"med.ec":!0,"pro.ec":!0,"org.ec":!0,"edu.ec":!0,"gov.ec":!0,"gob.ec":!0,"mil.ec":!0,edu:!0,ee:!0,"edu.ee":!0,"gov.ee":!0,"riik.ee":!0,"lib.ee":!0,"med.ee":!0,"com.ee":!0,"pri.ee":!0,"aip.ee":!0,"org.ee":!0,"fie.ee":!0,eg:!0,"com.eg":!0,"edu.eg":!0,"eun.eg":!0,"gov.eg":!0,"mil.eg":!0,"name.eg":!0,"net.eg":!0,"org.eg":!0,"sci.eg":!0,"*.er":!0,es:!0,"com.es":!0,"nom.es":!0,"org.es":!0,"gob.es":!0,"edu.es":!0,et:!0,"com.et":!0,"gov.et":!0,"org.et":!0,"edu.et":!0,"biz.et":!0,"name.et":!0,"info.et":!0,"net.et":!0,eu:!0,fi:!0,"aland.fi":!0,"*.fj":!0,"*.fk":!0,fm:!0,fo:!0,fr:!0,"com.fr":!0,"asso.fr":!0,"nom.fr":!0,"prd.fr":!0,"presse.fr":!0,"tm.fr":!0,"aeroport.fr":!0,"assedic.fr":!0,"avocat.fr":!0,"avoues.fr":!0,"cci.fr":!0,"chambagri.fr":!0,"chirurgiens-dentistes.fr":!0,"experts-comptables.fr":!0,"geometre-expert.fr":!0,"gouv.fr":!0,"greta.fr":!0,"huissier-justice.fr":!0,"medecin.fr":!0,"notaires.fr":!0,"pharmacien.fr":!0,"port.fr":!0,"veterinaire.fr":!0,ga:!0,gb:!0,gd:!0,ge:!0,"com.ge":!0,"edu.ge":!0,"gov.ge":!0,"org.ge":!0,"mil.ge":!0,"net.ge":!0,"pvt.ge":!0,gf:!0,gg:!0,"co.gg":!0,"net.gg":!0,"org.gg":!0,gh:!0,"com.gh":!0,"edu.gh":!0,"gov.gh":!0,"org.gh":!0,"mil.gh":!0,gi:!0,"com.gi":!0,"ltd.gi":!0,"gov.gi":!0,"mod.gi":!0,"edu.gi":!0,"org.gi":!0,gl:!0,"co.gl":!0,"com.gl":!0,"edu.gl":!0,"net.gl":!0,"org.gl":!0,gm:!0,gn:!0,"ac.gn":!0,"com.gn":!0,"edu.gn":!0,"gov.gn":!0,"org.gn":!0,"net.gn":!0,gov:!0,gp:!0,"com.gp":!0,"net.gp":!0,"mobi.gp":!0,"edu.gp":!0,"org.gp":!0,"asso.gp":!0,gq:!0,gr:!0,"com.gr":!0,"edu.gr":!0,"net.gr":!0,"org.gr":!0,"gov.gr":!0,gs:!0,gt:!0,"com.gt":!0,"edu.gt":!0,"gob.gt":!0,"ind.gt":!0,"mil.gt":!0,"net.gt":!0,"org.gt":!0,"*.gu":!0,gw:!0,gy:!0,"co.gy":!0,"com.gy":!0,"net.gy":!0,hk:!0,"com.hk":!0,"edu.hk":!0,"gov.hk":!0,"idv.hk":!0,"net.hk":!0,"org.hk":!0,"xn--55qx5d.hk":!0,"xn--wcvs22d.hk":!0,"xn--lcvr32d.hk":!0,"xn--mxtq1m.hk":!0,"xn--gmqw5a.hk":!0,"xn--ciqpn.hk":!0,"xn--gmq050i.hk":!0,"xn--zf0avx.hk":!0,"xn--io0a7i.hk":!0,"xn--mk0axi.hk":!0,"xn--od0alg.hk":!0,"xn--od0aq3b.hk":!0,"xn--tn0ag.hk":!0,"xn--uc0atv.hk":!0,"xn--uc0ay4a.hk":!0,hm:!0,hn:!0,"com.hn":!0,"edu.hn":!0,"org.hn":!0,"net.hn":!0,"mil.hn":!0,"gob.hn":!0,hr:!0,"iz.hr":!0,"from.hr":!0,"name.hr":!0,"com.hr":!0,ht:!0,"com.ht":!0,"shop.ht":!0,"firm.ht":!0,"info.ht":!0,"adult.ht":!0,"net.ht":!0,"pro.ht":!0,"org.ht":!0,"med.ht":!0,"art.ht":!0,"coop.ht":!0,"pol.ht":!0,"asso.ht":!0,"edu.ht":!0,"rel.ht":!0,"gouv.ht":!0,"perso.ht":!0,hu:!0,"co.hu":!0,"info.hu":!0,"org.hu":!0,"priv.hu":!0,"sport.hu":!0,"tm.hu":!0,"2000.hu":!0,"agrar.hu":!0,"bolt.hu":!0,"casino.hu":!0,"city.hu":!0,"erotica.hu":!0,"erotika.hu":!0,"film.hu":!0,"forum.hu":!0,"games.hu":!0,"hotel.hu":!0,"ingatlan.hu":!0,"jogasz.hu":!0,"konyvelo.hu":!0,"lakas.hu":!0,"media.hu":!0,"news.hu":!0,"reklam.hu":!0,"sex.hu":!0,"shop.hu":!0,"suli.hu":!0,"szex.hu":!0,"tozsde.hu":!0,"utazas.hu":!0,"video.hu":!0,id:!0,"ac.id":!0,"biz.id":!0,"co.id":!0,"desa.id":!0,"go.id":!0,"mil.id":!0,"my.id":!0,"net.id":!0,"or.id":!0,"sch.id":!0,"web.id":!0,ie:!0,"gov.ie":!0,il:!0,"ac.il":!0,"co.il":!0,"gov.il":!0,"idf.il":!0,"k12.il":!0,"muni.il":!0,"net.il":!0,"org.il":!0,im:!0,"ac.im":!0,"co.im":!0,"com.im":!0,"ltd.co.im":!0,"net.im":!0,"org.im":!0,"plc.co.im":!0,"tt.im":!0,"tv.im":!0,in:!0,"co.in":!0,"firm.in":!0,"net.in":!0,"org.in":!0,"gen.in":!0,"ind.in":!0,"nic.in":!0,"ac.in":!0,"edu.in":!0,"res.in":!0,"gov.in":!0,"mil.in":!0,info:!0,int:!0,"eu.int":!0,io:!0,"com.io":!0,iq:!0,"gov.iq":!0,"edu.iq":!0,"mil.iq":!0,"com.iq":!0,"org.iq":!0,"net.iq":!0,ir:!0,"ac.ir":!0,"co.ir":!0,"gov.ir":!0,"id.ir":!0,"net.ir":!0,"org.ir":!0,"sch.ir":!0,"xn--mgba3a4f16a.ir":!0,"xn--mgba3a4fra.ir":!0,is:!0,"net.is":!0,"com.is":!0,"edu.is":!0,"gov.is":!0,"org.is":!0,"int.is":!0,it:!0,"gov.it":!0,"edu.it":!0,"abr.it":!0,"abruzzo.it":!0,"aosta-valley.it":!0,"aostavalley.it":!0,"bas.it":!0,"basilicata.it":!0,"cal.it":!0,"calabria.it":!0,"cam.it":!0,"campania.it":!0,"emilia-romagna.it":!0,"emiliaromagna.it":!0,"emr.it":!0,"friuli-v-giulia.it":!0,"friuli-ve-giulia.it":!0,"friuli-vegiulia.it":!0,"friuli-venezia-giulia.it":!0,"friuli-veneziagiulia.it":!0,"friuli-vgiulia.it":!0,"friuliv-giulia.it":!0,"friulive-giulia.it":!0,"friulivegiulia.it":!0,"friulivenezia-giulia.it":!0,"friuliveneziagiulia.it":!0,"friulivgiulia.it":!0,"fvg.it":!0,"laz.it":!0,"lazio.it":!0,"lig.it":!0,"liguria.it":!0,"lom.it":!0,"lombardia.it":!0,"lombardy.it":!0,"lucania.it":!0,"mar.it":!0,"marche.it":!0,"mol.it":!0,"molise.it":!0,"piedmont.it":!0,"piemonte.it":!0,"pmn.it":!0,"pug.it":!0,"puglia.it":!0,"sar.it":!0,"sardegna.it":!0,"sardinia.it":!0,"sic.it":!0,"sicilia.it":!0,"sicily.it":!0,"taa.it":!0,"tos.it":!0,"toscana.it":!0,"trentino-a-adige.it":!0,"trentino-aadige.it":!0,"trentino-alto-adige.it":!0,"trentino-altoadige.it":!0,"trentino-s-tirol.it":!0,"trentino-stirol.it":!0,"trentino-sud-tirol.it":!0,"trentino-sudtirol.it":!0,"trentino-sued-tirol.it":!0,"trentino-suedtirol.it":!0,"trentinoa-adige.it":!0,"trentinoaadige.it":!0,"trentinoalto-adige.it":!0,"trentinoaltoadige.it":!0,"trentinos-tirol.it":!0,"trentinostirol.it":!0,"trentinosud-tirol.it":!0,"trentinosudtirol.it":!0,"trentinosued-tirol.it":!0,"trentinosuedtirol.it":!0,"tuscany.it":!0,"umb.it":!0,"umbria.it":!0,"val-d-aosta.it":!0,"val-daosta.it":!0,"vald-aosta.it":!0,"valdaosta.it":!0,"valle-aosta.it":!0,"valle-d-aosta.it":!0,"valle-daosta.it":!0,"valleaosta.it":!0,"valled-aosta.it":!0,"valledaosta.it":!0,"vallee-aoste.it":!0,"valleeaoste.it":!0,"vao.it":!0,"vda.it":!0,"ven.it":!0,"veneto.it":!0,"ag.it":!0,"agrigento.it":!0,"al.it":!0,"alessandria.it":!0,"alto-adige.it":!0,"altoadige.it":!0,"an.it":!0,"ancona.it":!0,"andria-barletta-trani.it":!0,"andria-trani-barletta.it":!0,"andriabarlettatrani.it":!0,"andriatranibarletta.it":!0,"ao.it":!0,"aosta.it":!0,"aoste.it":!0,"ap.it":!0,"aq.it":!0,"aquila.it":!0,"ar.it":!0,"arezzo.it":!0,"ascoli-piceno.it":!0,"ascolipiceno.it":!0,"asti.it":!0,"at.it":!0,"av.it":!0,"avellino.it":!0,"ba.it":!0,"balsan.it":!0,"bari.it":!0,"barletta-trani-andria.it":!0,"barlettatraniandria.it":!0,"belluno.it":!0,"benevento.it":!0,"bergamo.it":!0,"bg.it":!0,"bi.it":!0,"biella.it":!0,"bl.it":!0,"bn.it":!0,"bo.it":!0,"bologna.it":!0,"bolzano.it":!0,"bozen.it":!0,"br.it":!0,"brescia.it":!0,"brindisi.it":!0,"bs.it":!0,"bt.it":!0,"bz.it":!0,"ca.it":!0,"cagliari.it":!0,"caltanissetta.it":!0,"campidano-medio.it":!0,"campidanomedio.it":!0,"campobasso.it":!0,"carbonia-iglesias.it":!0,"carboniaiglesias.it":!0,"carrara-massa.it":!0,"carraramassa.it":!0,"caserta.it":!0,"catania.it":!0,"catanzaro.it":!0,"cb.it":!0,"ce.it":!0,"cesena-forli.it":!0,"cesenaforli.it":!0,"ch.it":!0,"chieti.it":!0,"ci.it":!0,"cl.it":!0,"cn.it":!0,"co.it":!0,"como.it":!0,"cosenza.it":!0,"cr.it":!0,"cremona.it":!0,"crotone.it":!0,"cs.it":!0,"ct.it":!0,"cuneo.it":!0,"cz.it":!0,"dell-ogliastra.it":!0,"dellogliastra.it":!0,"en.it":!0,"enna.it":!0,"fc.it":!0,"fe.it":!0,"fermo.it":!0,"ferrara.it":!0,"fg.it":!0,"fi.it":!0,"firenze.it":!0,"florence.it":!0,"fm.it":!0,"foggia.it":!0,"forli-cesena.it":!0,"forlicesena.it":!0,"fr.it":!0,"frosinone.it":!0,"ge.it":!0,"genoa.it":!0,"genova.it":!0,"go.it":!0,"gorizia.it":!0,"gr.it":!0,"grosseto.it":!0,"iglesias-carbonia.it":!0,"iglesiascarbonia.it":!0,"im.it":!0,"imperia.it":!0,"is.it":!0,"isernia.it":!0,"kr.it":!0,"la-spezia.it":!0,"laquila.it":!0,"laspezia.it":!0,"latina.it":!0,"lc.it":!0,"le.it":!0,"lecce.it":!0,"lecco.it":!0,"li.it":!0,"livorno.it":!0,"lo.it":!0,"lodi.it":!0,"lt.it":!0,"lu.it":!0,"lucca.it":!0,"macerata.it":!0,"mantova.it":!0,"massa-carrara.it":!0,"massacarrara.it":!0,"matera.it":!0,"mb.it":!0,"mc.it":!0,"me.it":!0,"medio-campidano.it":!0,"mediocampidano.it":!0,"messina.it":!0,"mi.it":!0,"milan.it":!0,"milano.it":!0,"mn.it":!0,"mo.it":!0,"modena.it":!0,"monza-brianza.it":!0,"monza-e-della-brianza.it":!0,"monza.it":!0,"monzabrianza.it":!0,"monzaebrianza.it":!0,"monzaedellabrianza.it":!0,"ms.it":!0,"mt.it":!0,"na.it":!0,"naples.it":!0,"napoli.it":!0,"no.it":!0,"novara.it":!0,"nu.it":!0,"nuoro.it":!0,"og.it":!0,"ogliastra.it":!0,"olbia-tempio.it":!0,"olbiatempio.it":!0,"or.it":!0,"oristano.it":!0,"ot.it":!0,"pa.it":!0,"padova.it":!0,"padua.it":!0,"palermo.it":!0,"parma.it":!0,"pavia.it":!0,"pc.it":!0,"pd.it":!0,"pe.it":!0,"perugia.it":!0,"pesaro-urbino.it":!0,"pesarourbino.it":!0,"pescara.it":!0,"pg.it":!0,"pi.it":!0,"piacenza.it":!0,"pisa.it":!0,"pistoia.it":!0,"pn.it":!0,"po.it":!0,"pordenone.it":!0,"potenza.it":!0,"pr.it":!0,"prato.it":!0,"pt.it":!0,"pu.it":!0,"pv.it":!0,"pz.it":!0,"ra.it":!0,"ragusa.it":!0,"ravenna.it":!0,"rc.it":!0,"re.it":!0,"reggio-calabria.it":!0,"reggio-emilia.it":!0,"reggiocalabria.it":!0,"reggioemilia.it":!0,"rg.it":!0,"ri.it":!0,"rieti.it":!0,"rimini.it":!0,"rm.it":!0,"rn.it":!0,"ro.it":!0,"roma.it":!0,"rome.it":!0,"rovigo.it":!0,"sa.it":!0,"salerno.it":!0,"sassari.it":!0,"savona.it":!0,"si.it":!0,"siena.it":!0,"siracusa.it":!0,"so.it":!0,"sondrio.it":!0,"sp.it":!0,"sr.it":!0,"ss.it":!0,"suedtirol.it":!0,"sv.it":!0,"ta.it":!0,"taranto.it":!0,"te.it":!0,"tempio-olbia.it":!0,"tempioolbia.it":!0,"teramo.it":!0,"terni.it":!0,"tn.it":!0,"to.it":!0,"torino.it":!0,"tp.it":!0,"tr.it":!0,"trani-andria-barletta.it":!0,"trani-barletta-andria.it":!0,"traniandriabarletta.it":!0,"tranibarlettaandria.it":!0, -"trapani.it":!0,"trentino.it":!0,"trento.it":!0,"treviso.it":!0,"trieste.it":!0,"ts.it":!0,"turin.it":!0,"tv.it":!0,"ud.it":!0,"udine.it":!0,"urbino-pesaro.it":!0,"urbinopesaro.it":!0,"va.it":!0,"varese.it":!0,"vb.it":!0,"vc.it":!0,"ve.it":!0,"venezia.it":!0,"venice.it":!0,"verbania.it":!0,"vercelli.it":!0,"verona.it":!0,"vi.it":!0,"vibo-valentia.it":!0,"vibovalentia.it":!0,"vicenza.it":!0,"viterbo.it":!0,"vr.it":!0,"vs.it":!0,"vt.it":!0,"vv.it":!0,je:!0,"co.je":!0,"net.je":!0,"org.je":!0,"*.jm":!0,jo:!0,"com.jo":!0,"org.jo":!0,"net.jo":!0,"edu.jo":!0,"sch.jo":!0,"gov.jo":!0,"mil.jo":!0,"name.jo":!0,jobs:!0,jp:!0,"ac.jp":!0,"ad.jp":!0,"co.jp":!0,"ed.jp":!0,"go.jp":!0,"gr.jp":!0,"lg.jp":!0,"ne.jp":!0,"or.jp":!0,"aichi.jp":!0,"akita.jp":!0,"aomori.jp":!0,"chiba.jp":!0,"ehime.jp":!0,"fukui.jp":!0,"fukuoka.jp":!0,"fukushima.jp":!0,"gifu.jp":!0,"gunma.jp":!0,"hiroshima.jp":!0,"hokkaido.jp":!0,"hyogo.jp":!0,"ibaraki.jp":!0,"ishikawa.jp":!0,"iwate.jp":!0,"kagawa.jp":!0,"kagoshima.jp":!0,"kanagawa.jp":!0,"kochi.jp":!0,"kumamoto.jp":!0,"kyoto.jp":!0,"mie.jp":!0,"miyagi.jp":!0,"miyazaki.jp":!0,"nagano.jp":!0,"nagasaki.jp":!0,"nara.jp":!0,"niigata.jp":!0,"oita.jp":!0,"okayama.jp":!0,"okinawa.jp":!0,"osaka.jp":!0,"saga.jp":!0,"saitama.jp":!0,"shiga.jp":!0,"shimane.jp":!0,"shizuoka.jp":!0,"tochigi.jp":!0,"tokushima.jp":!0,"tokyo.jp":!0,"tottori.jp":!0,"toyama.jp":!0,"wakayama.jp":!0,"yamagata.jp":!0,"yamaguchi.jp":!0,"yamanashi.jp":!0,"xn--4pvxs.jp":!0,"xn--vgu402c.jp":!0,"xn--c3s14m.jp":!0,"xn--f6qx53a.jp":!0,"xn--8pvr4u.jp":!0,"xn--uist22h.jp":!0,"xn--djrs72d6uy.jp":!0,"xn--mkru45i.jp":!0,"xn--0trq7p7nn.jp":!0,"xn--8ltr62k.jp":!0,"xn--2m4a15e.jp":!0,"xn--efvn9s.jp":!0,"xn--32vp30h.jp":!0,"xn--4it797k.jp":!0,"xn--1lqs71d.jp":!0,"xn--5rtp49c.jp":!0,"xn--5js045d.jp":!0,"xn--ehqz56n.jp":!0,"xn--1lqs03n.jp":!0,"xn--qqqt11m.jp":!0,"xn--kbrq7o.jp":!0,"xn--pssu33l.jp":!0,"xn--ntsq17g.jp":!0,"xn--uisz3g.jp":!0,"xn--6btw5a.jp":!0,"xn--1ctwo.jp":!0,"xn--6orx2r.jp":!0,"xn--rht61e.jp":!0,"xn--rht27z.jp":!0,"xn--djty4k.jp":!0,"xn--nit225k.jp":!0,"xn--rht3d.jp":!0,"xn--klty5x.jp":!0,"xn--kltx9a.jp":!0,"xn--kltp7d.jp":!0,"xn--uuwu58a.jp":!0,"xn--zbx025d.jp":!0,"xn--ntso0iqx3a.jp":!0,"xn--elqq16h.jp":!0,"xn--4it168d.jp":!0,"xn--klt787d.jp":!0,"xn--rny31h.jp":!0,"xn--7t0a264c.jp":!0,"xn--5rtq34k.jp":!0,"xn--k7yn95e.jp":!0,"xn--tor131o.jp":!0,"xn--d5qv7z876c.jp":!0,"*.kawasaki.jp":!0,"*.kitakyushu.jp":!0,"*.kobe.jp":!0,"*.nagoya.jp":!0,"*.sapporo.jp":!0,"*.sendai.jp":!0,"*.yokohama.jp":!0,"city.kawasaki.jp":!1,"city.kitakyushu.jp":!1,"city.kobe.jp":!1,"city.nagoya.jp":!1,"city.sapporo.jp":!1,"city.sendai.jp":!1,"city.yokohama.jp":!1,"aisai.aichi.jp":!0,"ama.aichi.jp":!0,"anjo.aichi.jp":!0,"asuke.aichi.jp":!0,"chiryu.aichi.jp":!0,"chita.aichi.jp":!0,"fuso.aichi.jp":!0,"gamagori.aichi.jp":!0,"handa.aichi.jp":!0,"hazu.aichi.jp":!0,"hekinan.aichi.jp":!0,"higashiura.aichi.jp":!0,"ichinomiya.aichi.jp":!0,"inazawa.aichi.jp":!0,"inuyama.aichi.jp":!0,"isshiki.aichi.jp":!0,"iwakura.aichi.jp":!0,"kanie.aichi.jp":!0,"kariya.aichi.jp":!0,"kasugai.aichi.jp":!0,"kira.aichi.jp":!0,"kiyosu.aichi.jp":!0,"komaki.aichi.jp":!0,"konan.aichi.jp":!0,"kota.aichi.jp":!0,"mihama.aichi.jp":!0,"miyoshi.aichi.jp":!0,"nishio.aichi.jp":!0,"nisshin.aichi.jp":!0,"obu.aichi.jp":!0,"oguchi.aichi.jp":!0,"oharu.aichi.jp":!0,"okazaki.aichi.jp":!0,"owariasahi.aichi.jp":!0,"seto.aichi.jp":!0,"shikatsu.aichi.jp":!0,"shinshiro.aichi.jp":!0,"shitara.aichi.jp":!0,"tahara.aichi.jp":!0,"takahama.aichi.jp":!0,"tobishima.aichi.jp":!0,"toei.aichi.jp":!0,"togo.aichi.jp":!0,"tokai.aichi.jp":!0,"tokoname.aichi.jp":!0,"toyoake.aichi.jp":!0,"toyohashi.aichi.jp":!0,"toyokawa.aichi.jp":!0,"toyone.aichi.jp":!0,"toyota.aichi.jp":!0,"tsushima.aichi.jp":!0,"yatomi.aichi.jp":!0,"akita.akita.jp":!0,"daisen.akita.jp":!0,"fujisato.akita.jp":!0,"gojome.akita.jp":!0,"hachirogata.akita.jp":!0,"happou.akita.jp":!0,"higashinaruse.akita.jp":!0,"honjo.akita.jp":!0,"honjyo.akita.jp":!0,"ikawa.akita.jp":!0,"kamikoani.akita.jp":!0,"kamioka.akita.jp":!0,"katagami.akita.jp":!0,"kazuno.akita.jp":!0,"kitaakita.akita.jp":!0,"kosaka.akita.jp":!0,"kyowa.akita.jp":!0,"misato.akita.jp":!0,"mitane.akita.jp":!0,"moriyoshi.akita.jp":!0,"nikaho.akita.jp":!0,"noshiro.akita.jp":!0,"odate.akita.jp":!0,"oga.akita.jp":!0,"ogata.akita.jp":!0,"semboku.akita.jp":!0,"yokote.akita.jp":!0,"yurihonjo.akita.jp":!0,"aomori.aomori.jp":!0,"gonohe.aomori.jp":!0,"hachinohe.aomori.jp":!0,"hashikami.aomori.jp":!0,"hiranai.aomori.jp":!0,"hirosaki.aomori.jp":!0,"itayanagi.aomori.jp":!0,"kuroishi.aomori.jp":!0,"misawa.aomori.jp":!0,"mutsu.aomori.jp":!0,"nakadomari.aomori.jp":!0,"noheji.aomori.jp":!0,"oirase.aomori.jp":!0,"owani.aomori.jp":!0,"rokunohe.aomori.jp":!0,"sannohe.aomori.jp":!0,"shichinohe.aomori.jp":!0,"shingo.aomori.jp":!0,"takko.aomori.jp":!0,"towada.aomori.jp":!0,"tsugaru.aomori.jp":!0,"tsuruta.aomori.jp":!0,"abiko.chiba.jp":!0,"asahi.chiba.jp":!0,"chonan.chiba.jp":!0,"chosei.chiba.jp":!0,"choshi.chiba.jp":!0,"chuo.chiba.jp":!0,"funabashi.chiba.jp":!0,"futtsu.chiba.jp":!0,"hanamigawa.chiba.jp":!0,"ichihara.chiba.jp":!0,"ichikawa.chiba.jp":!0,"ichinomiya.chiba.jp":!0,"inzai.chiba.jp":!0,"isumi.chiba.jp":!0,"kamagaya.chiba.jp":!0,"kamogawa.chiba.jp":!0,"kashiwa.chiba.jp":!0,"katori.chiba.jp":!0,"katsuura.chiba.jp":!0,"kimitsu.chiba.jp":!0,"kisarazu.chiba.jp":!0,"kozaki.chiba.jp":!0,"kujukuri.chiba.jp":!0,"kyonan.chiba.jp":!0,"matsudo.chiba.jp":!0,"midori.chiba.jp":!0,"mihama.chiba.jp":!0,"minamiboso.chiba.jp":!0,"mobara.chiba.jp":!0,"mutsuzawa.chiba.jp":!0,"nagara.chiba.jp":!0,"nagareyama.chiba.jp":!0,"narashino.chiba.jp":!0,"narita.chiba.jp":!0,"noda.chiba.jp":!0,"oamishirasato.chiba.jp":!0,"omigawa.chiba.jp":!0,"onjuku.chiba.jp":!0,"otaki.chiba.jp":!0,"sakae.chiba.jp":!0,"sakura.chiba.jp":!0,"shimofusa.chiba.jp":!0,"shirako.chiba.jp":!0,"shiroi.chiba.jp":!0,"shisui.chiba.jp":!0,"sodegaura.chiba.jp":!0,"sosa.chiba.jp":!0,"tako.chiba.jp":!0,"tateyama.chiba.jp":!0,"togane.chiba.jp":!0,"tohnosho.chiba.jp":!0,"tomisato.chiba.jp":!0,"urayasu.chiba.jp":!0,"yachimata.chiba.jp":!0,"yachiyo.chiba.jp":!0,"yokaichiba.chiba.jp":!0,"yokoshibahikari.chiba.jp":!0,"yotsukaido.chiba.jp":!0,"ainan.ehime.jp":!0,"honai.ehime.jp":!0,"ikata.ehime.jp":!0,"imabari.ehime.jp":!0,"iyo.ehime.jp":!0,"kamijima.ehime.jp":!0,"kihoku.ehime.jp":!0,"kumakogen.ehime.jp":!0,"masaki.ehime.jp":!0,"matsuno.ehime.jp":!0,"matsuyama.ehime.jp":!0,"namikata.ehime.jp":!0,"niihama.ehime.jp":!0,"ozu.ehime.jp":!0,"saijo.ehime.jp":!0,"seiyo.ehime.jp":!0,"shikokuchuo.ehime.jp":!0,"tobe.ehime.jp":!0,"toon.ehime.jp":!0,"uchiko.ehime.jp":!0,"uwajima.ehime.jp":!0,"yawatahama.ehime.jp":!0,"echizen.fukui.jp":!0,"eiheiji.fukui.jp":!0,"fukui.fukui.jp":!0,"ikeda.fukui.jp":!0,"katsuyama.fukui.jp":!0,"mihama.fukui.jp":!0,"minamiechizen.fukui.jp":!0,"obama.fukui.jp":!0,"ohi.fukui.jp":!0,"ono.fukui.jp":!0,"sabae.fukui.jp":!0,"sakai.fukui.jp":!0,"takahama.fukui.jp":!0,"tsuruga.fukui.jp":!0,"wakasa.fukui.jp":!0,"ashiya.fukuoka.jp":!0,"buzen.fukuoka.jp":!0,"chikugo.fukuoka.jp":!0,"chikuho.fukuoka.jp":!0,"chikujo.fukuoka.jp":!0,"chikushino.fukuoka.jp":!0,"chikuzen.fukuoka.jp":!0,"chuo.fukuoka.jp":!0,"dazaifu.fukuoka.jp":!0,"fukuchi.fukuoka.jp":!0,"hakata.fukuoka.jp":!0,"higashi.fukuoka.jp":!0,"hirokawa.fukuoka.jp":!0,"hisayama.fukuoka.jp":!0,"iizuka.fukuoka.jp":!0,"inatsuki.fukuoka.jp":!0,"kaho.fukuoka.jp":!0,"kasuga.fukuoka.jp":!0,"kasuya.fukuoka.jp":!0,"kawara.fukuoka.jp":!0,"keisen.fukuoka.jp":!0,"koga.fukuoka.jp":!0,"kurate.fukuoka.jp":!0,"kurogi.fukuoka.jp":!0,"kurume.fukuoka.jp":!0,"minami.fukuoka.jp":!0,"miyako.fukuoka.jp":!0,"miyama.fukuoka.jp":!0,"miyawaka.fukuoka.jp":!0,"mizumaki.fukuoka.jp":!0,"munakata.fukuoka.jp":!0,"nakagawa.fukuoka.jp":!0,"nakama.fukuoka.jp":!0,"nishi.fukuoka.jp":!0,"nogata.fukuoka.jp":!0,"ogori.fukuoka.jp":!0,"okagaki.fukuoka.jp":!0,"okawa.fukuoka.jp":!0,"oki.fukuoka.jp":!0,"omuta.fukuoka.jp":!0,"onga.fukuoka.jp":!0,"onojo.fukuoka.jp":!0,"oto.fukuoka.jp":!0,"saigawa.fukuoka.jp":!0,"sasaguri.fukuoka.jp":!0,"shingu.fukuoka.jp":!0,"shinyoshitomi.fukuoka.jp":!0,"shonai.fukuoka.jp":!0,"soeda.fukuoka.jp":!0,"sue.fukuoka.jp":!0,"tachiarai.fukuoka.jp":!0,"tagawa.fukuoka.jp":!0,"takata.fukuoka.jp":!0,"toho.fukuoka.jp":!0,"toyotsu.fukuoka.jp":!0,"tsuiki.fukuoka.jp":!0,"ukiha.fukuoka.jp":!0,"umi.fukuoka.jp":!0,"usui.fukuoka.jp":!0,"yamada.fukuoka.jp":!0,"yame.fukuoka.jp":!0,"yanagawa.fukuoka.jp":!0,"yukuhashi.fukuoka.jp":!0,"aizubange.fukushima.jp":!0,"aizumisato.fukushima.jp":!0,"aizuwakamatsu.fukushima.jp":!0,"asakawa.fukushima.jp":!0,"bandai.fukushima.jp":!0,"date.fukushima.jp":!0,"fukushima.fukushima.jp":!0,"furudono.fukushima.jp":!0,"futaba.fukushima.jp":!0,"hanawa.fukushima.jp":!0,"higashi.fukushima.jp":!0,"hirata.fukushima.jp":!0,"hirono.fukushima.jp":!0,"iitate.fukushima.jp":!0,"inawashiro.fukushima.jp":!0,"ishikawa.fukushima.jp":!0,"iwaki.fukushima.jp":!0,"izumizaki.fukushima.jp":!0,"kagamiishi.fukushima.jp":!0,"kaneyama.fukushima.jp":!0,"kawamata.fukushima.jp":!0,"kitakata.fukushima.jp":!0,"kitashiobara.fukushima.jp":!0,"koori.fukushima.jp":!0,"koriyama.fukushima.jp":!0,"kunimi.fukushima.jp":!0,"miharu.fukushima.jp":!0,"mishima.fukushima.jp":!0,"namie.fukushima.jp":!0,"nango.fukushima.jp":!0,"nishiaizu.fukushima.jp":!0,"nishigo.fukushima.jp":!0,"okuma.fukushima.jp":!0,"omotego.fukushima.jp":!0,"ono.fukushima.jp":!0,"otama.fukushima.jp":!0,"samegawa.fukushima.jp":!0,"shimogo.fukushima.jp":!0,"shirakawa.fukushima.jp":!0,"showa.fukushima.jp":!0,"soma.fukushima.jp":!0,"sukagawa.fukushima.jp":!0,"taishin.fukushima.jp":!0,"tamakawa.fukushima.jp":!0,"tanagura.fukushima.jp":!0,"tenei.fukushima.jp":!0,"yabuki.fukushima.jp":!0,"yamato.fukushima.jp":!0,"yamatsuri.fukushima.jp":!0,"yanaizu.fukushima.jp":!0,"yugawa.fukushima.jp":!0,"anpachi.gifu.jp":!0,"ena.gifu.jp":!0,"gifu.gifu.jp":!0,"ginan.gifu.jp":!0,"godo.gifu.jp":!0,"gujo.gifu.jp":!0,"hashima.gifu.jp":!0,"hichiso.gifu.jp":!0,"hida.gifu.jp":!0,"higashishirakawa.gifu.jp":!0,"ibigawa.gifu.jp":!0,"ikeda.gifu.jp":!0,"kakamigahara.gifu.jp":!0,"kani.gifu.jp":!0,"kasahara.gifu.jp":!0,"kasamatsu.gifu.jp":!0,"kawaue.gifu.jp":!0,"kitagata.gifu.jp":!0,"mino.gifu.jp":!0,"minokamo.gifu.jp":!0,"mitake.gifu.jp":!0,"mizunami.gifu.jp":!0,"motosu.gifu.jp":!0,"nakatsugawa.gifu.jp":!0,"ogaki.gifu.jp":!0,"sakahogi.gifu.jp":!0,"seki.gifu.jp":!0,"sekigahara.gifu.jp":!0,"shirakawa.gifu.jp":!0,"tajimi.gifu.jp":!0,"takayama.gifu.jp":!0,"tarui.gifu.jp":!0,"toki.gifu.jp":!0,"tomika.gifu.jp":!0,"wanouchi.gifu.jp":!0,"yamagata.gifu.jp":!0,"yaotsu.gifu.jp":!0,"yoro.gifu.jp":!0,"annaka.gunma.jp":!0,"chiyoda.gunma.jp":!0,"fujioka.gunma.jp":!0,"higashiagatsuma.gunma.jp":!0,"isesaki.gunma.jp":!0,"itakura.gunma.jp":!0,"kanna.gunma.jp":!0,"kanra.gunma.jp":!0,"katashina.gunma.jp":!0,"kawaba.gunma.jp":!0,"kiryu.gunma.jp":!0,"kusatsu.gunma.jp":!0,"maebashi.gunma.jp":!0,"meiwa.gunma.jp":!0,"midori.gunma.jp":!0,"minakami.gunma.jp":!0,"naganohara.gunma.jp":!0,"nakanojo.gunma.jp":!0,"nanmoku.gunma.jp":!0,"numata.gunma.jp":!0,"oizumi.gunma.jp":!0,"ora.gunma.jp":!0,"ota.gunma.jp":!0,"shibukawa.gunma.jp":!0,"shimonita.gunma.jp":!0,"shinto.gunma.jp":!0,"showa.gunma.jp":!0,"takasaki.gunma.jp":!0,"takayama.gunma.jp":!0,"tamamura.gunma.jp":!0,"tatebayashi.gunma.jp":!0,"tomioka.gunma.jp":!0,"tsukiyono.gunma.jp":!0,"tsumagoi.gunma.jp":!0,"ueno.gunma.jp":!0,"yoshioka.gunma.jp":!0,"asaminami.hiroshima.jp":!0,"daiwa.hiroshima.jp":!0,"etajima.hiroshima.jp":!0,"fuchu.hiroshima.jp":!0,"fukuyama.hiroshima.jp":!0,"hatsukaichi.hiroshima.jp":!0,"higashihiroshima.hiroshima.jp":!0,"hongo.hiroshima.jp":!0,"jinsekikogen.hiroshima.jp":!0,"kaita.hiroshima.jp":!0,"kui.hiroshima.jp":!0,"kumano.hiroshima.jp":!0,"kure.hiroshima.jp":!0,"mihara.hiroshima.jp":!0,"miyoshi.hiroshima.jp":!0,"naka.hiroshima.jp":!0,"onomichi.hiroshima.jp":!0,"osakikamijima.hiroshima.jp":!0,"otake.hiroshima.jp":!0,"saka.hiroshima.jp":!0,"sera.hiroshima.jp":!0,"seranishi.hiroshima.jp":!0,"shinichi.hiroshima.jp":!0,"shobara.hiroshima.jp":!0,"takehara.hiroshima.jp":!0,"abashiri.hokkaido.jp":!0,"abira.hokkaido.jp":!0,"aibetsu.hokkaido.jp":!0,"akabira.hokkaido.jp":!0,"akkeshi.hokkaido.jp":!0,"asahikawa.hokkaido.jp":!0,"ashibetsu.hokkaido.jp":!0,"ashoro.hokkaido.jp":!0,"assabu.hokkaido.jp":!0,"atsuma.hokkaido.jp":!0,"bibai.hokkaido.jp":!0,"biei.hokkaido.jp":!0,"bifuka.hokkaido.jp":!0,"bihoro.hokkaido.jp":!0,"biratori.hokkaido.jp":!0,"chippubetsu.hokkaido.jp":!0,"chitose.hokkaido.jp":!0,"date.hokkaido.jp":!0,"ebetsu.hokkaido.jp":!0,"embetsu.hokkaido.jp":!0,"eniwa.hokkaido.jp":!0,"erimo.hokkaido.jp":!0,"esan.hokkaido.jp":!0,"esashi.hokkaido.jp":!0,"fukagawa.hokkaido.jp":!0,"fukushima.hokkaido.jp":!0,"furano.hokkaido.jp":!0,"furubira.hokkaido.jp":!0,"haboro.hokkaido.jp":!0,"hakodate.hokkaido.jp":!0,"hamatonbetsu.hokkaido.jp":!0,"hidaka.hokkaido.jp":!0,"higashikagura.hokkaido.jp":!0,"higashikawa.hokkaido.jp":!0,"hiroo.hokkaido.jp":!0,"hokuryu.hokkaido.jp":!0,"hokuto.hokkaido.jp":!0,"honbetsu.hokkaido.jp":!0,"horokanai.hokkaido.jp":!0,"horonobe.hokkaido.jp":!0,"ikeda.hokkaido.jp":!0,"imakane.hokkaido.jp":!0,"ishikari.hokkaido.jp":!0,"iwamizawa.hokkaido.jp":!0,"iwanai.hokkaido.jp":!0,"kamifurano.hokkaido.jp":!0,"kamikawa.hokkaido.jp":!0,"kamishihoro.hokkaido.jp":!0,"kamisunagawa.hokkaido.jp":!0,"kamoenai.hokkaido.jp":!0,"kayabe.hokkaido.jp":!0,"kembuchi.hokkaido.jp":!0,"kikonai.hokkaido.jp":!0,"kimobetsu.hokkaido.jp":!0,"kitahiroshima.hokkaido.jp":!0,"kitami.hokkaido.jp":!0,"kiyosato.hokkaido.jp":!0,"koshimizu.hokkaido.jp":!0,"kunneppu.hokkaido.jp":!0,"kuriyama.hokkaido.jp":!0,"kuromatsunai.hokkaido.jp":!0,"kushiro.hokkaido.jp":!0,"kutchan.hokkaido.jp":!0,"kyowa.hokkaido.jp":!0,"mashike.hokkaido.jp":!0,"matsumae.hokkaido.jp":!0,"mikasa.hokkaido.jp":!0,"minamifurano.hokkaido.jp":!0,"mombetsu.hokkaido.jp":!0,"moseushi.hokkaido.jp":!0,"mukawa.hokkaido.jp":!0,"muroran.hokkaido.jp":!0,"naie.hokkaido.jp":!0,"nakagawa.hokkaido.jp":!0,"nakasatsunai.hokkaido.jp":!0,"nakatombetsu.hokkaido.jp":!0,"nanae.hokkaido.jp":!0,"nanporo.hokkaido.jp":!0,"nayoro.hokkaido.jp":!0,"nemuro.hokkaido.jp":!0,"niikappu.hokkaido.jp":!0,"niki.hokkaido.jp":!0,"nishiokoppe.hokkaido.jp":!0,"noboribetsu.hokkaido.jp":!0,"numata.hokkaido.jp":!0,"obihiro.hokkaido.jp":!0,"obira.hokkaido.jp":!0,"oketo.hokkaido.jp":!0,"okoppe.hokkaido.jp":!0,"otaru.hokkaido.jp":!0,"otobe.hokkaido.jp":!0,"otofuke.hokkaido.jp":!0,"otoineppu.hokkaido.jp":!0,"oumu.hokkaido.jp":!0,"ozora.hokkaido.jp":!0,"pippu.hokkaido.jp":!0,"rankoshi.hokkaido.jp":!0,"rebun.hokkaido.jp":!0,"rikubetsu.hokkaido.jp":!0,"rishiri.hokkaido.jp":!0,"rishirifuji.hokkaido.jp":!0,"saroma.hokkaido.jp":!0,"sarufutsu.hokkaido.jp":!0,"shakotan.hokkaido.jp":!0,"shari.hokkaido.jp":!0,"shibecha.hokkaido.jp":!0,"shibetsu.hokkaido.jp":!0,"shikabe.hokkaido.jp":!0,"shikaoi.hokkaido.jp":!0,"shimamaki.hokkaido.jp":!0,"shimizu.hokkaido.jp":!0,"shimokawa.hokkaido.jp":!0,"shinshinotsu.hokkaido.jp":!0,"shintoku.hokkaido.jp":!0,"shiranuka.hokkaido.jp":!0,"shiraoi.hokkaido.jp":!0,"shiriuchi.hokkaido.jp":!0,"sobetsu.hokkaido.jp":!0,"sunagawa.hokkaido.jp":!0,"taiki.hokkaido.jp":!0,"takasu.hokkaido.jp":!0,"takikawa.hokkaido.jp":!0,"takinoue.hokkaido.jp":!0,"teshikaga.hokkaido.jp":!0,"tobetsu.hokkaido.jp":!0,"tohma.hokkaido.jp":!0,"tomakomai.hokkaido.jp":!0,"tomari.hokkaido.jp":!0,"toya.hokkaido.jp":!0,"toyako.hokkaido.jp":!0,"toyotomi.hokkaido.jp":!0,"toyoura.hokkaido.jp":!0,"tsubetsu.hokkaido.jp":!0,"tsukigata.hokkaido.jp":!0,"urakawa.hokkaido.jp":!0,"urausu.hokkaido.jp":!0,"uryu.hokkaido.jp":!0,"utashinai.hokkaido.jp":!0,"wakkanai.hokkaido.jp":!0,"wassamu.hokkaido.jp":!0,"yakumo.hokkaido.jp":!0,"yoichi.hokkaido.jp":!0,"aioi.hyogo.jp":!0,"akashi.hyogo.jp":!0,"ako.hyogo.jp":!0,"amagasaki.hyogo.jp":!0,"aogaki.hyogo.jp":!0,"asago.hyogo.jp":!0,"ashiya.hyogo.jp":!0,"awaji.hyogo.jp":!0,"fukusaki.hyogo.jp":!0,"goshiki.hyogo.jp":!0,"harima.hyogo.jp":!0,"himeji.hyogo.jp":!0,"ichikawa.hyogo.jp":!0,"inagawa.hyogo.jp":!0,"itami.hyogo.jp":!0,"kakogawa.hyogo.jp":!0,"kamigori.hyogo.jp":!0,"kamikawa.hyogo.jp":!0,"kasai.hyogo.jp":!0,"kasuga.hyogo.jp":!0,"kawanishi.hyogo.jp":!0,"miki.hyogo.jp":!0,"minamiawaji.hyogo.jp":!0,"nishinomiya.hyogo.jp":!0,"nishiwaki.hyogo.jp":!0,"ono.hyogo.jp":!0,"sanda.hyogo.jp":!0,"sannan.hyogo.jp":!0,"sasayama.hyogo.jp":!0,"sayo.hyogo.jp":!0,"shingu.hyogo.jp":!0,"shinonsen.hyogo.jp":!0,"shiso.hyogo.jp":!0,"sumoto.hyogo.jp":!0,"taishi.hyogo.jp":!0,"taka.hyogo.jp":!0,"takarazuka.hyogo.jp":!0,"takasago.hyogo.jp":!0,"takino.hyogo.jp":!0,"tamba.hyogo.jp":!0,"tatsuno.hyogo.jp":!0,"toyooka.hyogo.jp":!0,"yabu.hyogo.jp":!0,"yashiro.hyogo.jp":!0,"yoka.hyogo.jp":!0,"yokawa.hyogo.jp":!0,"ami.ibaraki.jp":!0,"asahi.ibaraki.jp":!0,"bando.ibaraki.jp":!0,"chikusei.ibaraki.jp":!0,"daigo.ibaraki.jp":!0,"fujishiro.ibaraki.jp":!0,"hitachi.ibaraki.jp":!0,"hitachinaka.ibaraki.jp":!0,"hitachiomiya.ibaraki.jp":!0,"hitachiota.ibaraki.jp":!0,"ibaraki.ibaraki.jp":!0,"ina.ibaraki.jp":!0,"inashiki.ibaraki.jp":!0,"itako.ibaraki.jp":!0,"iwama.ibaraki.jp":!0,"joso.ibaraki.jp":!0,"kamisu.ibaraki.jp":!0,"kasama.ibaraki.jp":!0,"kashima.ibaraki.jp":!0,"kasumigaura.ibaraki.jp":!0,"koga.ibaraki.jp":!0,"miho.ibaraki.jp":!0,"mito.ibaraki.jp":!0,"moriya.ibaraki.jp":!0,"naka.ibaraki.jp":!0,"namegata.ibaraki.jp":!0,"oarai.ibaraki.jp":!0,"ogawa.ibaraki.jp":!0,"omitama.ibaraki.jp":!0,"ryugasaki.ibaraki.jp":!0,"sakai.ibaraki.jp":!0,"sakuragawa.ibaraki.jp":!0,"shimodate.ibaraki.jp":!0,"shimotsuma.ibaraki.jp":!0,"shirosato.ibaraki.jp":!0,"sowa.ibaraki.jp":!0,"suifu.ibaraki.jp":!0,"takahagi.ibaraki.jp":!0,"tamatsukuri.ibaraki.jp":!0,"tokai.ibaraki.jp":!0,"tomobe.ibaraki.jp":!0,"tone.ibaraki.jp":!0,"toride.ibaraki.jp":!0,"tsuchiura.ibaraki.jp":!0,"tsukuba.ibaraki.jp":!0,"uchihara.ibaraki.jp":!0,"ushiku.ibaraki.jp":!0,"yachiyo.ibaraki.jp":!0,"yamagata.ibaraki.jp":!0,"yawara.ibaraki.jp":!0,"yuki.ibaraki.jp":!0,"anamizu.ishikawa.jp":!0,"hakui.ishikawa.jp":!0,"hakusan.ishikawa.jp":!0,"kaga.ishikawa.jp":!0,"kahoku.ishikawa.jp":!0,"kanazawa.ishikawa.jp":!0,"kawakita.ishikawa.jp":!0,"komatsu.ishikawa.jp":!0,"nakanoto.ishikawa.jp":!0,"nanao.ishikawa.jp":!0,"nomi.ishikawa.jp":!0,"nonoichi.ishikawa.jp":!0,"noto.ishikawa.jp":!0,"shika.ishikawa.jp":!0,"suzu.ishikawa.jp":!0,"tsubata.ishikawa.jp":!0,"tsurugi.ishikawa.jp":!0,"uchinada.ishikawa.jp":!0,"wajima.ishikawa.jp":!0,"fudai.iwate.jp":!0,"fujisawa.iwate.jp":!0,"hanamaki.iwate.jp":!0,"hiraizumi.iwate.jp":!0,"hirono.iwate.jp":!0,"ichinohe.iwate.jp":!0,"ichinoseki.iwate.jp":!0,"iwaizumi.iwate.jp":!0,"iwate.iwate.jp":!0,"joboji.iwate.jp":!0,"kamaishi.iwate.jp":!0,"kanegasaki.iwate.jp":!0,"karumai.iwate.jp":!0,"kawai.iwate.jp":!0,"kitakami.iwate.jp":!0,"kuji.iwate.jp":!0,"kunohe.iwate.jp":!0,"kuzumaki.iwate.jp":!0,"miyako.iwate.jp":!0,"mizusawa.iwate.jp":!0,"morioka.iwate.jp":!0,"ninohe.iwate.jp":!0,"noda.iwate.jp":!0,"ofunato.iwate.jp":!0,"oshu.iwate.jp":!0,"otsuchi.iwate.jp":!0,"rikuzentakata.iwate.jp":!0,"shiwa.iwate.jp":!0,"shizukuishi.iwate.jp":!0,"sumita.iwate.jp":!0,"tanohata.iwate.jp":!0,"tono.iwate.jp":!0,"yahaba.iwate.jp":!0,"yamada.iwate.jp":!0,"ayagawa.kagawa.jp":!0,"higashikagawa.kagawa.jp":!0,"kanonji.kagawa.jp":!0,"kotohira.kagawa.jp":!0,"manno.kagawa.jp":!0,"marugame.kagawa.jp":!0,"mitoyo.kagawa.jp":!0,"naoshima.kagawa.jp":!0,"sanuki.kagawa.jp":!0,"tadotsu.kagawa.jp":!0,"takamatsu.kagawa.jp":!0,"tonosho.kagawa.jp":!0,"uchinomi.kagawa.jp":!0,"utazu.kagawa.jp":!0,"zentsuji.kagawa.jp":!0,"akune.kagoshima.jp":!0,"amami.kagoshima.jp":!0,"hioki.kagoshima.jp":!0,"isa.kagoshima.jp":!0,"isen.kagoshima.jp":!0,"izumi.kagoshima.jp":!0,"kagoshima.kagoshima.jp":!0,"kanoya.kagoshima.jp":!0,"kawanabe.kagoshima.jp":!0,"kinko.kagoshima.jp":!0,"kouyama.kagoshima.jp":!0,"makurazaki.kagoshima.jp":!0,"matsumoto.kagoshima.jp":!0,"minamitane.kagoshima.jp":!0,"nakatane.kagoshima.jp":!0,"nishinoomote.kagoshima.jp":!0,"satsumasendai.kagoshima.jp":!0,"soo.kagoshima.jp":!0,"tarumizu.kagoshima.jp":!0,"yusui.kagoshima.jp":!0,"aikawa.kanagawa.jp":!0,"atsugi.kanagawa.jp":!0,"ayase.kanagawa.jp":!0,"chigasaki.kanagawa.jp":!0,"ebina.kanagawa.jp":!0,"fujisawa.kanagawa.jp":!0,"hadano.kanagawa.jp":!0,"hakone.kanagawa.jp":!0,"hiratsuka.kanagawa.jp":!0,"isehara.kanagawa.jp":!0,"kaisei.kanagawa.jp":!0,"kamakura.kanagawa.jp":!0,"kiyokawa.kanagawa.jp":!0,"matsuda.kanagawa.jp":!0,"minamiashigara.kanagawa.jp":!0,"miura.kanagawa.jp":!0,"nakai.kanagawa.jp":!0,"ninomiya.kanagawa.jp":!0,"odawara.kanagawa.jp":!0,"oi.kanagawa.jp":!0,"oiso.kanagawa.jp":!0,"sagamihara.kanagawa.jp":!0,"samukawa.kanagawa.jp":!0,"tsukui.kanagawa.jp":!0,"yamakita.kanagawa.jp":!0,"yamato.kanagawa.jp":!0,"yokosuka.kanagawa.jp":!0,"yugawara.kanagawa.jp":!0,"zama.kanagawa.jp":!0,"zushi.kanagawa.jp":!0,"aki.kochi.jp":!0,"geisei.kochi.jp":!0,"hidaka.kochi.jp":!0,"higashitsuno.kochi.jp":!0,"ino.kochi.jp":!0,"kagami.kochi.jp":!0,"kami.kochi.jp":!0,"kitagawa.kochi.jp":!0,"kochi.kochi.jp":!0,"mihara.kochi.jp":!0,"motoyama.kochi.jp":!0,"muroto.kochi.jp":!0,"nahari.kochi.jp":!0,"nakamura.kochi.jp":!0,"nankoku.kochi.jp":!0,"nishitosa.kochi.jp":!0,"niyodogawa.kochi.jp":!0,"ochi.kochi.jp":!0,"okawa.kochi.jp":!0,"otoyo.kochi.jp":!0,"otsuki.kochi.jp":!0,"sakawa.kochi.jp":!0,"sukumo.kochi.jp":!0,"susaki.kochi.jp":!0,"tosa.kochi.jp":!0,"tosashimizu.kochi.jp":!0,"toyo.kochi.jp":!0,"tsuno.kochi.jp":!0,"umaji.kochi.jp":!0,"yasuda.kochi.jp":!0,"yusuhara.kochi.jp":!0,"amakusa.kumamoto.jp":!0,"arao.kumamoto.jp":!0,"aso.kumamoto.jp":!0,"choyo.kumamoto.jp":!0,"gyokuto.kumamoto.jp":!0,"hitoyoshi.kumamoto.jp":!0,"kamiamakusa.kumamoto.jp":!0,"kashima.kumamoto.jp":!0,"kikuchi.kumamoto.jp":!0,"kosa.kumamoto.jp":!0,"kumamoto.kumamoto.jp":!0,"mashiki.kumamoto.jp":!0,"mifune.kumamoto.jp":!0,"minamata.kumamoto.jp":!0,"minamioguni.kumamoto.jp":!0,"nagasu.kumamoto.jp":!0,"nishihara.kumamoto.jp":!0,"oguni.kumamoto.jp":!0,"ozu.kumamoto.jp":!0,"sumoto.kumamoto.jp":!0,"takamori.kumamoto.jp":!0,"uki.kumamoto.jp":!0,"uto.kumamoto.jp":!0,"yamaga.kumamoto.jp":!0,"yamato.kumamoto.jp":!0,"yatsushiro.kumamoto.jp":!0,"ayabe.kyoto.jp":!0,"fukuchiyama.kyoto.jp":!0,"higashiyama.kyoto.jp":!0,"ide.kyoto.jp":!0,"ine.kyoto.jp":!0,"joyo.kyoto.jp":!0,"kameoka.kyoto.jp":!0,"kamo.kyoto.jp":!0,"kita.kyoto.jp":!0,"kizu.kyoto.jp":!0,"kumiyama.kyoto.jp":!0,"kyotamba.kyoto.jp":!0,"kyotanabe.kyoto.jp":!0,"kyotango.kyoto.jp":!0,"maizuru.kyoto.jp":!0,"minami.kyoto.jp":!0,"minamiyamashiro.kyoto.jp":!0,"miyazu.kyoto.jp":!0,"muko.kyoto.jp":!0,"nagaokakyo.kyoto.jp":!0,"nakagyo.kyoto.jp":!0,"nantan.kyoto.jp":!0,"oyamazaki.kyoto.jp":!0,"sakyo.kyoto.jp":!0,"seika.kyoto.jp":!0,"tanabe.kyoto.jp":!0,"uji.kyoto.jp":!0,"ujitawara.kyoto.jp":!0,"wazuka.kyoto.jp":!0,"yamashina.kyoto.jp":!0,"yawata.kyoto.jp":!0,"asahi.mie.jp":!0,"inabe.mie.jp":!0,"ise.mie.jp":!0,"kameyama.mie.jp":!0,"kawagoe.mie.jp":!0,"kiho.mie.jp":!0,"kisosaki.mie.jp":!0,"kiwa.mie.jp":!0,"komono.mie.jp":!0,"kumano.mie.jp":!0,"kuwana.mie.jp":!0,"matsusaka.mie.jp":!0,"meiwa.mie.jp":!0,"mihama.mie.jp":!0,"minamiise.mie.jp":!0,"misugi.mie.jp":!0,"miyama.mie.jp":!0,"nabari.mie.jp":!0,"shima.mie.jp":!0,"suzuka.mie.jp":!0,"tado.mie.jp":!0,"taiki.mie.jp":!0,"taki.mie.jp":!0,"tamaki.mie.jp":!0,"toba.mie.jp":!0,"tsu.mie.jp":!0,"udono.mie.jp":!0,"ureshino.mie.jp":!0,"watarai.mie.jp":!0,"yokkaichi.mie.jp":!0,"furukawa.miyagi.jp":!0,"higashimatsushima.miyagi.jp":!0,"ishinomaki.miyagi.jp":!0,"iwanuma.miyagi.jp":!0,"kakuda.miyagi.jp":!0,"kami.miyagi.jp":!0,"kawasaki.miyagi.jp":!0,"kesennuma.miyagi.jp":!0,"marumori.miyagi.jp":!0,"matsushima.miyagi.jp":!0,"minamisanriku.miyagi.jp":!0,"misato.miyagi.jp":!0,"murata.miyagi.jp":!0,"natori.miyagi.jp":!0,"ogawara.miyagi.jp":!0,"ohira.miyagi.jp":!0,"onagawa.miyagi.jp":!0,"osaki.miyagi.jp":!0,"rifu.miyagi.jp":!0,"semine.miyagi.jp":!0,"shibata.miyagi.jp":!0,"shichikashuku.miyagi.jp":!0,"shikama.miyagi.jp":!0,"shiogama.miyagi.jp":!0,"shiroishi.miyagi.jp":!0,"tagajo.miyagi.jp":!0,"taiwa.miyagi.jp":!0,"tome.miyagi.jp":!0,"tomiya.miyagi.jp":!0,"wakuya.miyagi.jp":!0,"watari.miyagi.jp":!0,"yamamoto.miyagi.jp":!0,"zao.miyagi.jp":!0,"aya.miyazaki.jp":!0,"ebino.miyazaki.jp":!0,"gokase.miyazaki.jp":!0,"hyuga.miyazaki.jp":!0,"kadogawa.miyazaki.jp":!0,"kawaminami.miyazaki.jp":!0,"kijo.miyazaki.jp":!0,"kitagawa.miyazaki.jp":!0,"kitakata.miyazaki.jp":!0,"kitaura.miyazaki.jp":!0,"kobayashi.miyazaki.jp":!0,"kunitomi.miyazaki.jp":!0,"kushima.miyazaki.jp":!0,"mimata.miyazaki.jp":!0,"miyakonojo.miyazaki.jp":!0,"miyazaki.miyazaki.jp":!0,"morotsuka.miyazaki.jp":!0,"nichinan.miyazaki.jp":!0,"nishimera.miyazaki.jp":!0,"nobeoka.miyazaki.jp":!0,"saito.miyazaki.jp":!0,"shiiba.miyazaki.jp":!0,"shintomi.miyazaki.jp":!0,"takaharu.miyazaki.jp":!0,"takanabe.miyazaki.jp":!0,"takazaki.miyazaki.jp":!0,"tsuno.miyazaki.jp":!0,"achi.nagano.jp":!0,"agematsu.nagano.jp":!0,"anan.nagano.jp":!0,"aoki.nagano.jp":!0,"asahi.nagano.jp":!0,"azumino.nagano.jp":!0,"chikuhoku.nagano.jp":!0,"chikuma.nagano.jp":!0,"chino.nagano.jp":!0,"fujimi.nagano.jp":!0,"hakuba.nagano.jp":!0,"hara.nagano.jp":!0,"hiraya.nagano.jp":!0,"iida.nagano.jp":!0,"iijima.nagano.jp":!0,"iiyama.nagano.jp":!0,"iizuna.nagano.jp":!0,"ikeda.nagano.jp":!0,"ikusaka.nagano.jp":!0,"ina.nagano.jp":!0,"karuizawa.nagano.jp":!0,"kawakami.nagano.jp":!0,"kiso.nagano.jp":!0,"kisofukushima.nagano.jp":!0,"kitaaiki.nagano.jp":!0,"komagane.nagano.jp":!0,"komoro.nagano.jp":!0,"matsukawa.nagano.jp":!0,"matsumoto.nagano.jp":!0,"miasa.nagano.jp":!0,"minamiaiki.nagano.jp":!0,"minamimaki.nagano.jp":!0,"minamiminowa.nagano.jp":!0,"minowa.nagano.jp":!0,"miyada.nagano.jp":!0,"miyota.nagano.jp":!0,"mochizuki.nagano.jp":!0,"nagano.nagano.jp":!0,"nagawa.nagano.jp":!0,"nagiso.nagano.jp":!0,"nakagawa.nagano.jp":!0,"nakano.nagano.jp":!0,"nozawaonsen.nagano.jp":!0,"obuse.nagano.jp":!0,"ogawa.nagano.jp":!0,"okaya.nagano.jp":!0,"omachi.nagano.jp":!0,"omi.nagano.jp":!0,"ookuwa.nagano.jp":!0,"ooshika.nagano.jp":!0,"otaki.nagano.jp":!0,"otari.nagano.jp":!0,"sakae.nagano.jp":!0,"sakaki.nagano.jp":!0,"saku.nagano.jp":!0,"sakuho.nagano.jp":!0,"shimosuwa.nagano.jp":!0,"shinanomachi.nagano.jp":!0,"shiojiri.nagano.jp":!0,"suwa.nagano.jp":!0,"suzaka.nagano.jp":!0,"takagi.nagano.jp":!0,"takamori.nagano.jp":!0,"takayama.nagano.jp":!0,"tateshina.nagano.jp":!0,"tatsuno.nagano.jp":!0,"togakushi.nagano.jp":!0,"togura.nagano.jp":!0,"tomi.nagano.jp":!0,"ueda.nagano.jp":!0,"wada.nagano.jp":!0,"yamagata.nagano.jp":!0,"yamanouchi.nagano.jp":!0,"yasaka.nagano.jp":!0,"yasuoka.nagano.jp":!0,"chijiwa.nagasaki.jp":!0,"futsu.nagasaki.jp":!0,"goto.nagasaki.jp":!0,"hasami.nagasaki.jp":!0,"hirado.nagasaki.jp":!0,"iki.nagasaki.jp":!0,"isahaya.nagasaki.jp":!0,"kawatana.nagasaki.jp":!0,"kuchinotsu.nagasaki.jp":!0,"matsuura.nagasaki.jp":!0,"nagasaki.nagasaki.jp":!0,"obama.nagasaki.jp":!0,"omura.nagasaki.jp":!0,"oseto.nagasaki.jp":!0,"saikai.nagasaki.jp":!0,"sasebo.nagasaki.jp":!0,"seihi.nagasaki.jp":!0,"shimabara.nagasaki.jp":!0,"shinkamigoto.nagasaki.jp":!0,"togitsu.nagasaki.jp":!0,"tsushima.nagasaki.jp":!0,"unzen.nagasaki.jp":!0,"ando.nara.jp":!0,"gose.nara.jp":!0,"heguri.nara.jp":!0,"higashiyoshino.nara.jp":!0,"ikaruga.nara.jp":!0,"ikoma.nara.jp":!0,"kamikitayama.nara.jp":!0,"kanmaki.nara.jp":!0,"kashiba.nara.jp":!0,"kashihara.nara.jp":!0,"katsuragi.nara.jp":!0,"kawai.nara.jp":!0,"kawakami.nara.jp":!0,"kawanishi.nara.jp":!0,"koryo.nara.jp":!0,"kurotaki.nara.jp":!0,"mitsue.nara.jp":!0,"miyake.nara.jp":!0,"nara.nara.jp":!0,"nosegawa.nara.jp":!0,"oji.nara.jp":!0,"ouda.nara.jp":!0,"oyodo.nara.jp":!0,"sakurai.nara.jp":!0,"sango.nara.jp":!0,"shimoichi.nara.jp":!0,"shimokitayama.nara.jp":!0,"shinjo.nara.jp":!0,"soni.nara.jp":!0,"takatori.nara.jp":!0,"tawaramoto.nara.jp":!0,"tenkawa.nara.jp":!0,"tenri.nara.jp":!0,"uda.nara.jp":!0,"yamatokoriyama.nara.jp":!0,"yamatotakada.nara.jp":!0,"yamazoe.nara.jp":!0,"yoshino.nara.jp":!0,"aga.niigata.jp":!0,"agano.niigata.jp":!0,"gosen.niigata.jp":!0,"itoigawa.niigata.jp":!0,"izumozaki.niigata.jp":!0,"joetsu.niigata.jp":!0,"kamo.niigata.jp":!0,"kariwa.niigata.jp":!0,"kashiwazaki.niigata.jp":!0,"minamiuonuma.niigata.jp":!0,"mitsuke.niigata.jp":!0,"muika.niigata.jp":!0,"murakami.niigata.jp":!0,"myoko.niigata.jp":!0,"nagaoka.niigata.jp":!0,"niigata.niigata.jp":!0,"ojiya.niigata.jp":!0,"omi.niigata.jp":!0,"sado.niigata.jp":!0,"sanjo.niigata.jp":!0,"seiro.niigata.jp":!0,"seirou.niigata.jp":!0,"sekikawa.niigata.jp":!0,"shibata.niigata.jp":!0,"tagami.niigata.jp":!0,"tainai.niigata.jp":!0,"tochio.niigata.jp":!0,"tokamachi.niigata.jp":!0,"tsubame.niigata.jp":!0,"tsunan.niigata.jp":!0,"uonuma.niigata.jp":!0,"yahiko.niigata.jp":!0,"yoita.niigata.jp":!0,"yuzawa.niigata.jp":!0,"beppu.oita.jp":!0,"bungoono.oita.jp":!0,"bungotakada.oita.jp":!0,"hasama.oita.jp":!0,"hiji.oita.jp":!0,"himeshima.oita.jp":!0,"hita.oita.jp":!0,"kamitsue.oita.jp":!0,"kokonoe.oita.jp":!0,"kuju.oita.jp":!0,"kunisaki.oita.jp":!0,"kusu.oita.jp":!0,"oita.oita.jp":!0,"saiki.oita.jp":!0,"taketa.oita.jp":!0,"tsukumi.oita.jp":!0,"usa.oita.jp":!0,"usuki.oita.jp":!0,"yufu.oita.jp":!0,"akaiwa.okayama.jp":!0,"asakuchi.okayama.jp":!0,"bizen.okayama.jp":!0,"hayashima.okayama.jp":!0,"ibara.okayama.jp":!0,"kagamino.okayama.jp":!0,"kasaoka.okayama.jp":!0,"kibichuo.okayama.jp":!0,"kumenan.okayama.jp":!0,"kurashiki.okayama.jp":!0,"maniwa.okayama.jp":!0,"misaki.okayama.jp":!0,"nagi.okayama.jp":!0,"niimi.okayama.jp":!0,"nishiawakura.okayama.jp":!0,"okayama.okayama.jp":!0,"satosho.okayama.jp":!0,"setouchi.okayama.jp":!0,"shinjo.okayama.jp":!0,"shoo.okayama.jp":!0,"soja.okayama.jp":!0,"takahashi.okayama.jp":!0,"tamano.okayama.jp":!0,"tsuyama.okayama.jp":!0,"wake.okayama.jp":!0,"yakage.okayama.jp":!0,"aguni.okinawa.jp":!0,"ginowan.okinawa.jp":!0,"ginoza.okinawa.jp":!0,"gushikami.okinawa.jp":!0,"haebaru.okinawa.jp":!0,"higashi.okinawa.jp":!0,"hirara.okinawa.jp":!0,"iheya.okinawa.jp":!0,"ishigaki.okinawa.jp":!0,"ishikawa.okinawa.jp":!0,"itoman.okinawa.jp":!0,"izena.okinawa.jp":!0,"kadena.okinawa.jp":!0,"kin.okinawa.jp":!0,"kitadaito.okinawa.jp":!0,"kitanakagusuku.okinawa.jp":!0,"kumejima.okinawa.jp":!0,"kunigami.okinawa.jp":!0,"minamidaito.okinawa.jp":!0,"motobu.okinawa.jp":!0,"nago.okinawa.jp":!0,"naha.okinawa.jp":!0,"nakagusuku.okinawa.jp":!0,"nakijin.okinawa.jp":!0,"nanjo.okinawa.jp":!0,"nishihara.okinawa.jp":!0,"ogimi.okinawa.jp":!0,"okinawa.okinawa.jp":!0,"onna.okinawa.jp":!0,"shimoji.okinawa.jp":!0,"taketomi.okinawa.jp":!0,"tarama.okinawa.jp":!0,"tokashiki.okinawa.jp":!0,"tomigusuku.okinawa.jp":!0,"tonaki.okinawa.jp":!0,"urasoe.okinawa.jp":!0,"uruma.okinawa.jp":!0,"yaese.okinawa.jp":!0,"yomitan.okinawa.jp":!0,"yonabaru.okinawa.jp":!0,"yonaguni.okinawa.jp":!0,"zamami.okinawa.jp":!0,"abeno.osaka.jp":!0,"chihayaakasaka.osaka.jp":!0,"chuo.osaka.jp":!0,"daito.osaka.jp":!0,"fujiidera.osaka.jp":!0,"habikino.osaka.jp":!0,"hannan.osaka.jp":!0,"higashiosaka.osaka.jp":!0,"higashisumiyoshi.osaka.jp":!0,"higashiyodogawa.osaka.jp":!0,"hirakata.osaka.jp":!0,"ibaraki.osaka.jp":!0,"ikeda.osaka.jp":!0,"izumi.osaka.jp":!0,"izumiotsu.osaka.jp":!0,"izumisano.osaka.jp":!0,"kadoma.osaka.jp":!0,"kaizuka.osaka.jp":!0,"kanan.osaka.jp":!0,"kashiwara.osaka.jp":!0,"katano.osaka.jp":!0,"kawachinagano.osaka.jp":!0,"kishiwada.osaka.jp":!0,"kita.osaka.jp":!0,"kumatori.osaka.jp":!0,"matsubara.osaka.jp":!0,"minato.osaka.jp":!0,"minoh.osaka.jp":!0,"misaki.osaka.jp":!0,"moriguchi.osaka.jp":!0,"neyagawa.osaka.jp":!0,"nishi.osaka.jp":!0,"nose.osaka.jp":!0,"osakasayama.osaka.jp":!0,"sakai.osaka.jp":!0,"sayama.osaka.jp":!0,"sennan.osaka.jp":!0,"settsu.osaka.jp":!0,"shijonawate.osaka.jp":!0,"shimamoto.osaka.jp":!0,"suita.osaka.jp":!0,"tadaoka.osaka.jp":!0,"taishi.osaka.jp":!0,"tajiri.osaka.jp":!0,"takaishi.osaka.jp":!0,"takatsuki.osaka.jp":!0,"tondabayashi.osaka.jp":!0,"toyonaka.osaka.jp":!0,"toyono.osaka.jp":!0,"yao.osaka.jp":!0,"ariake.saga.jp":!0,"arita.saga.jp":!0,"fukudomi.saga.jp":!0,"genkai.saga.jp":!0,"hamatama.saga.jp":!0,"hizen.saga.jp":!0,"imari.saga.jp":!0,"kamimine.saga.jp":!0,"kanzaki.saga.jp":!0,"karatsu.saga.jp":!0,"kashima.saga.jp":!0,"kitagata.saga.jp":!0,"kitahata.saga.jp":!0,"kiyama.saga.jp":!0,"kouhoku.saga.jp":!0,"kyuragi.saga.jp":!0,"nishiarita.saga.jp":!0,"ogi.saga.jp":!0,"omachi.saga.jp":!0,"ouchi.saga.jp":!0,"saga.saga.jp":!0,"shiroishi.saga.jp":!0,"taku.saga.jp":!0, -"tara.saga.jp":!0,"tosu.saga.jp":!0,"yoshinogari.saga.jp":!0,"arakawa.saitama.jp":!0,"asaka.saitama.jp":!0,"chichibu.saitama.jp":!0,"fujimi.saitama.jp":!0,"fujimino.saitama.jp":!0,"fukaya.saitama.jp":!0,"hanno.saitama.jp":!0,"hanyu.saitama.jp":!0,"hasuda.saitama.jp":!0,"hatogaya.saitama.jp":!0,"hatoyama.saitama.jp":!0,"hidaka.saitama.jp":!0,"higashichichibu.saitama.jp":!0,"higashimatsuyama.saitama.jp":!0,"honjo.saitama.jp":!0,"ina.saitama.jp":!0,"iruma.saitama.jp":!0,"iwatsuki.saitama.jp":!0,"kamiizumi.saitama.jp":!0,"kamikawa.saitama.jp":!0,"kamisato.saitama.jp":!0,"kasukabe.saitama.jp":!0,"kawagoe.saitama.jp":!0,"kawaguchi.saitama.jp":!0,"kawajima.saitama.jp":!0,"kazo.saitama.jp":!0,"kitamoto.saitama.jp":!0,"koshigaya.saitama.jp":!0,"kounosu.saitama.jp":!0,"kuki.saitama.jp":!0,"kumagaya.saitama.jp":!0,"matsubushi.saitama.jp":!0,"minano.saitama.jp":!0,"misato.saitama.jp":!0,"miyashiro.saitama.jp":!0,"miyoshi.saitama.jp":!0,"moroyama.saitama.jp":!0,"nagatoro.saitama.jp":!0,"namegawa.saitama.jp":!0,"niiza.saitama.jp":!0,"ogano.saitama.jp":!0,"ogawa.saitama.jp":!0,"ogose.saitama.jp":!0,"okegawa.saitama.jp":!0,"omiya.saitama.jp":!0,"otaki.saitama.jp":!0,"ranzan.saitama.jp":!0,"ryokami.saitama.jp":!0,"saitama.saitama.jp":!0,"sakado.saitama.jp":!0,"satte.saitama.jp":!0,"sayama.saitama.jp":!0,"shiki.saitama.jp":!0,"shiraoka.saitama.jp":!0,"soka.saitama.jp":!0,"sugito.saitama.jp":!0,"toda.saitama.jp":!0,"tokigawa.saitama.jp":!0,"tokorozawa.saitama.jp":!0,"tsurugashima.saitama.jp":!0,"urawa.saitama.jp":!0,"warabi.saitama.jp":!0,"yashio.saitama.jp":!0,"yokoze.saitama.jp":!0,"yono.saitama.jp":!0,"yorii.saitama.jp":!0,"yoshida.saitama.jp":!0,"yoshikawa.saitama.jp":!0,"yoshimi.saitama.jp":!0,"aisho.shiga.jp":!0,"gamo.shiga.jp":!0,"higashiomi.shiga.jp":!0,"hikone.shiga.jp":!0,"koka.shiga.jp":!0,"konan.shiga.jp":!0,"kosei.shiga.jp":!0,"koto.shiga.jp":!0,"kusatsu.shiga.jp":!0,"maibara.shiga.jp":!0,"moriyama.shiga.jp":!0,"nagahama.shiga.jp":!0,"nishiazai.shiga.jp":!0,"notogawa.shiga.jp":!0,"omihachiman.shiga.jp":!0,"otsu.shiga.jp":!0,"ritto.shiga.jp":!0,"ryuoh.shiga.jp":!0,"takashima.shiga.jp":!0,"takatsuki.shiga.jp":!0,"torahime.shiga.jp":!0,"toyosato.shiga.jp":!0,"yasu.shiga.jp":!0,"akagi.shimane.jp":!0,"ama.shimane.jp":!0,"gotsu.shimane.jp":!0,"hamada.shimane.jp":!0,"higashiizumo.shimane.jp":!0,"hikawa.shimane.jp":!0,"hikimi.shimane.jp":!0,"izumo.shimane.jp":!0,"kakinoki.shimane.jp":!0,"masuda.shimane.jp":!0,"matsue.shimane.jp":!0,"misato.shimane.jp":!0,"nishinoshima.shimane.jp":!0,"ohda.shimane.jp":!0,"okinoshima.shimane.jp":!0,"okuizumo.shimane.jp":!0,"shimane.shimane.jp":!0,"tamayu.shimane.jp":!0,"tsuwano.shimane.jp":!0,"unnan.shimane.jp":!0,"yakumo.shimane.jp":!0,"yasugi.shimane.jp":!0,"yatsuka.shimane.jp":!0,"arai.shizuoka.jp":!0,"atami.shizuoka.jp":!0,"fuji.shizuoka.jp":!0,"fujieda.shizuoka.jp":!0,"fujikawa.shizuoka.jp":!0,"fujinomiya.shizuoka.jp":!0,"fukuroi.shizuoka.jp":!0,"gotemba.shizuoka.jp":!0,"haibara.shizuoka.jp":!0,"hamamatsu.shizuoka.jp":!0,"higashiizu.shizuoka.jp":!0,"ito.shizuoka.jp":!0,"iwata.shizuoka.jp":!0,"izu.shizuoka.jp":!0,"izunokuni.shizuoka.jp":!0,"kakegawa.shizuoka.jp":!0,"kannami.shizuoka.jp":!0,"kawanehon.shizuoka.jp":!0,"kawazu.shizuoka.jp":!0,"kikugawa.shizuoka.jp":!0,"kosai.shizuoka.jp":!0,"makinohara.shizuoka.jp":!0,"matsuzaki.shizuoka.jp":!0,"minamiizu.shizuoka.jp":!0,"mishima.shizuoka.jp":!0,"morimachi.shizuoka.jp":!0,"nishiizu.shizuoka.jp":!0,"numazu.shizuoka.jp":!0,"omaezaki.shizuoka.jp":!0,"shimada.shizuoka.jp":!0,"shimizu.shizuoka.jp":!0,"shimoda.shizuoka.jp":!0,"shizuoka.shizuoka.jp":!0,"susono.shizuoka.jp":!0,"yaizu.shizuoka.jp":!0,"yoshida.shizuoka.jp":!0,"ashikaga.tochigi.jp":!0,"bato.tochigi.jp":!0,"haga.tochigi.jp":!0,"ichikai.tochigi.jp":!0,"iwafune.tochigi.jp":!0,"kaminokawa.tochigi.jp":!0,"kanuma.tochigi.jp":!0,"karasuyama.tochigi.jp":!0,"kuroiso.tochigi.jp":!0,"mashiko.tochigi.jp":!0,"mibu.tochigi.jp":!0,"moka.tochigi.jp":!0,"motegi.tochigi.jp":!0,"nasu.tochigi.jp":!0,"nasushiobara.tochigi.jp":!0,"nikko.tochigi.jp":!0,"nishikata.tochigi.jp":!0,"nogi.tochigi.jp":!0,"ohira.tochigi.jp":!0,"ohtawara.tochigi.jp":!0,"oyama.tochigi.jp":!0,"sakura.tochigi.jp":!0,"sano.tochigi.jp":!0,"shimotsuke.tochigi.jp":!0,"shioya.tochigi.jp":!0,"takanezawa.tochigi.jp":!0,"tochigi.tochigi.jp":!0,"tsuga.tochigi.jp":!0,"ujiie.tochigi.jp":!0,"utsunomiya.tochigi.jp":!0,"yaita.tochigi.jp":!0,"aizumi.tokushima.jp":!0,"anan.tokushima.jp":!0,"ichiba.tokushima.jp":!0,"itano.tokushima.jp":!0,"kainan.tokushima.jp":!0,"komatsushima.tokushima.jp":!0,"matsushige.tokushima.jp":!0,"mima.tokushima.jp":!0,"minami.tokushima.jp":!0,"miyoshi.tokushima.jp":!0,"mugi.tokushima.jp":!0,"nakagawa.tokushima.jp":!0,"naruto.tokushima.jp":!0,"sanagochi.tokushima.jp":!0,"shishikui.tokushima.jp":!0,"tokushima.tokushima.jp":!0,"wajiki.tokushima.jp":!0,"adachi.tokyo.jp":!0,"akiruno.tokyo.jp":!0,"akishima.tokyo.jp":!0,"aogashima.tokyo.jp":!0,"arakawa.tokyo.jp":!0,"bunkyo.tokyo.jp":!0,"chiyoda.tokyo.jp":!0,"chofu.tokyo.jp":!0,"chuo.tokyo.jp":!0,"edogawa.tokyo.jp":!0,"fuchu.tokyo.jp":!0,"fussa.tokyo.jp":!0,"hachijo.tokyo.jp":!0,"hachioji.tokyo.jp":!0,"hamura.tokyo.jp":!0,"higashikurume.tokyo.jp":!0,"higashimurayama.tokyo.jp":!0,"higashiyamato.tokyo.jp":!0,"hino.tokyo.jp":!0,"hinode.tokyo.jp":!0,"hinohara.tokyo.jp":!0,"inagi.tokyo.jp":!0,"itabashi.tokyo.jp":!0,"katsushika.tokyo.jp":!0,"kita.tokyo.jp":!0,"kiyose.tokyo.jp":!0,"kodaira.tokyo.jp":!0,"koganei.tokyo.jp":!0,"kokubunji.tokyo.jp":!0,"komae.tokyo.jp":!0,"koto.tokyo.jp":!0,"kouzushima.tokyo.jp":!0,"kunitachi.tokyo.jp":!0,"machida.tokyo.jp":!0,"meguro.tokyo.jp":!0,"minato.tokyo.jp":!0,"mitaka.tokyo.jp":!0,"mizuho.tokyo.jp":!0,"musashimurayama.tokyo.jp":!0,"musashino.tokyo.jp":!0,"nakano.tokyo.jp":!0,"nerima.tokyo.jp":!0,"ogasawara.tokyo.jp":!0,"okutama.tokyo.jp":!0,"ome.tokyo.jp":!0,"oshima.tokyo.jp":!0,"ota.tokyo.jp":!0,"setagaya.tokyo.jp":!0,"shibuya.tokyo.jp":!0,"shinagawa.tokyo.jp":!0,"shinjuku.tokyo.jp":!0,"suginami.tokyo.jp":!0,"sumida.tokyo.jp":!0,"tachikawa.tokyo.jp":!0,"taito.tokyo.jp":!0,"tama.tokyo.jp":!0,"toshima.tokyo.jp":!0,"chizu.tottori.jp":!0,"hino.tottori.jp":!0,"kawahara.tottori.jp":!0,"koge.tottori.jp":!0,"kotoura.tottori.jp":!0,"misasa.tottori.jp":!0,"nanbu.tottori.jp":!0,"nichinan.tottori.jp":!0,"sakaiminato.tottori.jp":!0,"tottori.tottori.jp":!0,"wakasa.tottori.jp":!0,"yazu.tottori.jp":!0,"yonago.tottori.jp":!0,"asahi.toyama.jp":!0,"fuchu.toyama.jp":!0,"fukumitsu.toyama.jp":!0,"funahashi.toyama.jp":!0,"himi.toyama.jp":!0,"imizu.toyama.jp":!0,"inami.toyama.jp":!0,"johana.toyama.jp":!0,"kamiichi.toyama.jp":!0,"kurobe.toyama.jp":!0,"nakaniikawa.toyama.jp":!0,"namerikawa.toyama.jp":!0,"nanto.toyama.jp":!0,"nyuzen.toyama.jp":!0,"oyabe.toyama.jp":!0,"taira.toyama.jp":!0,"takaoka.toyama.jp":!0,"tateyama.toyama.jp":!0,"toga.toyama.jp":!0,"tonami.toyama.jp":!0,"toyama.toyama.jp":!0,"unazuki.toyama.jp":!0,"uozu.toyama.jp":!0,"yamada.toyama.jp":!0,"arida.wakayama.jp":!0,"aridagawa.wakayama.jp":!0,"gobo.wakayama.jp":!0,"hashimoto.wakayama.jp":!0,"hidaka.wakayama.jp":!0,"hirogawa.wakayama.jp":!0,"inami.wakayama.jp":!0,"iwade.wakayama.jp":!0,"kainan.wakayama.jp":!0,"kamitonda.wakayama.jp":!0,"katsuragi.wakayama.jp":!0,"kimino.wakayama.jp":!0,"kinokawa.wakayama.jp":!0,"kitayama.wakayama.jp":!0,"koya.wakayama.jp":!0,"koza.wakayama.jp":!0,"kozagawa.wakayama.jp":!0,"kudoyama.wakayama.jp":!0,"kushimoto.wakayama.jp":!0,"mihama.wakayama.jp":!0,"misato.wakayama.jp":!0,"nachikatsuura.wakayama.jp":!0,"shingu.wakayama.jp":!0,"shirahama.wakayama.jp":!0,"taiji.wakayama.jp":!0,"tanabe.wakayama.jp":!0,"wakayama.wakayama.jp":!0,"yuasa.wakayama.jp":!0,"yura.wakayama.jp":!0,"asahi.yamagata.jp":!0,"funagata.yamagata.jp":!0,"higashine.yamagata.jp":!0,"iide.yamagata.jp":!0,"kahoku.yamagata.jp":!0,"kaminoyama.yamagata.jp":!0,"kaneyama.yamagata.jp":!0,"kawanishi.yamagata.jp":!0,"mamurogawa.yamagata.jp":!0,"mikawa.yamagata.jp":!0,"murayama.yamagata.jp":!0,"nagai.yamagata.jp":!0,"nakayama.yamagata.jp":!0,"nanyo.yamagata.jp":!0,"nishikawa.yamagata.jp":!0,"obanazawa.yamagata.jp":!0,"oe.yamagata.jp":!0,"oguni.yamagata.jp":!0,"ohkura.yamagata.jp":!0,"oishida.yamagata.jp":!0,"sagae.yamagata.jp":!0,"sakata.yamagata.jp":!0,"sakegawa.yamagata.jp":!0,"shinjo.yamagata.jp":!0,"shirataka.yamagata.jp":!0,"shonai.yamagata.jp":!0,"takahata.yamagata.jp":!0,"tendo.yamagata.jp":!0,"tozawa.yamagata.jp":!0,"tsuruoka.yamagata.jp":!0,"yamagata.yamagata.jp":!0,"yamanobe.yamagata.jp":!0,"yonezawa.yamagata.jp":!0,"yuza.yamagata.jp":!0,"abu.yamaguchi.jp":!0,"hagi.yamaguchi.jp":!0,"hikari.yamaguchi.jp":!0,"hofu.yamaguchi.jp":!0,"iwakuni.yamaguchi.jp":!0,"kudamatsu.yamaguchi.jp":!0,"mitou.yamaguchi.jp":!0,"nagato.yamaguchi.jp":!0,"oshima.yamaguchi.jp":!0,"shimonoseki.yamaguchi.jp":!0,"shunan.yamaguchi.jp":!0,"tabuse.yamaguchi.jp":!0,"tokuyama.yamaguchi.jp":!0,"toyota.yamaguchi.jp":!0,"ube.yamaguchi.jp":!0,"yuu.yamaguchi.jp":!0,"chuo.yamanashi.jp":!0,"doshi.yamanashi.jp":!0,"fuefuki.yamanashi.jp":!0,"fujikawa.yamanashi.jp":!0,"fujikawaguchiko.yamanashi.jp":!0,"fujiyoshida.yamanashi.jp":!0,"hayakawa.yamanashi.jp":!0,"hokuto.yamanashi.jp":!0,"ichikawamisato.yamanashi.jp":!0,"kai.yamanashi.jp":!0,"kofu.yamanashi.jp":!0,"koshu.yamanashi.jp":!0,"kosuge.yamanashi.jp":!0,"minami-alps.yamanashi.jp":!0,"minobu.yamanashi.jp":!0,"nakamichi.yamanashi.jp":!0,"nanbu.yamanashi.jp":!0,"narusawa.yamanashi.jp":!0,"nirasaki.yamanashi.jp":!0,"nishikatsura.yamanashi.jp":!0,"oshino.yamanashi.jp":!0,"otsuki.yamanashi.jp":!0,"showa.yamanashi.jp":!0,"tabayama.yamanashi.jp":!0,"tsuru.yamanashi.jp":!0,"uenohara.yamanashi.jp":!0,"yamanakako.yamanashi.jp":!0,"yamanashi.yamanashi.jp":!0,"*.ke":!0,kg:!0,"org.kg":!0,"net.kg":!0,"com.kg":!0,"edu.kg":!0,"gov.kg":!0,"mil.kg":!0,"*.kh":!0,ki:!0,"edu.ki":!0,"biz.ki":!0,"net.ki":!0,"org.ki":!0,"gov.ki":!0,"info.ki":!0,"com.ki":!0,km:!0,"org.km":!0,"nom.km":!0,"gov.km":!0,"prd.km":!0,"tm.km":!0,"edu.km":!0,"mil.km":!0,"ass.km":!0,"com.km":!0,"coop.km":!0,"asso.km":!0,"presse.km":!0,"medecin.km":!0,"notaires.km":!0,"pharmaciens.km":!0,"veterinaire.km":!0,"gouv.km":!0,kn:!0,"net.kn":!0,"org.kn":!0,"edu.kn":!0,"gov.kn":!0,kp:!0,"com.kp":!0,"edu.kp":!0,"gov.kp":!0,"org.kp":!0,"rep.kp":!0,"tra.kp":!0,kr:!0,"ac.kr":!0,"co.kr":!0,"es.kr":!0,"go.kr":!0,"hs.kr":!0,"kg.kr":!0,"mil.kr":!0,"ms.kr":!0,"ne.kr":!0,"or.kr":!0,"pe.kr":!0,"re.kr":!0,"sc.kr":!0,"busan.kr":!0,"chungbuk.kr":!0,"chungnam.kr":!0,"daegu.kr":!0,"daejeon.kr":!0,"gangwon.kr":!0,"gwangju.kr":!0,"gyeongbuk.kr":!0,"gyeonggi.kr":!0,"gyeongnam.kr":!0,"incheon.kr":!0,"jeju.kr":!0,"jeonbuk.kr":!0,"jeonnam.kr":!0,"seoul.kr":!0,"ulsan.kr":!0,"*.kw":!0,ky:!0,"edu.ky":!0,"gov.ky":!0,"com.ky":!0,"org.ky":!0,"net.ky":!0,kz:!0,"org.kz":!0,"edu.kz":!0,"net.kz":!0,"gov.kz":!0,"mil.kz":!0,"com.kz":!0,la:!0,"int.la":!0,"net.la":!0,"info.la":!0,"edu.la":!0,"gov.la":!0,"per.la":!0,"com.la":!0,"org.la":!0,lb:!0,"com.lb":!0,"edu.lb":!0,"gov.lb":!0,"net.lb":!0,"org.lb":!0,lc:!0,"com.lc":!0,"net.lc":!0,"co.lc":!0,"org.lc":!0,"edu.lc":!0,"gov.lc":!0,li:!0,lk:!0,"gov.lk":!0,"sch.lk":!0,"net.lk":!0,"int.lk":!0,"com.lk":!0,"org.lk":!0,"edu.lk":!0,"ngo.lk":!0,"soc.lk":!0,"web.lk":!0,"ltd.lk":!0,"assn.lk":!0,"grp.lk":!0,"hotel.lk":!0,"ac.lk":!0,lr:!0,"com.lr":!0,"edu.lr":!0,"gov.lr":!0,"org.lr":!0,"net.lr":!0,ls:!0,"co.ls":!0,"org.ls":!0,lt:!0,"gov.lt":!0,lu:!0,lv:!0,"com.lv":!0,"edu.lv":!0,"gov.lv":!0,"org.lv":!0,"mil.lv":!0,"id.lv":!0,"net.lv":!0,"asn.lv":!0,"conf.lv":!0,ly:!0,"com.ly":!0,"net.ly":!0,"gov.ly":!0,"plc.ly":!0,"edu.ly":!0,"sch.ly":!0,"med.ly":!0,"org.ly":!0,"id.ly":!0,ma:!0,"co.ma":!0,"net.ma":!0,"gov.ma":!0,"org.ma":!0,"ac.ma":!0,"press.ma":!0,mc:!0,"tm.mc":!0,"asso.mc":!0,md:!0,me:!0,"co.me":!0,"net.me":!0,"org.me":!0,"edu.me":!0,"ac.me":!0,"gov.me":!0,"its.me":!0,"priv.me":!0,mg:!0,"org.mg":!0,"nom.mg":!0,"gov.mg":!0,"prd.mg":!0,"tm.mg":!0,"edu.mg":!0,"mil.mg":!0,"com.mg":!0,"co.mg":!0,mh:!0,mil:!0,mk:!0,"com.mk":!0,"org.mk":!0,"net.mk":!0,"edu.mk":!0,"gov.mk":!0,"inf.mk":!0,"name.mk":!0,ml:!0,"com.ml":!0,"edu.ml":!0,"gouv.ml":!0,"gov.ml":!0,"net.ml":!0,"org.ml":!0,"presse.ml":!0,"*.mm":!0,mn:!0,"gov.mn":!0,"edu.mn":!0,"org.mn":!0,mo:!0,"com.mo":!0,"net.mo":!0,"org.mo":!0,"edu.mo":!0,"gov.mo":!0,mobi:!0,mp:!0,mq:!0,mr:!0,"gov.mr":!0,ms:!0,"com.ms":!0,"edu.ms":!0,"gov.ms":!0,"net.ms":!0,"org.ms":!0,mt:!0,"com.mt":!0,"edu.mt":!0,"net.mt":!0,"org.mt":!0,mu:!0,"com.mu":!0,"net.mu":!0,"org.mu":!0,"gov.mu":!0,"ac.mu":!0,"co.mu":!0,"or.mu":!0,museum:!0,"academy.museum":!0,"agriculture.museum":!0,"air.museum":!0,"airguard.museum":!0,"alabama.museum":!0,"alaska.museum":!0,"amber.museum":!0,"ambulance.museum":!0,"american.museum":!0,"americana.museum":!0,"americanantiques.museum":!0,"americanart.museum":!0,"amsterdam.museum":!0,"and.museum":!0,"annefrank.museum":!0,"anthro.museum":!0,"anthropology.museum":!0,"antiques.museum":!0,"aquarium.museum":!0,"arboretum.museum":!0,"archaeological.museum":!0,"archaeology.museum":!0,"architecture.museum":!0,"art.museum":!0,"artanddesign.museum":!0,"artcenter.museum":!0,"artdeco.museum":!0,"arteducation.museum":!0,"artgallery.museum":!0,"arts.museum":!0,"artsandcrafts.museum":!0,"asmatart.museum":!0,"assassination.museum":!0,"assisi.museum":!0,"association.museum":!0,"astronomy.museum":!0,"atlanta.museum":!0,"austin.museum":!0,"australia.museum":!0,"automotive.museum":!0,"aviation.museum":!0,"axis.museum":!0,"badajoz.museum":!0,"baghdad.museum":!0,"bahn.museum":!0,"bale.museum":!0,"baltimore.museum":!0,"barcelona.museum":!0,"baseball.museum":!0,"basel.museum":!0,"baths.museum":!0,"bauern.museum":!0,"beauxarts.museum":!0,"beeldengeluid.museum":!0,"bellevue.museum":!0,"bergbau.museum":!0,"berkeley.museum":!0,"berlin.museum":!0,"bern.museum":!0,"bible.museum":!0,"bilbao.museum":!0,"bill.museum":!0,"birdart.museum":!0,"birthplace.museum":!0,"bonn.museum":!0,"boston.museum":!0,"botanical.museum":!0,"botanicalgarden.museum":!0,"botanicgarden.museum":!0,"botany.museum":!0,"brandywinevalley.museum":!0,"brasil.museum":!0,"bristol.museum":!0,"british.museum":!0,"britishcolumbia.museum":!0,"broadcast.museum":!0,"brunel.museum":!0,"brussel.museum":!0,"brussels.museum":!0,"bruxelles.museum":!0,"building.museum":!0,"burghof.museum":!0,"bus.museum":!0,"bushey.museum":!0,"cadaques.museum":!0,"california.museum":!0,"cambridge.museum":!0,"can.museum":!0,"canada.museum":!0,"capebreton.museum":!0,"carrier.museum":!0,"cartoonart.museum":!0,"casadelamoneda.museum":!0,"castle.museum":!0,"castres.museum":!0,"celtic.museum":!0,"center.museum":!0,"chattanooga.museum":!0,"cheltenham.museum":!0,"chesapeakebay.museum":!0,"chicago.museum":!0,"children.museum":!0,"childrens.museum":!0,"childrensgarden.museum":!0,"chiropractic.museum":!0,"chocolate.museum":!0,"christiansburg.museum":!0,"cincinnati.museum":!0,"cinema.museum":!0,"circus.museum":!0,"civilisation.museum":!0,"civilization.museum":!0,"civilwar.museum":!0,"clinton.museum":!0,"clock.museum":!0,"coal.museum":!0,"coastaldefence.museum":!0,"cody.museum":!0,"coldwar.museum":!0,"collection.museum":!0,"colonialwilliamsburg.museum":!0,"coloradoplateau.museum":!0,"columbia.museum":!0,"columbus.museum":!0,"communication.museum":!0,"communications.museum":!0,"community.museum":!0,"computer.museum":!0,"computerhistory.museum":!0,"xn--comunicaes-v6a2o.museum":!0,"contemporary.museum":!0,"contemporaryart.museum":!0,"convent.museum":!0,"copenhagen.museum":!0,"corporation.museum":!0,"xn--correios-e-telecomunicaes-ghc29a.museum":!0,"corvette.museum":!0,"costume.museum":!0,"countryestate.museum":!0,"county.museum":!0,"crafts.museum":!0,"cranbrook.museum":!0,"creation.museum":!0,"cultural.museum":!0,"culturalcenter.museum":!0,"culture.museum":!0,"cyber.museum":!0,"cymru.museum":!0,"dali.museum":!0,"dallas.museum":!0,"database.museum":!0,"ddr.museum":!0,"decorativearts.museum":!0,"delaware.museum":!0,"delmenhorst.museum":!0,"denmark.museum":!0,"depot.museum":!0,"design.museum":!0,"detroit.museum":!0,"dinosaur.museum":!0,"discovery.museum":!0,"dolls.museum":!0,"donostia.museum":!0,"durham.museum":!0,"eastafrica.museum":!0,"eastcoast.museum":!0,"education.museum":!0,"educational.museum":!0,"egyptian.museum":!0,"eisenbahn.museum":!0,"elburg.museum":!0,"elvendrell.museum":!0,"embroidery.museum":!0,"encyclopedic.museum":!0,"england.museum":!0,"entomology.museum":!0,"environment.museum":!0,"environmentalconservation.museum":!0,"epilepsy.museum":!0,"essex.museum":!0,"estate.museum":!0,"ethnology.museum":!0,"exeter.museum":!0,"exhibition.museum":!0,"family.museum":!0,"farm.museum":!0,"farmequipment.museum":!0,"farmers.museum":!0,"farmstead.museum":!0,"field.museum":!0,"figueres.museum":!0,"filatelia.museum":!0,"film.museum":!0,"fineart.museum":!0,"finearts.museum":!0,"finland.museum":!0,"flanders.museum":!0,"florida.museum":!0,"force.museum":!0,"fortmissoula.museum":!0,"fortworth.museum":!0,"foundation.museum":!0,"francaise.museum":!0,"frankfurt.museum":!0,"franziskaner.museum":!0,"freemasonry.museum":!0,"freiburg.museum":!0,"fribourg.museum":!0,"frog.museum":!0,"fundacio.museum":!0,"furniture.museum":!0,"gallery.museum":!0,"garden.museum":!0,"gateway.museum":!0,"geelvinck.museum":!0,"gemological.museum":!0,"geology.museum":!0,"georgia.museum":!0,"giessen.museum":!0,"glas.museum":!0,"glass.museum":!0,"gorge.museum":!0,"grandrapids.museum":!0,"graz.museum":!0,"guernsey.museum":!0,"halloffame.museum":!0,"hamburg.museum":!0,"handson.museum":!0,"harvestcelebration.museum":!0,"hawaii.museum":!0,"health.museum":!0,"heimatunduhren.museum":!0,"hellas.museum":!0,"helsinki.museum":!0,"hembygdsforbund.museum":!0,"heritage.museum":!0,"histoire.museum":!0,"historical.museum":!0,"historicalsociety.museum":!0,"historichouses.museum":!0,"historisch.museum":!0,"historisches.museum":!0,"history.museum":!0,"historyofscience.museum":!0,"horology.museum":!0,"house.museum":!0,"humanities.museum":!0,"illustration.museum":!0,"imageandsound.museum":!0,"indian.museum":!0,"indiana.museum":!0,"indianapolis.museum":!0,"indianmarket.museum":!0,"intelligence.museum":!0,"interactive.museum":!0,"iraq.museum":!0,"iron.museum":!0,"isleofman.museum":!0,"jamison.museum":!0,"jefferson.museum":!0,"jerusalem.museum":!0,"jewelry.museum":!0,"jewish.museum":!0,"jewishart.museum":!0,"jfk.museum":!0,"journalism.museum":!0,"judaica.museum":!0,"judygarland.museum":!0,"juedisches.museum":!0,"juif.museum":!0,"karate.museum":!0,"karikatur.museum":!0,"kids.museum":!0,"koebenhavn.museum":!0,"koeln.museum":!0,"kunst.museum":!0,"kunstsammlung.museum":!0,"kunstunddesign.museum":!0,"labor.museum":!0,"labour.museum":!0,"lajolla.museum":!0,"lancashire.museum":!0,"landes.museum":!0,"lans.museum":!0,"xn--lns-qla.museum":!0,"larsson.museum":!0,"lewismiller.museum":!0,"lincoln.museum":!0,"linz.museum":!0,"living.museum":!0,"livinghistory.museum":!0,"localhistory.museum":!0,"london.museum":!0,"losangeles.museum":!0,"louvre.museum":!0,"loyalist.museum":!0,"lucerne.museum":!0,"luxembourg.museum":!0,"luzern.museum":!0,"mad.museum":!0,"madrid.museum":!0,"mallorca.museum":!0,"manchester.museum":!0,"mansion.museum":!0,"mansions.museum":!0,"manx.museum":!0,"marburg.museum":!0,"maritime.museum":!0,"maritimo.museum":!0,"maryland.museum":!0,"marylhurst.museum":!0,"media.museum":!0,"medical.museum":!0,"medizinhistorisches.museum":!0,"meeres.museum":!0,"memorial.museum":!0,"mesaverde.museum":!0,"michigan.museum":!0,"midatlantic.museum":!0,"military.museum":!0,"mill.museum":!0,"miners.museum":!0,"mining.museum":!0,"minnesota.museum":!0,"missile.museum":!0,"missoula.museum":!0,"modern.museum":!0,"moma.museum":!0,"money.museum":!0,"monmouth.museum":!0,"monticello.museum":!0,"montreal.museum":!0,"moscow.museum":!0,"motorcycle.museum":!0,"muenchen.museum":!0,"muenster.museum":!0,"mulhouse.museum":!0,"muncie.museum":!0,"museet.museum":!0,"museumcenter.museum":!0,"museumvereniging.museum":!0,"music.museum":!0,"national.museum":!0,"nationalfirearms.museum":!0,"nationalheritage.museum":!0,"nativeamerican.museum":!0,"naturalhistory.museum":!0,"naturalhistorymuseum.museum":!0,"naturalsciences.museum":!0,"nature.museum":!0,"naturhistorisches.museum":!0,"natuurwetenschappen.museum":!0,"naumburg.museum":!0,"naval.museum":!0,"nebraska.museum":!0,"neues.museum":!0,"newhampshire.museum":!0,"newjersey.museum":!0,"newmexico.museum":!0,"newport.museum":!0,"newspaper.museum":!0,"newyork.museum":!0,"niepce.museum":!0,"norfolk.museum":!0,"north.museum":!0,"nrw.museum":!0,"nuernberg.museum":!0,"nuremberg.museum":!0,"nyc.museum":!0,"nyny.museum":!0,"oceanographic.museum":!0,"oceanographique.museum":!0,"omaha.museum":!0,"online.museum":!0,"ontario.museum":!0,"openair.museum":!0,"oregon.museum":!0,"oregontrail.museum":!0,"otago.museum":!0,"oxford.museum":!0,"pacific.museum":!0,"paderborn.museum":!0,"palace.museum":!0,"paleo.museum":!0,"palmsprings.museum":!0,"panama.museum":!0,"paris.museum":!0,"pasadena.museum":!0,"pharmacy.museum":!0,"philadelphia.museum":!0,"philadelphiaarea.museum":!0,"philately.museum":!0,"phoenix.museum":!0,"photography.museum":!0,"pilots.museum":!0,"pittsburgh.museum":!0,"planetarium.museum":!0,"plantation.museum":!0,"plants.museum":!0,"plaza.museum":!0,"portal.museum":!0,"portland.museum":!0,"portlligat.museum":!0,"posts-and-telecommunications.museum":!0,"preservation.museum":!0,"presidio.museum":!0,"press.museum":!0,"project.museum":!0,"public.museum":!0,"pubol.museum":!0,"quebec.museum":!0,"railroad.museum":!0,"railway.museum":!0,"research.museum":!0,"resistance.museum":!0,"riodejaneiro.museum":!0,"rochester.museum":!0,"rockart.museum":!0,"roma.museum":!0,"russia.museum":!0,"saintlouis.museum":!0,"salem.museum":!0,"salvadordali.museum":!0,"salzburg.museum":!0,"sandiego.museum":!0,"sanfrancisco.museum":!0,"santabarbara.museum":!0,"santacruz.museum":!0,"santafe.museum":!0,"saskatchewan.museum":!0,"satx.museum":!0,"savannahga.museum":!0,"schlesisches.museum":!0,"schoenbrunn.museum":!0,"schokoladen.museum":!0,"school.museum":!0,"schweiz.museum":!0,"science.museum":!0,"scienceandhistory.museum":!0,"scienceandindustry.museum":!0,"sciencecenter.museum":!0,"sciencecenters.museum":!0,"science-fiction.museum":!0,"sciencehistory.museum":!0,"sciences.museum":!0,"sciencesnaturelles.museum":!0,"scotland.museum":!0,"seaport.museum":!0,"settlement.museum":!0,"settlers.museum":!0,"shell.museum":!0,"sherbrooke.museum":!0,"sibenik.museum":!0,"silk.museum":!0,"ski.museum":!0,"skole.museum":!0,"society.museum":!0,"sologne.museum":!0,"soundandvision.museum":!0,"southcarolina.museum":!0,"southwest.museum":!0,"space.museum":!0,"spy.museum":!0,"square.museum":!0,"stadt.museum":!0,"stalbans.museum":!0,"starnberg.museum":!0,"state.museum":!0,"stateofdelaware.museum":!0,"station.museum":!0,"steam.museum":!0,"steiermark.museum":!0,"stjohn.museum":!0,"stockholm.museum":!0,"stpetersburg.museum":!0,"stuttgart.museum":!0,"suisse.museum":!0,"surgeonshall.museum":!0,"surrey.museum":!0,"svizzera.museum":!0,"sweden.museum":!0,"sydney.museum":!0,"tank.museum":!0,"tcm.museum":!0,"technology.museum":!0,"telekommunikation.museum":!0,"television.museum":!0,"texas.museum":!0,"textile.museum":!0,"theater.museum":!0,"time.museum":!0,"timekeeping.museum":!0,"topology.museum":!0,"torino.museum":!0,"touch.museum":!0,"town.museum":!0,"transport.museum":!0,"tree.museum":!0,"trolley.museum":!0,"trust.museum":!0,"trustee.museum":!0,"uhren.museum":!0,"ulm.museum":!0,"undersea.museum":!0,"university.museum":!0,"usa.museum":!0,"usantiques.museum":!0,"usarts.museum":!0,"uscountryestate.museum":!0,"usculture.museum":!0,"usdecorativearts.museum":!0,"usgarden.museum":!0,"ushistory.museum":!0,"ushuaia.museum":!0,"uslivinghistory.museum":!0,"utah.museum":!0,"uvic.museum":!0,"valley.museum":!0,"vantaa.museum":!0,"versailles.museum":!0,"viking.museum":!0,"village.museum":!0,"virginia.museum":!0,"virtual.museum":!0,"virtuel.museum":!0,"vlaanderen.museum":!0,"volkenkunde.museum":!0,"wales.museum":!0,"wallonie.museum":!0,"war.museum":!0,"washingtondc.museum":!0,"watchandclock.museum":!0,"watch-and-clock.museum":!0,"western.museum":!0,"westfalen.museum":!0,"whaling.museum":!0,"wildlife.museum":!0,"williamsburg.museum":!0,"windmill.museum":!0,"workshop.museum":!0,"york.museum":!0,"yorkshire.museum":!0,"yosemite.museum":!0,"youth.museum":!0,"zoological.museum":!0,"zoology.museum":!0,"xn--9dbhblg6di.museum":!0,"xn--h1aegh.museum":!0,mv:!0,"aero.mv":!0,"biz.mv":!0,"com.mv":!0,"coop.mv":!0,"edu.mv":!0,"gov.mv":!0,"info.mv":!0,"int.mv":!0,"mil.mv":!0,"museum.mv":!0,"name.mv":!0,"net.mv":!0,"org.mv":!0,"pro.mv":!0,mw:!0,"ac.mw":!0,"biz.mw":!0,"co.mw":!0,"com.mw":!0,"coop.mw":!0,"edu.mw":!0,"gov.mw":!0,"int.mw":!0,"museum.mw":!0,"net.mw":!0,"org.mw":!0,mx:!0,"com.mx":!0,"org.mx":!0,"gob.mx":!0,"edu.mx":!0,"net.mx":!0,my:!0,"com.my":!0,"net.my":!0,"org.my":!0,"gov.my":!0,"edu.my":!0,"mil.my":!0,"name.my":!0,"*.mz":!0,"teledata.mz":!1,na:!0,"info.na":!0,"pro.na":!0,"name.na":!0,"school.na":!0,"or.na":!0,"dr.na":!0,"us.na":!0,"mx.na":!0,"ca.na":!0,"in.na":!0,"cc.na":!0,"tv.na":!0,"ws.na":!0,"mobi.na":!0,"co.na":!0,"com.na":!0,"org.na":!0,name:!0,nc:!0,"asso.nc":!0,ne:!0,net:!0,nf:!0,"com.nf":!0,"net.nf":!0,"per.nf":!0,"rec.nf":!0,"web.nf":!0,"arts.nf":!0,"firm.nf":!0,"info.nf":!0,"other.nf":!0,"store.nf":!0,ng:!0,"com.ng":!0,"edu.ng":!0,"name.ng":!0,"net.ng":!0,"org.ng":!0,"sch.ng":!0,"gov.ng":!0,"mil.ng":!0,"mobi.ng":!0,"*.ni":!0,nl:!0,"bv.nl":!0,no:!0,"fhs.no":!0,"vgs.no":!0,"fylkesbibl.no":!0,"folkebibl.no":!0,"museum.no":!0,"idrett.no":!0,"priv.no":!0,"mil.no":!0,"stat.no":!0,"dep.no":!0,"kommune.no":!0,"herad.no":!0,"aa.no":!0,"ah.no":!0,"bu.no":!0,"fm.no":!0,"hl.no":!0,"hm.no":!0,"jan-mayen.no":!0,"mr.no":!0,"nl.no":!0,"nt.no":!0,"of.no":!0,"ol.no":!0,"oslo.no":!0,"rl.no":!0,"sf.no":!0,"st.no":!0,"svalbard.no":!0,"tm.no":!0,"tr.no":!0,"va.no":!0,"vf.no":!0,"gs.aa.no":!0,"gs.ah.no":!0,"gs.bu.no":!0,"gs.fm.no":!0,"gs.hl.no":!0,"gs.hm.no":!0,"gs.jan-mayen.no":!0,"gs.mr.no":!0,"gs.nl.no":!0,"gs.nt.no":!0,"gs.of.no":!0,"gs.ol.no":!0,"gs.oslo.no":!0,"gs.rl.no":!0,"gs.sf.no":!0,"gs.st.no":!0,"gs.svalbard.no":!0,"gs.tm.no":!0,"gs.tr.no":!0,"gs.va.no":!0,"gs.vf.no":!0,"akrehamn.no":!0,"xn--krehamn-dxa.no":!0,"algard.no":!0,"xn--lgrd-poac.no":!0,"arna.no":!0,"brumunddal.no":!0,"bryne.no":!0,"bronnoysund.no":!0,"xn--brnnysund-m8ac.no":!0,"drobak.no":!0,"xn--drbak-wua.no":!0,"egersund.no":!0,"fetsund.no":!0,"floro.no":!0,"xn--flor-jra.no":!0,"fredrikstad.no":!0,"hokksund.no":!0,"honefoss.no":!0,"xn--hnefoss-q1a.no":!0,"jessheim.no":!0,"jorpeland.no":!0,"xn--jrpeland-54a.no":!0,"kirkenes.no":!0,"kopervik.no":!0,"krokstadelva.no":!0,"langevag.no":!0,"xn--langevg-jxa.no":!0,"leirvik.no":!0,"mjondalen.no":!0,"xn--mjndalen-64a.no":!0,"mo-i-rana.no":!0,"mosjoen.no":!0,"xn--mosjen-eya.no":!0,"nesoddtangen.no":!0,"orkanger.no":!0,"osoyro.no":!0,"xn--osyro-wua.no":!0,"raholt.no":!0,"xn--rholt-mra.no":!0,"sandnessjoen.no":!0,"xn--sandnessjen-ogb.no":!0,"skedsmokorset.no":!0,"slattum.no":!0,"spjelkavik.no":!0,"stathelle.no":!0,"stavern.no":!0,"stjordalshalsen.no":!0,"xn--stjrdalshalsen-sqb.no":!0,"tananger.no":!0,"tranby.no":!0,"vossevangen.no":!0,"afjord.no":!0,"xn--fjord-lra.no":!0,"agdenes.no":!0,"al.no":!0,"xn--l-1fa.no":!0,"alesund.no":!0,"xn--lesund-hua.no":!0,"alstahaug.no":!0,"alta.no":!0,"xn--lt-liac.no":!0,"alaheadju.no":!0,"xn--laheadju-7ya.no":!0,"alvdal.no":!0,"amli.no":!0,"xn--mli-tla.no":!0,"amot.no":!0,"xn--mot-tla.no":!0,"andebu.no":!0,"andoy.no":!0,"xn--andy-ira.no":!0,"andasuolo.no":!0,"ardal.no":!0,"xn--rdal-poa.no":!0,"aremark.no":!0,"arendal.no":!0,"xn--s-1fa.no":!0,"aseral.no":!0,"xn--seral-lra.no":!0,"asker.no":!0,"askim.no":!0,"askvoll.no":!0,"askoy.no":!0,"xn--asky-ira.no":!0,"asnes.no":!0,"xn--snes-poa.no":!0,"audnedaln.no":!0,"aukra.no":!0,"aure.no":!0,"aurland.no":!0,"aurskog-holand.no":!0,"xn--aurskog-hland-jnb.no":!0,"austevoll.no":!0,"austrheim.no":!0,"averoy.no":!0,"xn--avery-yua.no":!0,"balestrand.no":!0,"ballangen.no":!0,"balat.no":!0,"xn--blt-elab.no":!0,"balsfjord.no":!0,"bahccavuotna.no":!0,"xn--bhccavuotna-k7a.no":!0,"bamble.no":!0,"bardu.no":!0,"beardu.no":!0,"beiarn.no":!0,"bajddar.no":!0,"xn--bjddar-pta.no":!0,"baidar.no":!0,"xn--bidr-5nac.no":!0,"berg.no":!0,"bergen.no":!0,"berlevag.no":!0,"xn--berlevg-jxa.no":!0,"bearalvahki.no":!0,"xn--bearalvhki-y4a.no":!0,"bindal.no":!0,"birkenes.no":!0,"bjarkoy.no":!0,"xn--bjarky-fya.no":!0,"bjerkreim.no":!0,"bjugn.no":!0,"bodo.no":!0,"xn--bod-2na.no":!0,"badaddja.no":!0,"xn--bdddj-mrabd.no":!0,"budejju.no":!0,"bokn.no":!0,"bremanger.no":!0,"bronnoy.no":!0,"xn--brnny-wuac.no":!0,"bygland.no":!0,"bykle.no":!0,"barum.no":!0,"xn--brum-voa.no":!0,"bo.telemark.no":!0,"xn--b-5ga.telemark.no":!0,"bo.nordland.no":!0,"xn--b-5ga.nordland.no":!0,"bievat.no":!0,"xn--bievt-0qa.no":!0,"bomlo.no":!0,"xn--bmlo-gra.no":!0,"batsfjord.no":!0,"xn--btsfjord-9za.no":!0,"bahcavuotna.no":!0,"xn--bhcavuotna-s4a.no":!0,"dovre.no":!0,"drammen.no":!0,"drangedal.no":!0,"dyroy.no":!0,"xn--dyry-ira.no":!0,"donna.no":!0,"xn--dnna-gra.no":!0,"eid.no":!0,"eidfjord.no":!0,"eidsberg.no":!0,"eidskog.no":!0,"eidsvoll.no":!0,"eigersund.no":!0,"elverum.no":!0,"enebakk.no":!0,"engerdal.no":!0,"etne.no":!0,"etnedal.no":!0,"evenes.no":!0,"evenassi.no":!0,"xn--eveni-0qa01ga.no":!0,"evje-og-hornnes.no":!0,"farsund.no":!0,"fauske.no":!0,"fuossko.no":!0,"fuoisku.no":!0,"fedje.no":!0,"fet.no":!0,"finnoy.no":!0,"xn--finny-yua.no":!0,"fitjar.no":!0,"fjaler.no":!0,"fjell.no":!0,"flakstad.no":!0,"flatanger.no":!0,"flekkefjord.no":!0,"flesberg.no":!0,"flora.no":!0,"fla.no":!0,"xn--fl-zia.no":!0,"folldal.no":!0,"forsand.no":!0,"fosnes.no":!0,"frei.no":!0,"frogn.no":!0,"froland.no":!0,"frosta.no":!0,"frana.no":!0,"xn--frna-woa.no":!0,"froya.no":!0,"xn--frya-hra.no":!0,"fusa.no":!0,"fyresdal.no":!0,"forde.no":!0,"xn--frde-gra.no":!0,"gamvik.no":!0,"gangaviika.no":!0,"xn--ggaviika-8ya47h.no":!0,"gaular.no":!0,"gausdal.no":!0,"gildeskal.no":!0,"xn--gildeskl-g0a.no":!0,"giske.no":!0,"gjemnes.no":!0,"gjerdrum.no":!0,"gjerstad.no":!0,"gjesdal.no":!0,"gjovik.no":!0,"xn--gjvik-wua.no":!0,"gloppen.no":!0,"gol.no":!0,"gran.no":!0,"grane.no":!0,"granvin.no":!0,"gratangen.no":!0,"grimstad.no":!0,"grong.no":!0,"kraanghke.no":!0,"xn--kranghke-b0a.no":!0,"grue.no":!0,"gulen.no":!0,"hadsel.no":!0,"halden.no":!0,"halsa.no":!0,"hamar.no":!0,"hamaroy.no":!0,"habmer.no":!0,"xn--hbmer-xqa.no":!0,"hapmir.no":!0,"xn--hpmir-xqa.no":!0,"hammerfest.no":!0,"hammarfeasta.no":!0,"xn--hmmrfeasta-s4ac.no":!0,"haram.no":!0,"hareid.no":!0,"harstad.no":!0,"hasvik.no":!0,"aknoluokta.no":!0,"xn--koluokta-7ya57h.no":!0,"hattfjelldal.no":!0,"aarborte.no":!0,"haugesund.no":!0,"hemne.no":!0,"hemnes.no":!0,"hemsedal.no":!0,"heroy.more-og-romsdal.no":!0,"xn--hery-ira.xn--mre-og-romsdal-qqb.no":!0,"heroy.nordland.no":!0,"xn--hery-ira.nordland.no":!0,"hitra.no":!0,"hjartdal.no":!0,"hjelmeland.no":!0,"hobol.no":!0,"xn--hobl-ira.no":!0,"hof.no":!0,"hol.no":!0,"hole.no":!0,"holmestrand.no":!0,"holtalen.no":!0,"xn--holtlen-hxa.no":!0,"hornindal.no":!0,"horten.no":!0,"hurdal.no":!0,"hurum.no":!0,"hvaler.no":!0,"hyllestad.no":!0,"hagebostad.no":!0,"xn--hgebostad-g3a.no":!0,"hoyanger.no":!0,"xn--hyanger-q1a.no":!0,"hoylandet.no":!0,"xn--hylandet-54a.no":!0,"ha.no":!0,"xn--h-2fa.no":!0,"ibestad.no":!0,"inderoy.no":!0,"xn--indery-fya.no":!0,"iveland.no":!0,"jevnaker.no":!0,"jondal.no":!0,"jolster.no":!0,"xn--jlster-bya.no":!0,"karasjok.no":!0,"karasjohka.no":!0,"xn--krjohka-hwab49j.no":!0,"karlsoy.no":!0,"galsa.no":!0,"xn--gls-elac.no":!0,"karmoy.no":!0,"xn--karmy-yua.no":!0,"kautokeino.no":!0,"guovdageaidnu.no":!0,"klepp.no":!0,"klabu.no":!0,"xn--klbu-woa.no":!0,"kongsberg.no":!0,"kongsvinger.no":!0,"kragero.no":!0,"xn--krager-gya.no":!0,"kristiansand.no":!0,"kristiansund.no":!0,"krodsherad.no":!0,"xn--krdsherad-m8a.no":!0,"kvalsund.no":!0,"rahkkeravju.no":!0,"xn--rhkkervju-01af.no":!0,"kvam.no":!0,"kvinesdal.no":!0,"kvinnherad.no":!0,"kviteseid.no":!0,"kvitsoy.no":!0,"xn--kvitsy-fya.no":!0,"kvafjord.no":!0,"xn--kvfjord-nxa.no":!0,"giehtavuoatna.no":!0,"kvanangen.no":!0,"xn--kvnangen-k0a.no":!0,"navuotna.no":!0,"xn--nvuotna-hwa.no":!0,"kafjord.no":!0,"xn--kfjord-iua.no":!0,"gaivuotna.no":!0,"xn--givuotna-8ya.no":!0, -"larvik.no":!0,"lavangen.no":!0,"lavagis.no":!0,"loabat.no":!0,"xn--loabt-0qa.no":!0,"lebesby.no":!0,"davvesiida.no":!0,"leikanger.no":!0,"leirfjord.no":!0,"leka.no":!0,"leksvik.no":!0,"lenvik.no":!0,"leangaviika.no":!0,"xn--leagaviika-52b.no":!0,"lesja.no":!0,"levanger.no":!0,"lier.no":!0,"lierne.no":!0,"lillehammer.no":!0,"lillesand.no":!0,"lindesnes.no":!0,"lindas.no":!0,"xn--linds-pra.no":!0,"lom.no":!0,"loppa.no":!0,"lahppi.no":!0,"xn--lhppi-xqa.no":!0,"lund.no":!0,"lunner.no":!0,"luroy.no":!0,"xn--lury-ira.no":!0,"luster.no":!0,"lyngdal.no":!0,"lyngen.no":!0,"ivgu.no":!0,"lardal.no":!0,"lerdal.no":!0,"xn--lrdal-sra.no":!0,"lodingen.no":!0,"xn--ldingen-q1a.no":!0,"lorenskog.no":!0,"xn--lrenskog-54a.no":!0,"loten.no":!0,"xn--lten-gra.no":!0,"malvik.no":!0,"masoy.no":!0,"xn--msy-ula0h.no":!0,"muosat.no":!0,"xn--muost-0qa.no":!0,"mandal.no":!0,"marker.no":!0,"marnardal.no":!0,"masfjorden.no":!0,"meland.no":!0,"meldal.no":!0,"melhus.no":!0,"meloy.no":!0,"xn--mely-ira.no":!0,"meraker.no":!0,"xn--merker-kua.no":!0,"moareke.no":!0,"xn--moreke-jua.no":!0,"midsund.no":!0,"midtre-gauldal.no":!0,"modalen.no":!0,"modum.no":!0,"molde.no":!0,"moskenes.no":!0,"moss.no":!0,"mosvik.no":!0,"malselv.no":!0,"xn--mlselv-iua.no":!0,"malatvuopmi.no":!0,"xn--mlatvuopmi-s4a.no":!0,"namdalseid.no":!0,"aejrie.no":!0,"namsos.no":!0,"namsskogan.no":!0,"naamesjevuemie.no":!0,"xn--nmesjevuemie-tcba.no":!0,"laakesvuemie.no":!0,"nannestad.no":!0,"narvik.no":!0,"narviika.no":!0,"naustdal.no":!0,"nedre-eiker.no":!0,"nes.akershus.no":!0,"nes.buskerud.no":!0,"nesna.no":!0,"nesodden.no":!0,"nesseby.no":!0,"unjarga.no":!0,"xn--unjrga-rta.no":!0,"nesset.no":!0,"nissedal.no":!0,"nittedal.no":!0,"nord-aurdal.no":!0,"nord-fron.no":!0,"nord-odal.no":!0,"norddal.no":!0,"nordkapp.no":!0,"davvenjarga.no":!0,"xn--davvenjrga-y4a.no":!0,"nordre-land.no":!0,"nordreisa.no":!0,"raisa.no":!0,"xn--risa-5na.no":!0,"nore-og-uvdal.no":!0,"notodden.no":!0,"naroy.no":!0,"xn--nry-yla5g.no":!0,"notteroy.no":!0,"xn--nttery-byae.no":!0,"odda.no":!0,"oksnes.no":!0,"xn--ksnes-uua.no":!0,"oppdal.no":!0,"oppegard.no":!0,"xn--oppegrd-ixa.no":!0,"orkdal.no":!0,"orland.no":!0,"xn--rland-uua.no":!0,"orskog.no":!0,"xn--rskog-uua.no":!0,"orsta.no":!0,"xn--rsta-fra.no":!0,"os.hedmark.no":!0,"os.hordaland.no":!0,"osen.no":!0,"osteroy.no":!0,"xn--ostery-fya.no":!0,"ostre-toten.no":!0,"xn--stre-toten-zcb.no":!0,"overhalla.no":!0,"ovre-eiker.no":!0,"xn--vre-eiker-k8a.no":!0,"oyer.no":!0,"xn--yer-zna.no":!0,"oygarden.no":!0,"xn--ygarden-p1a.no":!0,"oystre-slidre.no":!0,"xn--ystre-slidre-ujb.no":!0,"porsanger.no":!0,"porsangu.no":!0,"xn--porsgu-sta26f.no":!0,"porsgrunn.no":!0,"radoy.no":!0,"xn--rady-ira.no":!0,"rakkestad.no":!0,"rana.no":!0,"ruovat.no":!0,"randaberg.no":!0,"rauma.no":!0,"rendalen.no":!0,"rennebu.no":!0,"rennesoy.no":!0,"xn--rennesy-v1a.no":!0,"rindal.no":!0,"ringebu.no":!0,"ringerike.no":!0,"ringsaker.no":!0,"rissa.no":!0,"risor.no":!0,"xn--risr-ira.no":!0,"roan.no":!0,"rollag.no":!0,"rygge.no":!0,"ralingen.no":!0,"xn--rlingen-mxa.no":!0,"rodoy.no":!0,"xn--rdy-0nab.no":!0,"romskog.no":!0,"xn--rmskog-bya.no":!0,"roros.no":!0,"xn--rros-gra.no":!0,"rost.no":!0,"xn--rst-0na.no":!0,"royken.no":!0,"xn--ryken-vua.no":!0,"royrvik.no":!0,"xn--ryrvik-bya.no":!0,"rade.no":!0,"xn--rde-ula.no":!0,"salangen.no":!0,"siellak.no":!0,"saltdal.no":!0,"salat.no":!0,"xn--slt-elab.no":!0,"xn--slat-5na.no":!0,"samnanger.no":!0,"sande.more-og-romsdal.no":!0,"sande.xn--mre-og-romsdal-qqb.no":!0,"sande.vestfold.no":!0,"sandefjord.no":!0,"sandnes.no":!0,"sandoy.no":!0,"xn--sandy-yua.no":!0,"sarpsborg.no":!0,"sauda.no":!0,"sauherad.no":!0,"sel.no":!0,"selbu.no":!0,"selje.no":!0,"seljord.no":!0,"sigdal.no":!0,"siljan.no":!0,"sirdal.no":!0,"skaun.no":!0,"skedsmo.no":!0,"ski.no":!0,"skien.no":!0,"skiptvet.no":!0,"skjervoy.no":!0,"xn--skjervy-v1a.no":!0,"skierva.no":!0,"xn--skierv-uta.no":!0,"skjak.no":!0,"xn--skjk-soa.no":!0,"skodje.no":!0,"skanland.no":!0,"xn--sknland-fxa.no":!0,"skanit.no":!0,"xn--sknit-yqa.no":!0,"smola.no":!0,"xn--smla-hra.no":!0,"snillfjord.no":!0,"snasa.no":!0,"xn--snsa-roa.no":!0,"snoasa.no":!0,"snaase.no":!0,"xn--snase-nra.no":!0,"sogndal.no":!0,"sokndal.no":!0,"sola.no":!0,"solund.no":!0,"songdalen.no":!0,"sortland.no":!0,"spydeberg.no":!0,"stange.no":!0,"stavanger.no":!0,"steigen.no":!0,"steinkjer.no":!0,"stjordal.no":!0,"xn--stjrdal-s1a.no":!0,"stokke.no":!0,"stor-elvdal.no":!0,"stord.no":!0,"stordal.no":!0,"storfjord.no":!0,"omasvuotna.no":!0,"strand.no":!0,"stranda.no":!0,"stryn.no":!0,"sula.no":!0,"suldal.no":!0,"sund.no":!0,"sunndal.no":!0,"surnadal.no":!0,"sveio.no":!0,"svelvik.no":!0,"sykkylven.no":!0,"sogne.no":!0,"xn--sgne-gra.no":!0,"somna.no":!0,"xn--smna-gra.no":!0,"sondre-land.no":!0,"xn--sndre-land-0cb.no":!0,"sor-aurdal.no":!0,"xn--sr-aurdal-l8a.no":!0,"sor-fron.no":!0,"xn--sr-fron-q1a.no":!0,"sor-odal.no":!0,"xn--sr-odal-q1a.no":!0,"sor-varanger.no":!0,"xn--sr-varanger-ggb.no":!0,"matta-varjjat.no":!0,"xn--mtta-vrjjat-k7af.no":!0,"sorfold.no":!0,"xn--srfold-bya.no":!0,"sorreisa.no":!0,"xn--srreisa-q1a.no":!0,"sorum.no":!0,"xn--srum-gra.no":!0,"tana.no":!0,"deatnu.no":!0,"time.no":!0,"tingvoll.no":!0,"tinn.no":!0,"tjeldsund.no":!0,"dielddanuorri.no":!0,"tjome.no":!0,"xn--tjme-hra.no":!0,"tokke.no":!0,"tolga.no":!0,"torsken.no":!0,"tranoy.no":!0,"xn--trany-yua.no":!0,"tromso.no":!0,"xn--troms-zua.no":!0,"tromsa.no":!0,"romsa.no":!0,"trondheim.no":!0,"troandin.no":!0,"trysil.no":!0,"trana.no":!0,"xn--trna-woa.no":!0,"trogstad.no":!0,"xn--trgstad-r1a.no":!0,"tvedestrand.no":!0,"tydal.no":!0,"tynset.no":!0,"tysfjord.no":!0,"divtasvuodna.no":!0,"divttasvuotna.no":!0,"tysnes.no":!0,"tysvar.no":!0,"xn--tysvr-vra.no":!0,"tonsberg.no":!0,"xn--tnsberg-q1a.no":!0,"ullensaker.no":!0,"ullensvang.no":!0,"ulvik.no":!0,"utsira.no":!0,"vadso.no":!0,"xn--vads-jra.no":!0,"cahcesuolo.no":!0,"xn--hcesuolo-7ya35b.no":!0,"vaksdal.no":!0,"valle.no":!0,"vang.no":!0,"vanylven.no":!0,"vardo.no":!0,"xn--vard-jra.no":!0,"varggat.no":!0,"xn--vrggt-xqad.no":!0,"vefsn.no":!0,"vaapste.no":!0,"vega.no":!0,"vegarshei.no":!0,"xn--vegrshei-c0a.no":!0,"vennesla.no":!0,"verdal.no":!0,"verran.no":!0,"vestby.no":!0,"vestnes.no":!0,"vestre-slidre.no":!0,"vestre-toten.no":!0,"vestvagoy.no":!0,"xn--vestvgy-ixa6o.no":!0,"vevelstad.no":!0,"vik.no":!0,"vikna.no":!0,"vindafjord.no":!0,"volda.no":!0,"voss.no":!0,"varoy.no":!0,"xn--vry-yla5g.no":!0,"vagan.no":!0,"xn--vgan-qoa.no":!0,"voagat.no":!0,"vagsoy.no":!0,"xn--vgsy-qoa0j.no":!0,"vaga.no":!0,"xn--vg-yiab.no":!0,"valer.ostfold.no":!0,"xn--vler-qoa.xn--stfold-9xa.no":!0,"valer.hedmark.no":!0,"xn--vler-qoa.hedmark.no":!0,"*.np":!0,nr:!0,"biz.nr":!0,"info.nr":!0,"gov.nr":!0,"edu.nr":!0,"org.nr":!0,"net.nr":!0,"com.nr":!0,nu:!0,nz:!0,"ac.nz":!0,"co.nz":!0,"cri.nz":!0,"geek.nz":!0,"gen.nz":!0,"govt.nz":!0,"health.nz":!0,"iwi.nz":!0,"kiwi.nz":!0,"maori.nz":!0,"mil.nz":!0,"xn--mori-qsa.nz":!0,"net.nz":!0,"org.nz":!0,"parliament.nz":!0,"school.nz":!0,om:!0,"co.om":!0,"com.om":!0,"edu.om":!0,"gov.om":!0,"med.om":!0,"museum.om":!0,"net.om":!0,"org.om":!0,"pro.om":!0,org:!0,pa:!0,"ac.pa":!0,"gob.pa":!0,"com.pa":!0,"org.pa":!0,"sld.pa":!0,"edu.pa":!0,"net.pa":!0,"ing.pa":!0,"abo.pa":!0,"med.pa":!0,"nom.pa":!0,pe:!0,"edu.pe":!0,"gob.pe":!0,"nom.pe":!0,"mil.pe":!0,"org.pe":!0,"com.pe":!0,"net.pe":!0,pf:!0,"com.pf":!0,"org.pf":!0,"edu.pf":!0,"*.pg":!0,ph:!0,"com.ph":!0,"net.ph":!0,"org.ph":!0,"gov.ph":!0,"edu.ph":!0,"ngo.ph":!0,"mil.ph":!0,"i.ph":!0,pk:!0,"com.pk":!0,"net.pk":!0,"edu.pk":!0,"org.pk":!0,"fam.pk":!0,"biz.pk":!0,"web.pk":!0,"gov.pk":!0,"gob.pk":!0,"gok.pk":!0,"gon.pk":!0,"gop.pk":!0,"gos.pk":!0,"info.pk":!0,pl:!0,"com.pl":!0,"net.pl":!0,"org.pl":!0,"aid.pl":!0,"agro.pl":!0,"atm.pl":!0,"auto.pl":!0,"biz.pl":!0,"edu.pl":!0,"gmina.pl":!0,"gsm.pl":!0,"info.pl":!0,"mail.pl":!0,"miasta.pl":!0,"media.pl":!0,"mil.pl":!0,"nieruchomosci.pl":!0,"nom.pl":!0,"pc.pl":!0,"powiat.pl":!0,"priv.pl":!0,"realestate.pl":!0,"rel.pl":!0,"sex.pl":!0,"shop.pl":!0,"sklep.pl":!0,"sos.pl":!0,"szkola.pl":!0,"targi.pl":!0,"tm.pl":!0,"tourism.pl":!0,"travel.pl":!0,"turystyka.pl":!0,"gov.pl":!0,"ap.gov.pl":!0,"ic.gov.pl":!0,"is.gov.pl":!0,"us.gov.pl":!0,"kmpsp.gov.pl":!0,"kppsp.gov.pl":!0,"kwpsp.gov.pl":!0,"psp.gov.pl":!0,"wskr.gov.pl":!0,"kwp.gov.pl":!0,"mw.gov.pl":!0,"ug.gov.pl":!0,"um.gov.pl":!0,"umig.gov.pl":!0,"ugim.gov.pl":!0,"upow.gov.pl":!0,"uw.gov.pl":!0,"starostwo.gov.pl":!0,"pa.gov.pl":!0,"po.gov.pl":!0,"psse.gov.pl":!0,"pup.gov.pl":!0,"rzgw.gov.pl":!0,"sa.gov.pl":!0,"so.gov.pl":!0,"sr.gov.pl":!0,"wsa.gov.pl":!0,"sko.gov.pl":!0,"uzs.gov.pl":!0,"wiih.gov.pl":!0,"winb.gov.pl":!0,"pinb.gov.pl":!0,"wios.gov.pl":!0,"witd.gov.pl":!0,"wzmiuw.gov.pl":!0,"piw.gov.pl":!0,"wiw.gov.pl":!0,"griw.gov.pl":!0,"wif.gov.pl":!0,"oum.gov.pl":!0,"sdn.gov.pl":!0,"zp.gov.pl":!0,"uppo.gov.pl":!0,"mup.gov.pl":!0,"wuoz.gov.pl":!0,"konsulat.gov.pl":!0,"oirm.gov.pl":!0,"augustow.pl":!0,"babia-gora.pl":!0,"bedzin.pl":!0,"beskidy.pl":!0,"bialowieza.pl":!0,"bialystok.pl":!0,"bielawa.pl":!0,"bieszczady.pl":!0,"boleslawiec.pl":!0,"bydgoszcz.pl":!0,"bytom.pl":!0,"cieszyn.pl":!0,"czeladz.pl":!0,"czest.pl":!0,"dlugoleka.pl":!0,"elblag.pl":!0,"elk.pl":!0,"glogow.pl":!0,"gniezno.pl":!0,"gorlice.pl":!0,"grajewo.pl":!0,"ilawa.pl":!0,"jaworzno.pl":!0,"jelenia-gora.pl":!0,"jgora.pl":!0,"kalisz.pl":!0,"kazimierz-dolny.pl":!0,"karpacz.pl":!0,"kartuzy.pl":!0,"kaszuby.pl":!0,"katowice.pl":!0,"kepno.pl":!0,"ketrzyn.pl":!0,"klodzko.pl":!0,"kobierzyce.pl":!0,"kolobrzeg.pl":!0,"konin.pl":!0,"konskowola.pl":!0,"kutno.pl":!0,"lapy.pl":!0,"lebork.pl":!0,"legnica.pl":!0,"lezajsk.pl":!0,"limanowa.pl":!0,"lomza.pl":!0,"lowicz.pl":!0,"lubin.pl":!0,"lukow.pl":!0,"malbork.pl":!0,"malopolska.pl":!0,"mazowsze.pl":!0,"mazury.pl":!0,"mielec.pl":!0,"mielno.pl":!0,"mragowo.pl":!0,"naklo.pl":!0,"nowaruda.pl":!0,"nysa.pl":!0,"olawa.pl":!0,"olecko.pl":!0,"olkusz.pl":!0,"olsztyn.pl":!0,"opoczno.pl":!0,"opole.pl":!0,"ostroda.pl":!0,"ostroleka.pl":!0,"ostrowiec.pl":!0,"ostrowwlkp.pl":!0,"pila.pl":!0,"pisz.pl":!0,"podhale.pl":!0,"podlasie.pl":!0,"polkowice.pl":!0,"pomorze.pl":!0,"pomorskie.pl":!0,"prochowice.pl":!0,"pruszkow.pl":!0,"przeworsk.pl":!0,"pulawy.pl":!0,"radom.pl":!0,"rawa-maz.pl":!0,"rybnik.pl":!0,"rzeszow.pl":!0,"sanok.pl":!0,"sejny.pl":!0,"slask.pl":!0,"slupsk.pl":!0,"sosnowiec.pl":!0,"stalowa-wola.pl":!0,"skoczow.pl":!0,"starachowice.pl":!0,"stargard.pl":!0,"suwalki.pl":!0,"swidnica.pl":!0,"swiebodzin.pl":!0,"swinoujscie.pl":!0,"szczecin.pl":!0,"szczytno.pl":!0,"tarnobrzeg.pl":!0,"tgory.pl":!0,"turek.pl":!0,"tychy.pl":!0,"ustka.pl":!0,"walbrzych.pl":!0,"warmia.pl":!0,"warszawa.pl":!0,"waw.pl":!0,"wegrow.pl":!0,"wielun.pl":!0,"wlocl.pl":!0,"wloclawek.pl":!0,"wodzislaw.pl":!0,"wolomin.pl":!0,"wroclaw.pl":!0,"zachpomor.pl":!0,"zagan.pl":!0,"zarow.pl":!0,"zgora.pl":!0,"zgorzelec.pl":!0,pm:!0,pn:!0,"gov.pn":!0,"co.pn":!0,"org.pn":!0,"edu.pn":!0,"net.pn":!0,post:!0,pr:!0,"com.pr":!0,"net.pr":!0,"org.pr":!0,"gov.pr":!0,"edu.pr":!0,"isla.pr":!0,"pro.pr":!0,"biz.pr":!0,"info.pr":!0,"name.pr":!0,"est.pr":!0,"prof.pr":!0,"ac.pr":!0,pro:!0,"aca.pro":!0,"bar.pro":!0,"cpa.pro":!0,"jur.pro":!0,"law.pro":!0,"med.pro":!0,"eng.pro":!0,ps:!0,"edu.ps":!0,"gov.ps":!0,"sec.ps":!0,"plo.ps":!0,"com.ps":!0,"org.ps":!0,"net.ps":!0,pt:!0,"net.pt":!0,"gov.pt":!0,"org.pt":!0,"edu.pt":!0,"int.pt":!0,"publ.pt":!0,"com.pt":!0,"nome.pt":!0,pw:!0,"co.pw":!0,"ne.pw":!0,"or.pw":!0,"ed.pw":!0,"go.pw":!0,"belau.pw":!0,py:!0,"com.py":!0,"coop.py":!0,"edu.py":!0,"gov.py":!0,"mil.py":!0,"net.py":!0,"org.py":!0,qa:!0,"com.qa":!0,"edu.qa":!0,"gov.qa":!0,"mil.qa":!0,"name.qa":!0,"net.qa":!0,"org.qa":!0,"sch.qa":!0,re:!0,"com.re":!0,"asso.re":!0,"nom.re":!0,ro:!0,"com.ro":!0,"org.ro":!0,"tm.ro":!0,"nt.ro":!0,"nom.ro":!0,"info.ro":!0,"rec.ro":!0,"arts.ro":!0,"firm.ro":!0,"store.ro":!0,"www.ro":!0,rs:!0,"co.rs":!0,"org.rs":!0,"edu.rs":!0,"ac.rs":!0,"gov.rs":!0,"in.rs":!0,ru:!0,"ac.ru":!0,"com.ru":!0,"edu.ru":!0,"int.ru":!0,"net.ru":!0,"org.ru":!0,"pp.ru":!0,"adygeya.ru":!0,"altai.ru":!0,"amur.ru":!0,"arkhangelsk.ru":!0,"astrakhan.ru":!0,"bashkiria.ru":!0,"belgorod.ru":!0,"bir.ru":!0,"bryansk.ru":!0,"buryatia.ru":!0,"cbg.ru":!0,"chel.ru":!0,"chelyabinsk.ru":!0,"chita.ru":!0,"chukotka.ru":!0,"chuvashia.ru":!0,"dagestan.ru":!0,"dudinka.ru":!0,"e-burg.ru":!0,"grozny.ru":!0,"irkutsk.ru":!0,"ivanovo.ru":!0,"izhevsk.ru":!0,"jar.ru":!0,"joshkar-ola.ru":!0,"kalmykia.ru":!0,"kaluga.ru":!0,"kamchatka.ru":!0,"karelia.ru":!0,"kazan.ru":!0,"kchr.ru":!0,"kemerovo.ru":!0,"khabarovsk.ru":!0,"khakassia.ru":!0,"khv.ru":!0,"kirov.ru":!0,"koenig.ru":!0,"komi.ru":!0,"kostroma.ru":!0,"krasnoyarsk.ru":!0,"kuban.ru":!0,"kurgan.ru":!0,"kursk.ru":!0,"lipetsk.ru":!0,"magadan.ru":!0,"mari.ru":!0,"mari-el.ru":!0,"marine.ru":!0,"mordovia.ru":!0,"msk.ru":!0,"murmansk.ru":!0,"nalchik.ru":!0,"nnov.ru":!0,"nov.ru":!0,"novosibirsk.ru":!0,"nsk.ru":!0,"omsk.ru":!0,"orenburg.ru":!0,"oryol.ru":!0,"palana.ru":!0,"penza.ru":!0,"perm.ru":!0,"ptz.ru":!0,"rnd.ru":!0,"ryazan.ru":!0,"sakhalin.ru":!0,"samara.ru":!0,"saratov.ru":!0,"simbirsk.ru":!0,"smolensk.ru":!0,"spb.ru":!0,"stavropol.ru":!0,"stv.ru":!0,"surgut.ru":!0,"tambov.ru":!0,"tatarstan.ru":!0,"tom.ru":!0,"tomsk.ru":!0,"tsaritsyn.ru":!0,"tsk.ru":!0,"tula.ru":!0,"tuva.ru":!0,"tver.ru":!0,"tyumen.ru":!0,"udm.ru":!0,"udmurtia.ru":!0,"ulan-ude.ru":!0,"vladikavkaz.ru":!0,"vladimir.ru":!0,"vladivostok.ru":!0,"volgograd.ru":!0,"vologda.ru":!0,"voronezh.ru":!0,"vrn.ru":!0,"vyatka.ru":!0,"yakutia.ru":!0,"yamal.ru":!0,"yaroslavl.ru":!0,"yekaterinburg.ru":!0,"yuzhno-sakhalinsk.ru":!0,"amursk.ru":!0,"baikal.ru":!0,"cmw.ru":!0,"fareast.ru":!0,"jamal.ru":!0,"kms.ru":!0,"k-uralsk.ru":!0,"kustanai.ru":!0,"kuzbass.ru":!0,"magnitka.ru":!0,"mytis.ru":!0,"nakhodka.ru":!0,"nkz.ru":!0,"norilsk.ru":!0,"oskol.ru":!0,"pyatigorsk.ru":!0,"rubtsovsk.ru":!0,"snz.ru":!0,"syzran.ru":!0,"vdonsk.ru":!0,"zgrad.ru":!0,"gov.ru":!0,"mil.ru":!0,"test.ru":!0,rw:!0,"gov.rw":!0,"net.rw":!0,"edu.rw":!0,"ac.rw":!0,"com.rw":!0,"co.rw":!0,"int.rw":!0,"mil.rw":!0,"gouv.rw":!0,sa:!0,"com.sa":!0,"net.sa":!0,"org.sa":!0,"gov.sa":!0,"med.sa":!0,"pub.sa":!0,"edu.sa":!0,"sch.sa":!0,sb:!0,"com.sb":!0,"edu.sb":!0,"gov.sb":!0,"net.sb":!0,"org.sb":!0,sc:!0,"com.sc":!0,"gov.sc":!0,"net.sc":!0,"org.sc":!0,"edu.sc":!0,sd:!0,"com.sd":!0,"net.sd":!0,"org.sd":!0,"edu.sd":!0,"med.sd":!0,"tv.sd":!0,"gov.sd":!0,"info.sd":!0,se:!0,"a.se":!0,"ac.se":!0,"b.se":!0,"bd.se":!0,"brand.se":!0,"c.se":!0,"d.se":!0,"e.se":!0,"f.se":!0,"fh.se":!0,"fhsk.se":!0,"fhv.se":!0,"g.se":!0,"h.se":!0,"i.se":!0,"k.se":!0,"komforb.se":!0,"kommunalforbund.se":!0,"komvux.se":!0,"l.se":!0,"lanbib.se":!0,"m.se":!0,"n.se":!0,"naturbruksgymn.se":!0,"o.se":!0,"org.se":!0,"p.se":!0,"parti.se":!0,"pp.se":!0,"press.se":!0,"r.se":!0,"s.se":!0,"t.se":!0,"tm.se":!0,"u.se":!0,"w.se":!0,"x.se":!0,"y.se":!0,"z.se":!0,sg:!0,"com.sg":!0,"net.sg":!0,"org.sg":!0,"gov.sg":!0,"edu.sg":!0,"per.sg":!0,sh:!0,"com.sh":!0,"net.sh":!0,"gov.sh":!0,"org.sh":!0,"mil.sh":!0,si:!0,sj:!0,sk:!0,sl:!0,"com.sl":!0,"net.sl":!0,"edu.sl":!0,"gov.sl":!0,"org.sl":!0,sm:!0,sn:!0,"art.sn":!0,"com.sn":!0,"edu.sn":!0,"gouv.sn":!0,"org.sn":!0,"perso.sn":!0,"univ.sn":!0,so:!0,"com.so":!0,"net.so":!0,"org.so":!0,sr:!0,st:!0,"co.st":!0,"com.st":!0,"consulado.st":!0,"edu.st":!0,"embaixada.st":!0,"gov.st":!0,"mil.st":!0,"net.st":!0,"org.st":!0,"principe.st":!0,"saotome.st":!0,"store.st":!0,su:!0,"adygeya.su":!0,"arkhangelsk.su":!0,"balashov.su":!0,"bashkiria.su":!0,"bryansk.su":!0,"dagestan.su":!0,"grozny.su":!0,"ivanovo.su":!0,"kalmykia.su":!0,"kaluga.su":!0,"karelia.su":!0,"khakassia.su":!0,"krasnodar.su":!0,"kurgan.su":!0,"lenug.su":!0,"mordovia.su":!0,"msk.su":!0,"murmansk.su":!0,"nalchik.su":!0,"nov.su":!0,"obninsk.su":!0,"penza.su":!0,"pokrovsk.su":!0,"sochi.su":!0,"spb.su":!0,"togliatti.su":!0,"troitsk.su":!0,"tula.su":!0,"tuva.su":!0,"vladikavkaz.su":!0,"vladimir.su":!0,"vologda.su":!0,sv:!0,"com.sv":!0,"edu.sv":!0,"gob.sv":!0,"org.sv":!0,"red.sv":!0,sx:!0,"gov.sx":!0,sy:!0,"edu.sy":!0,"gov.sy":!0,"net.sy":!0,"mil.sy":!0,"com.sy":!0,"org.sy":!0,sz:!0,"co.sz":!0,"ac.sz":!0,"org.sz":!0,tc:!0,td:!0,tel:!0,tf:!0,tg:!0,th:!0,"ac.th":!0,"co.th":!0,"go.th":!0,"in.th":!0,"mi.th":!0,"net.th":!0,"or.th":!0,tj:!0,"ac.tj":!0,"biz.tj":!0,"co.tj":!0,"com.tj":!0,"edu.tj":!0,"go.tj":!0,"gov.tj":!0,"int.tj":!0,"mil.tj":!0,"name.tj":!0,"net.tj":!0,"nic.tj":!0,"org.tj":!0,"test.tj":!0,"web.tj":!0,tk:!0,tl:!0,"gov.tl":!0,tm:!0,"com.tm":!0,"co.tm":!0,"org.tm":!0,"net.tm":!0,"nom.tm":!0,"gov.tm":!0,"mil.tm":!0,"edu.tm":!0,tn:!0,"com.tn":!0,"ens.tn":!0,"fin.tn":!0,"gov.tn":!0,"ind.tn":!0,"intl.tn":!0,"nat.tn":!0,"net.tn":!0,"org.tn":!0,"info.tn":!0,"perso.tn":!0,"tourism.tn":!0,"edunet.tn":!0,"rnrt.tn":!0,"rns.tn":!0,"rnu.tn":!0,"mincom.tn":!0,"agrinet.tn":!0,"defense.tn":!0,"turen.tn":!0,to:!0,"com.to":!0,"gov.to":!0,"net.to":!0,"org.to":!0,"edu.to":!0,"mil.to":!0,tp:!0,tr:!0,"com.tr":!0,"info.tr":!0,"biz.tr":!0,"net.tr":!0,"org.tr":!0,"web.tr":!0,"gen.tr":!0,"tv.tr":!0,"av.tr":!0,"dr.tr":!0,"bbs.tr":!0,"name.tr":!0,"tel.tr":!0,"gov.tr":!0,"bel.tr":!0,"pol.tr":!0,"mil.tr":!0,"k12.tr":!0,"edu.tr":!0,"kep.tr":!0,"nc.tr":!0,"gov.nc.tr":!0,travel:!0,tt:!0,"co.tt":!0,"com.tt":!0,"org.tt":!0,"net.tt":!0,"biz.tt":!0,"info.tt":!0,"pro.tt":!0,"int.tt":!0,"coop.tt":!0,"jobs.tt":!0,"mobi.tt":!0,"travel.tt":!0,"museum.tt":!0,"aero.tt":!0,"name.tt":!0,"gov.tt":!0,"edu.tt":!0,tv:!0,tw:!0,"edu.tw":!0,"gov.tw":!0,"mil.tw":!0,"com.tw":!0,"net.tw":!0,"org.tw":!0,"idv.tw":!0,"game.tw":!0,"ebiz.tw":!0,"club.tw":!0,"xn--zf0ao64a.tw":!0,"xn--uc0atv.tw":!0,"xn--czrw28b.tw":!0,tz:!0,"ac.tz":!0,"co.tz":!0,"go.tz":!0,"hotel.tz":!0,"info.tz":!0,"me.tz":!0,"mil.tz":!0,"mobi.tz":!0,"ne.tz":!0,"or.tz":!0,"sc.tz":!0,"tv.tz":!0,ua:!0,"com.ua":!0,"edu.ua":!0,"gov.ua":!0,"in.ua":!0,"net.ua":!0,"org.ua":!0,"cherkassy.ua":!0,"cherkasy.ua":!0,"chernigov.ua":!0,"chernihiv.ua":!0,"chernivtsi.ua":!0,"chernovtsy.ua":!0,"ck.ua":!0,"cn.ua":!0,"cr.ua":!0,"crimea.ua":!0,"cv.ua":!0,"dn.ua":!0,"dnepropetrovsk.ua":!0,"dnipropetrovsk.ua":!0,"dominic.ua":!0,"donetsk.ua":!0,"dp.ua":!0,"if.ua":!0,"ivano-frankivsk.ua":!0,"kh.ua":!0,"kharkiv.ua":!0,"kharkov.ua":!0,"kherson.ua":!0,"khmelnitskiy.ua":!0,"khmelnytskyi.ua":!0,"kiev.ua":!0,"kirovograd.ua":!0,"km.ua":!0,"kr.ua":!0,"krym.ua":!0,"ks.ua":!0,"kv.ua":!0,"kyiv.ua":!0,"lg.ua":!0,"lt.ua":!0,"lugansk.ua":!0,"lutsk.ua":!0,"lv.ua":!0,"lviv.ua":!0,"mk.ua":!0,"mykolaiv.ua":!0,"nikolaev.ua":!0,"od.ua":!0,"odesa.ua":!0,"odessa.ua":!0,"pl.ua":!0,"poltava.ua":!0,"rivne.ua":!0,"rovno.ua":!0,"rv.ua":!0,"sb.ua":!0,"sebastopol.ua":!0,"sevastopol.ua":!0,"sm.ua":!0,"sumy.ua":!0,"te.ua":!0,"ternopil.ua":!0,"uz.ua":!0,"uzhgorod.ua":!0,"vinnica.ua":!0,"vinnytsia.ua":!0,"vn.ua":!0,"volyn.ua":!0,"yalta.ua":!0,"zaporizhzhe.ua":!0,"zaporizhzhia.ua":!0,"zhitomir.ua":!0,"zhytomyr.ua":!0,"zp.ua":!0,"zt.ua":!0,ug:!0,"co.ug":!0,"or.ug":!0,"ac.ug":!0,"sc.ug":!0,"go.ug":!0,"ne.ug":!0,"com.ug":!0,"org.ug":!0,uk:!0,"ac.uk":!0,"co.uk":!0,"gov.uk":!0,"ltd.uk":!0,"me.uk":!0,"net.uk":!0,"nhs.uk":!0,"org.uk":!0,"plc.uk":!0,"police.uk":!0,"*.sch.uk":!0,us:!0,"dni.us":!0,"fed.us":!0,"isa.us":!0,"kids.us":!0,"nsn.us":!0,"ak.us":!0,"al.us":!0,"ar.us":!0,"as.us":!0,"az.us":!0,"ca.us":!0,"co.us":!0,"ct.us":!0,"dc.us":!0,"de.us":!0,"fl.us":!0,"ga.us":!0,"gu.us":!0,"hi.us":!0,"ia.us":!0,"id.us":!0,"il.us":!0,"in.us":!0,"ks.us":!0,"ky.us":!0,"la.us":!0,"ma.us":!0,"md.us":!0,"me.us":!0,"mi.us":!0,"mn.us":!0,"mo.us":!0,"ms.us":!0,"mt.us":!0,"nc.us":!0,"nd.us":!0,"ne.us":!0,"nh.us":!0,"nj.us":!0,"nm.us":!0,"nv.us":!0,"ny.us":!0,"oh.us":!0,"ok.us":!0,"or.us":!0,"pa.us":!0,"pr.us":!0,"ri.us":!0,"sc.us":!0,"sd.us":!0,"tn.us":!0,"tx.us":!0,"ut.us":!0,"vi.us":!0,"vt.us":!0,"va.us":!0,"wa.us":!0,"wi.us":!0,"wv.us":!0,"wy.us":!0,"k12.ak.us":!0,"k12.al.us":!0,"k12.ar.us":!0,"k12.as.us":!0,"k12.az.us":!0,"k12.ca.us":!0,"k12.co.us":!0,"k12.ct.us":!0,"k12.dc.us":!0,"k12.de.us":!0,"k12.fl.us":!0,"k12.ga.us":!0,"k12.gu.us":!0,"k12.ia.us":!0,"k12.id.us":!0,"k12.il.us":!0,"k12.in.us":!0,"k12.ks.us":!0,"k12.ky.us":!0,"k12.la.us":!0,"k12.ma.us":!0,"k12.md.us":!0,"k12.me.us":!0,"k12.mi.us":!0,"k12.mn.us":!0,"k12.mo.us":!0,"k12.ms.us":!0,"k12.mt.us":!0,"k12.nc.us":!0,"k12.ne.us":!0,"k12.nh.us":!0,"k12.nj.us":!0,"k12.nm.us":!0,"k12.nv.us":!0,"k12.ny.us":!0,"k12.oh.us":!0,"k12.ok.us":!0,"k12.or.us":!0,"k12.pa.us":!0,"k12.pr.us":!0,"k12.ri.us":!0,"k12.sc.us":!0,"k12.tn.us":!0,"k12.tx.us":!0,"k12.ut.us":!0,"k12.vi.us":!0,"k12.vt.us":!0,"k12.va.us":!0,"k12.wa.us":!0,"k12.wi.us":!0,"k12.wy.us":!0,"cc.ak.us":!0,"cc.al.us":!0,"cc.ar.us":!0,"cc.as.us":!0,"cc.az.us":!0,"cc.ca.us":!0,"cc.co.us":!0,"cc.ct.us":!0,"cc.dc.us":!0,"cc.de.us":!0,"cc.fl.us":!0,"cc.ga.us":!0,"cc.gu.us":!0,"cc.hi.us":!0,"cc.ia.us":!0,"cc.id.us":!0,"cc.il.us":!0,"cc.in.us":!0,"cc.ks.us":!0,"cc.ky.us":!0,"cc.la.us":!0,"cc.ma.us":!0,"cc.md.us":!0,"cc.me.us":!0,"cc.mi.us":!0,"cc.mn.us":!0,"cc.mo.us":!0,"cc.ms.us":!0,"cc.mt.us":!0,"cc.nc.us":!0,"cc.nd.us":!0,"cc.ne.us":!0,"cc.nh.us":!0,"cc.nj.us":!0,"cc.nm.us":!0,"cc.nv.us":!0,"cc.ny.us":!0,"cc.oh.us":!0,"cc.ok.us":!0,"cc.or.us":!0,"cc.pa.us":!0,"cc.pr.us":!0,"cc.ri.us":!0,"cc.sc.us":!0,"cc.sd.us":!0,"cc.tn.us":!0,"cc.tx.us":!0,"cc.ut.us":!0,"cc.vi.us":!0,"cc.vt.us":!0,"cc.va.us":!0,"cc.wa.us":!0,"cc.wi.us":!0,"cc.wv.us":!0,"cc.wy.us":!0,"lib.ak.us":!0,"lib.al.us":!0,"lib.ar.us":!0,"lib.as.us":!0,"lib.az.us":!0,"lib.ca.us":!0,"lib.co.us":!0,"lib.ct.us":!0,"lib.dc.us":!0,"lib.de.us":!0,"lib.fl.us":!0,"lib.ga.us":!0,"lib.gu.us":!0,"lib.hi.us":!0,"lib.ia.us":!0,"lib.id.us":!0,"lib.il.us":!0,"lib.in.us":!0,"lib.ks.us":!0,"lib.ky.us":!0,"lib.la.us":!0,"lib.ma.us":!0,"lib.md.us":!0,"lib.me.us":!0,"lib.mi.us":!0,"lib.mn.us":!0,"lib.mo.us":!0,"lib.ms.us":!0,"lib.mt.us":!0,"lib.nc.us":!0,"lib.nd.us":!0,"lib.ne.us":!0,"lib.nh.us":!0,"lib.nj.us":!0,"lib.nm.us":!0,"lib.nv.us":!0,"lib.ny.us":!0,"lib.oh.us":!0,"lib.ok.us":!0,"lib.or.us":!0,"lib.pa.us":!0,"lib.pr.us":!0,"lib.ri.us":!0,"lib.sc.us":!0,"lib.sd.us":!0,"lib.tn.us":!0,"lib.tx.us":!0,"lib.ut.us":!0,"lib.vi.us":!0,"lib.vt.us":!0,"lib.va.us":!0,"lib.wa.us":!0,"lib.wi.us":!0,"lib.wy.us":!0,"pvt.k12.ma.us":!0,"chtr.k12.ma.us":!0,"paroch.k12.ma.us":!0,uy:!0,"com.uy":!0,"edu.uy":!0,"gub.uy":!0,"mil.uy":!0,"net.uy":!0,"org.uy":!0,uz:!0,"co.uz":!0,"com.uz":!0,"net.uz":!0,"org.uz":!0,va:!0,vc:!0,"com.vc":!0,"net.vc":!0,"org.vc":!0,"gov.vc":!0,"mil.vc":!0,"edu.vc":!0,ve:!0,"arts.ve":!0,"co.ve":!0,"com.ve":!0,"e12.ve":!0,"edu.ve":!0,"firm.ve":!0,"gob.ve":!0,"gov.ve":!0,"info.ve":!0,"int.ve":!0,"mil.ve":!0,"net.ve":!0,"org.ve":!0,"rec.ve":!0,"store.ve":!0,"tec.ve":!0,"web.ve":!0,vg:!0,vi:!0,"co.vi":!0,"com.vi":!0,"k12.vi":!0,"net.vi":!0,"org.vi":!0,vn:!0,"com.vn":!0,"net.vn":!0,"org.vn":!0,"edu.vn":!0,"gov.vn":!0,"int.vn":!0,"ac.vn":!0,"biz.vn":!0,"info.vn":!0,"name.vn":!0,"pro.vn":!0,"health.vn":!0,vu:!0,"com.vu":!0,"edu.vu":!0,"net.vu":!0,"org.vu":!0,wf:!0,ws:!0,"com.ws":!0,"net.ws":!0,"org.ws":!0,"gov.ws":!0,"edu.ws":!0,yt:!0,"xn--mgbaam7a8h":!0,"xn--y9a3aq":!0,"xn--54b7fta0cc":!0,"xn--90ais":!0,"xn--fiqs8s":!0,"xn--fiqz9s":!0,"xn--lgbbat1ad8j":!0,"xn--wgbh1c":!0,"xn--node":!0,"xn--qxam":!0,"xn--j6w193g":!0,"xn--h2brj9c":!0,"xn--mgbbh1a71e":!0,"xn--fpcrj9c3d":!0,"xn--gecrj9c":!0,"xn--s9brj9c":!0,"xn--45brj9c":!0,"xn--xkc2dl3a5ee0h":!0,"xn--mgba3a4f16a":!0,"xn--mgba3a4fra":!0,"xn--mgbtx2b":!0,"xn--mgbayh7gpa":!0,"xn--3e0b707e":!0,"xn--80ao21a":!0,"xn--fzc2c9e2c":!0,"xn--xkc2al3hye2a":!0,"xn--mgbc0a9azcg":!0,"xn--d1alf":!0,"xn--l1acc":!0,"xn--mix891f":!0,"xn--mix082f":!0,"xn--mgbx4cd0ab":!0,"xn--mgb9awbf":!0,"xn--mgbai9azgqp6j":!0,"xn--mgbai9a5eva00b":!0,"xn--ygbi2ammx":!0,"xn--90a3ac":!0,"xn--o1ac.xn--90a3ac":!0,"xn--c1avg.xn--90a3ac":!0,"xn--90azh.xn--90a3ac":!0,"xn--d1at.xn--90a3ac":!0,"xn--o1ach.xn--90a3ac":!0,"xn--80au.xn--90a3ac":!0,"xn--p1ai":!0,"xn--wgbl6a":!0,"xn--mgberp4a5d4ar":!0,"xn--mgberp4a5d4a87g":!0,"xn--mgbqly7c0a67fbc":!0,"xn--mgbqly7cvafr":!0,"xn--mgbpl2fh":!0,"xn--yfro4i67o":!0,"xn--clchc0ea0b2g2a9gcd":!0,"xn--ogbpf8fl":!0,"xn--mgbtf8fl":!0,"xn--o3cw4h":!0,"xn--pgbs0dh":!0,"xn--kpry57d":!0,"xn--kprw13d":!0,"xn--nnx388a":!0,"xn--j1amh":!0,"xn--mgb2ddes":!0,xxx:!0,"*.ye":!0,"ac.za":!0,"agrica.za":!0,"alt.za":!0,"co.za":!0,"edu.za":!0,"gov.za":!0,"grondar.za":!0,"law.za":!0,"mil.za":!0,"net.za":!0,"ngo.za":!0,"nis.za":!0,"nom.za":!0,"org.za":!0,"school.za":!0,"tm.za":!0,"web.za":!0,"*.zm":!0,"*.zw":!0,aaa:!0,aarp:!0,abarth:!0,abb:!0,abbott:!0,abbvie:!0,abc:!0,able:!0,abogado:!0,abudhabi:!0,academy:!0,accenture:!0,accountant:!0,accountants:!0,aco:!0,active:!0,actor:!0,adac:!0,ads:!0,adult:!0,aeg:!0,aetna:!0,afamilycompany:!0,afl:!0,africa:!0,africamagic:!0,agakhan:!0,agency:!0,aig:!0,aigo:!0,airbus:!0,airforce:!0,airtel:!0,akdn:!0,alfaromeo:!0,alibaba:!0,alipay:!0,allfinanz:!0,allstate:!0,ally:!0,alsace:!0,alstom:!0,americanexpress:!0,americanfamily:!0,amex:!0,amfam:!0,amica:!0,amsterdam:!0,analytics:!0,android:!0,anquan:!0,anz:!0,aol:!0,apartments:!0,app:!0,apple:!0,aquarelle:!0,aramco:!0,archi:!0,army:!0,arte:!0,asda:!0,associates:!0,athleta:!0,attorney:!0,auction:!0,audi:!0,audible:!0,audio:!0,auspost:!0,author:!0,auto:!0,autos:!0,avianca:!0,aws:!0,axa:!0,azure:!0,baby:!0,baidu:!0,banamex:!0,bananarepublic:!0,band:!0,bank:!0,bar:!0,barcelona:!0,barclaycard:!0,barclays:!0,barefoot:!0,bargains:!0,basketball:!0,bauhaus:!0,bayern:!0,bbc:!0,bbt:!0,bbva:!0,bcg:!0,bcn:!0,beats:!0,beer:!0,bentley:!0,berlin:!0,best:!0,bestbuy:!0,bet:!0,bharti:!0,bible:!0,bid:!0,bike:!0,bing:!0,bingo:!0,bio:!0,black:!0,blackfriday:!0,blanco:!0,blockbuster:!0,blog:!0,bloomberg:!0,blue:!0,bms:!0,bmw:!0,bnl:!0,bnpparibas:!0,boats:!0,boehringer:!0,bofa:!0,bom:!0,bond:!0,boo:!0,book:!0,booking:!0,boots:!0,bosch:!0,bostik:!0,bot:!0,boutique:!0,bradesco:!0,bridgestone:!0,broadway:!0,broker:!0,brother:!0,brussels:!0,budapest:!0,bugatti:!0,build:!0,builders:!0,business:!0,buy:!0,buzz:!0,bzh:!0,cab:!0,cafe:!0,cal:!0,call:!0,calvinklein:!0,camera:!0,camp:!0,cancerresearch:!0,canon:!0,capetown:!0,capital:!0,capitalone:!0,car:!0,caravan:!0,cards:!0,care:!0,career:!0,careers:!0,cars:!0,cartier:!0,casa:!0,case:!0,caseih:!0,cash:!0,casino:!0,catering:!0,cba:!0,cbn:!0,cbre:!0,cbs:!0,ceb:!0,center:!0,ceo:!0,cern:!0,cfa:!0,cfd:!0,chanel:!0,channel:!0,chase:!0,chat:!0,cheap:!0,chintai:!0,chloe:!0,christmas:!0,chrome:!0,chrysler:!0,church:!0,cipriani:!0,circle:!0,cisco:!0,citadel:!0,citi:!0,citic:!0,city:!0,cityeats:!0,claims:!0,cleaning:!0,click:!0,clinic:!0,clothing:!0,cloud:!0,club:!0,clubmed:!0,coach:!0,codes:!0,coffee:!0,college:!0,cologne:!0,comcast:!0,commbank:!0,community:!0,company:!0,computer:!0,comsec:!0,condos:!0,construction:!0,consulting:!0,contact:!0,contractors:!0,cooking:!0,cookingchannel:!0,cool:!0,corsica:!0,country:!0,coupon:!0,coupons:!0,courses:!0,credit:!0,creditcard:!0,creditunion:!0,cricket:!0,crown:!0,crs:!0,cruises:!0,csc:!0,cuisinella:!0,cymru:!0,cyou:!0,dabur:!0,dad:!0,dance:!0,date:!0,dating:!0,datsun:!0,day:!0,dclk:!0,dds:!0,deal:!0,dealer:!0,deals:!0,degree:!0,delivery:!0,dell:!0,deloitte:!0,delta:!0,democrat:!0,dental:!0,dentist:!0,desi:!0,design:!0,dev:!0,dhl:!0,diamonds:!0,diet:!0,digital:!0,direct:!0,directory:!0,discount:!0,discover:!0,dish:!0,dnp:!0,docs:!0,dodge:!0,dog:!0,doha:!0,domains:!0,doosan:!0,dot:!0,download:!0,drive:!0,dstv:!0,dtv:!0,dubai:!0,duck:!0,dunlop:!0,duns:!0,dupont:!0,durban:!0,dvag:!0,dwg:!0,earth:!0,eat:!0,edeka:!0,education:!0,email:!0,emerck:!0,emerson:!0,energy:!0,engineer:!0,engineering:!0,enterprises:!0,epost:!0,epson:!0,equipment:!0,ericsson:!0,erni:!0,esq:!0,estate:!0,esurance:!0,etisalat:!0,eurovision:!0,eus:!0,events:!0,everbank:!0,exchange:!0,expert:!0,exposed:!0,express:!0,extraspace:!0,fage:!0,fail:!0,fairwinds:!0,faith:!0,family:!0,fan:!0,fans:!0,farm:!0,farmers:!0,fashion:!0,fast:!0,fedex:!0,feedback:!0,ferrari:!0,ferrero:!0,fiat:!0,fidelity:!0,fido:!0,film:!0,final:!0,finance:!0,financial:!0,fire:!0,firestone:!0,firmdale:!0,fish:!0,fishing:!0,fit:!0,fitness:!0,flickr:!0,flights:!0,flir:!0,florist:!0,flowers:!0,flsmidth:!0,fly:!0,foo:!0,foodnetwork:!0,football:!0,ford:!0,forex:!0,forsale:!0,forum:!0,foundation:!0,fox:!0,fresenius:!0,frl:!0,frogans:!0,frontdoor:!0,frontier:!0,ftr:!0,fujitsu:!0,fujixerox:!0,fund:!0,furniture:!0,futbol:!0,fyi:!0,gal:!0,gallery:!0,gallo:!0,gallup:!0,game:!0,games:!0,gap:!0,garden:!0,gbiz:!0,gdn:!0,gea:!0,gent:!0,genting:!0,george:!0,ggee:!0,gift:!0,gifts:!0,gives:!0,giving:!0,glade:!0,glass:!0,gle:!0,global:!0,globo:!0,gmail:!0,gmo:!0,gmx:!0,godaddy:!0,gold:!0,goldpoint:!0,golf:!0,goo:!0,goodhands:!0,goodyear:!0,goog:!0,google:!0,gop:!0,got:!0,gotv:!0,grainger:!0,graphics:!0,gratis:!0,green:!0,gripe:!0,group:!0,guardian:!0,gucci:!0,guge:!0,guide:!0,guitars:!0,guru:!0,hamburg:!0,hangout:!0,haus:!0,hbo:!0,hdfc:!0,hdfcbank:!0,health:!0,healthcare:!0,help:!0,helsinki:!0,here:!0,hermes:!0,hgtv:!0,hiphop:!0,hisamitsu:!0,hitachi:!0,hiv:!0,hkt:!0,hockey:!0,holdings:!0,holiday:!0,homedepot:!0,homegoods:!0,homes:!0,homesense:!0,honda:!0,honeywell:!0,horse:!0,host:!0,hosting:!0,hot:!0,hoteles:!0,hotmail:!0,house:!0,how:!0,hsbc:!0,htc:!0,hughes:!0,hyatt:!0,hyundai:!0,ibm:!0,icbc:!0,ice:!0,icu:!0,ieee:!0,ifm:!0,iinet:!0,ikano:!0,imamat:!0,imdb:!0,immo:!0,immobilien:!0,industries:!0,infiniti:!0,ing:!0,ink:!0,institute:!0,insurance:!0,insure:!0,intel:!0,international:!0,intuit:!0,investments:!0,ipiranga:!0,irish:!0,iselect:!0,ismaili:!0,ist:!0,istanbul:!0,itau:!0,itv:!0,iveco:!0,iwc:!0,jaguar:!0,java:!0,jcb:!0,jcp:!0,jeep:!0,jetzt:!0,jewelry:!0,jio:!0,jlc:!0,jll:!0,jmp:!0,jnj:!0,joburg:!0,jot:!0,joy:!0,jpmorgan:!0,jprs:!0,juegos:!0,juniper:!0,kaufen:!0,kddi:!0,kerryhotels:!0,kerrylogistics:!0,kerryproperties:!0,kfh:!0,kia:!0,kim:!0,kinder:!0,kindle:!0,kitchen:!0,kiwi:!0,koeln:!0,komatsu:!0,kosher:!0,kpmg:!0,kpn:!0,krd:!0,kred:!0,kuokgroup:!0,kyknet:!0,kyoto:!0,lacaixa:!0,ladbrokes:!0,lamborghini:!0,lancaster:!0,lancia:!0,lancome:!0,land:!0,landrover:!0,lanxess:!0,lasalle:!0,lat:!0,latino:!0,latrobe:!0,law:!0,lawyer:!0,lds:!0,lease:!0,leclerc:!0,lefrak:!0,legal:!0,lego:!0,lexus:!0,lgbt:!0,liaison:!0,lidl:!0,life:!0,lifeinsurance:!0,lifestyle:!0,lighting:!0,like:!0,lilly:!0,limited:!0,limo:!0,lincoln:!0,linde:!0,link:!0,lipsy:!0,live:!0,living:!0,lixil:!0,loan:!0,loans:!0,locker:!0,locus:!0,loft:!0,lol:!0,london:!0,lotte:!0,lotto:!0,love:!0,lpl:!0,lplfinancial:!0,ltd:!0,ltda:!0,lundbeck:!0,lupin:!0,luxe:!0,luxury:!0,macys:!0,madrid:!0,maif:!0,maison:!0,makeup:!0,man:!0,management:!0,mango:!0,market:!0,marketing:!0,markets:!0,marriott:!0,marshalls:!0,maserati:!0,mattel:!0,mba:!0,mcd:!0,mcdonalds:!0,mckinsey:!0,med:!0,media:!0,meet:!0,melbourne:!0,meme:!0,memorial:!0,men:!0,menu:!0,meo:!0,metlife:!0,miami:!0,microsoft:!0,mini:!0,mint:!0,mit:!0,mitsubishi:!0,mlb:!0,mls:!0,mma:!0,mnet:!0,mobily:!0,moda:!0,moe:!0,moi:!0,mom:!0,monash:!0,money:!0,monster:!0,montblanc:!0,mopar:!0,mormon:!0,mortgage:!0,moscow:!0,moto:!0,motorcycles:!0,mov:!0,movie:!0,movistar:!0,msd:!0,mtn:!0,mtpc:!0,mtr:!0,multichoice:!0,mutual:!0,mutuelle:!0,mzansimagic:!0,nab:!0,nadex:!0,nagoya:!0,naspers:!0,nationwide:!0,natura:!0,navy:!0,nba:!0,nec:!0,netbank:!0,netflix:!0,network:!0,neustar:!0,new:!0,newholland:!0,news:!0,next:!0,nextdirect:!0,nexus:!0,nfl:!0,ngo:!0,nhk:!0,nico:!0,nike:!0,nikon:!0,ninja:!0,nissan:!0,nokia:!0,northwesternmutual:!0,norton:!0,now:!0,nowruz:!0,nowtv:!0,nra:!0,nrw:!0,ntt:!0,nyc:!0,obi:!0,observer:!0,off:!0,office:!0,okinawa:!0,olayan:!0,olayangroup:!0,oldnavy:!0,ollo:!0,omega:!0,one:!0,ong:!0,onl:!0,online:!0,onyourside:!0,ooo:!0,open:!0,oracle:!0,orange:!0,organic:!0,orientexpress:!0,osaka:!0,otsuka:!0,ott:!0,ovh:!0,page:!0,pamperedchef:!0,panasonic:!0,panerai:!0,paris:!0,pars:!0,partners:!0,parts:!0,party:!0,passagens:!0,pay:!0,payu:!0,pccw:!0,pet:!0,pfizer:!0,pharmacy:!0,philips:!0,photo:!0,photography:!0,photos:!0,physio:!0,piaget:!0,pics:!0,pictet:!0,pictures:!0,pid:!0,pin:!0,ping:!0,pink:!0,pioneer:!0,pizza:!0,place:!0,play:!0,playstation:!0,plumbing:!0,plus:!0,pnc:!0,pohl:!0,poker:!0,politie:!0,porn:!0,pramerica:!0,praxi:!0,press:!0,prime:!0,prod:!0,productions:!0,prof:!0,progressive:!0,promo:!0,properties:!0,property:!0,protection:!0,pru:!0,prudential:!0, -pub:!0,qpon:!0,quebec:!0,quest:!0,qvc:!0,racing:!0,raid:!0,read:!0,realestate:!0,realtor:!0,realty:!0,recipes:!0,red:!0,redstone:!0,redumbrella:!0,rehab:!0,reise:!0,reisen:!0,reit:!0,reliance:!0,ren:!0,rent:!0,rentals:!0,repair:!0,report:!0,republican:!0,rest:!0,restaurant:!0,review:!0,reviews:!0,rexroth:!0,rich:!0,richardli:!0,ricoh:!0,rightathome:!0,ril:!0,rio:!0,rip:!0,rocher:!0,rocks:!0,rodeo:!0,rogers:!0,room:!0,rsvp:!0,ruhr:!0,run:!0,rwe:!0,ryukyu:!0,saarland:!0,safe:!0,safety:!0,sakura:!0,sale:!0,salon:!0,samsclub:!0,samsung:!0,sandvik:!0,sandvikcoromant:!0,sanofi:!0,sap:!0,sapo:!0,sarl:!0,sas:!0,save:!0,saxo:!0,sbi:!0,sbs:!0,sca:!0,scb:!0,schaeffler:!0,schmidt:!0,scholarships:!0,school:!0,schule:!0,schwarz:!0,science:!0,scjohnson:!0,scor:!0,scot:!0,seat:!0,secure:!0,security:!0,seek:!0,sener:!0,services:!0,ses:!0,seven:!0,sew:!0,sex:!0,sexy:!0,sfr:!0,shangrila:!0,sharp:!0,shaw:!0,shell:!0,shia:!0,shiksha:!0,shoes:!0,shouji:!0,show:!0,showtime:!0,shriram:!0,silk:!0,sina:!0,singles:!0,site:!0,ski:!0,skin:!0,sky:!0,skype:!0,sling:!0,smart:!0,smile:!0,sncf:!0,soccer:!0,social:!0,softbank:!0,software:!0,sohu:!0,solar:!0,solutions:!0,song:!0,sony:!0,soy:!0,space:!0,spiegel:!0,spot:!0,spreadbetting:!0,srl:!0,srt:!0,stada:!0,staples:!0,star:!0,starhub:!0,statebank:!0,statefarm:!0,statoil:!0,stc:!0,stcgroup:!0,stockholm:!0,storage:!0,store:!0,studio:!0,study:!0,style:!0,sucks:!0,supersport:!0,supplies:!0,supply:!0,support:!0,surf:!0,surgery:!0,suzuki:!0,swatch:!0,swiftcover:!0,swiss:!0,sydney:!0,symantec:!0,systems:!0,tab:!0,taipei:!0,talk:!0,taobao:!0,target:!0,tatamotors:!0,tatar:!0,tattoo:!0,tax:!0,taxi:!0,tci:!0,tdk:!0,team:!0,tech:!0,technology:!0,telecity:!0,telefonica:!0,temasek:!0,tennis:!0,teva:!0,thd:!0,theater:!0,theatre:!0,theguardian:!0,tiaa:!0,tickets:!0,tienda:!0,tiffany:!0,tips:!0,tires:!0,tirol:!0,tjmaxx:!0,tjx:!0,tkmaxx:!0,tmall:!0,today:!0,tokyo:!0,tools:!0,top:!0,toray:!0,toshiba:!0,total:!0,tours:!0,town:!0,toyota:!0,toys:!0,trade:!0,trading:!0,training:!0,travelchannel:!0,travelers:!0,travelersinsurance:!0,trust:!0,trv:!0,tube:!0,tui:!0,tunes:!0,tushu:!0,tvs:!0,ubank:!0,ubs:!0,uconnect:!0,university:!0,uno:!0,uol:!0,ups:!0,vacations:!0,vana:!0,vanguard:!0,vegas:!0,ventures:!0,verisign:!0,versicherung:!0,vet:!0,viajes:!0,video:!0,vig:!0,viking:!0,villas:!0,vin:!0,vip:!0,virgin:!0,visa:!0,vision:!0,vista:!0,vistaprint:!0,viva:!0,vivo:!0,vlaanderen:!0,vodka:!0,volkswagen:!0,vote:!0,voting:!0,voto:!0,voyage:!0,vuelos:!0,wales:!0,walmart:!0,walter:!0,wang:!0,wanggou:!0,warman:!0,watch:!0,watches:!0,weather:!0,weatherchannel:!0,webcam:!0,weber:!0,website:!0,wed:!0,wedding:!0,weibo:!0,weir:!0,whoswho:!0,wien:!0,wiki:!0,williamhill:!0,win:!0,windows:!0,wine:!0,winners:!0,wme:!0,wolterskluwer:!0,woodside:!0,work:!0,works:!0,world:!0,wtc:!0,wtf:!0,xbox:!0,xerox:!0,xfinity:!0,xihuan:!0,xin:!0,"xn--11b4c3d":!0,"xn--1ck2e1b":!0,"xn--1qqw23a":!0,"xn--30rr7y":!0,"xn--3bst00m":!0,"xn--3ds443g":!0,"xn--3oq18vl8pn36a":!0,"xn--3pxu8k":!0,"xn--42c2d9a":!0,"xn--45q11c":!0,"xn--4gbrim":!0,"xn--4gq48lf9j":!0,"xn--55qw42g":!0,"xn--55qx5d":!0,"xn--5su34j936bgsg":!0,"xn--5tzm5g":!0,"xn--6frz82g":!0,"xn--6qq986b3xl":!0,"xn--80adxhks":!0,"xn--80asehdb":!0,"xn--80aswg":!0,"xn--8y0a063a":!0,"xn--9dbq2a":!0,"xn--9et52u":!0,"xn--9krt00a":!0,"xn--b4w605ferd":!0,"xn--bck1b9a5dre4c":!0,"xn--c1avg":!0,"xn--c2br7g":!0,"xn--cck2b3b":!0,"xn--cg4bki":!0,"xn--czr694b":!0,"xn--czrs0t":!0,"xn--czru2d":!0,"xn--d1acj3b":!0,"xn--eckvdtc9d":!0,"xn--efvy88h":!0,"xn--estv75g":!0,"xn--fct429k":!0,"xn--fhbei":!0,"xn--fiq228c5hs":!0,"xn--fiq64b":!0,"xn--fjq720a":!0,"xn--flw351e":!0,"xn--fzys8d69uvgm":!0,"xn--g2xx48c":!0,"xn--gckr3f0f":!0,"xn--hxt814e":!0,"xn--i1b6b1a6a2e":!0,"xn--imr513n":!0,"xn--io0a7i":!0,"xn--j1aef":!0,"xn--jlq61u9w7b":!0,"xn--jvr189m":!0,"xn--kcrx77d1x4a":!0,"xn--kpu716f":!0,"xn--kput3i":!0,"xn--mgba3a3ejt":!0,"xn--mgba7c0bbn0a":!0,"xn--mgbaakc7dvf":!0,"xn--mgbab2bd":!0,"xn--mgbb9fbpob":!0,"xn--mgbca7dzdo":!0,"xn--mgbt3dhd":!0,"xn--mk1bu44c":!0,"xn--mxtq1m":!0,"xn--ngbc5azd":!0,"xn--ngbe9e0a":!0,"xn--nqv7f":!0,"xn--nqv7fs00ema":!0,"xn--nyqy26a":!0,"xn--p1acf":!0,"xn--pbt977c":!0,"xn--pssy2u":!0,"xn--q9jyb4c":!0,"xn--qcka1pmc":!0,"xn--rhqv96g":!0,"xn--rovu88b":!0,"xn--ses554g":!0,"xn--t60b56a":!0,"xn--tckwe":!0,"xn--unup4y":!0,"xn--vermgensberater-ctb":!0,"xn--vermgensberatung-pwb":!0,"xn--vhquv":!0,"xn--vuq861b":!0,"xn--w4r85el8fhu5dnra":!0,"xn--w4rs40l":!0,"xn--xhq521b":!0,"xn--zfr164b":!0,xperia:!0,xyz:!0,yachts:!0,yahoo:!0,yamaxun:!0,yandex:!0,yodobashi:!0,yoga:!0,yokohama:!0,you:!0,youtube:!0,yun:!0,zappos:!0,zara:!0,zero:!0,zip:!0,zippo:!0,zone:!0,zuerich:!0,"cloudfront.net":!0,"ap-northeast-1.compute.amazonaws.com":!0,"ap-southeast-1.compute.amazonaws.com":!0,"ap-southeast-2.compute.amazonaws.com":!0,"cn-north-1.compute.amazonaws.cn":!0,"compute.amazonaws.cn":!0,"compute.amazonaws.com":!0,"compute-1.amazonaws.com":!0,"eu-west-1.compute.amazonaws.com":!0,"eu-central-1.compute.amazonaws.com":!0,"sa-east-1.compute.amazonaws.com":!0,"us-east-1.amazonaws.com":!0,"us-gov-west-1.compute.amazonaws.com":!0,"us-west-1.compute.amazonaws.com":!0,"us-west-2.compute.amazonaws.com":!0,"z-1.compute-1.amazonaws.com":!0,"z-2.compute-1.amazonaws.com":!0,"elasticbeanstalk.com":!0,"elb.amazonaws.com":!0,"s3.amazonaws.com":!0,"s3-ap-northeast-1.amazonaws.com":!0,"s3-ap-southeast-1.amazonaws.com":!0,"s3-ap-southeast-2.amazonaws.com":!0,"s3-external-1.amazonaws.com":!0,"s3-external-2.amazonaws.com":!0,"s3-fips-us-gov-west-1.amazonaws.com":!0,"s3-eu-central-1.amazonaws.com":!0,"s3-eu-west-1.amazonaws.com":!0,"s3-sa-east-1.amazonaws.com":!0,"s3-us-gov-west-1.amazonaws.com":!0,"s3-us-west-1.amazonaws.com":!0,"s3-us-west-2.amazonaws.com":!0,"s3.cn-north-1.amazonaws.com.cn":!0,"s3.eu-central-1.amazonaws.com":!0,"betainabox.com":!0,"ae.org":!0,"ar.com":!0,"br.com":!0,"cn.com":!0,"com.de":!0,"com.se":!0,"de.com":!0,"eu.com":!0,"gb.com":!0,"gb.net":!0,"hu.com":!0,"hu.net":!0,"jp.net":!0,"jpn.com":!0,"kr.com":!0,"mex.com":!0,"no.com":!0,"qc.com":!0,"ru.com":!0,"sa.com":!0,"se.com":!0,"se.net":!0,"uk.com":!0,"uk.net":!0,"us.com":!0,"uy.com":!0,"za.bz":!0,"za.com":!0,"africa.com":!0,"gr.com":!0,"in.net":!0,"us.org":!0,"co.com":!0,"c.la":!0,"cloudcontrolled.com":!0,"cloudcontrolapp.com":!0,"co.ca":!0,"c.cdn77.org":!0,"cdn77-ssl.net":!0,"r.cdn77.net":!0,"rsc.cdn77.org":!0,"ssl.origin.cdn77-secure.org":!0,"co.nl":!0,"co.no":!0,"*.platform.sh":!0,"cupcake.is":!0,"dreamhosters.com":!0,"duckdns.org":!0,"dyndns-at-home.com":!0,"dyndns-at-work.com":!0,"dyndns-blog.com":!0,"dyndns-free.com":!0,"dyndns-home.com":!0,"dyndns-ip.com":!0,"dyndns-mail.com":!0,"dyndns-office.com":!0,"dyndns-pics.com":!0,"dyndns-remote.com":!0,"dyndns-server.com":!0,"dyndns-web.com":!0,"dyndns-wiki.com":!0,"dyndns-work.com":!0,"dyndns.biz":!0,"dyndns.info":!0,"dyndns.org":!0,"dyndns.tv":!0,"at-band-camp.net":!0,"ath.cx":!0,"barrel-of-knowledge.info":!0,"barrell-of-knowledge.info":!0,"better-than.tv":!0,"blogdns.com":!0,"blogdns.net":!0,"blogdns.org":!0,"blogsite.org":!0,"boldlygoingnowhere.org":!0,"broke-it.net":!0,"buyshouses.net":!0,"cechire.com":!0,"dnsalias.com":!0,"dnsalias.net":!0,"dnsalias.org":!0,"dnsdojo.com":!0,"dnsdojo.net":!0,"dnsdojo.org":!0,"does-it.net":!0,"doesntexist.com":!0,"doesntexist.org":!0,"dontexist.com":!0,"dontexist.net":!0,"dontexist.org":!0,"doomdns.com":!0,"doomdns.org":!0,"dvrdns.org":!0,"dyn-o-saur.com":!0,"dynalias.com":!0,"dynalias.net":!0,"dynalias.org":!0,"dynathome.net":!0,"dyndns.ws":!0,"endofinternet.net":!0,"endofinternet.org":!0,"endoftheinternet.org":!0,"est-a-la-maison.com":!0,"est-a-la-masion.com":!0,"est-le-patron.com":!0,"est-mon-blogueur.com":!0,"for-better.biz":!0,"for-more.biz":!0,"for-our.info":!0,"for-some.biz":!0,"for-the.biz":!0,"forgot.her.name":!0,"forgot.his.name":!0,"from-ak.com":!0,"from-al.com":!0,"from-ar.com":!0,"from-az.net":!0,"from-ca.com":!0,"from-co.net":!0,"from-ct.com":!0,"from-dc.com":!0,"from-de.com":!0,"from-fl.com":!0,"from-ga.com":!0,"from-hi.com":!0,"from-ia.com":!0,"from-id.com":!0,"from-il.com":!0,"from-in.com":!0,"from-ks.com":!0,"from-ky.com":!0,"from-la.net":!0,"from-ma.com":!0,"from-md.com":!0,"from-me.org":!0,"from-mi.com":!0,"from-mn.com":!0,"from-mo.com":!0,"from-ms.com":!0,"from-mt.com":!0,"from-nc.com":!0,"from-nd.com":!0,"from-ne.com":!0,"from-nh.com":!0,"from-nj.com":!0,"from-nm.com":!0,"from-nv.com":!0,"from-ny.net":!0,"from-oh.com":!0,"from-ok.com":!0,"from-or.com":!0,"from-pa.com":!0,"from-pr.com":!0,"from-ri.com":!0,"from-sc.com":!0,"from-sd.com":!0,"from-tn.com":!0,"from-tx.com":!0,"from-ut.com":!0,"from-va.com":!0,"from-vt.com":!0,"from-wa.com":!0,"from-wi.com":!0,"from-wv.com":!0,"from-wy.com":!0,"ftpaccess.cc":!0,"fuettertdasnetz.de":!0,"game-host.org":!0,"game-server.cc":!0,"getmyip.com":!0,"gets-it.net":!0,"go.dyndns.org":!0,"gotdns.com":!0,"gotdns.org":!0,"groks-the.info":!0,"groks-this.info":!0,"ham-radio-op.net":!0,"here-for-more.info":!0,"hobby-site.com":!0,"hobby-site.org":!0,"home.dyndns.org":!0,"homedns.org":!0,"homeftp.net":!0,"homeftp.org":!0,"homeip.net":!0,"homelinux.com":!0,"homelinux.net":!0,"homelinux.org":!0,"homeunix.com":!0,"homeunix.net":!0,"homeunix.org":!0,"iamallama.com":!0,"in-the-band.net":!0,"is-a-anarchist.com":!0,"is-a-blogger.com":!0,"is-a-bookkeeper.com":!0,"is-a-bruinsfan.org":!0,"is-a-bulls-fan.com":!0,"is-a-candidate.org":!0,"is-a-caterer.com":!0,"is-a-celticsfan.org":!0,"is-a-chef.com":!0,"is-a-chef.net":!0,"is-a-chef.org":!0,"is-a-conservative.com":!0,"is-a-cpa.com":!0,"is-a-cubicle-slave.com":!0,"is-a-democrat.com":!0,"is-a-designer.com":!0,"is-a-doctor.com":!0,"is-a-financialadvisor.com":!0,"is-a-geek.com":!0,"is-a-geek.net":!0,"is-a-geek.org":!0,"is-a-green.com":!0,"is-a-guru.com":!0,"is-a-hard-worker.com":!0,"is-a-hunter.com":!0,"is-a-knight.org":!0,"is-a-landscaper.com":!0,"is-a-lawyer.com":!0,"is-a-liberal.com":!0,"is-a-libertarian.com":!0,"is-a-linux-user.org":!0,"is-a-llama.com":!0,"is-a-musician.com":!0,"is-a-nascarfan.com":!0,"is-a-nurse.com":!0,"is-a-painter.com":!0,"is-a-patsfan.org":!0,"is-a-personaltrainer.com":!0,"is-a-photographer.com":!0,"is-a-player.com":!0,"is-a-republican.com":!0,"is-a-rockstar.com":!0,"is-a-socialist.com":!0,"is-a-soxfan.org":!0,"is-a-student.com":!0,"is-a-teacher.com":!0,"is-a-techie.com":!0,"is-a-therapist.com":!0,"is-an-accountant.com":!0,"is-an-actor.com":!0,"is-an-actress.com":!0,"is-an-anarchist.com":!0,"is-an-artist.com":!0,"is-an-engineer.com":!0,"is-an-entertainer.com":!0,"is-by.us":!0,"is-certified.com":!0,"is-found.org":!0,"is-gone.com":!0,"is-into-anime.com":!0,"is-into-cars.com":!0,"is-into-cartoons.com":!0,"is-into-games.com":!0,"is-leet.com":!0,"is-lost.org":!0,"is-not-certified.com":!0,"is-saved.org":!0,"is-slick.com":!0,"is-uberleet.com":!0,"is-very-bad.org":!0,"is-very-evil.org":!0,"is-very-good.org":!0,"is-very-nice.org":!0,"is-very-sweet.org":!0,"is-with-theband.com":!0,"isa-geek.com":!0,"isa-geek.net":!0,"isa-geek.org":!0,"isa-hockeynut.com":!0,"issmarterthanyou.com":!0,"isteingeek.de":!0,"istmein.de":!0,"kicks-ass.net":!0,"kicks-ass.org":!0,"knowsitall.info":!0,"land-4-sale.us":!0,"lebtimnetz.de":!0,"leitungsen.de":!0,"likes-pie.com":!0,"likescandy.com":!0,"merseine.nu":!0,"mine.nu":!0,"misconfused.org":!0,"mypets.ws":!0,"myphotos.cc":!0,"neat-url.com":!0,"office-on-the.net":!0,"on-the-web.tv":!0,"podzone.net":!0,"podzone.org":!0,"readmyblog.org":!0,"saves-the-whales.com":!0,"scrapper-site.net":!0,"scrapping.cc":!0,"selfip.biz":!0,"selfip.com":!0,"selfip.info":!0,"selfip.net":!0,"selfip.org":!0,"sells-for-less.com":!0,"sells-for-u.com":!0,"sells-it.net":!0,"sellsyourhome.org":!0,"servebbs.com":!0,"servebbs.net":!0,"servebbs.org":!0,"serveftp.net":!0,"serveftp.org":!0,"servegame.org":!0,"shacknet.nu":!0,"simple-url.com":!0,"space-to-rent.com":!0,"stuff-4-sale.org":!0,"stuff-4-sale.us":!0,"teaches-yoga.com":!0,"thruhere.net":!0,"traeumtgerade.de":!0,"webhop.biz":!0,"webhop.info":!0,"webhop.net":!0,"webhop.org":!0,"worse-than.tv":!0,"writesthisblog.com":!0,"eu.org":!0,"al.eu.org":!0,"asso.eu.org":!0,"at.eu.org":!0,"au.eu.org":!0,"be.eu.org":!0,"bg.eu.org":!0,"ca.eu.org":!0,"cd.eu.org":!0,"ch.eu.org":!0,"cn.eu.org":!0,"cy.eu.org":!0,"cz.eu.org":!0,"de.eu.org":!0,"dk.eu.org":!0,"edu.eu.org":!0,"ee.eu.org":!0,"es.eu.org":!0,"fi.eu.org":!0,"fr.eu.org":!0,"gr.eu.org":!0,"hr.eu.org":!0,"hu.eu.org":!0,"ie.eu.org":!0,"il.eu.org":!0,"in.eu.org":!0,"int.eu.org":!0,"is.eu.org":!0,"it.eu.org":!0,"jp.eu.org":!0,"kr.eu.org":!0,"lt.eu.org":!0,"lu.eu.org":!0,"lv.eu.org":!0,"mc.eu.org":!0,"me.eu.org":!0,"mk.eu.org":!0,"mt.eu.org":!0,"my.eu.org":!0,"net.eu.org":!0,"ng.eu.org":!0,"nl.eu.org":!0,"no.eu.org":!0,"nz.eu.org":!0,"paris.eu.org":!0,"pl.eu.org":!0,"pt.eu.org":!0,"q-a.eu.org":!0,"ro.eu.org":!0,"ru.eu.org":!0,"se.eu.org":!0,"si.eu.org":!0,"sk.eu.org":!0,"tr.eu.org":!0,"uk.eu.org":!0,"us.eu.org":!0,"a.ssl.fastly.net":!0,"b.ssl.fastly.net":!0,"global.ssl.fastly.net":!0,"a.prod.fastly.net":!0,"global.prod.fastly.net":!0,"firebaseapp.com":!0,"flynnhub.com":!0,"service.gov.uk":!0,"github.io":!0,"githubusercontent.com":!0,"ro.com":!0,"appspot.com":!0,"blogspot.ae":!0,"blogspot.al":!0,"blogspot.am":!0,"blogspot.ba":!0,"blogspot.be":!0,"blogspot.bg":!0,"blogspot.bj":!0,"blogspot.ca":!0,"blogspot.cf":!0,"blogspot.ch":!0,"blogspot.cl":!0,"blogspot.co.at":!0,"blogspot.co.id":!0,"blogspot.co.il":!0,"blogspot.co.ke":!0,"blogspot.co.nz":!0,"blogspot.co.uk":!0,"blogspot.co.za":!0,"blogspot.com":!0,"blogspot.com.ar":!0,"blogspot.com.au":!0,"blogspot.com.br":!0,"blogspot.com.by":!0,"blogspot.com.co":!0,"blogspot.com.cy":!0,"blogspot.com.ee":!0,"blogspot.com.eg":!0,"blogspot.com.es":!0,"blogspot.com.mt":!0,"blogspot.com.ng":!0,"blogspot.com.tr":!0,"blogspot.com.uy":!0,"blogspot.cv":!0,"blogspot.cz":!0,"blogspot.de":!0,"blogspot.dk":!0,"blogspot.fi":!0,"blogspot.fr":!0,"blogspot.gr":!0,"blogspot.hk":!0,"blogspot.hr":!0,"blogspot.hu":!0,"blogspot.ie":!0,"blogspot.in":!0,"blogspot.is":!0,"blogspot.it":!0,"blogspot.jp":!0,"blogspot.kr":!0,"blogspot.li":!0,"blogspot.lt":!0,"blogspot.lu":!0,"blogspot.md":!0,"blogspot.mk":!0,"blogspot.mr":!0,"blogspot.mx":!0,"blogspot.my":!0,"blogspot.nl":!0,"blogspot.no":!0,"blogspot.pe":!0,"blogspot.pt":!0,"blogspot.qa":!0,"blogspot.re":!0,"blogspot.ro":!0,"blogspot.rs":!0,"blogspot.ru":!0,"blogspot.se":!0,"blogspot.sg":!0,"blogspot.si":!0,"blogspot.sk":!0,"blogspot.sn":!0,"blogspot.td":!0,"blogspot.tw":!0,"blogspot.ug":!0,"blogspot.vn":!0,"codespot.com":!0,"googleapis.com":!0,"googlecode.com":!0,"pagespeedmobilizer.com":!0,"withgoogle.com":!0,"withyoutube.com":!0,"herokuapp.com":!0,"herokussl.com":!0,"iki.fi":!0,"biz.at":!0,"info.at":!0,"co.pl":!0,"azurewebsites.net":!0,"azure-mobile.net":!0,"cloudapp.net":!0,"bmoattachments.org":!0,"4u.com":!0,"nfshost.com":!0,"nyc.mn":!0,"nid.io":!0,"operaunite.com":!0,"outsystemscloud.com":!0,"art.pl":!0,"gliwice.pl":!0,"krakow.pl":!0,"poznan.pl":!0,"wroc.pl":!0,"zakopane.pl":!0,"pantheon.io":!0,"gotpantheon.com":!0,"priv.at":!0,"qa2.com":!0,"rhcloud.com":!0,"sandcats.io":!0,"biz.ua":!0,"co.ua":!0,"pp.ua":!0,"sinaapp.com":!0,"vipsinaapp.com":!0,"1kapp.com":!0,"gda.pl":!0,"gdansk.pl":!0,"gdynia.pl":!0,"med.pl":!0,"sopot.pl":!0,"hk.com":!0,"hk.org":!0,"ltd.hk":!0,"inc.hk":!0,"yolasite.com":!0,"za.net":!0,"za.org":!0})},{punycode:438}],522:[function(e,t,r){"use strict";function n(){}r.Store=n,n.prototype.synchronous=!1,n.prototype.findCookie=function(e,t,r,n){throw new Error("findCookie is not implemented")},n.prototype.findCookies=function(e,t,r){throw new Error("findCookies is not implemented")},n.prototype.putCookie=function(e,t){throw new Error("putCookie is not implemented")},n.prototype.updateCookie=function(e,t,r){throw new Error("updateCookie is not implemented")},n.prototype.removeCookie=function(e,t,r,n){throw new Error("removeCookie is not implemented")},n.prototype.removeCookies=function(e,t,r){throw new Error("removeCookies is not implemented")},n.prototype.getAllCookies=function(e){throw new Error("getAllCookies is not implemented (therefore jar cannot be serialized)")}},{}],523:[function(e,t,r){t.exports={_args:[["tough-cookie@~2.3.0","/home/iegor/QuickBlox/quickblox-javascript-sdk/node_modules/request"]],_from:"tough-cookie@>=2.3.0 <2.4.0",_id:"tough-cookie@2.3.2",_inCache:!0,_installable:!0,_location:"/tough-cookie",_nodeVersion:"7.0.0",_npmOperationalInternal:{host:"packages-12-west.internal.npmjs.com",tmp:"tmp/tough-cookie-2.3.2.tgz_1477415232912_0.6133609430398792"},_npmUser:{email:"jstash@gmail.com",name:"jstash"},_npmVersion:"3.10.8",_phantomChildren:{},_requested:{name:"tough-cookie",raw:"tough-cookie@~2.3.0",rawSpec:"~2.3.0",scope:null,spec:">=2.3.0 <2.4.0",type:"range"},_requiredBy:["/request"],_resolved:"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz",_shasum:"f081f76e4c85720e6c37a5faced737150d84072a",_shrinkwrap:null,_spec:"tough-cookie@~2.3.0",_where:"/home/iegor/QuickBlox/quickblox-javascript-sdk/node_modules/request",author:{email:"jstashewsky@salesforce.com",name:"Jeremy Stashewsky"},bugs:{url:"https://github.com/salesforce/tough-cookie/issues"},contributors:[{name:"Alexander Savin"},{name:"Ian Livingstone"},{name:"Ivan Nikulin"},{name:"Lalit Kapoor"},{name:"Sam Thompson"},{name:"Sebastian Mayr"}],dependencies:{punycode:"^1.4.1"},description:"RFC6265 Cookies and Cookie Jar for node.js",devDependencies:{async:"^1.4.2","string.prototype.repeat":"^0.2.0",vows:"^0.8.1"},directories:{},dist:{shasum:"f081f76e4c85720e6c37a5faced737150d84072a",tarball:"https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.2.tgz"},engines:{node:">=0.8"},files:["lib"],gitHead:"2610df5dc8ef7373a483d509006e5887572a4076",homepage:"https://github.com/salesforce/tough-cookie",keywords:["HTTP","RFC2965","RFC6265","cookie","cookiejar","cookies","jar","set-cookie"],license:"BSD-3-Clause",main:"./lib/cookie",maintainers:[{name:"awaterma",email:"awaterma@awaterma.net"},{name:"jstash",email:"jstash@gmail.com"},{name:"nexxy",email:"emily@contactvibe.com"}],name:"tough-cookie",optionalDependencies:{},readme:"ERROR: No README data found!",repository:{type:"git",url:"git://github.com/salesforce/tough-cookie.git"},scripts:{suffixup:"curl -o public_suffix_list.dat https://publicsuffix.org/list/public_suffix_list.dat && ./generate-pubsuffix.js",test:"vows test/*_test.js"},version:"2.3.2"}},{}],524:[function(e,t,r){(function(t,n){"use strict";function i(e){var t=new c(e);return t.request=f.request,t}function a(e){var t=new c(e);return t.request=f.request,t.createSocket=u,t.defaultPort=443,t}function o(e){var t=new c(e);return t.request=h.request,t}function s(e){var t=new c(e);return t.request=h.request,t.createSocket=u,t.defaultPort=443,t}function c(e){var t=this;t.options=e||{},t.proxyOptions=t.options.proxy||{},t.maxSockets=t.options.maxSockets||f.Agent.defaultMaxSockets,t.requests=[],t.sockets=[],t.on("free",function(e,r,n){for(var i=0,a=t.requests.length;i=this.maxSockets?void r.requests.push({host:t.host,port:t.port,request:e}):void r.createConnection({host:t.host,port:t.port,request:e})},c.prototype.createConnection=function(e){var t=this;t.createSocket(e,function(r){function n(){t.emit("free",r,e.host,e.port)}function i(e){t.removeSocket(r),r.removeListener("free",n),r.removeListener("close",i),r.removeListener("agentRemove",i)}r.on("free",n),r.on("close",i),r.on("agentRemove",i),e.request.onSocket(r)})},c.prototype.createSocket=function(e,r){function i(e){e.upgrade=!0}function a(e,r,n){t.nextTick(function(){o(e,r,n)})}function o(t,n,i){if(f.removeAllListeners(),n.removeAllListeners(),200===t.statusCode)m.equal(i.length,0),v("tunneling connection has established"),c.sockets[c.sockets.indexOf(u)]=n,r(n);else{v("tunneling socket could not be established, statusCode=%d",t.statusCode);var a=new Error("tunneling socket could not be established, statusCode="+t.statusCode);a.code="ECONNRESET",e.request.emit("error",a),c.removeSocket(u)}}function s(t){f.removeAllListeners(),v("tunneling socket could not be established, cause=%s\n",t.message,t.stack);var r=new Error("tunneling socket could not be established, cause="+t.message);r.code="ECONNRESET",e.request.emit("error",r),c.removeSocket(u)}var c=this,u={};c.sockets.push(u);var p=l({},c.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1});p.proxyAuth&&(p.headers=p.headers||{},p.headers["Proxy-Authorization"]="Basic "+new n(p.proxyAuth).toString("base64")),v("making CONNECT request");var f=c.request(p);f.useChunkedEncodingByDefault=!1,f.once("response",i),f.once("upgrade",a),f.once("connect",o),f.once("error",s),f.end()},c.prototype.removeSocket=function(e){var t=this.sockets.indexOf(e);if(t!==-1){this.sockets.splice(t,1);var r=this.requests.shift();r&&this.createConnection(r)}};var v;v=t.env.NODE_DEBUG&&/\btunnel\b/.test(t.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments);"string"==typeof e[0]?e[0]="TUNNEL: "+e[0]:e.unshift("TUNNEL:"),console.error.apply(console,e)}:function(){},r.debug=v}).call(this,e("_process"),e("buffer").Buffer)},{_process:431,assert:77,buffer:122,events:171,http:508,https:212,net:119,tls:119,util:531}],525:[function(e,t,r){!function(t){"use strict";function r(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function n(e,t,r,n,i){var a,o=0;for(a=0;a>>8)-1}function i(e,t,r,i){return n(e,t,r,i,16)}function a(e,t,r,i){return n(e,t,r,i,32)}function o(e,t,r,n){for(var i,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,y=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=a,k=o,_=s,j=c,S=u,E=l,A=p,C=f,T=h,I=d,P=m,O=g,D=v,M=b,q=y,R=w,z=0;z<20;z+=2)i=x+D|0,S^=i<<7|i>>>25,i=S+x|0,T^=i<<9|i>>>23,i=T+S|0,D^=i<<13|i>>>19,i=D+T|0,x^=i<<18|i>>>14,i=E+k|0,I^=i<<7|i>>>25,i=I+E|0,M^=i<<9|i>>>23,i=M+I|0,k^=i<<13|i>>>19,i=k+M|0,E^=i<<18|i>>>14,i=P+A|0,q^=i<<7|i>>>25,i=q+P|0,_^=i<<9|i>>>23,i=_+q|0,A^=i<<13|i>>>19,i=A+_|0,P^=i<<18|i>>>14,i=R+O|0,j^=i<<7|i>>>25,i=j+R|0,C^=i<<9|i>>>23,i=C+j|0,O^=i<<13|i>>>19,i=O+C|0,R^=i<<18|i>>>14,i=x+j|0,k^=i<<7|i>>>25,i=k+x|0,_^=i<<9|i>>>23,i=_+k|0,j^=i<<13|i>>>19,i=j+_|0,x^=i<<18|i>>>14,i=E+S|0,A^=i<<7|i>>>25,i=A+E|0,C^=i<<9|i>>>23,i=C+A|0,S^=i<<13|i>>>19,i=S+C|0,E^=i<<18|i>>>14,i=P+I|0,O^=i<<7|i>>>25,i=O+P|0,T^=i<<9|i>>>23,i=T+O|0,I^=i<<13|i>>>19,i=I+T|0,P^=i<<18|i>>>14,i=R+q|0,D^=i<<7|i>>>25,i=D+R|0,M^=i<<9|i>>>23,i=M+D|0,q^=i<<13|i>>>19,i=q+M|0,R^=i<<18|i>>>14;x=x+a|0,k=k+o|0,_=_+s|0,j=j+c|0,S=S+u|0,E=E+l|0,A=A+p|0,C=C+f|0,T=T+h|0,I=I+d|0,P=P+m|0,O=O+g|0,D=D+v|0,M=M+b|0,q=q+y|0,R=R+w|0,e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=k>>>0&255,e[5]=k>>>8&255,e[6]=k>>>16&255,e[7]=k>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=j>>>0&255,e[13]=j>>>8&255,e[14]=j>>>16&255,e[15]=j>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=E>>>0&255,e[21]=E>>>8&255,e[22]=E>>>16&255,e[23]=E>>>24&255,e[24]=A>>>0&255,e[25]=A>>>8&255,e[26]=A>>>16&255,e[27]=A>>>24&255,e[28]=C>>>0&255,e[29]=C>>>8&255,e[30]=C>>>16&255,e[31]=C>>>24&255,e[32]=T>>>0&255,e[33]=T>>>8&255,e[34]=T>>>16&255,e[35]=T>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=P>>>0&255,e[41]=P>>>8&255,e[42]=P>>>16&255,e[43]=P>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=D>>>0&255,e[49]=D>>>8&255,e[50]=D>>>16&255,e[51]=D>>>24&255,e[52]=M>>>0&255,e[53]=M>>>8&255,e[54]=M>>>16&255,e[55]=M>>>24&255,e[56]=q>>>0&255,e[57]=q>>>8&255,e[58]=q>>>16&255,e[59]=q>>>24&255,e[60]=R>>>0&255,e[61]=R>>>8&255,e[62]=R>>>16&255,e[63]=R>>>24&255}function s(e,t,r,n){for(var i,a=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,c=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,u=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,l=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,p=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,h=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,d=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,g=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,v=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,b=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,y=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,x=a,k=o,_=s,j=c,S=u,E=l,A=p,C=f,T=h,I=d,P=m,O=g,D=v,M=b,q=y,R=w,z=0;z<20;z+=2)i=x+D|0,S^=i<<7|i>>>25,i=S+x|0,T^=i<<9|i>>>23,i=T+S|0,D^=i<<13|i>>>19,i=D+T|0,x^=i<<18|i>>>14,i=E+k|0,I^=i<<7|i>>>25,i=I+E|0,M^=i<<9|i>>>23,i=M+I|0,k^=i<<13|i>>>19,i=k+M|0,E^=i<<18|i>>>14,i=P+A|0,q^=i<<7|i>>>25,i=q+P|0,_^=i<<9|i>>>23,i=_+q|0,A^=i<<13|i>>>19,i=A+_|0,P^=i<<18|i>>>14,i=R+O|0,j^=i<<7|i>>>25,i=j+R|0,C^=i<<9|i>>>23,i=C+j|0,O^=i<<13|i>>>19,i=O+C|0,R^=i<<18|i>>>14,i=x+j|0,k^=i<<7|i>>>25,i=k+x|0,_^=i<<9|i>>>23,i=_+k|0,j^=i<<13|i>>>19,i=j+_|0,x^=i<<18|i>>>14,i=E+S|0,A^=i<<7|i>>>25,i=A+E|0,C^=i<<9|i>>>23,i=C+A|0,S^=i<<13|i>>>19,i=S+C|0,E^=i<<18|i>>>14,i=P+I|0,O^=i<<7|i>>>25,i=O+P|0,T^=i<<9|i>>>23,i=T+O|0,I^=i<<13|i>>>19,i=I+T|0,P^=i<<18|i>>>14,i=R+q|0,D^=i<<7|i>>>25,i=D+R|0,M^=i<<9|i>>>23,i=M+D|0,q^=i<<13|i>>>19,i=q+M|0,R^=i<<18|i>>>14;e[0]=x>>>0&255,e[1]=x>>>8&255,e[2]=x>>>16&255,e[3]=x>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=P>>>0&255,e[9]=P>>>8&255,e[10]=P>>>16&255,e[11]=P>>>24&255,e[12]=R>>>0&255,e[13]=R>>>8&255,e[14]=R>>>16&255,e[15]=R>>>24&255,e[16]=A>>>0&255,e[17]=A>>>8&255,e[18]=A>>>16&255,e[19]=A>>>24&255,e[20]=C>>>0&255,e[21]=C>>>8&255,e[22]=C>>>16&255,e[23]=C>>>24&255,e[24]=T>>>0&255,e[25]=T>>>8&255,e[26]=T>>>16&255,e[27]=T>>>24&255,e[28]=I>>>0&255,e[29]=I>>>8&255,e[30]=I>>>16&255,e[31]=I>>>24&255}function c(e,t,r,n){o(e,t,r,n)}function u(e,t,r,n){s(e,t,r,n)}function l(e,t,r,n,i,a,o){var s,u,l=new Uint8Array(16),p=new Uint8Array(64);for(u=0;u<16;u++)l[u]=0;for(u=0;u<8;u++)l[u]=a[u];for(;i>=64;){for(c(p,l,o,fe),u=0;u<64;u++)e[t+u]=r[n+u]^p[u];for(s=1,u=8;u<16;u++)s=s+(255&l[u])|0,l[u]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(c(p,l,o,fe),u=0;u=64;){for(c(u,s,i,fe),o=0;o<64;o++)e[t+o]=u[o];for(a=1,o=8;o<16;o++)a=a+(255&s[o])|0,s[o]=255&a,a>>>=8;r-=64,t+=64}if(r>0)for(c(u,s,i,fe),o=0;o>16&1),a[r-1]&=65535;a[15]=o[15]-32767-(a[14]>>16&1),i=a[15]>>16&1,a[14]&=65535,w(o,a,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function k(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return x(r,e),x(n,t),a(r,0,n,0)}function _(e){var t=new Uint8Array(32);return x(t,e),1&t[0]}function j(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function S(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function E(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function A(e,t,r){var n,i,a=0,o=0,s=0,c=0,u=0,l=0,p=0,f=0,h=0,d=0,m=0,g=0,v=0,b=0,y=0,w=0,x=0,k=0,_=0,j=0,S=0,E=0,A=0,C=0,T=0,I=0,P=0,O=0,D=0,M=0,q=0,R=r[0],z=r[1],B=r[2],F=r[3],N=r[4],L=r[5],U=r[6],H=r[7],K=r[8],$=r[9],V=r[10],G=r[11],X=r[12],Q=r[13],W=r[14],J=r[15];n=t[0],a+=n*R,o+=n*z,s+=n*B,c+=n*F,u+=n*N,l+=n*L,p+=n*U,f+=n*H,h+=n*K,d+=n*$,m+=n*V,g+=n*G,v+=n*X,b+=n*Q,y+=n*W,w+=n*J,n=t[1],o+=n*R,s+=n*z,c+=n*B,u+=n*F,l+=n*N,p+=n*L,f+=n*U,h+=n*H,d+=n*K,m+=n*$,g+=n*V,v+=n*G,b+=n*X,y+=n*Q,w+=n*W,x+=n*J,n=t[2],s+=n*R,c+=n*z,u+=n*B,l+=n*F,p+=n*N,f+=n*L,h+=n*U,d+=n*H,m+=n*K,g+=n*$,v+=n*V,b+=n*G,y+=n*X,w+=n*Q,x+=n*W,k+=n*J,n=t[3],c+=n*R,u+=n*z,l+=n*B,p+=n*F,f+=n*N,h+=n*L,d+=n*U,m+=n*H,g+=n*K,v+=n*$,b+=n*V,y+=n*G,w+=n*X,x+=n*Q,k+=n*W,_+=n*J,n=t[4],u+=n*R,l+=n*z,p+=n*B,f+=n*F,h+=n*N,d+=n*L,m+=n*U,g+=n*H,v+=n*K,b+=n*$,y+=n*V,w+=n*G,x+=n*X,k+=n*Q,_+=n*W,j+=n*J,n=t[5],l+=n*R,p+=n*z,f+=n*B,h+=n*F,d+=n*N,m+=n*L,g+=n*U,v+=n*H,b+=n*K,y+=n*$,w+=n*V,x+=n*G,k+=n*X,_+=n*Q,j+=n*W,S+=n*J,n=t[6],p+=n*R,f+=n*z,h+=n*B,d+=n*F,m+=n*N,g+=n*L,v+=n*U,b+=n*H,y+=n*K,w+=n*$,x+=n*V,k+=n*G,_+=n*X,j+=n*Q,S+=n*W,E+=n*J,n=t[7],f+=n*R,h+=n*z,d+=n*B,m+=n*F,g+=n*N,v+=n*L,b+=n*U,y+=n*H,w+=n*K,x+=n*$,k+=n*V,_+=n*G,j+=n*X,S+=n*Q,E+=n*W,A+=n*J,n=t[8],h+=n*R,d+=n*z,m+=n*B,g+=n*F,v+=n*N,b+=n*L,y+=n*U,w+=n*H,x+=n*K,k+=n*$,_+=n*V,j+=n*G,S+=n*X,E+=n*Q,A+=n*W,C+=n*J,n=t[9],d+=n*R,m+=n*z,g+=n*B,v+=n*F,b+=n*N,y+=n*L,w+=n*U,x+=n*H,k+=n*K,_+=n*$,j+=n*V,S+=n*G,E+=n*X,A+=n*Q,C+=n*W,T+=n*J,n=t[10],m+=n*R,g+=n*z,v+=n*B,b+=n*F,y+=n*N,w+=n*L,x+=n*U,k+=n*H,_+=n*K,j+=n*$,S+=n*V,E+=n*G,A+=n*X,C+=n*Q,T+=n*W,I+=n*J,n=t[11],g+=n*R,v+=n*z,b+=n*B,y+=n*F,w+=n*N,x+=n*L,k+=n*U,_+=n*H,j+=n*K,S+=n*$,E+=n*V,A+=n*G;C+=n*X;T+=n*Q,I+=n*W,P+=n*J,n=t[12],v+=n*R,b+=n*z,y+=n*B,w+=n*F,x+=n*N,k+=n*L,_+=n*U,j+=n*H,S+=n*K,E+=n*$,A+=n*V,C+=n*G,T+=n*X,I+=n*Q,P+=n*W,O+=n*J,n=t[13],b+=n*R,y+=n*z,w+=n*B,x+=n*F,k+=n*N,_+=n*L,j+=n*U,S+=n*H,E+=n*K,A+=n*$,C+=n*V,T+=n*G,I+=n*X,P+=n*Q,O+=n*W,D+=n*J,n=t[14],y+=n*R,w+=n*z,x+=n*B,k+=n*F,_+=n*N,j+=n*L,S+=n*U,E+=n*H,A+=n*K,C+=n*$,T+=n*V,I+=n*G,P+=n*X,O+=n*Q,D+=n*W,M+=n*J,n=t[15],w+=n*R,x+=n*z,k+=n*B,_+=n*F,j+=n*N,S+=n*L,E+=n*U,A+=n*H,C+=n*K,T+=n*$,I+=n*V,P+=n*G,O+=n*X,D+=n*Q,M+=n*W,q+=n*J,a+=38*x,o+=38*k,s+=38*_,c+=38*j, -u+=38*S,l+=38*E,p+=38*A,f+=38*C,h+=38*T,d+=38*I,m+=38*P,g+=38*O,v+=38*D,b+=38*M,y+=38*q,i=1,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,a+=i-1+37*(i-1),i=1,n=a+i+65535,i=Math.floor(n/65536),a=n-65536*i,n=o+i+65535,i=Math.floor(n/65536),o=n-65536*i,n=s+i+65535,i=Math.floor(n/65536),s=n-65536*i,n=c+i+65535,i=Math.floor(n/65536),c=n-65536*i,n=u+i+65535,i=Math.floor(n/65536),u=n-65536*i,n=l+i+65535,i=Math.floor(n/65536),l=n-65536*i,n=p+i+65535,i=Math.floor(n/65536),p=n-65536*i,n=f+i+65535,i=Math.floor(n/65536),f=n-65536*i,n=h+i+65535,i=Math.floor(n/65536),h=n-65536*i,n=d+i+65535,i=Math.floor(n/65536),d=n-65536*i,n=m+i+65535,i=Math.floor(n/65536),m=n-65536*i,n=g+i+65535,i=Math.floor(n/65536),g=n-65536*i,n=v+i+65535,i=Math.floor(n/65536),v=n-65536*i,n=b+i+65535,i=Math.floor(n/65536),b=n-65536*i,n=y+i+65535,i=Math.floor(n/65536),y=n-65536*i,n=w+i+65535,i=Math.floor(n/65536),w=n-65536*i,a+=i-1+37*(i-1),e[0]=a,e[1]=o,e[2]=s,e[3]=c,e[4]=u,e[5]=l,e[6]=p,e[7]=f,e[8]=h,e[9]=d,e[10]=m,e[11]=g,e[12]=v,e[13]=b;e[14]=y;e[15]=w}function C(e,t){A(e,t,t)}function T(e,t){var r,n=ee();for(r=0;r<16;r++)n[r]=t[r];for(r=253;r>=0;r--)C(n,n),2!==r&&4!==r&&A(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function I(e,t){var r,n=ee();for(r=0;r<16;r++)n[r]=t[r];for(r=250;r>=0;r--)C(n,n),1!==r&&A(n,n,t);for(r=0;r<16;r++)e[r]=n[r]}function P(e,t,r){var n,i,a=new Uint8Array(32),o=new Float64Array(80),s=ee(),c=ee(),u=ee(),l=ee(),p=ee(),f=ee();for(i=0;i<31;i++)a[i]=t[i];for(a[31]=127&t[31]|64,a[0]&=248,j(o,r),i=0;i<16;i++)c[i]=o[i],l[i]=s[i]=u[i]=0;for(s[0]=l[0]=1,i=254;i>=0;--i)n=a[i>>>3]>>>(7&i)&1,w(s,c,n),w(u,l,n),S(p,s,u),E(s,s,u),S(u,c,l),E(c,c,l),C(l,p),C(f,s),A(s,u,s),A(u,c,p),S(p,s,u),E(s,s,u),C(c,s),E(u,l,f),A(s,u,oe),S(s,s,l),A(u,u,s),A(s,l,f),A(l,c,o),C(c,p),w(s,c,n),w(u,l,n);for(i=0;i<16;i++)o[i+16]=s[i],o[i+32]=u[i],o[i+48]=c[i],o[i+64]=l[i];var h=o.subarray(32),d=o.subarray(16);return T(h,h),A(d,d,h),x(e,d),0}function O(e,t){return P(e,t,ne)}function D(e,t){return te(t,32),O(e,t)}function M(e,t,r){var n=new Uint8Array(32);return P(n,r,t),u(e,re,n,fe)}function q(e,t,r,n,i,a){var o=new Uint8Array(32);return M(o,i,a),de(e,t,r,n,o)}function R(e,t,r,n,i,a){var o=new Uint8Array(32);return M(o,i,a),me(e,t,r,n,o)}function z(e,t,r,n){for(var i,a,o,s,c,u,l,p,f,h,d,m,g,v,b,y,w,x,k,_,j,S,E,A,C,T,I=new Int32Array(16),P=new Int32Array(16),O=e[0],D=e[1],M=e[2],q=e[3],R=e[4],z=e[5],B=e[6],F=e[7],N=t[0],L=t[1],U=t[2],H=t[3],K=t[4],$=t[5],V=t[6],G=t[7],X=0;n>=128;){for(k=0;k<16;k++)_=8*k+X,I[k]=r[_+0]<<24|r[_+1]<<16|r[_+2]<<8|r[_+3],P[k]=r[_+4]<<24|r[_+5]<<16|r[_+6]<<8|r[_+7];for(k=0;k<80;k++)if(i=O,a=D,o=M,s=q,c=R,u=z,l=B,p=F,f=N,h=L,d=U,m=H,g=K,v=$,b=V,y=G,j=F,S=G,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=(R>>>14|K<<18)^(R>>>18|K<<14)^(K>>>9|R<<23),S=(K>>>14|R<<18)^(K>>>18|R<<14)^(R>>>9|K<<23),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=R&z^~R&B,S=K&$^~K&V,E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=ge[2*k],S=ge[2*k+1],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=I[k%16],S=P[k%16],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,w=65535&C|T<<16,x=65535&E|A<<16,j=w,S=x,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=(O>>>28|N<<4)^(N>>>2|O<<30)^(N>>>7|O<<25),S=(N>>>28|O<<4)^(O>>>2|N<<30)^(O>>>7|N<<25),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,j=O&D^O&M^D&M,S=N&L^N&U^L&U,E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,p=65535&C|T<<16,y=65535&E|A<<16,j=s,S=m,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=w,S=x,E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,s=65535&C|T<<16,m=65535&E|A<<16,D=i,M=a,q=o,R=s,z=c,B=u,F=l,O=p,L=f,U=h,H=d,K=m,$=g,V=v,G=b,N=y,k%16===15)for(_=0;_<16;_++)j=I[_],S=P[_],E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=I[(_+9)%16],S=P[(_+9)%16],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,w=I[(_+1)%16],x=P[(_+1)%16],j=(w>>>1|x<<31)^(w>>>8|x<<24)^w>>>7,S=(x>>>1|w<<31)^(x>>>8|w<<24)^(x>>>7|w<<25),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,w=I[(_+14)%16],x=P[(_+14)%16],j=(w>>>19|x<<13)^(x>>>29|w<<3)^w>>>6,S=(x>>>19|w<<13)^(w>>>29|x<<3)^(x>>>6|w<<26),E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,I[_]=65535&C|T<<16,P[_]=65535&E|A<<16;j=O,S=N,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[0],S=t[0],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[0]=O=65535&C|T<<16,t[0]=N=65535&E|A<<16,j=D,S=L,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[1],S=t[1],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[1]=D=65535&C|T<<16,t[1]=L=65535&E|A<<16,j=M,S=U,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[2],S=t[2],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[2]=M=65535&C|T<<16,t[2]=U=65535&E|A<<16,j=q,S=H,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[3],S=t[3],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[3]=q=65535&C|T<<16,t[3]=H=65535&E|A<<16,j=R,S=K,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[4],S=t[4],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[4]=R=65535&C|T<<16,t[4]=K=65535&E|A<<16,j=z,S=$,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[5],S=t[5],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[5]=z=65535&C|T<<16,t[5]=$=65535&E|A<<16,j=B,S=V,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[6],S=t[6],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[6]=B=65535&C|T<<16,t[6]=V=65535&E|A<<16,j=F,S=G,E=65535&S,A=S>>>16,C=65535&j,T=j>>>16,j=e[7],S=t[7],E+=65535&S,A+=S>>>16,C+=65535&j,T+=j>>>16,A+=E>>>16,C+=A>>>16,T+=C>>>16,e[7]=F=65535&C|T<<16,t[7]=G=65535&E|A<<16,X+=128,n-=128}return n}function B(e,t,n){var i,a=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),c=n;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,z(a,o,t,n),n%=128,i=0;i=0;--i)n=r[i/8|0]>>(7&i)&1,N(e,t,n),F(t,e),F(e,e),N(e,t,n)}function H(e,t){var r=[ee(),ee(),ee(),ee()];b(r[0],ue),b(r[1],le),b(r[2],ae),A(r[3],ue,le),U(e,r,t)}function K(e,t,r){var n,i=new Uint8Array(64),a=[ee(),ee(),ee(),ee()];for(r||te(t,32),B(i,t,32),i[0]&=248,i[31]&=127,i[31]|=64,H(a,i),L(e,a),n=0;n<32;n++)t[n+32]=e[n];return 0}function $(e,t){var r,n,i,a;for(n=63;n>=32;--n){for(r=0,i=n-32,a=n-12;i>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ve[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ve[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function V(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;$(e,r)}function G(e,t,r,n){var i,a,o=new Uint8Array(64),s=new Uint8Array(64),c=new Uint8Array(64),u=new Float64Array(64),l=[ee(),ee(),ee(),ee()];B(o,n,32),o[0]&=248,o[31]&=127,o[31]|=64;var p=r+64;for(i=0;i>7&&E(e[0],ie,e[0]),A(e[3],e[0],e[1]),0)}function Q(e,t,r,n){var i,o,s=new Uint8Array(32),c=new Uint8Array(64),u=[ee(),ee(),ee(),ee()],l=[ee(),ee(),ee(),ee()];if(o=-1,r<64)return-1;if(X(l,n))return-1;for(i=0;i>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),a=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|a<<12),this.r[5]=a>>>1&8190,o=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(a>>>14|o<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(o>>>11|s<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|c<<8),this.r[9]=c>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};he.prototype.blocks=function(e,t,r){for(var n,i,a,o,s,c,u,l,p,f,h,d,m,g,v,b,y,w,x,k=this.fin?0:2048,_=this.h[0],j=this.h[1],S=this.h[2],E=this.h[3],A=this.h[4],C=this.h[5],T=this.h[6],I=this.h[7],P=this.h[8],O=this.h[9],D=this.r[0],M=this.r[1],q=this.r[2],R=this.r[3],z=this.r[4],B=this.r[5],F=this.r[6],N=this.r[7],L=this.r[8],U=this.r[9];r>=16;)n=255&e[t+0]|(255&e[t+1])<<8,_+=8191&n,i=255&e[t+2]|(255&e[t+3])<<8,j+=8191&(n>>>13|i<<3),a=255&e[t+4]|(255&e[t+5])<<8,S+=8191&(i>>>10|a<<6),o=255&e[t+6]|(255&e[t+7])<<8,E+=8191&(a>>>7|o<<9),s=255&e[t+8]|(255&e[t+9])<<8,A+=8191&(o>>>4|s<<12),C+=s>>>1&8191,c=255&e[t+10]|(255&e[t+11])<<8,T+=8191&(s>>>14|c<<2),u=255&e[t+12]|(255&e[t+13])<<8,I+=8191&(c>>>11|u<<5),l=255&e[t+14]|(255&e[t+15])<<8,P+=8191&(u>>>8|l<<8),O+=l>>>5|k,p=0,f=p,f+=_*D,f+=j*(5*U),f+=S*(5*L),f+=E*(5*N),f+=A*(5*F),p=f>>>13,f&=8191,f+=C*(5*B),f+=T*(5*z),f+=I*(5*R),f+=P*(5*q),f+=O*(5*M),p+=f>>>13,f&=8191,h=p,h+=_*M,h+=j*D,h+=S*(5*U),h+=E*(5*L),h+=A*(5*N),p=h>>>13,h&=8191,h+=C*(5*F),h+=T*(5*B),h+=I*(5*z),h+=P*(5*R),h+=O*(5*q),p+=h>>>13,h&=8191,d=p,d+=_*q,d+=j*M,d+=S*D,d+=E*(5*U),d+=A*(5*L),p=d>>>13,d&=8191,d+=C*(5*N),d+=T*(5*F),d+=I*(5*B),d+=P*(5*z),d+=O*(5*R),p+=d>>>13,d&=8191,m=p,m+=_*R,m+=j*q,m+=S*M,m+=E*D,m+=A*(5*U),p=m>>>13,m&=8191,m+=C*(5*L),m+=T*(5*N),m+=I*(5*F),m+=P*(5*B),m+=O*(5*z),p+=m>>>13,m&=8191,g=p,g+=_*z,g+=j*R,g+=S*q,g+=E*M,g+=A*D,p=g>>>13,g&=8191,g+=C*(5*U),g+=T*(5*L),g+=I*(5*N),g+=P*(5*F),g+=O*(5*B),p+=g>>>13,g&=8191,v=p,v+=_*B,v+=j*z,v+=S*R,v+=E*q,v+=A*M,p=v>>>13,v&=8191,v+=C*D,v+=T*(5*U),v+=I*(5*L),v+=P*(5*N),v+=O*(5*F),p+=v>>>13,v&=8191,b=p,b+=_*F,b+=j*B,b+=S*z,b+=E*R,b+=A*q,p=b>>>13,b&=8191,b+=C*M,b+=T*D,b+=I*(5*U),b+=P*(5*L),b+=O*(5*N),p+=b>>>13,b&=8191,y=p,y+=_*N,y+=j*F,y+=S*B,y+=E*z,y+=A*R,p=y>>>13,y&=8191,y+=C*q,y+=T*M,y+=I*D,y+=P*(5*U),y+=O*(5*L),p+=y>>>13,y&=8191,w=p,w+=_*L,w+=j*N,w+=S*F,w+=E*B,w+=A*z,p=w>>>13,w&=8191,w+=C*R,w+=T*q,w+=I*M,w+=P*D,w+=O*(5*U),p+=w>>>13,w&=8191,x=p,x+=_*U,x+=j*L,x+=S*N,x+=E*F,x+=A*B,p=x>>>13,x&=8191,x+=C*z,x+=T*R,x+=I*q,x+=P*M,x+=O*D,p+=x>>>13,x&=8191,p=(p<<2)+p|0,p=p+f|0,f=8191&p,p>>>=13,h+=p,_=f,j=h,S=d,E=m,A=g,C=v,T=b,I=y,P=w,O=x,t+=16,r-=16;this.h[0]=_,this.h[1]=j,this.h[2]=S,this.h[3]=E,this.h[4]=A,this.h[5]=C,this.h[6]=T,this.h[7]=I,this.h[8]=P,this.h[9]=O},he.prototype.finish=function(e,t){var r,n,i,a,o=new Uint16Array(10);if(this.leftover){for(a=this.leftover,this.buffer[a++]=1;a<16;a++)this.buffer[a]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,a=2;a<10;a++)this.h[a]+=r,r=this.h[a]>>>13,this.h[a]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,o[0]=this.h[0]+5,r=o[0]>>>13,o[0]&=8191,a=1;a<10;a++)o[a]=this.h[a]+r,r=o[a]>>>13,o[a]&=8191;for(o[9]-=8192,n=(1^r)-1,a=0;a<10;a++)o[a]&=n;for(n=~n,a=0;a<10;a++)this.h[a]=this.h[a]&n|o[a];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,a=1;a<8;a++)i=(this.h[a]+this.pad[a]|0)+(i>>>16)|0,this.h[a]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},he.prototype.update=function(e,t,r){var n,i;if(this.leftover){for(i=16-this.leftover,i>r&&(i=r),n=0;n=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n=0},t.sign.keyPair=function(){var e=new Uint8Array(Pe),t=new Uint8Array(Oe);return K(e,t),{publicKey:e,secretKey:t}},t.sign.keyPair.fromSecretKey=function(e){if(Z(e),e.length!==Oe)throw new Error("bad secret key size");for(var t=new Uint8Array(Pe),r=0;r",'"',"`"," ","\r","\n","\t"],d=["{","}","|","\\","^","`"].concat(h),m=["'"].concat(d),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],b=255,y=/^[+a-z0-9A-Z_-]{0,63}$/,w=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,x={javascript:!0,"javascript:":!0},k={javascript:!0,"javascript:":!0},_={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},j=e("querystring");n.prototype.parse=function(e,t,r){if(!u.isString(e))throw new TypeError("Parameter 'url' must be a string, not "+typeof e);var n=e.indexOf("?"),i=n!==-1&&n127?"x":M[R];if(!q.match(y)){var B=O.slice(0,A),F=O.slice(A+1),N=M.match(w);N&&(B.push(N[1]),F.unshift(N[2])),F.length&&(s="/"+F.join(".")+s),this.hostname=B.join(".");break}}}this.hostname.length>b?this.hostname="":this.hostname=this.hostname.toLowerCase(),P||(this.hostname=c.toASCII(this.hostname));var L=this.port?":"+this.port:"",U=this.hostname||"";this.host=U+L,this.href+=this.host,P&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==s[0]&&(s="/"+s))}if(!x[d])for(var A=0,D=m.length;A0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return r.search=e.search,r.query=e.query,u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r}if(!x.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var E=x.slice(-1)[0],A=(r.host||e.host||x.length>1)&&("."===E||".."===E)||""===E,C=0,T=x.length;T>=0;T--)E=x[T],"."===E?x.splice(T,1):".."===E?(x.splice(T,1),C++):C&&(x.splice(T,1),C--);if(!y&&!w)for(;C--;C)x.unshift("..");!y||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),A&&"/"!==x.join("/").substr(-1)&&x.push("");var I=""===x[0]||x[0]&&"/"===x[0].charAt(0);if(j){r.hostname=r.host=I?"":x.length?x.shift():"";var S=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@");S&&(r.auth=S.shift(),r.host=r.hostname=S.shift())}return y=y||r.host&&x.length,y&&!I&&x.unshift(""),x.length?r.pathname=x.join("/"):(r.pathname=null,r.path=null),u.isNull(r.pathname)&&u.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=e.auth||r.auth,r.slashes=r.slashes||e.slashes,r.href=r.format(),r},n.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],":"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},{"./util":527,punycode:438,querystring:446}],527:[function(e,t,r){"use strict";t.exports={isString:function(e){return"string"==typeof e},isObject:function(e){return"object"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},{}],528:[function(e,t,r){(function(e){function r(e,t){function r(){if(!i){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(n("noDeprecation"))return e;var i=!1;return r}function n(t){try{if(!e.localStorage)return!1}catch(e){return!1}var r=e.localStorage[t];return null!=r&&"true"===String(r).toLowerCase()}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],529:[function(e,t,r){arguments[4][215][0].apply(r,arguments)},{dup:215}],530:[function(e,t,r){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],531:[function(e,t,r){(function(t,n){function i(e,t){var n={seen:[],stylize:o};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),x(n.showHidden)&&(n.showHidden=!1),x(n.depth)&&(n.depth=2),x(n.colors)&&(n.colors=!1),x(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=a),c(n,e,n.depth)}function a(e,t){var r=i.styles[t];return r?"["+i.colors[r][0]+"m"+e+"["+i.colors[r][1]+"m":e}function o(e,t){return e}function s(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}function c(e,t,n){if(e.customInspect&&t&&E(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t)){var i=t.inspect(n,e);return y(i)||(i=c(e,i,n)),i}var a=u(e,t);if(a)return a;var o=Object.keys(t),m=s(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)), -S(t)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(t);if(0===o.length){if(E(t)){var g=t.name?": "+t.name:"";return e.stylize("[Function"+g+"]","special")}if(k(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(j(t))return e.stylize(Date.prototype.toString.call(t),"date");if(S(t))return l(t)}var v="",b=!1,w=["{","}"];if(d(t)&&(b=!0,w=["[","]"]),E(t)){var x=t.name?": "+t.name:"";v=" [Function"+x+"]"}if(k(t)&&(v=" "+RegExp.prototype.toString.call(t)),j(t)&&(v=" "+Date.prototype.toUTCString.call(t)),S(t)&&(v=" "+l(t)),0===o.length&&(!b||0==t.length))return w[0]+v+w[1];if(n<0)return k(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var _;return _=b?p(e,t,n,m,o):o.map(function(r){return f(e,t,n,m,r,b)}),e.seen.pop(),h(_,v,w)}function u(e,t){if(x(t))return e.stylize("undefined","undefined");if(y(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return b(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):g(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,i){for(var a=[],o=0,s=t.length;o-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),x(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e,t,r){var n=0,i=e.reduce(function(e,t){return n++,t.indexOf("\n")>=0&&n++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}function d(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function v(e){return null==e}function b(e){return"number"==typeof e}function y(e){return"string"==typeof e}function w(e){return"symbol"==typeof e}function x(e){return void 0===e}function k(e){return _(e)&&"[object RegExp]"===C(e)}function _(e){return"object"==typeof e&&null!==e}function j(e){return _(e)&&"[object Date]"===C(e)}function S(e){return _(e)&&("[object Error]"===C(e)||e instanceof Error)}function E(e){return"function"==typeof e}function A(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||"undefined"==typeof e}function C(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}function I(){var e=new Date,t=[T(e.getHours()),T(e.getMinutes()),T(e.getSeconds())].join(":");return[e.getDate(),q[e.getMonth()],t].join(" ")}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var O=/%[sdj%]/g;r.format=function(e){if(!y(e)){for(var t=[],r=0;r=a)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),s=n[r];r>>((3&t)<<3)&255;return a}}t.exports=r}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],535:[function(e,t,r){function n(e,t,r){var n=t&&r||0,i=t||[];e=e||{};var o=void 0!==e.clockseq?e.clockseq:c,p=void 0!==e.msecs?e.msecs:(new Date).getTime(),f=void 0!==e.nsecs?e.nsecs:l+1,h=p-u+(f-l)/1e4;if(h<0&&void 0===e.clockseq&&(o=o+1&16383),(h<0||p>u)&&void 0===e.nsecs&&(f=0),f>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=p,l=f,c=o,p+=122192928e5;var d=(1e4*(268435455&p)+f)%4294967296;i[n++]=d>>>24&255,i[n++]=d>>>16&255,i[n++]=d>>>8&255,i[n++]=255&d;var m=p/4294967296*1e4&268435455;i[n++]=m>>>8&255,i[n++]=255&m,i[n++]=m>>>24&15|16,i[n++]=m>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o;for(var g=e.node||s,v=0;v<6;++v)i[n+v]=g[v];return t?t:a(i)}var i=e("./lib/rng"),a=e("./lib/bytesToUuid"),o=i(),s=[1|o[0],o[1],o[2],o[3],o[4],o[5]],c=16383&(o[6]<<8|o[7]),u=0,l=0;t.exports=n},{"./lib/bytesToUuid":533,"./lib/rng":534}],536:[function(e,t,r){function n(e,t,r){var n=t&&r||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null),e=e||{};var o=e.random||(e.rng||i)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[n+s]=o[s];return t||a(o)}var i=e("./lib/rng"),a=e("./lib/bytesToUuid");t.exports=n},{"./lib/bytesToUuid":533,"./lib/rng":534}],537:[function(e,t,r){function n(e){var t,r,n,i;e instanceof Error||"object"==typeof e?t=Array.prototype.slice.call(arguments,1):(t=Array.prototype.slice.call(arguments,0),e=void 0),i=t.length>0?c.sprintf.apply(null,t):"",this.jse_shortmsg=i,this.jse_summary=i,e&&(r=e.cause,r&&e.cause instanceof Error||(r=e),r&&r instanceof Error&&(this.jse_cause=r,this.jse_summary+=": "+r.message)),this.message=this.jse_summary,Error.call(this,this.jse_summary),Error.captureStackTrace&&(n=e?e.constructorOpt:void 0,n=n||arguments.callee,Error.captureStackTrace(this,n))}function i(e){o.ok(e.length>0),this.ase_errors=e,n.call(this,e[0],"first of %d error%s",e.length,1==e.length?"":"s")}function a(e){Error.call(this);var t,r,n;"object"==typeof e?t=Array.prototype.slice.call(arguments,1):(t=Array.prototype.slice.call(arguments,0),e=void 0),t.length>0?this.message=c.sprintf.apply(null,t):this.message="",e&&(e instanceof Error?r=e:(r=e.cause,n=e.constructorOpt)),Error.captureStackTrace(this,n||this.constructor),r&&this.cause(r)}var o=e("assert"),s=e("util"),c=e("extsprintf");r.VError=n,r.WError=a,r.MultiError=i,s.inherits(n,Error),n.prototype.name="VError",n.prototype.toString=function(){var e=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e+=": "+this.message),e},n.prototype.cause=function(){return this.jse_cause},s.inherits(i,n),s.inherits(a,Error),a.prototype.name="WError",a.prototype.toString=function(){var e=this.hasOwnProperty("name")&&this.name||this.constructor.name||this.constructor.prototype.name;return this.message&&(e+=": "+this.message),this.we_cause&&this.we_cause.message&&(e+="; caused by "+this.we_cause.toString()),e},a.prototype.cause=function(e){return e instanceof Error&&(this.we_cause=e),this.we_cause}},{assert:77,extsprintf:174,util:531}],538:[function(require,module,exports){function Context(){}var indexOf=require("indexof"),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r0&&"function"==typeof e)return i(e,t);var o=function(e){var t={},r=e.result();return r.forEach(function(e){var r={id:e.id,timestamp:e.timestamp,type:e.type};e.names().forEach(function(t){r[t]=e.stat(t)}),t[r.id]=r}),t},s=function(e,t){var r=new Map(Object.keys(e).map(function(t){return[t,e[t]]}));return t=t||e,Object.keys(t).forEach(function(e){r[e]=t[e]}),r};if(arguments.length>=2){var c=function(e){a[1](s(o(e)))};return i.apply(this,[c,arguments[0]])}return new Promise(function(t,r){1===a.length&&"object"==typeof e?i.apply(n,[function(e){t(s(o(e)))},r]):i.apply(n,[function(e){t(s(o(e),e.result()))},r])}).then(t,r)},r},window.RTCPeerConnection.prototype=webkitRTCPeerConnection.prototype,webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(window.RTCPeerConnection,"generateCertificate",{get:function(){return webkitRTCPeerConnection.generateCertificate}}),["createOffer","createAnswer"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var r=1===arguments.length?arguments[0]:void 0;return new Promise(function(n,i){t.apply(e,[n,i,r])})}return t.apply(this,arguments)}}),i.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){var e=arguments,r=this,n=new Promise(function(n,i){t.apply(r,[e[0],n,i])});return e.length<2?n:n.then(function(){e[1].apply(null,[])},function(t){e.length>=3&&e[2].apply(null,[t])})}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=webkitRTCPeerConnection.prototype[e];webkitRTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?RTCIceCandidate:RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var e=RTCPeerConnection.prototype.addIceCandidate;RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?e.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}};t.exports={shimMediaStream:a.shimMediaStream,shimOnTrack:a.shimOnTrack,shimSourceObject:a.shimSourceObject,shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:e("./getusermedia")}},{"../utils.js":547,"./getusermedia":541}],541:[function(e,t,r){"use strict";var n=e("../utils.js").log;t.exports=function(){var e=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;var t={};return Object.keys(e).forEach(function(r){if("require"!==r&&"advanced"!==r&&"mediaSource"!==r){var n="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);var i=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==n.ideal){t.optional=t.optional||[];var a={};"number"==typeof n.ideal?(a[i("min",r)]=n.ideal,t.optional.push(a),a={},a[i("max",r)]=n.ideal,t.optional.push(a)):(a[i("",r)]=n.ideal,t.optional.push(a))}void 0!==n.exact&&"number"!=typeof n.exact?(t.mandatory=t.mandatory||{},t.mandatory[i("",r)]=n.exact):["min","max"].forEach(function(e){void 0!==n[e]&&(t.mandatory=t.mandatory||{},t.mandatory[i(e,r)]=n[e])})}}),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},t=function(t,r){if(t=JSON.parse(JSON.stringify(t)),t&&t.audio&&(t.audio=e(t.audio)),t&&"object"==typeof t.video){var i=t.video.facingMode;if(i=i&&("object"==typeof i?i:{ideal:i}),i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!navigator.mediaDevices.getSupportedConstraints||!navigator.mediaDevices.getSupportedConstraints().facingMode)&&(delete t.video.facingMode,"environment"===i.exact||"environment"===i.ideal))return navigator.mediaDevices.enumerateDevices().then(function(a){a=a.filter(function(e){return"videoinput"===e.kind});var o=a.find(function(e){return e.label.toLowerCase().indexOf("back")!==-1})||a.length&&a[a.length-1];return o&&(t.video.deviceId=i.exact?{exact:o.deviceId}:{ideal:o.deviceId}),t.video=e(t.video),n("chrome: "+JSON.stringify(t)),r(t)});t.video=e(t.video)}return n("chrome: "+JSON.stringify(t)),r(t)},r=function(e){return{name:{PermissionDeniedError:"NotAllowedError",ConstraintNotSatisfiedError:"OverconstrainedError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},i=function(e,n,i){t(e,function(e){navigator.webkitGetUserMedia(e,n,function(e){i(r(e))})})};navigator.getUserMedia=i;var a=function(e){return new Promise(function(t,r){navigator.getUserMedia(e,t,r)})};if(navigator.mediaDevices||(navigator.mediaDevices={getUserMedia:a,enumerateDevices:function(){return new Promise(function(e){var t={audio:"audioinput",video:"videoinput"};return MediaStreamTrack.getSources(function(r){e(r.map(function(e){return{label:e.label,kind:t[e.kind],deviceId:e.id,groupId:""}}))})})}}),navigator.mediaDevices.getUserMedia){var o=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(e){return t(e,function(e){return o(e).then(function(t){if(e.audio&&!t.getAudioTracks().length||e.video&&!t.getVideoTracks().length)throw t.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return t},function(e){return Promise.reject(r(e))})})}}else navigator.mediaDevices.getUserMedia=function(e){return a(e)};"undefined"==typeof navigator.mediaDevices.addEventListener&&(navigator.mediaDevices.addEventListener=function(){n("Dummy mediaDevices.addEventListener called.")}),"undefined"==typeof navigator.mediaDevices.removeEventListener&&(navigator.mediaDevices.removeEventListener=function(){n("Dummy mediaDevices.removeEventListener called.")})}},{"../utils.js":547}],542:[function(e,t,r){"use strict";var n=e("sdp"),i=e("../utils").browserDetails,a={shimPeerConnection:function(){if(window.RTCIceGatherer){window.RTCIceCandidate||(window.RTCIceCandidate=function(e){return e}),window.RTCSessionDescription||(window.RTCSessionDescription=function(e){return e});var e=Object.getOwnPropertyDescriptor(MediaStreamTrack.prototype,"enabled");Object.defineProperty(MediaStreamTrack.prototype,"enabled",{set:function(t){e.set.call(this,t);var r=new Event("enabled");r.enabled=t,this.dispatchEvent(r)}})}window.RTCPeerConnection=function(e){var t=this,r=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){t[e]=r[e].bind(r)}),this.onicecandidate=null,this.onaddstream=null,this.ontrack=null,this.onremovestream=null,this.onsignalingstatechange=null,this.oniceconnectionstatechange=null,this.onnegotiationneeded=null,this.ondatachannel=null,this.localStreams=[],this.remoteStreams=[],this.getLocalStreams=function(){return t.localStreams},this.getRemoteStreams=function(){return t.remoteStreams},this.localDescription=new RTCSessionDescription({type:"",sdp:""}),this.remoteDescription=new RTCSessionDescription({type:"",sdp:""}),this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",this.iceOptions={gatherPolicy:"all",iceServers:[]},e&&e.iceTransportPolicy)switch(e.iceTransportPolicy){case"all":case"relay":this.iceOptions.gatherPolicy=e.iceTransportPolicy;break;case"none":throw new TypeError('iceTransportPolicy "none" not supported')}if(this.usingBundle=e&&"max-bundle"===e.bundlePolicy,e&&e.iceServers){var n=JSON.parse(JSON.stringify(e.iceServers));this.iceOptions.iceServers=n.filter(function(e){if(e&&e.urls){var t=e.urls;return"string"==typeof t&&(t=[t]),t=t.filter(function(e){return 0===e.indexOf("turn:")&&e.indexOf("transport=udp")!==-1&&e.indexOf("turn:[")===-1||0===e.indexOf("stun:")&&i.version>=14393})[0],!!t}return!1})}this._config=e,this.transceivers=[],this._localIceCandidatesBuffer=[]},window.RTCPeerConnection.prototype._emitBufferedCandidates=function(){var e=this,t=n.splitSections(e.localDescription.sdp);this._localIceCandidatesBuffer.forEach(function(r){var n=!r.candidate||0===Object.keys(r.candidate).length;if(n)for(var i=1;i-1&&(this.localStreams.splice(t,1),this._maybeFireNegotiationNeeded())},window.RTCPeerConnection.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},window.RTCPeerConnection.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},window.RTCPeerConnection.prototype._getCommonCapabilities=function(e,t){var r={codecs:[],headerExtensions:[],fecMechanisms:[]};return e.codecs.forEach(function(e){for(var n=0;n0;t.forEach(function(e,t){var o=i.transceivers[t],s=o.iceGatherer,c=o.iceTransport,u=o.dtlsTransport,l=o.localCapabilities,p=o.remoteCapabilities,f="0"===e.split("\n",1)[0].split(" ",2)[1];if(!f&&!o.isDatachannel){var h=n.getIceParameters(e,r);if(a){var d=n.matchPrefix(e,"a=candidate:").map(function(e){return n.parseCandidate(e)}).filter(function(e){return"1"===e.component});d.length&&c.setRemoteCandidates(d)}var m=n.getDtlsParameters(e,r);a&&(m.role="server"),i.usingBundle&&0!==t||(c.start(s,h,a?"controlling":"controlled"),u.start(m));var g=i._getCommonCapabilities(l,p);i._transceive(o,g.codecs.length>0,!1)}})}switch(this.localDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-local-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}var o=arguments.length>1&&"function"==typeof arguments[1];if(o){var s=arguments[1];window.setTimeout(function(){s(),"new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),i._emitBufferedCandidates()},0)}var c=Promise.resolve();return c.then(function(){o||("new"===i.iceGatheringState&&(i.iceGatheringState="gathering"),window.setTimeout(i._emitBufferedCandidates.bind(i),500))}),c},window.RTCPeerConnection.prototype.setRemoteDescription=function(e){var t=this,r=new MediaStream,i=[],a=n.splitSections(e.sdp),o=a.shift(),s=n.matchPrefix(o,"a=ice-lite").length>0;switch(this.usingBundle=n.matchPrefix(o,"a=group:BUNDLE ").length>0,a.forEach(function(a,c){var u=n.splitLines(a),l=u[0].substr(2).split(" "),p=l[0],f="0"===l[1],h=n.getDirection(a,o),d=n.matchPrefix(a,"a=mid:");if(d=d.length?d[0].substr(6):n.generateIdentifier(),"application"===p&&"DTLS/SCTP"===l[2])return void(t.transceivers[c]={mid:d,isDatachannel:!0});var m,g,v,b,y,w,x,k,_,j,S,E,A=n.parseRtpParameters(a);f||(S=n.getIceParameters(a,o),E=n.getDtlsParameters(a,o),E.role="client"),k=n.parseRtpEncodingParameters(a);var C,T=n.matchPrefix(a,"a=ssrc:").map(function(e){return n.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];T&&(C=T.value);var I=n.matchPrefix(a,"a=end-of-candidates",o).length>0,P=n.matchPrefix(a,"a=candidate:").map(function(e){return n.parseCandidate(e)}).filter(function(e){return"1"===e.component});if("offer"!==e.type||f)"answer"!==e.type||f||(m=t.transceivers[c],g=m.iceGatherer,v=m.iceTransport,b=m.dtlsTransport,y=m.rtpSender,w=m.rtpReceiver,x=m.sendEncodingParameters,_=m.localCapabilities,t.transceivers[c].recvEncodingParameters=k,t.transceivers[c].remoteCapabilities=A,t.transceivers[c].cname=C,(s||I)&&P.length&&v.setRemoteCandidates(P),t.usingBundle&&0!==c||(v.start(g,S,"controlling"),b.start(E)),t._transceive(m,"sendrecv"===h||"recvonly"===h,"sendrecv"===h||"sendonly"===h),!w||"sendrecv"!==h&&"sendonly"!==h?delete m.rtpReceiver:(j=w.track,i.push([j,w]),r.addTrack(j)));else{var O=t.usingBundle&&c>0?{iceGatherer:t.transceivers[0].iceGatherer,iceTransport:t.transceivers[0].iceTransport,dtlsTransport:t.transceivers[0].dtlsTransport}:t._createIceAndDtlsTransports(d,c);if(I&&O.iceTransport.setRemoteCandidates(P),_=RTCRtpReceiver.getCapabilities(p),_.codecs=_.codecs.filter(function(e){return"rtx"!==e.name}),x=[{ssrc:1001*(2*c+2)}],w=new RTCRtpReceiver(O.dtlsTransport,p),j=w.track,i.push([j,w]),r.addTrack(j),t.localStreams.length>0&&t.localStreams[0].getTracks().length>=c){var D;"audio"===p?D=t.localStreams[0].getAudioTracks()[0]:"video"===p&&(D=t.localStreams[0].getVideoTracks()[0]),D&&(y=new RTCRtpSender(D,O.dtlsTransport))}t.transceivers[c]={iceGatherer:O.iceGatherer,iceTransport:O.iceTransport,dtlsTransport:O.dtlsTransport,localCapabilities:_,remoteCapabilities:A,rtpSender:y,rtpReceiver:w,kind:p,mid:d,cname:C,sendEncodingParameters:x,recvEncodingParameters:k},t._transceive(t.transceivers[c],!1,"sendrecv"===h||"sendonly"===h)}}),this.remoteDescription={type:e.type,sdp:e.sdp},e.type){case"offer":this._updateSignalingState("have-remote-offer");break;case"answer":this._updateSignalingState("stable");break;default:throw new TypeError('unsupported type "'+e.type+'"')}return r.getTracks().length&&(t.remoteStreams.push(r),window.setTimeout(function(){var e=new Event("addstream");e.stream=r,t.dispatchEvent(e),null!==t.onaddstream&&window.setTimeout(function(){t.onaddstream(e); -},0),i.forEach(function(n){var i=n[0],a=n[1],o=new Event("track");o.track=i,o.receiver=a,o.streams=[r],t.dispatchEvent(e),null!==t.ontrack&&window.setTimeout(function(){t.ontrack(o)},0)})},0)),arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._updateSignalingState("closed")},window.RTCPeerConnection.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this.dispatchEvent(t),null!==this.onsignalingstatechange&&this.onsignalingstatechange(t)},window.RTCPeerConnection.prototype._maybeFireNegotiationNeeded=function(){var e=new Event("negotiationneeded");this.dispatchEvent(e),null!==this.onnegotiationneeded&&this.onnegotiationneeded(e)},window.RTCPeerConnection.prototype._updateConnectionState=function(){var e,t=this,r={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,failed:0};if(this.transceivers.forEach(function(e){r[e.iceTransport.state]++,r[e.dtlsTransport.state]++}),r.connected+=r.completed,e="new",r.failed>0?e="failed":r.connecting>0||r.checking>0?e="connecting":r.disconnected>0?e="disconnected":r.new>0?e="new":(r.connected>0||r.completed>0)&&(e="connected"),e!==t.iceConnectionState){t.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this.dispatchEvent(n),null!==this.oniceconnectionstatechange&&this.oniceconnectionstatechange(n)}},window.RTCPeerConnection.prototype.createOffer=function(){var e=this;if(this._pendingOffer)throw new Error("createOffer called while there is a pending offer.");var t;1===arguments.length&&"function"!=typeof arguments[0]?t=arguments[0]:3===arguments.length&&(t=arguments[2]);var r=[],i=0,a=0;if(this.localStreams.length&&(i=this.localStreams[0].getAudioTracks().length,a=this.localStreams[0].getVideoTracks().length),t){if(t.mandatory||t.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==t.offerToReceiveAudio&&(i=t.offerToReceiveAudio),void 0!==t.offerToReceiveVideo&&(a=t.offerToReceiveVideo)}for(this.localStreams.length&&this.localStreams[0].getTracks().forEach(function(e){r.push({kind:e.kind,track:e,wantReceive:"audio"===e.kind?i>0:a>0}),"audio"===e.kind?i--:"video"===e.kind&&a--});i>0||a>0;)i>0&&(r.push({kind:"audio",wantReceive:!0}),i--),a>0&&(r.push({kind:"video",wantReceive:!0}),a--);var o=n.writeSessionBoilerplate(),s=[];r.forEach(function(t,r){var i=t.track,a=t.kind,o=n.generateIdentifier(),c=e.usingBundle&&r>0?{iceGatherer:s[0].iceGatherer,iceTransport:s[0].iceTransport,dtlsTransport:s[0].dtlsTransport}:e._createIceAndDtlsTransports(o,r),u=RTCRtpSender.getCapabilities(a);u.codecs=u.codecs.filter(function(e){return"rtx"!==e.name}),u.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1")});var l,p,f=[{ssrc:1001*(2*r+1)}];i&&(l=new RTCRtpSender(i,c.dtlsTransport)),t.wantReceive&&(p=new RTCRtpReceiver(c.dtlsTransport,a)),s[r]={iceGatherer:c.iceGatherer,iceTransport:c.iceTransport,dtlsTransport:c.dtlsTransport,localCapabilities:u,remoteCapabilities:null,rtpSender:l,rtpReceiver:p,kind:a,mid:o,sendEncodingParameters:f,recvEncodingParameters:null}}),this.usingBundle&&(o+="a=group:BUNDLE "+s.map(function(e){return e.mid}).join(" ")+"\r\n"),r.forEach(function(t,r){var i=s[r];o+=n.writeMediaSection(i,i.localCapabilities,"offer",e.localStreams[0])}),this._pendingOffer=s;var c=new RTCSessionDescription({type:"offer",sdp:o});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,c),Promise.resolve(c)},window.RTCPeerConnection.prototype.createAnswer=function(){var e=this,t=n.writeSessionBoilerplate();this.usingBundle&&(t+="a=group:BUNDLE "+this.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),this.transceivers.forEach(function(r){if(r.isDatachannel)return void(t+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+r.mid+"\r\n");var i=e._getCommonCapabilities(r.localCapabilities,r.remoteCapabilities);t+=n.writeMediaSection(r,i,"answer",e.localStreams[0])});var r=new RTCSessionDescription({type:"answer",sdp:t});return arguments.length&&"function"==typeof arguments[0]&&window.setTimeout(arguments[0],0,r),Promise.resolve(r)},window.RTCPeerConnection.prototype.addIceCandidate=function(e){if(e){var t=e.sdpMLineIndex;if(e.sdpMid)for(var r=0;r0?n.parseCandidate(e.candidate):{};if("tcp"===a.protocol&&(0===a.port||9===a.port))return;if("1"!==a.component)return;"endOfCandidates"===a.type&&(a={}),i.iceTransport.addRemoteCandidate(a);var o=n.splitSections(this.remoteDescription.sdp);o[t+1]+=(a.type?e.candidate.trim():"a=end-of-candidates")+"\r\n",this.remoteDescription.sdp=o.join("")}}else this.transceivers.forEach(function(e){e.iceTransport.addRemoteCandidate({})});return arguments.length>1&&"function"==typeof arguments[1]&&window.setTimeout(arguments[1],0),Promise.resolve()},window.RTCPeerConnection.prototype.getStats=function(){var e=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(r){t[r]&&e.push(t[r].getStats())})});var t=arguments.length>1&&"function"==typeof arguments[1]&&arguments[1];return new Promise(function(r){var n=new Map;Promise.all(e).then(function(e){e.forEach(function(e){Object.keys(e).forEach(function(t){n.set(t,e[t]),n[t]=e[t]})}),t&&window.setTimeout(t,0,n),r(n)})})}}};t.exports={shimPeerConnection:a.shimPeerConnection,shimGetUserMedia:e("./getusermedia")}},{"../utils":547,"./getusermedia":543,sdp:474}],543:[function(e,t,r){"use strict";t.exports=function(){var e=function(e){return{name:{PermissionDeniedError:"NotAllowedError"}[e.name]||e.name,message:e.message,constraint:e.constraint,toString:function(){return this.name}}},t=navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);navigator.mediaDevices.getUserMedia=function(r){return t(r).catch(function(t){return Promise.reject(e(t))})}}},{}],544:[function(e,t,r){"use strict";var n=e("../utils").browserDetails,i={shimOnTrack:function(){"object"!=typeof window||!window.RTCPeerConnection||"ontrack"in window.RTCPeerConnection.prototype||Object.defineProperty(window.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(e){e.stream.getTracks().forEach(function(t){var r=new Event("track");r.track=t,r.receiver={track:t},r.streams=[e.stream],this.dispatchEvent(r)}.bind(this))}.bind(this))}})},shimSourceObject:function(){"object"==typeof window&&(!window.HTMLMediaElement||"srcObject"in window.HTMLMediaElement.prototype||Object.defineProperty(window.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(){if("object"==typeof window&&(window.RTCPeerConnection||window.mozRTCPeerConnection)){window.RTCPeerConnection||(window.RTCPeerConnection=function(e,t){if(n.version<38&&e&&e.iceServers){for(var r=[],i=0;i=r&&parseInt(n[r],10)},detectBrowser:function(){var e={};if(e.browser=null,e.version=null,"undefined"==typeof window||!window.navigator)return e.browser="Not a browser.",e;if(navigator.mozGetUserMedia)e.browser="firefox",e.version=this.extractVersion(navigator.userAgent,/Firefox\/([0-9]+)\./,1);else if(navigator.webkitGetUserMedia)if(window.webkitRTCPeerConnection)e.browser="chrome",e.version=this.extractVersion(navigator.userAgent,/Chrom(e|ium)\/([0-9]+)\./,2);else{if(!navigator.userAgent.match(/Version\/(\d+).(\d+)/))return e.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",e;e.browser="safari",e.version=this.extractVersion(navigator.userAgent,/AppleWebKit\/([0-9]+)\./,1)}else{if(!navigator.mediaDevices||!navigator.userAgent.match(/Edge\/(\d+).(\d+)$/))return e.browser="Not a supported browser.",e;e.browser="edge",e.version=this.extractVersion(navigator.userAgent,/Edge\/(\d+).(\d+)$/,2)}return e}};t.exports={log:i.log,disableLog:i.disableLog,browserDetails:i.detectBrowser(),extractVersion:i.extractVersion}},{}],548:[function(e,t,r){(function(){"use strict";r.stripBOM=function(e){return"\ufeff"===e[0]?e.substring(1):e}}).call(this)},{}],549:[function(e,t,r){(function(){"use strict";var e;e=new RegExp(/(?!xmlns)^.*:/),r.normalize=function(e){return e.toLowerCase()},r.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},r.stripPrefix=function(t){return t.replace(e,"")},r.parseNumbers=function(e){return isNaN(e)||(e=e%1===0?parseInt(e,10):parseFloat(e)),e},r.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e="true"===e.toLowerCase()),e}}).call(this)},{}],550:[function(e,t,r){(function(){"use strict";var t,n,i,a,o,s,c,u,l,p,f,h=function(e,t){function r(){this.constructor=e}for(var n in t)d.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},d={}.hasOwnProperty,m=function(e,t){return function(){return e.apply(t,arguments)}};l=e("sax"),a=e("events"),n=e("xmlbuilder"),t=e("./bom"),c=e("./processors"),p=e("timers").setImmediate,o=function(e){return"object"==typeof e&&null!=e&&0===Object.keys(e).length},s=function(e,t){var r,n,i;for(r=0,n=e.length;r=0||e.indexOf(">")>=0||e.indexOf("<")>=0},f=function(e){return""},i=function(e){return e.replace("]]>","]]]]>")},r.processors=c,r.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:"\n"},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}},r.ValidationError=function(e){function t(e){this.message=e}return h(t,e),t}(Error),r.Builder=function(){function e(e){var t,n,i;this.options={},n=r.defaults[.2];for(t in n)d.call(n,t)&&(i=n[t],this.options[t]=i);for(t in e)d.call(e,t)&&(i=e[t],this.options[t]=i)}return e.prototype.buildObject=function(e){var t,i,a,o,s;return t=this.options.attrkey,i=this.options.charkey,1===Object.keys(e).length&&this.options.rootName===r.defaults[.2].rootName?(s=Object.keys(e)[0],e=e[s]):s=this.options.rootName,a=function(e){return function(r,n){var o,s,c,l,p,h;if("object"!=typeof n)e.options.cdata&&u(n)?r.raw(f(n)):r.txt(n);else for(p in n)if(d.call(n,p))if(s=n[p],p===t){if("object"==typeof s)for(o in s)h=s[o],r=r.att(o,h)}else if(p===i)r=e.options.cdata&&u(s)?r.raw(f(s)):r.txt(s);else if(Array.isArray(s))for(l in s)d.call(s,l)&&(c=s[l],r="string"==typeof c?e.options.cdata&&u(c)?r.ele(p).raw(f(c)).up():r.ele(p,c).up():a(r.ele(p),c).up());else"object"==typeof s?r=a(r.ele(p),s).up():"string"==typeof s&&e.options.cdata&&u(s)?r=r.ele(p).raw(f(s)).up():(null==s&&(s=""),r=r.ele(p,s.toString()).up());return r}}(this),o=n.create(s,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),a(o,e).end(this.options.renderOpts)},e}(),r.Parser=function(e){function n(e){this.parseString=m(this.parseString,this),this.reset=m(this.reset,this),this.assignOrPush=m(this.assignOrPush,this),this.processAsync=m(this.processAsync,this);var t,n,i;if(!(this instanceof r.Parser))return new r.Parser(e);this.options={},n=r.defaults[.2];for(t in n)d.call(n,t)&&(i=n[t],this.options[t]=i);for(t in e)d.call(e,t)&&(i=e[t],this.options[t]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(c.normalize)),this.reset()}return h(n,e),n.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),p(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},n.prototype.assignOrPush=function(e,t,r){return t in e?(e[t]instanceof Array||(e[t]=[e[t]]),e[t].push(r)):this.options.explicitArray?e[t]=[r]:e[t]=r},n.prototype.reset=function(){var e,t,r,n;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(e){return function(t){if(e.saxParser.resume(),!e.saxParser.errThrown)return e.saxParser.errThrown=!0,e.emit("error",t)}}(this),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit("end",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,n=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(r){return function(i){var a,o,c,u,l;if(c={},c[t]="",!r.options.ignoreAttrs){l=i.attributes;for(a in l)d.call(l,a)&&(e in c||r.options.mergeAttrs||(c[e]={}),o=r.options.attrValueProcessors?s(r.options.attrValueProcessors,i.attributes[a]):i.attributes[a],u=r.options.attrNameProcessors?s(r.options.attrNameProcessors,a):a,r.options.mergeAttrs?r.assignOrPush(c,u,o):c[e][u]=o)}return c["#name"]=r.options.tagNameProcessors?s(r.options.tagNameProcessors,i.name):i.name,r.options.xmlns&&(c[r.options.xmlnskey]={uri:i.uri,local:i.local}),n.push(c)}}(this),this.saxParser.onclosetag=function(e){return function(){var r,i,a,c,u,l,p,f,h,m,g;if(p=n.pop(),l=p["#name"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete p["#name"],p.cdata===!0&&(r=p.cdata,delete p.cdata),m=n[n.length-1],p[t].match(/^\s*$/)&&!r?(i=p[t],delete p[t]):(e.options.trim&&(p[t]=p[t].trim()),e.options.normalize&&(p[t]=p[t].replace(/\s{2,}/g," ").trim()),p[t]=e.options.valueProcessors?s(e.options.valueProcessors,p[t]):p[t],1===Object.keys(p).length&&t in p&&!e.EXPLICIT_CHARKEY&&(p=p[t])),o(p)&&(p=""!==e.options.emptyTag?e.options.emptyTag:i),null!=e.options.validator){g="/"+function(){var e,t,r;for(r=[],e=0,t=n.length;e0&&(u[e.options.childkey]=p),p=u;return n.length>0?e.assignOrPush(m,l,p):(e.options.explicitRoot&&(h=p,p={},p[l]=h),e.resultObject=p,e.saxParser.ended=!0,e.emit("end",e.resultObject))}}(this),r=function(e){return function(r){var i,a;if(a=n[n.length-1])return a[t]+=r,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||""!==r.replace(/\\n/g,"").trim())&&(a[e.options.childkey]=a[e.options.childkey]||[],i={"#name":"__text__"},i[t]=r,e.options.normalize&&(i[t]=i[t].replace(/\s{2,}/g," ").trim()),a[e.options.childkey].push(i)),a}}(this),this.saxParser.ontext=r,this.saxParser.oncdata=function(e){return function(e){var t;if(t=r(e))return t.cdata=!0}}(this)},n.prototype.parseString=function(e,r){var n;null!=r&&"function"==typeof r&&(this.on("end",function(e){return this.reset(),r(null,e)}),this.on("error",function(e){return this.reset(),r(e)}));try{return e=e.toString(),""===e.trim()?(this.emit("end",null),!0):(e=t.stripBOM(e),this.options.async?(this.remaining=e,p(this.processAsync),this.saxParser):this.saxParser.write(e).close())}catch(e){if(n=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",n),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw n}},n}(a.EventEmitter),r.parseString=function(e,t,n){var i,a,o;return null!=n?("function"==typeof n&&(i=n),"object"==typeof t&&(a=t)):("function"==typeof t&&(i=t),a={}),o=new r.Parser(a),o.parseString(e,i)}}).call(this)},{"./bom":548,"./processors":549,events:171,sax:473,timers:515,xmlbuilder:567}],551:[function(e,t,r){(function(){var r,n;n=e("lodash/create"),t.exports=r=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing attribute name of element "+e.name);if(null==r)throw new Error("Missing attribute value for attribute "+t+" of element "+e.name);this.name=this.stringify.attName(t),this.value=this.stringify.attValue(r)}return e.prototype.clone=function(){return n(e.prototype,this)},e.prototype.toString=function(e,t){return" "+this.name+'="'+this.value+'"'},e}()}).call(this)},{"lodash/create":352}],552:[function(e,t,r){(function(){var r,n,i,a,o;o=e("./XMLStringifier"),n=e("./XMLDeclaration"),i=e("./XMLDocType"),a=e("./XMLElement"),t.exports=r=function(){function e(e,t){var r,n;if(null==e)throw new Error("Root element needs a name");null==t&&(t={}),this.options=t,this.stringify=new o(t),n=new a(this,"doc"),r=n.element(e),r.isRoot=!0,r.documentObject=this,this.rootObject=r,t.headless||(r.declaration(t),null==t.pubID&&null==t.sysID||r.doctype(t))}return e.prototype.root=function(){return this.rootObject},e.prototype.end=function(e){return this.toString(e)},e.prototype.toString=function(e){var t,r,n,i,a,o,s,c;return i=(null!=e?e.pretty:void 0)||!1,t=null!=(o=null!=e?e.indent:void 0)?o:" ",n=null!=(s=null!=e?e.offset:void 0)?s:0,r=null!=(c=null!=e?e.newline:void 0)?c:"\n",a="",null!=this.xmldec&&(a+=this.xmldec.toString(e)),null!=this.doctype&&(a+=this.doctype.toString(e)),a+=this.rootObject.toString(e),i&&a.slice(-r.length)===r&&(a=a.slice(0,-r.length)),a},e}()}).call(this)},{"./XMLDeclaration":559,"./XMLDocType":560,"./XMLElement":561,"./XMLStringifier":565}],553:[function(e,t,r){(function(){var r,n,i,a=function(e,t){function r(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;i=e("lodash/create"),n=e("./XMLNode"),t.exports=r=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(r)}return a(t,e),t.prototype.clone=function(){return i(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},t}(n)}).call(this)},{"./XMLNode":562,"lodash/create":352}],554:[function(e,t,r){(function(){var r,n,i,a=function(e,t){function r(){this.constructor=e}for(var n in t)o.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},o={}.hasOwnProperty;i=e("lodash/create"),n=e("./XMLNode"),t.exports=r=function(e){function t(e,r){if(t.__super__.constructor.call(this,e),null==r)throw new Error("Missing comment text");this.text=this.stringify.comment(r)}return a(t,e),t.prototype.clone=function(){return i(t.prototype,this)},t.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},t}(n)}).call(this)},{"./XMLNode":562,"lodash/create":352}],555:[function(e,t,r){(function(){var r,n;n=e("lodash/create"),t.exports=r=function(){function e(e,t,r,n,i,a){if(this.stringify=e.stringify,null==t)throw new Error("Missing DTD element name");if(null==r)throw new Error("Missing DTD attribute name");if(!n)throw new Error("Missing DTD attribute type");if(!i)throw new Error("Missing DTD attribute default");if(0!==i.indexOf("#")&&(i="#"+i),!i.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(a&&!i.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(t),this.attributeName=this.stringify.attName(r),this.attributeType=this.stringify.dtdAttType(n),this.defaultValue=this.stringify.dtdAttDefault(a),this.defaultValueType=i}return e.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},e}()}).call(this)},{"lodash/create":352}],556:[function(e,t,r){(function(){var r,n;n=e("lodash/create"),t.exports=r=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing DTD element name");r||(r="(#PCDATA)"),Array.isArray(r)&&(r="("+r.join(",")+")"),this.name=this.stringify.eleName(t),this.value=this.stringify.dtdElementValue(r)}return e.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},e}()}).call(this)},{"lodash/create":352}],557:[function(e,t,r){(function(){var r,n,i;n=e("lodash/create"),i=e("lodash/isObject"),t.exports=r=function(){function e(e,t,r,n){if(this.stringify=e.stringify,null==r)throw new Error("Missing entity name");if(null==n)throw new Error("Missing entity value");if(this.pe=!!t,this.name=this.stringify.eleName(r),i(n)){if(!n.pubID&&!n.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(n.pubID&&!n.sysID)throw new Error("System identifier is required for a public external entity");if(null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID)),null!=n.nData&&(this.nData=this.stringify.dtdNData(n.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(n)}return e.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},e}()}).call(this)},{"lodash/create":352,"lodash/isObject":365}],558:[function(e,t,r){(function(){var r,n;n=e("lodash/create"),t.exports=r=function(){function e(e,t,r){if(this.stringify=e.stringify,null==t)throw new Error("Missing notation name");if(!r.pubID&&!r.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(t),null!=r.pubID&&(this.pubID=this.stringify.dtdPubID(r.pubID)),null!=r.sysID&&(this.sysID=this.stringify.dtdSysID(r.sysID))}return e.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},e}()}).call(this)},{"lodash/create":352}],559:[function(e,t,r){(function(){var r,n,i,a,o=function(e,t){function r(){this.constructor=e}for(var n in t)s.call(t,n)&&(e[n]=t[n]);return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e},s={}.hasOwnProperty;i=e("lodash/create"),a=e("lodash/isObject"),n=e("./XMLNode"),t.exports=r=function(e){function t(e,r,n,i){var o;t.__super__.constructor.call(this,e),a(r)&&(o=r,r=o.version,n=o.encoding,i=o.standalone),r||(r="1.0"),this.version=this.stringify.xmlVersion(r),null!=n&&(this.encoding=this.stringify.xmlEncoding(n)),null!=i&&(this.standalone=this.stringify.xmlStandalone(i))}return o(t,e),t.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l;return a=(null!=e?e.pretty:void 0)||!1,r=null!=(s=null!=e?e.indent:void 0)?s:" ",i=null!=(c=null!=e?e.offset:void 0)?c:0,n=null!=(u=null!=e?e.newline:void 0)?u:"\n",t||(t=0),l=new Array(t+i+1).join(r),o="",a&&(o+=l),o+="",a&&(o+=n),o},t}(n)}).call(this)},{"./XMLNode":562,"lodash/create":352,"lodash/isObject":365}],560:[function(e,t,r){(function(){var r,n,i,a,o,s,c,u,l,p;l=e("lodash/create"),p=e("lodash/isObject"),r=e("./XMLCData"),n=e("./XMLComment"),i=e("./XMLDTDAttList"),o=e("./XMLDTDEntity"),a=e("./XMLDTDElement"),s=e("./XMLDTDNotation"),u=e("./XMLProcessingInstruction"),t.exports=c=function(){function e(e,t,r){var n,i;this.documentObject=e,this.stringify=this.documentObject.stringify,this.children=[], -p(t)&&(n=t,t=n.pubID,r=n.sysID),null==r&&(i=[t,r],r=i[0],t=i[1]),null!=t&&(this.pubID=this.stringify.dtdPubID(t)),null!=r&&(this.sysID=this.stringify.dtdSysID(r))}return e.prototype.element=function(e,t){var r;return r=new a(this,e,t),this.children.push(r),this},e.prototype.attList=function(e,t,r,n,a){var o;return o=new i(this,e,t,r,n,a),this.children.push(o),this},e.prototype.entity=function(e,t){var r;return r=new o(this,!1,e,t),this.children.push(r),this},e.prototype.pEntity=function(e,t){var r;return r=new o(this,!0,e,t),this.children.push(r),this},e.prototype.notation=function(e,t){var r;return r=new s(this,e,t),this.children.push(r),this},e.prototype.cdata=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.comment=function(e){var t;return t=new n(this,e),this.children.push(t),this},e.prototype.instruction=function(e,t){var r;return r=new u(this,e,t),this.children.push(r),this},e.prototype.root=function(){return this.documentObject.root()},e.prototype.document=function(){return this.documentObject},e.prototype.toString=function(e,t){var r,n,i,a,o,s,c,u,l,p,f,h,d;if(c=(null!=e?e.pretty:void 0)||!1,i=null!=(l=null!=e?e.indent:void 0)?l:" ",s=null!=(p=null!=e?e.offset:void 0)?p:0,o=null!=(f=null!=e?e.newline:void 0)?f:"\n",t||(t=0),d=new Array(t+s+1).join(i),u="",c&&(u+=d),u+="0){for(u+=" [",c&&(u+=o),h=this.children,n=0,a=h.length;n",m&&(g+=h);else if(m&&1===this.children.length&&null!=this.children[0].value)g+=">",g+=this.children[0].value,g+="",g+=h;else{for(g+=">",m&&(g+=h),k=this.children,c=0,l=k.length;c",m&&(g+=h)}return g},t.prototype.att=function(e,t){return this.attribute(e,t)},t.prototype.ins=function(e,t){return this.instruction(e,t)},t.prototype.a=function(e,t){return this.attribute(e,t)},t.prototype.i=function(e,t){return this.instruction(e,t)},t}(i)}).call(this)},{"./XMLAttribute":551,"./XMLNode":562,"./XMLProcessingInstruction":563,"lodash/create":352,"lodash/every":354,"lodash/isFunction":363,"lodash/isObject":365}],562:[function(e,t,r){(function(){var r,n,i,a,o,s,c,u,l,p,f,h={}.hasOwnProperty;f=e("lodash/isObject"),p=e("lodash/isFunction"),l=e("lodash/isEmpty"),o=null,r=null,n=null,i=null,a=null,c=null,u=null,t.exports=s=function(){function t(t){this.parent=t,this.options=this.parent.options,this.stringify=this.parent.stringify,null===o&&(o=e("./XMLElement"),r=e("./XMLCData"),n=e("./XMLComment"),i=e("./XMLDeclaration"),a=e("./XMLDocType"),c=e("./XMLRaw"),u=e("./XMLText"))}return t.prototype.element=function(e,t,r){var n,i,a,o,s,c,u,d,m,g;if(c=null,null==t&&(t={}),t=t.valueOf(),f(t)||(m=[t,r],r=m[0],t=m[1]),null!=e&&(e=e.valueOf()),Array.isArray(e))for(a=0,u=e.length;a/))throw new Error("Invalid CDATA text: "+e);return this.assertLegalChar(e)},e.prototype.comment=function(e){if(e=""+e||"",e.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return""+e||""},e.prototype.attName=function(e){return""+e||""},e.prototype.attValue=function(e){return e=""+e||"",this.attEscape(e)},e.prototype.insTarget=function(e){return""+e||""},e.prototype.insValue=function(e){if(e=""+e||"",e.match(/\?>/))throw new Error("Invalid processing instruction value: "+e);return e},e.prototype.xmlVersion=function(e){if(e=""+e||"",!e.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+e);return e},e.prototype.xmlEncoding=function(e){if(e=""+e||"",!e.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/))throw new Error("Invalid encoding: "+e);return e},e.prototype.xmlStandalone=function(e){return e?"yes":"no"},e.prototype.dtdPubID=function(e){return""+e||""},e.prototype.dtdSysID=function(e){return""+e||""},e.prototype.dtdElementValue=function(e){return""+e||""},e.prototype.dtdAttType=function(e){return""+e||""},e.prototype.dtdAttDefault=function(e){return null!=e?""+e||"":e},e.prototype.dtdEntityValue=function(e){return""+e||""},e.prototype.dtdNData=function(e){return""+e||""},e.prototype.convertAttKey="@",e.prototype.convertPIKey="?",e.prototype.convertTextKey="#text",e.prototype.convertCDataKey="#cdata",e.prototype.convertCommentKey="#comment",e.prototype.convertRawKey="#raw",e.prototype.assertLegalChar=function(e){var t,r;if(t=this.allowSurrogateChars?/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uFFFE-\uFFFF]/:/[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/,r=e.match(t))throw new Error("Invalid character ("+r+") in string: "+e+" at index "+r.index);return e},e.prototype.elEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(//g,">").replace(/\r/g," ")},e.prototype.attEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,e.replace(t,"&").replace(/=0;b--){var y=e.items[b];l[y.user_id]={action:y.action,mutualBlock:y.mutualBlock===!0}}g=Object.keys(l);var w={type:"set",from:p,id:m.getUniqueId("edit")},x=v.getEnv().browser?$iq:h.Stanza,k=m.createStanza(x,w,"iq");k.c("query",{xmlns:m.MARKERS.PRIVACY}).c("list",{name:e.name});for(var _=0,S=0,E=g.length;_-1?"groupchat":"chat";else{if("number"!=typeof e)throw new Error(x);t="chat"}return t},getRecipientId:function(e,t){var r=null;return e.forEach(function(e){e!=t&&(r=e)}),r},getUserJid:function(e,t){return t?e+"-"+t+"@"+g.endpoints.chat:e+"-"+g.creds.appId+"@"+g.endpoints.chat},getUserNickWithMucDomain:function(e){return g.endpoints.muc+"/"+e},getIdFromNode:function(e){return e.indexOf("@")<0?null:parseInt(e.split("@")[0].split("-")[0])},getDialogIdFromNode:function(e){return e.indexOf("@")<0?null:e.split("@")[0].split("_")[1]},getRoomJidFromDialogId:function(e){return g.creds.appId+"_"+e+"@"+g.endpoints.muc},getRoomJid:function(e){return e+"/"+this.getIdFromNode(p)},getIdFromResource:function(e){var t=e.split("/");return t.length<2?null:(t.splice(0,1),parseInt(t.join("/")))},getBsonObjectId:function(){return v.getBsonObjectId()},getUserIdFromRoomJid:function(e){var t=e.toString().split("/");return 0===t.length?null:t[t.length-1]}},t.exports=n},{"../plugins/streamManagement":585,"../qbConfig":586,"../qbUtils":590,"./qbChatHelpers":571,"node-xmpp-client":396,"strophe.js":514}],571:[function(e,t,r){"use strict";var n=e("../qbUtils"),i=e("../qbConfig"),a="Unknown interface. SDK support browser / node env.",o={CLIENT:"jabber:client",CHAT:"urn:xmpp:chat-markers:0",STATES:"http://jabber.org/protocol/chatstates",MARKERS:"urn:xmpp:chat-markers:0",CARBONS:"urn:xmpp:carbons:2",ROSTER:"jabber:iq:roster",MUC:"http://jabber.org/protocol/muc",PRIVACY:"jabber:iq:privacy"},s={MARKERS:o,buildUserJid:function(e){var t;return"userId"in e?(t=e.userId+"-"+i.creds.appId+"@"+i.endpoints.chat,"resource"in e&&(t=t+"/"+e.resource)):"jid"in e&&(t=e.jid),t},createStanza:function(e,t,r){var i;return n.getEnv().browser?i=e(t):n.getEnv().node&&(i=new e(r?r:"message",t)),i},getAttr:function(e,t){var r;if("function"==typeof e.getAttribute)r=e.getAttribute(t);else{if(!e.attrs)throw a;r=e.attrs[t]}return r?r:null},getElement:function(e,t){var r;if("function"==typeof e.querySelector)r=e.querySelector(t);else{if("function"!=typeof e.getChild)throw a;r=e.getChild(t)}return r?r:null},getAllElements:function(e,t){var r;if("function"==typeof e.querySelectorAll)r=e.querySelectorAll(t);else{if("function"!=typeof e.getChild)throw a;r=e.getChild(t)}return r?r:null},getElementText:function(e,t){var r,n;if("function"==typeof e.querySelector)r=e.querySelector(t),n=r?r.textContent:null;else{if("function"!=typeof e.getChildText)throw a;n=e.getChildText(t)}return n?n:null},_JStoXML:function(e,t,r){var n=this;r.c(e),Object.keys(t).forEach(function(e){"object"==typeof t[e]?n._JStoXML(e,t[e],r):r.c(e).t(t[e]).up()}),r.up()},_XMLtoJS:function(e,t,r){var n=this;e[t]={};for(var i=0,a=r.childNodes.length;i1?e[t]=n._XMLtoJS(e[t],r.childNodes[i].tagName,r.childNodes[i]):e[t][r.childNodes[i].tagName]=r.childNodes[i].textContent;return e},filledExtraParams:function(e,t,r){var i=this;return Object.keys(t).forEach(function(r){"attachments"===r?t[r].forEach(function(t){e.c("attachment",t).up()}):"object"==typeof t[r]?i._JStoXML(r,t[r],e):n.getEnv().browser?e.c(r).t(t[r]).up():n.getEnv().node&&e.getChild("extraParams").c(r).t(t[r]).up()}),e.up(),e},parseExtraParams:function(e){var t=this;if(!e)return null;var r,i,a,o={},s=[];if(n.getEnv().browser)for(var c=0,u=e.childNodes.length;c1){var f=e.childNodes[c].textContent.length;if(f>4096){for(var h="",d=0;d0&&(o.attachments=s),o.moduleIdentifier&&delete o.moduleIdentifier,{extension:o,dialogId:r}},getUniqueId:function(e){var t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0,r="x"==e?t:3&t|8;return r.toString(16)});return"string"==typeof e||"number"==typeof e?t+":"+e:t+""},getErrorFromXMLNode:function(e){var t=e.getElementsByTagName("error")[0],r=parseInt(t.getAttribute("code")),i=t.getElementsByTagName("text")[0].textContent;return n.getError(r,i)},getLocalTime:function(){return(new Date).toTimeString().split(" ")[0]}};t.exports=s},{"../qbConfig":586,"../qbUtils":590}],572:[function(e,t,r){"use strict";function n(e){this.service=e}function i(e){for(var t=i.options,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,i){r&&(n[t.q.name][r]=i)}),n}var a=e("../qbConfig"),o=e("../qbUtils"),s="undefined"!=typeof window;if(!s){e("xml2js")}var c=a.urls.blobs+"/tagged";n.prototype={create:function(e,t){o.QBLog("[ContentProxy]","create",e),this.service.ajax({type:"POST",data:{blob:e},url:o.getUrl(a.urls.blobs)},function(e,r){e?t(e,null):t(e,r.blob)})},list:function(e,t){"function"==typeof e&&"undefined"==typeof t&&(t=e,e=null),o.QBLog("[ContentProxy]","list",e),this.service.ajax({url:o.getUrl(a.urls.blobs),data:e,type:"GET"},function(e,r){e?t(e,null):t(e,r)})},delete:function(e,t){o.QBLog("[ContentProxy]","delete"),this.service.ajax({url:o.getUrl(a.urls.blobs,e),type:"DELETE",dataType:"text"},function(e,r){e?t(e,null):t(null,!0)})},createAndUpload:function(e,t){var r,n,a,c,u,l=this,p={},f=JSON.parse(JSON.stringify(e));f.file.data="...",o.QBLog("[ContentProxy]","createAndUpload",f),r=e.file,n=e.name||r.name,a=e.type||r.type,c=e.size||r.size,p.name=n,p.content_type=a,e.public&&(p.public=e.public),e.tag_list&&(p.tag_list=e.tag_list),this.create(p,function(e,n){if(e)t(e,null);else{var a=i(n.blob_object_access.params),o=a.protocol+"://"+a.authority+a.path,p={url:o},f=s?new FormData:{};u=n.id,Object.keys(a.queryKey).forEach(function(e){s?f.append(e,decodeURIComponent(a.queryKey[e])):f[e]=decodeURIComponent(a.queryKey[e])}),s?f.append("file",r,n.name):f.file=r,p.data=f,l.upload(p,function(e,r){e?t(e,null):l.markUploaded({id:u,size:c},function(e,r){e?t(e,null):t(null,n)})})}})},upload:function(e,t){o.QBLog("[ContentProxy]","upload");var r={type:"POST",dataType:"text",contentType:!1,processData:!1,url:e.url,data:e.data};this.service.ajax(r,function(e,r){e?t(e,null):t(null,{})})},taggedForCurrentUser:function(e){o.QBLog("[ContentProxy]","taggedForCurrentUser"),this.service.ajax({url:o.getUrl(c)},function(t,r){t?e(t,null):e(null,r)})},markUploaded:function(e,t){o.QBLog("[ContentProxy]","markUploaded",e),this.service.ajax({url:o.getUrl(a.urls.blobs,e.id+"/complete"),type:"PUT",data:{size:e.size},dataType:"text"},function(e,r){e?t(e,null):t(null,r)})},getInfo:function(e,t){o.QBLog("[ContentProxy]","getInfo",e),this.service.ajax({url:o.getUrl(a.urls.blobs,e)},function(e,r){e?t(e,null):t(null,r)})},getFile:function(e,t){o.QBLog("[ContentProxy]","getFile",e),this.service.ajax({url:o.getUrl(a.urls.blobs,e)},function(e,r){e?t(e,null):t(null,r)})},getFileUrl:function(e,t){o.QBLog("[ContentProxy]","getFileUrl",e),this.service.ajax({url:o.getUrl(a.urls.blobs,e+"/getblobobjectbyid"),type:"POST"},function(e,r){e?t(e,null):t(null,r.blob_object_access.params)})},update:function(e,t){o.QBLog("[ContentProxy]","update",e);var r={};r.blob={},"undefined"!=typeof e.name&&(r.blob.name=e.name),this.service.ajax({url:o.getUrl(a.urls.blobs,e.id),data:r},function(e,r){e?t(e,null):t(null,r)})},privateUrl:function(e){return"https://"+a.endpoints.api+"/blobs/"+e+"?token="+this.service.getSession().token},publicUrl:function(e){return"https://"+a.endpoints.api+"/blobs/"+e}},t.exports=n,i.options={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}}},{"../qbConfig":586,"../qbUtils":590,xml2js:550}],573:[function(e,t,r){"use strict";function n(e){this.service=e}var i=e("../qbConfig"),a=e("../qbUtils"),o="undefined"!=typeof window;n.prototype={create:function(e,t,r){a.QBLog("[DataProxy]","create",e,t),this.service.ajax({url:a.getUrl(i.urls.data,e),data:t,type:"POST"},function(e,t){e?r(e,null):r(e,t)})},list:function(e,t,r){"undefined"==typeof r&&"function"==typeof t&&(r=t,t=null),a.QBLog("[DataProxy]","list",e,t),this.service.ajax({url:a.getUrl(i.urls.data,e),data:t},function(e,t){e?r(e,null):r(e,t)})},update:function(e,t,r){a.QBLog("[DataProxy]","update",e,t),this.service.ajax({url:a.getUrl(i.urls.data,e+"/"+t._id),data:t,type:"PUT"},function(e,t){e?r(e,null):r(e,t)})},delete:function(e,t,r){a.QBLog("[DataProxy]","delete",e,t),this.service.ajax({url:a.getUrl(i.urls.data,e+"/"+t),type:"DELETE",dataType:"text"},function(e,t){e?r(e,null):r(e,!0)})},uploadFile:function(e,t,r){a.QBLog("[DataProxy]","uploadFile",e,t);var n;o?(n=new FormData,n.append("field_name",t.field_name),n.append("file",t.file)):n={field_name:t.field_name,file:{data:t.file,name:t.name}},this.service.ajax({url:a.getUrl(i.urls.data,e+"/"+t.id+"/file"),data:n,contentType:!1,processData:!1,type:"POST",isFileUpload:!0},function(e,t){e?r(e,null):r(e,t)})},downloadFile:function(e,t,r){a.QBLog("[DataProxy]","downloadFile",e,t);var n=a.getUrl(i.urls.data,e+"/"+t.id+"/file");n+="?field_name="+t.field_name+"&token="+this.service.getSession().token,r(null,n)},fileUrl:function(e,t){var r=a.getUrl(i.urls.data,e+"/"+t.id+"/file");return r+="?field_name="+t.field_name+"&token="+this.service.getSession().token},deleteFile:function(e,t,r){a.QBLog("[DataProxy]","deleteFile",e,t),this.service.ajax({url:a.getUrl(i.urls.data,e+"/"+t.id+"/file"),data:{field_name:t.field_name},dataType:"text",type:"DELETE"},function(e,t){e?r(e,null):r(e,!0)})}},t.exports=n},{"../qbConfig":586,"../qbUtils":590}],574:[function(e,t,r){"use strict";function n(e){this.service=e,this.geodata=new i(e)}function i(e){this.service=e}var a=e("../qbConfig"),o=e("../qbUtils"),s=a.urls.geodata+"/find",c="Avoid using it, this feature will be removed in future version. Instread of it use Custom Object (https://quickblox.com/developers/Sample-customobjects-javascript)";i.prototype={create:function(e,t){o.QBLog("[GeoProxy]","create",e),o.QBLog("Deprecated!",c),this.service.ajax({url:o.getUrl(a.urls.geodata),data:{geo_data:e},type:"POST"},function(e,r){e?t(e,null):t(e,r.geo_datum)})},update:function(e,t){o.QBLog("Deprecated!",c);var r,n=["longitude","latitude","status"],i={};for(r in e)e.hasOwnProperty(r)&&n.indexOf(r)>0&&(i[r]=e[r]);o.QBLog("[GeoProxy]","update",e),this.service.ajax({url:o.getUrl(a.urls.geodata,e.id),data:{geo_data:i},type:"PUT"},function(e,r){e?t(e,null):t(e,r.geo_datum)})},get:function(e,t){o.QBLog("[GeoProxy]","get",e),o.QBLog("Deprecated!",c),this.service.ajax({url:o.getUrl(a.urls.geodata,e)},function(e,r){e?t(e,null):t(null,r.geo_datum)})},list:function(e,t){o.QBLog("Deprecated!",c),"function"==typeof e&&(t=e,e=void 0),o.QBLog("[GeoProxy]","find",e),this.service.ajax({url:o.getUrl(s),data:e},t)},delete:function(e,t){o.QBLog("[GeoProxy]","delete",e),o.QBLog("Deprecated!",c),this.service.ajax({url:o.getUrl(a.urls.geodata,e),type:"DELETE",dataType:"text"},function(e,r){e?t(e,null):t(null,!0)})},purge:function(e,t){o.QBLog("[GeoProxy]","purge",e),o.QBLog("Deprecated!",c),this.service.ajax({url:o.getUrl(a.urls.geodata),data:{days:e},type:"DELETE",dataType:"text"},function(e,r){e?t(e,null):t(null,!0)})}},t.exports=n},{"../qbConfig":586,"../qbUtils":590}],575:[function(e,t,r){(function(r){"use strict";function n(e){this.service=e,this.subscriptions=new i(e),this.events=new a(e),this.base64Encode=function(e){return c?btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x"+t)})):new r(e).toString("base64")}}function i(e){this.service=e}function a(e){this.service=e}var o=e("../qbConfig"),s=e("../qbUtils"),c="undefined"!=typeof window;i.prototype={create:function(e,t){s.QBLog("[SubscriptionsProxy]","create",e),this.service.ajax({url:s.getUrl(o.urls.subscriptions),type:"POST",data:e},t)},list:function(e){s.QBLog("[SubscriptionsProxy]","list"),this.service.ajax({url:s.getUrl(o.urls.subscriptions)},e)},delete:function(e,t){s.QBLog("[SubscriptionsProxy]","delete",e);var r={type:"DELETE",dataType:"text",url:s.getUrl(o.urls.subscriptions,e)};this.service.ajax(r,function(e,r){e?t(e,null):t(null,!0)})}},a.prototype={create:function(e,t){s.QBLog("[EventsProxy]","create",e);var r={event:e};this.service.ajax({url:s.getUrl(o.urls.events),type:"POST",data:r},t)},list:function(e,t){"function"==typeof e&&"undefined"==typeof t&&(t=e,e=null),s.QBLog("[EventsProxy]","list",e),this.service.ajax({url:s.getUrl(o.urls.events),data:e},t)},get:function(e,t){s.QBLog("[EventsProxy]","get",e),this.service.ajax({url:s.getUrl(o.urls.events,e)},t)},status:function(e,t){s.QBLog("[EventsProxy]","status",e),this.service.ajax({url:s.getUrl(o.urls.events,e+"/status")},t)},delete:function(e,t){s.QBLog("[EventsProxy]","delete",e),this.service.ajax({url:s.getUrl(o.urls.events,e),dataType:"text",type:"DELETE"},t)}},t.exports=n}).call(this,e("buffer").Buffer)},{"../qbConfig":586,"../qbUtils":590,buffer:122}],576:[function(e,t,r){"use strict";function n(e){this.service=e}function i(e){var t=e.field in u?"date":typeof e.value;return(e.value instanceof Array||c.isArray(e.value))&&("object"==t&&(t=typeof e.value[0]),e.value=e.value.toString()),[t,e.field,e.param,e.value].join(" ")}function a(e){var t=e.field in u?"date":e.field in l?"number":"string";return[e.sort,t,e.field].join(" ")}var o=e("../qbConfig"),s=e("../qbUtils"),c=e("util"),u=["created_at","updated_at","last_request_at"],l=["id","external_user_id"],p=o.urls.users+"/password/reset";n.prototype={listUsers:function(e,t){s.QBLog("[UsersProxy]","listUsers",arguments.length>1?e:"");var r,n={},c=[];"function"==typeof e&&"undefined"==typeof t&&(t=e,e={}),e.filter&&(e.filter instanceof Array?e.filter.forEach(function(e){r=i(e),c.push(r)}):(r=i(e.filter),c.push(r)),n.filter=c),e.order&&(n.order=a(e.order)),e.page&&(n.page=e.page),e.per_page&&(n.per_page=e.per_page),this.service.ajax({url:s.getUrl(o.urls.users),data:n},t)},get:function(e,t){s.QBLog("[UsersProxy]","get",e);var r;"number"==typeof e?(r=e,e={}):e.login?r="by_login":e.full_name?r="by_full_name":e.facebook_id?r="by_facebook_id":e.twitter_id?r="by_twitter_id":e.email?r="by_email":e.tags?r="by_tags":e.external&&(r="external/"+e.external,e={}),this.service.ajax({url:s.getUrl(o.urls.users,r),data:e},function(e,r){e?t(e,null):t(null,r.user||r)})},create:function(e,t){s.QBLog("[UsersProxy]","create",e),this.service.ajax({url:s.getUrl(o.urls.users),type:"POST",data:{user:e}},function(e,r){e?t(e,null):t(null,r.user)})},update:function(e,t,r){s.QBLog("[UsersProxy]","update",e,t),this.service.ajax({url:s.getUrl(o.urls.users,e),type:"PUT",data:{user:t}},function(e,t){e?r(e,null):r(null,t.user)})},delete:function(e,t){s.QBLog("[UsersProxy]","delete",e);var r;"number"==typeof e?r=e:e.external&&(r="external/"+e.external),this.service.ajax({url:s.getUrl(o.urls.users,r),type:"DELETE",dataType:"text"},t)},resetPassword:function(e,t){s.QBLog("[UsersProxy]","resetPassword",e),this.service.ajax({url:s.getUrl(p),data:{email:e}},t)}},t.exports=n},{"../qbConfig":586,"../qbUtils":590,util:531}],577:[function(e,t,r){"use strict";function n(e,t,r,n){e.getStats(t,function(e){var t=[];e.forEach(function(e){var r={};r.id=e.id,r.type=e.type,r.timestamp=e.timestamp,t.push(r)}),r(t)},n)}var i=e("../../qbConfig"),a=e("./qbWebRTCHelpers"),o=window.RTCPeerConnection,s=window.RTCSessionDescription,c=window.RTCIceCandidate;o.State={NEW:1,CONNECTING:2,CHECKING:3,CONNECTED:4,DISCONNECTED:5,FAILED:6,CLOSED:7,COMPLETED:8},o.prototype.init=function(e,t,r,n){a.trace("RTCPeerConnection init. userID: "+t+", sessionID: "+r+", type: "+n),this.delegate=e,this.sessionID=r,this.userID=t,this.type=n,this.remoteSDP=null,this.state=o.State.NEW,this.onicecandidate=this.onIceCandidateCallback,this.onaddstream=this.onAddRemoteStreamCallback,this.onsignalingstatechange=this.onSignalingStateCallback,this.oniceconnectionstatechange=this.onIceConnectionStateCallback,this.dialingTimer=null,this.answerTimeInterval=0,this.statsReportTimer=null,this.reconnectTimer=0,this.iceCandidates=[]},o.prototype.release=function(){this._clearDialingTimer(),this._clearStatsReportTimer(),"closed"!==this.signalingState&&this.close()},o.prototype.updateRemoteSDP=function(e){if(!e)throw new Error("sdp string can't be empty.");this.remoteSDP=e},o.prototype.getRemoteSDP=function(){return this.remoteSDP},o.prototype.setRemoteSessionDescription=function(e,t,r){function n(){r(null)}function i(e){r(e)}var a=new s({sdp:t,type:e});this.setRemoteDescription(a,n,i)},o.prototype.addLocalStream=function(e){if(!e)throw new Error("'RTCPeerConnection.addStream' error: stream is 'null'.");this.addStream(e)},o.prototype.getAndSetLocalSessionDescription=function(e){function t(t){n.setLocalDescription(t,function(){e(null)},r)}function r(t){e(t)}var n=this;n.state=o.State.CONNECTING,"offer"===n.type?n.createOffer(t,r):n.createAnswer(t,r)},o.prototype.addCandidates=function(e){for(var t,r=0,n=e.length;r0&&(this.delegate.processIceCandidates(this,this.iceCandidates),this.iceCandidates.length=0)},o.prototype.onIceCandidateCallback=function(e){var t=e.candidate;if(t){var r={sdpMLineIndex:t.sdpMLineIndex,sdpMid:t.sdpMid,candidate:t.candidate};"stable"===this.signalingState?this.delegate.processIceCandidates(this,[r]):this.iceCandidates.push(r)}},o.prototype.onAddRemoteStreamCallback=function(e){var t=this;"function"==typeof this.delegate._onRemoteStreamListener&&this.delegate._onRemoteStreamListener(this.userID,e.stream),t._getStatsWrap()},o.prototype.onIceConnectionStateCallback=function(){var e=this.iceConnectionState;if(a.trace("onIceConnectionStateCallback: "+this.iceConnectionState),"function"==typeof this.delegate._onSessionConnectionStateChangedListener){var t=null;"checking"===e?(this.state=o.State.CHECKING,t=a.SessionConnectionState.CONNECTING):"connected"===e?(this._clearWaitingReconnectTimer(),this.state=o.State.CONNECTED,t=a.SessionConnectionState.CONNECTED):"completed"===e?(this._clearWaitingReconnectTimer(),this.state=o.State.COMPLETED,t=a.SessionConnectionState.COMPLETED):"failed"===e?(this.state=o.State.FAILED,t=a.SessionConnectionState.FAILED):"disconnected"===e?(this._startWaitingReconnectTimer(),this.state=o.State.DISCONNECTED,t=a.SessionConnectionState.DISCONNECTED):"closed"===e&&(this._clearWaitingReconnectTimer(),this.state=o.State.CLOSED,t=a.SessionConnectionState.CLOSED),t&&this.delegate._onSessionConnectionStateChangedListener(this.userID,t)}},o.prototype._clearStatsReportTimer=function(){this.statsReportTimer&&(clearInterval(this.statsReportTimer),this.statsReportTimer=null)},o.prototype._getStatsWrap=function(){var e,t=this,r=1==t.delegate.callType?t.getLocalStreams()[0].getVideoTracks()[0]:t.getLocalStreams()[0].getAudioTracks()[0];if(i.webrtc&&i.webrtc.statsReportTimeInterval){if(isNaN(+i.webrtc.statsReportTimeInterval))return void a.traceError("statsReportTimeInterval ("+i.webrtc.statsReportTimeInterval+") must be integer.");e=1e3*i.webrtc.statsReportTimeInterval;var o=function(){n(t,r,function(e){t.delegate._onCallStatsReport(t.userID,e,null)},function(e){a.traceError("_getStats error. "+e.name+": "+e.message),t.delegate._onCallStatsReport(t.userID,null,e)})};a.trace("Stats tracker has been started."),t.statsReportTimer=setInterval(o,e)}},o.prototype._clearWaitingReconnectTimer=function(){this.waitingReconnectTimeoutCallback&&(a.trace("_clearWaitingReconnectTimer"),clearTimeout(this.waitingReconnectTimeoutCallback),this.waitingReconnectTimeoutCallback=null)},o.prototype._startWaitingReconnectTimer=function(){var e=this,t=1e3*i.webrtc.disconnectTimeInterval,r=function(){a.trace("waitingReconnectTimeoutCallback"),clearTimeout(e.waitingReconnectTimeoutCallback),e.release(),e.delegate._closeSessionIfAllConnectionsClosed()};a.trace("_startWaitingReconnectTimer, timeout: "+t),e.waitingReconnectTimeoutCallback=setTimeout(r,t)},o.prototype._clearDialingTimer=function(){this.dialingTimer&&(a.trace("_clearDialingTimer"),clearInterval(this.dialingTimer),this.dialingTimer=null,this.answerTimeInterval=0)},o.prototype._startDialingTimer=function(e,t){var r=this,n=1e3*i.webrtc.dialingTimeInterval;a.trace("_startDialingTimer, dialingTimeInterval: "+n);var o=function(e,t,n){n||(r.answerTimeInterval+=1e3*i.webrtc.dialingTimeInterval),a.trace("_dialingCallback, answerTimeInterval: "+r.answerTimeInterval),r.answerTimeInterval>=1e3*i.webrtc.answerTimeInterval?(r._clearDialingTimer(),t&&r.delegate.processOnNotAnswer(r)):r.delegate.processCall(r,e)};r.dialingTimer=setInterval(o,n,e,t,!1),o(e,t,!0)},t.exports=o},{"../../qbConfig":586,"./qbWebRTCHelpers":579}],578:[function(e,t,r){"use strict";function n(e,t){return n.__instance?n.__instance:this===window?new n:(n.__instance=this,this.connection=t,this.signalingProcessor=new s(e,this,t),this.signalingProvider=new c(e,t),this.SessionConnectionState=u.SessionConnectionState,this.CallType=u.CallType,this.PeerConnectionState=l.State,void(this.sessions={}))}function i(e,t){var r=!1,n=t.sort();return e.length&&e.forEach(function(e){ -var t=e.sort();r=t.length==n.length&&t.every(function(e,t){return e===n[t]})}),r}function a(e){var t=[];return Object.keys(e).length>0&&Object.keys(e).forEach(function(r,n,i){var a=e[r];a.state!==o.State.NEW&&a.state!==o.State.ACTIVE||t.push(a.opponentsIDs)}),t}var o=e("./qbWebRTCSession"),s=e("./qbWebRTCSignalingProcessor"),c=e("./qbWebRTCSignalingProvider"),u=e("./qbWebRTCHelpers"),l=e("./qbRTCPeerConnection"),p=e("./qbWebRTCSignalingConstants"),f=e("../../qbUtils");n.prototype.getMediaDevices=function(e){var t=[],r="Browser does not support output device selection.";return new Promise(function(n,i){navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?navigator.mediaDevices.enumerateDevices().then(function(r){e?(r.forEach(function(r,n){r.kind===e&&t.push(r)}),n(t)):n(r)}):(i(r),u.traceWarning(r))})},n.prototype.sessions={},n.prototype.createNewSession=function(e,t,r){var n=a(this.sessions),o=r||u.getIdFromNode(this.connection.jid),s=!1,c=t||2;if(!e)throw new Error("Can't create a session without the opponentsIDs.");if(s=i(n,e))throw new Error("Can't create a session with the same opponentsIDs. There is a session already in NEW or ACTIVE state.");return this._createAndStoreSession(null,o,e,c)},n.prototype._createAndStoreSession=function(e,t,r,n){var i=new o(e,t,r,n,this.signalingProvider,u.getIdFromNode(this.connection.jid));return i.onUserNotAnswerListener=this.onUserNotAnswerListener,i.onRemoteStreamListener=this.onRemoteStreamListener,i.onSessionConnectionStateChangedListener=this.onSessionConnectionStateChangedListener,i.onSessionCloseListener=this.onSessionCloseListener,i.onCallStatsReport=this.onCallStatsReport,this.sessions[i.ID]=i,i},n.prototype.clearSession=function(e){delete n.sessions[e]},n.prototype.isExistNewOrActiveSessionExceptSessionID=function(e){var t=this,r=!1;return Object.keys(t.sessions).length>0&&Object.keys(t.sessions).forEach(function(n,i,a){var s=t.sessions[n];s.state!==o.State.NEW&&s.state!==o.State.ACTIVE||s.ID!==e&&(r=!0)}),r},n.prototype._onCallListener=function(e,t,r){var n=JSON.parse(JSON.stringify(r));if(u.trace("onCall. UserID:"+e+". SessionID: "+t),this.isExistNewOrActiveSessionExceptSessionID(t))u.trace("User with id "+e+" is busy at the moment."),delete r.sdp,delete r.platform,r.sessionID=t,this.signalingProvider.sendMessage(e,r,p.SignalingType.REJECT),"function"==typeof this.onInvalidEventsListener&&f.safeCallbackCall(this.onInvalidEventsListener,"onCall",t,e,n);else{var i=this.sessions[t];i||(i=this._createAndStoreSession(t,r.callerID,r.opponentsIDs,r.callType),this._cleanupExtension(n),"function"==typeof this.onCallListener&&f.safeCallbackCall(this.onCallListener,i,n)),i.processOnCall(e,r)}},n.prototype._onAcceptListener=function(e,t,r){var n=this.sessions[t],i=JSON.parse(JSON.stringify(r));this._cleanupExtension(i),u.trace("onAccept. UserID:"+e+". SessionID: "+t),n?n.state===o.State.ACTIVE?("function"==typeof this.onAcceptCallListener&&f.safeCallbackCall(this.onAcceptCallListener,n,e,i),n.processOnAccept(e,r)):("function"==typeof this.onInvalidEventsListener&&f.safeCallbackCall(this.onInvalidEventsListener,"onAccept",n,e,i),u.traceWarning("Ignore 'onAccept', the session( "+t+" ) has invalid state.")):u.traceError("Ignore 'onAccept', there is no information about session "+t+" by some reason.")},n.prototype._onRejectListener=function(e,t,r){var n=this,i=n.sessions[t];if(u.trace("onReject. UserID:"+e+". SessionID: "+t),i){var a=JSON.parse(JSON.stringify(r));n._cleanupExtension(a),"function"==typeof this.onRejectCallListener&&f.safeCallbackCall(n.onRejectCallListener,i,e,a),i.processOnReject(e,r)}else u.traceError("Ignore 'onReject', there is no information about session "+t+" by some reason.")},n.prototype._onStopListener=function(e,t,r){u.trace("onStop. UserID:"+e+". SessionID: "+t);var n=this.sessions[t],i=JSON.parse(JSON.stringify(r));!n||n.state!==o.State.ACTIVE&&n.state!==o.State.NEW?("function"==typeof this.onInvalidEventsListener&&f.safeCallbackCall(this.onInvalidEventsListener,"onStop",n,e,i),u.traceError("Ignore 'onStop', there is no information about session "+t+" by some reason.")):(this._cleanupExtension(i),"function"==typeof this.onStopCallListener&&f.safeCallbackCall(this.onStopCallListener,n,e,i),setTimeout(n.processOnStop.bind(n),10,e,r))},n.prototype._onIceCandidatesListener=function(e,t,r){var n=this.sessions[t];u.trace("onIceCandidates. UserID:"+e+". SessionID: "+t+". ICE candidates count: "+r.iceCandidates.length),n?n.state===o.State.ACTIVE?n.processOnIceCandidates(e,r):u.traceWarning("Ignore 'OnIceCandidates', the session ( "+t+" ) has invalid state."):u.traceError("Ignore 'OnIceCandidates', there is no information about session "+t+" by some reason.")},n.prototype._onUpdateListener=function(e,t,r){var n=this.sessions[t];u.trace("onUpdate. UserID:"+e+". SessionID: "+t+". Extension: "+JSON.stringify(r)),"function"==typeof this.onUpdateCallListener&&f.safeCallbackCall(this.onUpdateCallListener,n,e,r)},n.prototype._cleanupExtension=function(e){delete e.platform,delete e.sdp,delete e.opponentsIDs,delete e.callerID,delete e.callType},t.exports=n},{"../../qbUtils":590,"./qbRTCPeerConnection":577,"./qbWebRTCHelpers":579,"./qbWebRTCSession":580,"./qbWebRTCSignalingConstants":581,"./qbWebRTCSignalingProcessor":582,"./qbWebRTCSignalingProvider":583}],579:[function(e,t,r){"use strict";var n=e("../../qbConfig"),i={};i={getUserJid:function(e,t){return e+"-"+t+"@"+n.endpoints.chat},getIdFromNode:function(e){return e.indexOf("@")<0?null:parseInt(e.split("@")[0].split("-")[0])},trace:function(e){n.debug&&console.log("[QBWebRTC]:",e)},traceWarning:function(e){n.debug&&console.warn("[QBWebRTC]:",e)},traceError:function(e){n.debug&&console.error("[QBWebRTC]:",e)},getLocalTime:function(){var e=(new Date).toString().split(" ");return e.slice(1,5).join("-")},dataURItoBlob:function(e,t){for(var r=[],n=window.atob(e.split(",")[1]),i=0,a=n.length;i0){var o=(t.acceptCallTime-t.startCallTime)/1e3;t._startWaitingOfferOrAnswerTimer(o),i.forEach(function(e,r,n){t.currentUserID>e&&t._callInternal(e,{},!0)})}},n.prototype._acceptInternal=function(e,t){var r=this,n=this.peerConnections[e];n?(n.addLocalStream(this.localStream),n.setRemoteSessionDescription("offer",n.getRemoteSDP(),function(i){i?l.traceError("'setRemoteSessionDescription' error: "+i):(l.trace("'setRemoteSessionDescription' success"),n.getAndSetLocalSessionDescription(function(i){i?l.trace("getAndSetLocalSessionDescription error: "+i):(t.sessionID=r.ID,t.callType=r.callType,t.callerID=r.initiatorID,t.opponentsIDs=r.opponentsIDs,t.sdp=n.localDescription.sdp,r.signalingProvider.sendMessage(e,t,p.SignalingType.ACCEPT))}))})):l.traceError("Can't accept the call, there is no information about peer connection by some reason.")},n.prototype.reject=function(e){var t=this,r=a(e),i=Object.keys(t.peerConnections).length;if(l.trace("Reject, extension: "+JSON.stringify(r)),t.state=n.State.REJECTED,t._clearAnswerTimer(),r.sessionID=t.ID,r.callType=t.callType,r.callerID=t.initiatorID,r.opponentsIDs=t.opponentsIDs,i>0)for(var o in t.peerConnections){var s=t.peerConnections[o];t.signalingProvider.sendMessage(s.userID,r,p.SignalingType.REJECT)}t._close()},n.prototype.stop=function(e){var t=this,r=a(e),i=Object.keys(t.peerConnections).length;if(l.trace("Stop, extension: "+JSON.stringify(r)),t.state=n.State.HUNGUP,t.answerTimer&&t._clearAnswerTimer(),r.sessionID=t.ID,r.callType=t.callType,r.callerID=t.initiatorID,r.opponentsIDs=t.opponentsIDs,i>0)for(var o in t.peerConnections){var s=t.peerConnections[o];t.signalingProvider.sendMessage(s.userID,r,p.SignalingType.STOP)}t._close()},n.prototype.closeConnection=function(e){var t=this,r=this.peerConnections[e];if(!r)return l.traceWarn("Not found connection with user ("+e+")"),!1;try{r.release()}catch(e){l.traceError(e)}finally{t._closeSessionIfAllConnectionsClosed()}},n.prototype.update=function(e){var t=this,r={};if(l.trace("Update, extension: "+JSON.stringify(e)),null===e)return void l.trace("extension is null, no parameters to update");r=a(e),r.sessionID=this.ID;for(var n in t.peerConnections){var i=t.peerConnections[n];t.signalingProvider.sendMessage(i.userID,r,p.SignalingType.PARAMETERS_CHANGED)}},n.prototype.mute=function(e){this._muteStream(0,e)},n.prototype.unmute=function(e){this._muteStream(1,e)},n.prototype.processOnCall=function(e,t){var r=this,i=r._uniqueOpponentsIDs();i.forEach(function(i,a,o){var s=r.peerConnections[i];if(s)i==e&&(s.updateRemoteSDP(t.sdp),e!=r.initiatorID&&r.state===n.State.ACTIVE&&r._acceptInternal(e,{}));else{var c;c=i!=e&&r.currentUserID>i?r._createPeer(i,"offer"):r._createPeer(i,"answer"),r.peerConnections[i]=c,i==e&&(c.updateRemoteSDP(t.sdp),r._startAnswerTimer())}})},n.prototype.processOnAccept=function(e,t){var r=this.peerConnections[e];r?(r._clearDialingTimer(),r.setRemoteSessionDescription("answer",t.sdp,function(e){e?l.traceError("'setRemoteSessionDescription' error: "+e):l.trace("'setRemoteSessionDescription' success")})):l.traceError("Ignore 'OnAccept', there is no information about peer connection by some reason.")},n.prototype.processOnReject=function(e,t){var r=this.peerConnections[e];this._clearWaitingOfferOrAnswerTimer(),r?r.release():l.traceError("Ignore 'OnReject', there is no information about peer connection by some reason."),this._closeSessionIfAllConnectionsClosed()},n.prototype.processOnStop=function(e,t){var r=this;if(this._clearAnswerTimer(),e===r.initiatorID)Object.keys(r.peerConnections).length?Object.keys(r.peerConnections).forEach(function(e){r.peerConnections[e].release()}):l.traceError("Ignore 'OnStop', there is no information about peer connections by some reason.");else{var n=r.peerConnections[e];n?n.release():l.traceError("Ignore 'OnStop', there is no information about peer connection by some reason.")}this._closeSessionIfAllConnectionsClosed()},n.prototype.processOnIceCandidates=function(e,t){var r=this.peerConnections[e];r?r.addCandidates(t.iceCandidates):l.traceError("Ignore 'OnIceCandidates', there is no information about peer connection by some reason.")},n.prototype.processCall=function(e,t){var r=t||{};r.sessionID=this.ID,r.callType=this.callType,r.callerID=this.initiatorID,r.opponentsIDs=this.opponentsIDs,r.sdp=e.localDescription.sdp,this.signalingProvider.sendMessage(e.userID,r,p.SignalingType.CALL)},n.prototype.processIceCandidates=function(e,t){var r={};r.sessionID=this.ID,r.callType=this.callType,r.callerID=this.initiatorID,r.opponentsIDs=this.opponentsIDs,this.signalingProvider.sendCandidate(e.userID,t,r)},n.prototype.processOnNotAnswer=function(e){l.trace("Answer timeout callback for session "+this.ID+" for user "+e.userID),this._clearWaitingOfferOrAnswerTimer(),e.release(),"function"==typeof this.onUserNotAnswerListener&&u.safeCallbackCall(this.onUserNotAnswerListener,this,e.userID),this._closeSessionIfAllConnectionsClosed()},n.prototype._onRemoteStreamListener=function(e,t){"function"==typeof this.onRemoteStreamListener&&u.safeCallbackCall(this.onRemoteStreamListener,this,e,t)},n.prototype._onCallStatsReport=function(e,t,r){"function"==typeof this.onCallStatsReport&&u.safeCallbackCall(this.onCallStatsReport,this,e,t,r)},n.prototype._onSessionConnectionStateChangedListener=function(e,t){var r=this;"function"==typeof r.onSessionConnectionStateChangedListener&&u.safeCallbackCall(r.onSessionConnectionStateChangedListener,r,e,t)},n.prototype._createPeer=function(e,t){if(!c)throw new Error("_createPeer error: RTCPeerConnection() is not supported in your browser");this.startCallTime=new Date;var r={iceServers:o(s.webrtc.iceServers)};l.trace("_createPeer, iceServers: "+JSON.stringify(r));var n=new c(r);return n.init(this,e,this.ID,t),n},n.prototype._close=function(){l.trace("_close");for(var e in this.peerConnections){var t=this.peerConnections[e];try{t.release()}catch(e){console.warn("Peer close error:",e)}}this._closeLocalMediaStream(),this.state=n.State.CLOSED,"function"==typeof this.onSessionCloseListener&&u.safeCallbackCall(this.onSessionCloseListener,this)},n.prototype._closeSessionIfAllConnectionsClosed=function(){var e=!0;for(var t in this.peerConnections){var r,i=this.peerConnections[t];try{r=i.signalingState}catch(e){l.traceError(e),r="closed"}if("closed"!==r){e=!1;break}}l.trace("All peer connections closed: "+e),e&&(this._closeLocalMediaStream(),"function"==typeof this.onSessionCloseListener&&this.onSessionCloseListener(this),this.state=n.State.CLOSED)},n.prototype._closeLocalMediaStream=function(){this.localStream&&(this.localStream.getAudioTracks().forEach(function(e){e.stop()}),this.localStream.getVideoTracks().forEach(function(e){e.stop()}),this.localStream=null)},n.prototype._muteStream=function(e,t){return"audio"===t&&this.localStream.getAudioTracks().length>0?void this.localStream.getAudioTracks().forEach(function(t){t.enabled=!!e}):"video"===t&&this.localStream.getVideoTracks().length>0?void this.localStream.getVideoTracks().forEach(function(t){t.enabled=!!e}):void 0},n.prototype._clearAnswerTimer=function(){this.answerTimer&&(l.trace("_clearAnswerTimer"),clearTimeout(this.answerTimer),this.answerTimer=null)},n.prototype._startAnswerTimer=function(){l.trace("_startAnswerTimer");var e=this,t=function(){l.trace("_answerTimeoutCallback"),"function"==typeof e.onSessionCloseListener&&e._close(),e.answerTimer=null},r=1e3*s.webrtc.answerTimeInterval;this.answerTimer=setTimeout(t,r)},n.prototype._clearWaitingOfferOrAnswerTimer=function(){this.waitingOfferOrAnswerTimer&&(l.trace("_clearWaitingOfferOrAnswerTimer"),clearTimeout(this.waitingOfferOrAnswerTimer),this.waitingOfferOrAnswerTimer=null)},n.prototype._startWaitingOfferOrAnswerTimer=function(e){var t=this,r=s.webrtc.answerTimeInterval-e<0?1:s.webrtc.answerTimeInterval-e,n=function(){l.trace("waitingOfferOrAnswerTimeoutCallback"),Object.keys(t.peerConnections).length>0&&Object.keys(t.peerConnections).forEach(function(e){var r=t.peerConnections[e];r.state!==c.State.CONNECTING&&r.state!==c.State.NEW||t.processOnNotAnswer(r)}),t.waitingOfferOrAnswerTimer=null};l.trace("_startWaitingOfferOrAnswerTimer, timeout: "+r),this.waitingOfferOrAnswerTimer=setTimeout(n,1e3*r)},n.prototype._uniqueOpponentsIDs=function(){var e=this,t=[];return this.initiatorID!==this.currentUserID&&t.push(this.initiatorID),this.opponentsIDs.forEach(function(r,n,i){r!=e.currentUserID&&t.push(parseInt(r))}),t},n.prototype._uniqueOpponentsIDsWithoutInitiator=function(){var e=this,t=[];return this.opponentsIDs.forEach(function(r,n,i){r!=e.currentUserID&&t.push(parseInt(r))}),t},n.prototype.toString=function(){return"ID: "+this.ID+", initiatorID: "+this.initiatorID+", opponentsIDs: "+this.opponentsIDs+", state: "+this.state+", callType: "+this.callType},t.exports=n},{"../../qbConfig":586,"../../qbUtils":590,"./qbRTCPeerConnection":577,"./qbWebRTCHelpers":579,"./qbWebRTCSignalingConstants":581}],581:[function(e,t,r){"use strict";function n(){}n.MODULE_ID="WebRTCVideoChat",n.SignalingType={CALL:"call",ACCEPT:"accept",REJECT:"reject",STOP:"hangUp",CANDIDATE:"iceCandidates",PARAMETERS_CHANGED:"update"},t.exports=n},{}],582:[function(e,t,r){"use strict";function n(e,t,r){var n=this;n.service=e,n.delegate=t,n.connection=r,this._onMessage=function(e,t,r,a){var o=n._getExtension(t),s=o.sessionID,c=o.signalType;switch(delete o.moduleIdentifier,delete o.sessionID,delete o.signalType,c){case i.SignalingType.CALL:"function"==typeof n.delegate._onCallListener&&n.delegate._onCallListener(a,s,o);break;case i.SignalingType.ACCEPT:"function"==typeof n.delegate._onAcceptListener&&n.delegate._onAcceptListener(a,s,o);break;case i.SignalingType.REJECT:"function"==typeof n.delegate._onRejectListener&&n.delegate._onRejectListener(a,s,o);break;case i.SignalingType.STOP:"function"==typeof n.delegate._onStopListener&&n.delegate._onStopListener(a,s,o);break;case i.SignalingType.CANDIDATE:"function"==typeof n.delegate._onIceCandidatesListener&&n.delegate._onIceCandidatesListener(a,s,o);break;case i.SignalingType.PARAMETERS_CHANGED:"function"==typeof n.delegate._onUpdateListener&&n.delegate._onUpdateListener(a,s,o)}},this._getExtension=function(e){if(!e)return null;for(var t,r,i,a,o={},s=[],c=[],u=0,l=e.childNodes.length;u1){var v=e.childNodes[u].textContent.length;if(v>4096){for(var b="",y=0;y0&&(o.iceCandidates=s),c.length>0&&(o.opponentsIDs=c),o},this._XMLtoJS=function(e,t,r){var n=this;e[t]={};for(var i=0,a=r.childNodes.length;i1?e[t]=n._XMLtoJS(e[t],r.childNodes[i].tagName,r.childNodes[i]):e[t][r.childNodes[i].tagName]=r.childNodes[i].textContent;return e}}e("strophe.js");var i=e("./qbWebRTCSignalingConstants");t.exports=n},{"./qbWebRTCSignalingConstants":581,"strophe.js":514}],583:[function(e,t,r){"use strict";function n(e,t){this.service=e,this.connection=t}e("strophe.js");var i=e("./qbWebRTCHelpers"),a=e("./qbWebRTCSignalingConstants"),o=e("../../qbUtils"),s=e("../../qbConfig");n.prototype.sendCandidate=function(e,t,r){var n=r||{};n.iceCandidates=t,this.sendMessage(e,n,a.SignalingType.CANDIDATE)},n.prototype.sendMessage=function(e,t,r){var n,c,u=t||{},l=this;u.moduleIdentifier=a.MODULE_ID,u.signalType=r,u.platform="web",c={to:i.getUserJid(e,s.creds.appId),type:"headline",id:o.getBsonObjectId()},n=$msg(c).c("extraParams",{xmlns:Strophe.NS.CLIENT}),Object.keys(u).forEach(function(e){"iceCandidates"===e?(n=n.c("iceCandidates"),u[e].forEach(function(e){n=n.c("iceCandidate"),Object.keys(e).forEach(function(t){n.c(t).t(e[t]).up()}),n.up()}),n.up()):"opponentsIDs"===e?(n=n.c("opponentsIDs"),u[e].forEach(function(e){n=n.c("opponentID").t(e).up()}),n.up()):"object"==typeof u[e]?l._JStoXML(e,u[e],n):n.c(e).t(u[e]).up()}),this.connection.send(n)},n.prototype._JStoXML=function(e,t,r){var n=this;r.c(e),Object.keys(t).forEach(function(e){"object"==typeof t[e]?n._JStoXML(e,t[e],r):r.c(e).t(t[e]).up()}),r.up()},t.exports=n},{"../../qbConfig":586,"../../qbUtils":590,"./qbWebRTCHelpers":579,"./qbWebRTCSignalingConstants":581,"strophe.js":514}],584:[function(e,t,r){!function(e,r){"object"==typeof t&&"object"==typeof t.exports?t.exports=e.document?r(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return r(e)}:r(e)}("undefined"!=typeof window?window:this,function(e,t){function r(e){var t="length"in e&&e.length,r=L.type(e);return"function"!==r&&!L.isWindow(e)&&(!(1!==e.nodeType||!t)||("array"===r||0===t||"number"==typeof t&&t>0&&t-1 in e))}function n(e,t,r){if(L.isFunction(t))return L.grep(e,function(e,n){return!!t.call(e,n,e)!==r});if(t.nodeType)return L.grep(e,function(e){return e===t!==r});if("string"==typeof t){if(Z.test(t))return L.filter(t,e,r);t=L.filter(t,e)}return L.grep(e,function(e){return M.call(t,e)>=0!==r})}function i(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function a(e){var t=ae[e]={};return L.each(e.match(ie)||[],function(e,r){t[r]=!0}),t}function o(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=L.expando+o.uid++}function s(e,t,r){var n;if(void 0===r&&1===e.nodeType)if(n="data-"+t.replace(le,"-$1").toLowerCase(),r=e.getAttribute(n),"string"==typeof r){try{r="true"===r||"false"!==r&&("null"===r?null:+r+""===r?+r:ue.test(r)?L.parseJSON(r):r)}catch(e){}ce.set(e,t,r)}else r=void 0;return r}function c(e,t){return L.nodeName(e,"table")&&L.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function u(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function l(e){var t=ke.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function p(e,t){for(var r=0,n=e.length;r")).appendTo(t.documentElement),t=Se[0].contentDocument,t.write(),t.close(),r=m(e,t),Se.detach()),Ee[e]=r),r}function v(e,t,r){var n,i,a,o,s=e.style;return r=r||Te(e),r&&(o=r.getPropertyValue(t)||r[t]),r&&(""!==o||L.contains(e.ownerDocument,e)||(o=L.style(e,t)),Ce.test(o)&&Ae.test(t)&&(n=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=r.width,s.width=n,s.minWidth=i,s.maxWidth=a)),void 0!==o?o+"":o}function b(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function y(e,t){if(t in e)return t;for(var r=t[0].toUpperCase()+t.slice(1),n=t,i=qe.length;i--;)if(t=qe[i]+r,t in e)return t;return n}function w(e,t,r){var n=Pe.exec(t);return n?Math.max(0,n[1]-(r||0))+(n[2]||"px"):t}function x(e,t,r,n,i){for(var a=r===(n?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===r&&(o+=L.css(e,r+fe[a],!0,i)),n?("content"===r&&(o-=L.css(e,"padding"+fe[a],!0,i)),"margin"!==r&&(o-=L.css(e,"border"+fe[a]+"Width",!0,i))):(o+=L.css(e,"padding"+fe[a],!0,i),"padding"!==r&&(o+=L.css(e,"border"+fe[a]+"Width",!0,i)));return o}function k(e,t,r){var n=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=Te(e),o="border-box"===L.css(e,"boxSizing",!1,a);if(i<=0||null==i){if(i=v(e,t,a),(i<0||null==i)&&(i=e.style[t]),Ce.test(i))return i;n=o&&(B.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+x(e,t,r||(o?"border":"content"),n,a)+"px"}function _(e,t){for(var r,n,i,a=[],o=0,s=e.length;o=0&&r=0},isPlainObject:function(e){return"object"===L.type(e)&&!e.nodeType&&!L.isWindow(e)&&!(e.constructor&&!z.call(e.constructor.prototype,"isPrototypeOf"))},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?q[R.call(e)]||"object":typeof e},globalEval:function(e){var t,r=eval;e=L.trim(e),e&&(1===e.indexOf("use strict")?(t=F.createElement("script"),t.text=e,F.head.appendChild(t).parentNode.removeChild(t)):r(e))},camelCase:function(e){return e.replace(H,"ms-").replace(K,$)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var i,a=0,o=e.length,s=r(e);if(n){if(s)for(;a+~]/}}}),L.extend(L.find,{matches:function(e,t){return L.find(e,null,null,t)},matchesSelector:function(e,t){return X.call(e,t)},attr:function(e,t){return e.getAttribute(t)}});var W=L.expr.match.needsContext,J=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,Z=/^.[^:#\[\.,]*$/;L.filter=function(e,t,r){var n=t[0];return r&&(e=":not("+e+")"),1===t.length&&1===n.nodeType?L.find.matchesSelector(n,e)?[n]:[]:L.find.matches(e,L.grep(t,function(e){return 1===e.nodeType}))},L.fn.extend({find:function(e){var t,r=this.length,n=[],i=this;if("string"!=typeof e)return this.pushStack(L(e).filter(function(){for(t=0;t1?L.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},filter:function(e){return this.pushStack(n(this,e||[],!1))},not:function(e){return this.pushStack(n(this,e||[],!0))},is:function(e){return!!n(this,"string"==typeof e&&W.test(e)?L(e):e||[],!1).length}});var Y,ee=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,te=L.fn.init=function(e,t){var r,n;if(!e)return this;if("string"==typeof e){if(r="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ee.exec(e),!r||!r[1]&&t)return!t||t.jquery?(t||Y).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof L?t[0]:t,L.merge(this,L.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:F,!0)),J.test(r[1])&&L.isPlainObject(t))for(r in t)L.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return n=F.getElementById(r[2]),n&&n.parentNode&&(this.length=1,this[0]=n),this.context=F,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):L.isFunction(e)?"undefined"!=typeof Y.ready?Y.ready(e):e(L):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),L.makeArray(e,this))};te.prototype=L.fn,Y=L(F);var re=/^(?:parents|prev(?:Until|All))/,ne={children:!0,contents:!0,next:!0,prev:!0};L.extend({dir:function(e,t,r){for(var n=[],i=void 0!==r;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&L(e).is(r))break;n.push(e)}return n},sibling:function(e,t){for(var r=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&r.push(e);return r}}),L.fn.extend({has:function(e){var t=L(e,this),r=t.length;return this.filter(function(){for(var e=0;e-1:1===r.nodeType&&L.find.matchesSelector(r,e))){a.push(r);break}return this.pushStack(a.length>1?L.unique(a):a)},index:function(e){return e?"string"==typeof e?M.call(L(e),this[0]):M.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(L.unique(L.merge(this.get(),L(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),L.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return L.dir(e,"parentNode")},parentsUntil:function(e,t,r){return L.dir(e,"parentNode",r)},next:function(e){return i(e,"nextSibling")},prev:function(e){return i(e,"previousSibling")},nextAll:function(e){return L.dir(e,"nextSibling")},prevAll:function(e){return L.dir(e,"previousSibling")},nextUntil:function(e,t,r){return L.dir(e,"nextSibling",r)},prevUntil:function(e,t,r){return L.dir(e,"previousSibling",r)},siblings:function(e){return L.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return L.sibling(e.firstChild)},contents:function(e){return e.contentDocument||L.merge([],e.childNodes)}},function(e,t){L.fn[e]=function(r,n){var i=L.map(this,t,r);return"Until"!==e.slice(-5)&&(n=r),n&&"string"==typeof n&&(i=L.filter(n,i)),this.length>1&&(ne[e]||L.unique(i),re.test(e)&&i.reverse()),this.pushStack(i)}});var ie=/\S+/g,ae={};L.Callbacks=function(e){e="string"==typeof e?ae[e]||a(e):L.extend({},e);var t,r,n,i,o,s,c=[],u=!e.once&&[],l=function(a){for(t=e.memory&&a,r=!0,s=i||0,i=0,o=c.length,n=!0;c&&s-1;)c.splice(r,1),n&&(r<=o&&o--,r<=s&&s--)}),this},has:function(e){return e?L.inArray(e,c)>-1:!(!c||!c.length)},empty:function(){return c=[],o=0,this},disable:function(){return c=u=t=void 0,this},disabled:function(){return!c},lock:function(){return u=void 0,t||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!c||r&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):l(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!r}};return p},L.extend({Deferred:function(e){var t=[["resolve","done",L.Callbacks("once memory"),"resolved"],["reject","fail",L.Callbacks("once memory"),"rejected"],["notify","progress",L.Callbacks("memory")]],r="pending",n={state:function(){return r},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return L.Deferred(function(r){L.each(t,function(t,a){var o=L.isFunction(e[t])&&e[t];i[a[1]](function(){var e=o&&o.apply(this,arguments);e&&L.isFunction(e.promise)?e.promise().done(r.resolve).fail(r.reject).progress(r.notify):r[a[0]+"With"](this===n?r.promise():this,o?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?L.extend(e,n):n}},i={};return n.pipe=n.then,L.each(t,function(e,a){var o=a[2],s=a[3];n[a[1]]=o.add,s&&o.add(function(){r=s},t[1^e][2].disable,t[2][2].lock),i[a[0]]=function(){return i[a[0]+"With"](this===i?n:this,arguments),this},i[a[0]+"With"]=o.fireWith}),n.promise(i),e&&e.call(i,i),i},when:function(e){var t,r,n,i=0,a=P.call(arguments),o=a.length,s=1!==o||e&&L.isFunction(e.promise)?o:0,c=1===s?e:L.Deferred(),u=function(e,r,n){return function(i){r[e]=this,n[e]=arguments.length>1?P.call(arguments):i,n===t?c.notifyWith(r,n):--s||c.resolveWith(r,n)}};if(o>1)for(t=new Array(o),r=new Array(o),n=new Array(o);i1,null,!0)},removeData:function(e){return this.each(function(){ce.remove(this,e)})}}),L.extend({queue:function(e,t,r){var n;if(e)return t=(t||"fx")+"queue",n=se.get(e,t),r&&(!n||L.isArray(r)?n=se.access(e,t,L.makeArray(r)):n.push(r)),n||[]},dequeue:function(e,t){t=t||"fx";var r=L.queue(e,t),n=r.length,i=r.shift(),a=L._queueHooks(e,t),o=function(){L.dequeue(e,t)};"inprogress"===i&&(i=r.shift(),n--),i&&("fx"===t&&r.unshift("inprogress"),delete a.stop,i.call(e,o,a)),!n&&a&&a.empty.fire()},_queueHooks:function(e,t){var r=t+"queueHooks";return se.get(e,r)||se.access(e,r,{empty:L.Callbacks("once memory").add(function(){se.remove(e,[t+"queue",r])})})}}),L.fn.extend({queue:function(e,t){var r=2;return"string"!=typeof e&&(t=e,e="fx",r--),arguments.lengthx",B.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var me="undefined",ge=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ve=/<([\w:]+)/,be=/<|&#?\w+;/,ye=/<(?:script|style|link)/i,we=/checked\s*(?:[^=]|=\s*.checked.)/i,xe=/^$|\/(?:java|ecma)script/i,ke=/^true\/(.*)/,_e=/^\s*\s*$/g,je={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};je.optgroup=je.option,je.tbody=je.tfoot=je.colgroup=je.caption=je.thead,je.th=je.td,L.extend({clone:function(e,t,r){var n,i,a,o,s=e.cloneNode(!0),c=L.contains(e.ownerDocument,e);if(!(B.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||L.isXMLDoc(e)))for(o=h(s),a=h(e),n=0,i=a.length;n0&&p(o,!c&&h(e,"script")),s},buildFragment:function(e,t,r,n){for(var i,a,o,s,c,u,l=t.createDocumentFragment(),f=[],d=0,m=e.length;d")+s[2],u=s[0];u--;)a=a.lastChild;L.merge(f,a.childNodes),a=l.firstChild,a.textContent=""}else f.push(t.createTextNode(i));for(l.textContent="",d=0;i=f[d++];)if((!n||L.inArray(i,n)===-1)&&(c=L.contains(i.ownerDocument,i),a=h(l.appendChild(i),"script"),c&&p(a),r))for(u=0;i=a[u++];)xe.test(i.type||"")&&r.push(i);return l},cleanData:function(e){for(var t,r,n,i,a=L.event.special,o=0;void 0!==(r=e[o]);o++){if(L.acceptData(r)&&(i=r[se.expando],i&&(t=se.cache[i]))){if(t.events)for(n in t.events)a[n]?L.event.remove(r,n):L.removeEvent(r,n,t.handle);se.cache[i]&&delete se.cache[i]}delete ce.cache[r[ce.expando]]}}}),L.fn.extend({text:function(e){return oe(this,function(e){return void 0===e?L.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=c(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=c(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var r,n=e?L.filter(e,this):this,i=0;null!=(r=n[i]);i++)t||1!==r.nodeType||L.cleanData(h(r)),r.parentNode&&(t&&L.contains(r.ownerDocument,r)&&p(h(r,"script")),r.parentNode.removeChild(r));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(L.cleanData(h(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return L.clone(this,e,t)})},html:function(e){return oe(this,function(e){var t=this[0]||{},r=0,n=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!ye.test(e)&&!je[(ve.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(ge,"<$1>");try{for(;r1&&"string"==typeof m&&!B.checkClone&&we.test(m))return this.each(function(r){var n=f.eq(r);g&&(e[0]=m.call(this,r,n.html())),n.domManip(e,t)});if(p&&(r=L.buildFragment(e,this[0].ownerDocument,!1,this),n=r.firstChild,1===r.childNodes.length&&(r=n),n)){for(i=L.map(h(r,"script"),u),a=i.length;c1)},show:function(){return _(this,!0)},hide:function(){return _(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){he(this)?L(this).show():L(this).hide()})}}),L.fn.delay=function(e,t){return e=L.fx?L.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,r){var n=setTimeout(t,e);r.stop=function(){clearTimeout(n)}})},function(){var e=F.createElement("input"),t=F.createElement("select"),r=t.appendChild(F.createElement("option"));e.type="checkbox",B.checkOn=""!==e.value,B.optSelected=r.selected,t.disabled=!0,B.optDisabled=!r.disabled,e=F.createElement("input"),e.value="t",e.type="radio",B.radioValue="t"===e.value}();var Re,ze,Be=L.expr.attrHandle;L.fn.extend({attr:function(e,t){return oe(this,L.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){L.removeAttr(this,e)})}}),L.extend({attr:function(e,t,r){var n,i,a=e.nodeType;if(e&&3!==a&&8!==a&&2!==a)return typeof e.getAttribute===me?L.prop(e,t,r):(1===a&&L.isXMLDoc(e)||(t=t.toLowerCase(),n=L.attrHooks[t]||(L.expr.match.bool.test(t)?ze:Re)),void 0===r?n&&"get"in n&&null!==(i=n.get(e,t))?i:(i=L.find.attr(e,t),null==i?void 0:i):null!==r?n&&"set"in n&&void 0!==(i=n.set(e,r,t))?i:(e.setAttribute(t,r+""),r):void L.removeAttr(e,t))},removeAttr:function(e,t){var r,n,i=0,a=t&&t.match(ie);if(a&&1===e.nodeType)for(;r=a[i++];)n=L.propFix[r]||r,L.expr.match.bool.test(r)&&(e[n]=!1),e.removeAttribute(r)},attrHooks:{type:{set:function(e,t){if(!B.radioValue&&"radio"===t&&L.nodeName(e,"input")){var r=e.value;return e.setAttribute("type",t),r&&(e.value=r),t}}}}}),ze={set:function(e,t,r){return t===!1?L.removeAttr(e,r):e.setAttribute(r,r),r}},L.each(L.expr.match.bool.source.match(/\w+/g),function(e,t){var r=Be[t]||L.find.attr;Be[t]=function(e,t,n){var i,a;return n||(a=Be[t],Be[t]=i,i=null!=r(e,t,n)?t.toLowerCase():null,Be[t]=a),i}});var Fe=/^(?:input|select|textarea|button)$/i;L.fn.extend({prop:function(e,t){return oe(this,L.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[L.propFix[e]||e]})}}),L.extend({propFix:{for:"htmlFor",class:"className"},prop:function(e,t,r){var n,i,a,o=e.nodeType;if(e&&3!==o&&8!==o&&2!==o)return a=1!==o||!L.isXMLDoc(e),a&&(t=L.propFix[t]||t,i=L.propHooks[t]),void 0!==r?i&&"set"in i&&void 0!==(n=i.set(e,r,t))?n:e[t]=r:i&&"get"in i&&null!==(n=i.get(e,t))?n:e[t]},propHooks:{tabIndex:{get:function(e){return e.hasAttribute("tabindex")||Fe.test(e.nodeName)||e.href?e.tabIndex:-1}}}}),B.optSelected||(L.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null}}),L.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){L.propFix[this.toLowerCase()]=this});var Ne=/[\t\r\n\f]/g;L.fn.extend({addClass:function(e){var t,r,n,i,a,o,s="string"==typeof e&&e,c=0,u=this.length;if(L.isFunction(e))return this.each(function(t){L(this).addClass(e.call(this,t,this.className))});if(s)for(t=(e||"").match(ie)||[];c=0;)n=n.replace(" "+i+" "," ");o=e?L.trim(n):"",r.className!==o&&(r.className=o)}return this},toggleClass:function(e,t){var r=typeof e;return"boolean"==typeof t&&"string"===r?t?this.addClass(e):this.removeClass(e):L.isFunction(e)?this.each(function(r){L(this).toggleClass(e.call(this,r,this.className,t),t)}):this.each(function(){if("string"===r)for(var t,n=0,i=L(this),a=e.match(ie)||[];t=a[n++];)i.hasClass(t)?i.removeClass(t):i.addClass(t);else r!==me&&"boolean"!==r||(this.className&&se.set(this,"__className__",this.className),this.className=this.className||e===!1?"":se.get(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",r=0,n=this.length;r=0)return!0;return!1}});var Le=/\r/g;L.fn.extend({val:function(e){var t,r,n,i=this[0];{if(arguments.length)return n=L.isFunction(e),this.each(function(r){var i;1===this.nodeType&&(i=n?e.call(this,r,L(this).val()):e,null==i?i="":"number"==typeof i?i+="":L.isArray(i)&&(i=L.map(i,function(e){return null==e?"":e+""})),t=L.valHooks[this.type]||L.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,i,"value")||(this.value=i))});if(i)return t=L.valHooks[i.type]||L.valHooks[i.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(r=t.get(i,"value"))?r:(r=i.value,"string"==typeof r?r.replace(Le,""):null==r?"":r)}}}),L.extend({valHooks:{option:{get:function(e){var t=L.find.attr(e,"value");return null!=t?t:L.trim(L.text(e))}},select:{get:function(e){for(var t,r,n=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],s=a?i+1:n.length,c=i<0?s:a?i:0;c=0)&&(r=!0);return r||(e.selectedIndex=-1),a}}}}),L.each(["radio","checkbox"],function(){L.valHooks[this]={set:function(e,t){if(L.isArray(t))return e.checked=L.inArray(L(e).val(),t)>=0}},B.checkOn||(L.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Ue=L.now(),He=/\?/;L.parseJSON=function(e){return JSON.parse(e+"")},L.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{r=new DOMParser,t=r.parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||L.error("Invalid XML: "+e),t};var Ke=/#.*$/,$e=/([?&])_=[^&]*/,Ve=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ge=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Xe=/^(?:GET|HEAD)$/,Qe=/^\/\//,We=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Je={},Ze={},Ye="*/".concat("*"),et=e.location.href,tt=We.exec(et.toLowerCase())||[];L.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:et,type:"GET",isLocal:Ge.test(tt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ye,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":L.parseJSON,"text xml":L.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?E(E(e,L.ajaxSettings),t):E(L.ajaxSettings,e)},ajaxPrefilter:j(Je),ajaxTransport:j(Ze),ajax:function(e,t){function r(e,t,r,o){var c,l,v,b,w,k=t;2!==y&&(y=2,s&&clearTimeout(s),n=void 0,a=o||"",x.readyState=e>0?4:0,c=e>=200&&e<300||304===e,r&&(b=A(p,x,r)),b=C(p,b,x,c),c?(p.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(L.lastModified[i]=w),w=x.getResponseHeader("etag"),w&&(L.etag[i]=w)),204===e||"HEAD"===p.type?k="nocontent":304===e?k="notmodified":(k=b.state,l=b.data,v=b.error,c=!v)):(v=k,!e&&k||(k="error",e<0&&(e=0))),x.status=e,x.statusText=(t||k)+"",c?d.resolveWith(f,[l,k,x]):d.rejectWith(f,[x,k,v]),x.statusCode(g),g=void 0,u&&h.trigger(c?"ajaxSuccess":"ajaxError",[x,p,c?l:v]),m.fireWith(f,[x,k]),u&&(h.trigger("ajaxComplete",[x,p]),--L.active||L.event.trigger("ajaxStop")))}"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i,a,o,s,c,u,l,p=L.ajaxSetup({},t),f=p.context||p,h=p.context&&(f.nodeType||f.jquery)?L(f):L.event,d=L.Deferred(),m=L.Callbacks("once memory"),g=p.statusCode||{},v={},b={},y=0,w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(2===y){if(!o)for(o={};t=Ve.exec(a);)o[t[1].toLowerCase()]=t[2];t=o[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===y?a:null},setRequestHeader:function(e,t){var r=e.toLowerCase();return y||(e=b[r]=b[r]||e,v[e]=t),this},overrideMimeType:function(e){return y||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(y<2)for(t in e)g[t]=[g[t],e[t]];else x.always(e[x.status]);return this},abort:function(e){var t=e||w;return n&&n.abort(t),r(0,t),this}};if(d.promise(x).complete=m.add,x.success=x.done,x.error=x.fail,p.url=((e||p.url||et)+"").replace(Ke,"").replace(Qe,tt[1]+"//"),p.type=t.method||t.type||p.method||p.type,p.dataTypes=L.trim(p.dataType||"*").toLowerCase().match(ie)||[""],null==p.crossDomain&&(c=We.exec(p.url.toLowerCase()),p.crossDomain=!(!c||c[1]===tt[1]&&c[2]===tt[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(tt[3]||("http:"===tt[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=L.param(p.data,p.traditional)),S(Je,p,t,x),2===y)return x;u=L.event&&p.global,u&&0===L.active++&&L.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Xe.test(p.type),i=p.url,p.hasContent||(p.data&&(i=p.url+=(He.test(i)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=$e.test(i)?i.replace($e,"$1_="+Ue++):i+(He.test(i)?"&":"?")+"_="+Ue++)),p.ifModified&&(L.lastModified[i]&&x.setRequestHeader("If-Modified-Since",L.lastModified[i]),L.etag[i]&&x.setRequestHeader("If-None-Match",L.etag[i])),(p.data&&p.hasContent&&p.contentType!==!1||t.contentType)&&x.setRequestHeader("Content-Type",p.contentType),x.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Ye+"; q=0.01":""):p.accepts["*"]);for(l in p.headers)x.setRequestHeader(l,p.headers[l]);if(p.beforeSend&&(p.beforeSend.call(f,x,p)===!1||2===y))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](p[l]);if(n=S(Ze,p,t,x)){x.readyState=1,u&&h.trigger("ajaxSend",[x,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){x.abort("timeout")},p.timeout));try{y=1,n.send(v,r)}catch(e){if(!(y<2))throw e;r(-1,e)}}else r(-1,"No Transport");return x},getJSON:function(e,t,r){return L.get(e,t,r,"json")},getScript:function(e,t){return L.get(e,void 0,t,"script")}}),L.each(["get","post"],function(e,t){L[t]=function(e,r,n,i){return L.isFunction(r)&&(i=i||n,n=r,r=void 0),L.ajax({url:e,type:t,dataType:i,data:r,success:n})}}),L._evalUrl=function(e){return L.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})};var rt=/%20/g,nt=/\[\]$/,it=/\r?\n/g,at=/^(?:submit|button|image|reset|file)$/i,ot=/^(?:input|select|textarea|keygen)/i;L.param=function(e,t){var r,n=[],i=function(e,t){t=L.isFunction(t)?t():null==t?"":t,n[n.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=L.ajaxSettings&&L.ajaxSettings.traditional),L.isArray(e)||e.jquery&&!L.isPlainObject(e))L.each(e,function(){i(this.name,this.value)});else for(r in e)T(r,e[r],t,i);return n.join("&").replace(rt,"+")},L.fn.extend({serialize:function(){return L.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=L.prop(this,"elements");return e?L.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!L(this).is(":disabled")&&ot.test(this.nodeName)&&!at.test(e)&&(this.checked||!de.test(e)); -}).map(function(e,t){var r=L(this).val();return null==r?null:L.isArray(r)?L.map(r,function(e){return{name:t.name,value:e.replace(it,"\r\n")}}):{name:t.name,value:r.replace(it,"\r\n")}}).get()}}),L.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var st=0,ct={},ut={0:200,1223:204},lt=L.ajaxSettings.xhr();e.attachEvent&&e.attachEvent("onunload",function(){for(var e in ct)ct[e]()}),B.cors=!!lt&&"withCredentials"in lt,B.ajax=lt=!!lt,L.ajaxTransport(function(e){var t;if(B.cors||lt&&!e.crossDomain)return{send:function(r,n){var i,a=e.xhr(),o=++st;if(a.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(i in e.xhrFields)a[i]=e.xhrFields[i];e.mimeType&&a.overrideMimeType&&a.overrideMimeType(e.mimeType),e.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(i in r)a.setRequestHeader(i,r[i]);t=function(e){return function(){t&&(delete ct[o],t=a.onload=a.onerror=null,"abort"===e?a.abort():"error"===e?n(a.status,a.statusText):n(ut[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:void 0,a.getAllResponseHeaders()))}},a.onload=t(),a.onerror=t("error"),t=ct[o]=t("abort");try{a.send(e.hasContent&&e.data||null)}catch(e){if(t)throw e}},abort:function(){t&&t()}}}),L.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return L.globalEval(e),e}}}),L.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),L.ajaxTransport("script",function(e){if(e.crossDomain){var t,r;return{send:function(n,i){t=L(" + + diff --git a/samples/newChat/js/QBconfig.js b/samples/newChat/js/QBconfig.js index 62621381f..0867758d5 100644 --- a/samples/newChat/js/QBconfig.js +++ b/samples/newChat/js/QBconfig.js @@ -12,9 +12,9 @@ var QBconfig = { enable: true }, debug: { - mode: 0, + mode: 1, file: null - }, + } } }; @@ -95,7 +95,9 @@ var CONSTANTS = { PUBLICCHAT: 1 }, ATTACHMENT: { - TYPE : 'image', - BODY : '[attachment]' + TYPE: 'image', + BODY: '[attachment]', + MAXSIZE: 2 * 1000000, // set 2 megabytes, + MAXSIZEMESSAGE: 'Image is too large. Max size is 2 mb.' } }; diff --git a/samples/newChat/js/app.js b/samples/newChat/js/app.js index 0263d4286..cba6180dc 100644 --- a/samples/newChat/js/app.js +++ b/samples/newChat/js/app.js @@ -7,11 +7,11 @@ * 4. Set listeners; */ -function App (config) { +function App(config) { this._config = config; this.user = null; this.token = null; - + // Elements this.page = document.querySelector('#page'); this.sidebar = null; @@ -22,48 +22,53 @@ function App (config) { // Before start working with JS SDK you nead to init it. -App.prototype.init = function(config){ +App.prototype.init = function (config) { // Step 1. QB SDK initialization. QB.init(config.credentials.appId, config.credentials.authKey, config.credentials.authSecret, config.appConfig); }; -App.prototype.setLoginListeners = function() { +App.prototype.setLoginListeners = function () { var self = this, select = document.querySelector('.j-login__select'), loginBtn = document.querySelector('.j-login__button'); - - select.addEventListener('change', function(){ - if(!isNaN(this.value)){ + + select.addEventListener('change', function () { + if (!isNaN(this.value)) { loginBtn.removeAttribute('disabled'); } }); - - loginBtn.addEventListener('click', function(){ + + loginBtn.addEventListener('click', function () { + if (!self.checkInternetConnection()) { + return false; + } + var userId = +select.value; + if (loginBtn.classList.contains('loading')) return false; - + self.user = _.findWhere(usersList, {id: userId}); loginBtn.classList.add('loading'); - + self.login(); - + loginBtn.innerText = 'loading...' }); }; -App.prototype.login = function(){ +App.prototype.login = function () { var self = this, userData = { login: self.user.login, password: self.user.pass }; - + // Step 2. Create session with user credentials. - QB.createSession(userData, function(err, res) { + QB.createSession(userData, function (err, res) { if (res) { self.token = res.token; // Step 3. Conect to chat. - QB.chat.connect({userId: self.user.id, password: self.user.pass}, function(err, roster) { + QB.chat.connect({userId: self.user.id, password: self.user.pass}, function (err, roster) { if (err) { document.querySelector('.j-login__button').innerText = 'Login'; console.error(err); @@ -76,126 +81,138 @@ App.prototype.login = function(){ var loginBdt = document.querySelector('.j-login__button'); loginBdt.innerText = 'Login'; loginBdt.classList.remove('loading'); - console.error('create session Error',err); + console.error('create session Error', err); alert('Create session Error'); } }); }; -App.prototype.loadDashboard = function(){ +App.prototype.loadDashboard = function () { var self = this, logoutBtn = document.querySelector('.j-logout'); - + self.content = document.querySelector('.j-content'); self.sidebar = document.querySelector('.j-sidebar'); - + dialogModule.init(); - + self.loadWelcomeTpl(); - + listeners.setListeners(); - - logoutBtn.addEventListener('click', function(){ + + logoutBtn.addEventListener('click', function () { helpers.clearCache(); - + QB.chat.disconnect(); - QB.logout(function(err){ + QB.logout(function (err) { helpers.redirectToPage('login'); - if(err){ + if (err) { console.error(err); } }); }); - + dialogModule.loadDialogs('chat'); - + this.tabSelectInit(); }; -App.prototype.loadWelcomeTpl = function(){ - +App.prototype.loadWelcomeTpl = function () { + var content = document.querySelector('.j-content'), welcomeTpl = helpers.fillTemplate('tpl_welcome'); - + helpers.clearView(content); content.innerHTML = welcomeTpl; }; -App.prototype.tabSelectInit = function(){ +App.prototype.tabSelectInit = function () { var self = this, tabs = document.querySelectorAll('.j-sidebar__tab_link'), createDialogTab = document.querySelector('.j-sidebar__create_dilalog'); - - createDialogTab.addEventListener('click', function(e){ + + createDialogTab.addEventListener('click', function (e) { + if (!self.checkInternetConnection()) { + return false; + } + self.sidebar.classList.remove('active'); - if(e.currentTarget.classList.contains('active')) return false; - + + if (e.currentTarget.classList.contains('active')) return false; + createDialogTab.classList.add('active'); self.buildCreateDialogTpl(); }); - - _.each(tabs, function(item){ - item.addEventListener('click', function(e){ + + _.each(tabs, function (item) { + item.addEventListener('click', function (e) { + if (!self.checkInternetConnection()) { + return false; + } + var tab = e.currentTarget; self.loadChatList(tab); }); }); }; -App.prototype.loadChatList = function(tab, callback){ - var self = this, - tabs = document.querySelectorAll('.j-sidebar__tab_link'); - - if(tab.classList.contains('active')){ +App.prototype.loadChatList = function (tab, callback) { + var tabs = document.querySelectorAll('.j-sidebar__tab_link'); + + if (tab.classList.contains('active')) { return false; } - - _.each(tabs, function(elem){ + + _.each(tabs, function (elem) { elem.classList.remove('active'); }); - + tab.classList.add('active'); - + helpers.clearView(dialogModule.dialogsListContainer); dialogModule.dialogsListContainer.classList.remove('full'); dialogModule.loadDialogs(tab.dataset.type, callback); }; -App.prototype.buildCreateDialogTpl = function(){ +App.prototype.buildCreateDialogTpl = function () { var self = this, createDialogTPL = helpers.fillTemplate('tpl_newGroupChat'); - + helpers.clearView(self.content); - + self.content.innerHTML = createDialogTPL; - + var backToDialog = self.content.querySelector('.j-back_to_dialog'); - + backToDialog.addEventListener('click', self.backToDialog.bind(self)); - + self.userListConteiner = self.content.querySelector('.j-group_chat__user_list'); - - document.forms.create_dialog.addEventListener('submit', function(e){ - e.preventDefault(); - - if(document.forms.create_dialog.create_dialog_submit.disabled) return false; - + + document.forms.create_dialog.addEventListener('submit', function (e) { + e.preventDefault(); + + if (!self.checkInternetConnection()) { + return false; + } + + if (document.forms.create_dialog.create_dialog_submit.disabled) return false; + document.forms.create_dialog.create_dialog_submit.disabled = true; - + var users = self.userListConteiner.querySelectorAll('.selected'), type = users.length > 1 ? 2 : 3, name = document.forms.create_dialog.dialog_name.value, occupants_ids = type === 3 ? [] : [self.user.id]; - - _.each(users, function(user){ + + _.each(users, function (user) { occupants_ids.push(+user.id); }); - - if(!name && type === 2) { + + if (!name && type === 2) { var userNames = []; - - _.each(occupants_ids, function(id){ - if(id === self.user.id) { + + _.each(occupants_ids, function (id) { + if (id === self.user.id) { userNames.push(self.user.name); } else { userNames.push(userModule._cache[id].name); @@ -203,32 +220,47 @@ App.prototype.buildCreateDialogTpl = function(){ }); name = userNames.join(', '); } - + var params = { type: type, - occupants_ids: occupants_ids, + occupants_ids: occupants_ids }; - - if(type !== 3 && name) { + + if (type !== 3 && name) { params.name = name; } - + dialogModule.createDialog(params); }); userModule.initGettingUsers(); }; -App.prototype.backToDialog = function(e){ +App.prototype.backToDialog = function (e) { var self = this; self.sidebar.classList.add('active'); event.currentTarget.classList.remove('active'); - if(dialogModule.dialogId){ + if (dialogModule.dialogId) { dialogModule.renderMessages(dialogModule.dialogId); } else { self.loadWelcomeTpl(); } }; +App.prototype.noInternetMessage = function () { + var notifications = document.querySelector('.j-notifications'); + + notifications.classList.remove('hidden'); + notifications.innerHTML = helpers.fillTemplate('tpl_lost_connection'); +}; + +App.prototype.checkInternetConnection = function () { + if (!navigator.onLine) { + alert('No internet connection!'); + return false; + } + return true; +}; + // QBconfig was loaded from QBconfig.js file var app = new App(QBconfig); diff --git a/samples/newChat/js/dialog.js b/samples/newChat/js/dialog.js index fe0a15f6c..a6601cfd6 100644 --- a/samples/newChat/js/dialog.js +++ b/samples/newChat/js/dialog.js @@ -16,29 +16,33 @@ function Dialog() { this.limit = appConfig.dilogsPerRequers || 30; } -Dialog.prototype.init = function(){ +Dialog.prototype.init = function () { var self = this; self.sidebar = document.querySelector('.j-sidebar'); self.dialogsListContainer = document.querySelector('.j-sidebar__dilog_list'); self.content = document.querySelector('.j-content'); - self.dialogsListContainer.addEventListener('scroll', function loadMoreDialogs(e){ + self.dialogsListContainer.addEventListener('scroll', function loadMoreDialogs(e) { var container = self.dialogsListContainer, position = container.scrollHeight - (container.scrollTop + container.offsetHeight); - if(container.classList.contains('full')){ + if (container.classList.contains('full')) { container.removeEventListener('scroll', loadMoreDialogs); } - if(position <= 50 && !container.classList.contains('loading')) { + if (position <= 50 && !container.classList.contains('loading')) { var type = document.querySelector('.j-sidebar__tab_link.active').dataset.type; self.loadDialogs(type); } }); }; -Dialog.prototype.loadDialogs = function(type, callback) { +Dialog.prototype.loadDialogs = function (type, callback) { + if (!app.checkInternetConnection()) { + return false; + } + var self = this, filter = { limit: self.limit, @@ -48,99 +52,118 @@ Dialog.prototype.loadDialogs = function(type, callback) { self.dialogsListContainer.classList.add('loading'); - if(type === 'chat'){ + if (type === 'chat') { filter['type[in]'] = [CONSTANTS.DIALOG_TYPES.CHAT, CONSTANTS.DIALOG_TYPES.GROUPCHAT].toString(); } else { filter.type = CONSTANTS.DIALOG_TYPES.PUBLICCHAT; } - QB.chat.dialog.list(filter, function(err, resDialogs){ - if(err){ + QB.chat.dialog.list(filter, function (err, resDialogs) { + if (err) { console.error(err); + alert(err); return; } - var dialogs = resDialogs.items, - peerToPearDialogs = dialogs.filter(function(dialog){ - if(dialog.type === CONSTANTS.DIALOG_TYPES.CHAT) { + var dialogs = resDialogs.items.map(function (dialog) { + dialog.color = _.random(1, 10); + return dialog; + }); + + var peerToPearDialogs = dialogs.filter(function (dialog) { + if (dialog.type === CONSTANTS.DIALOG_TYPES.CHAT) { return true } - }).map(function(dialog){ + }).map(function (dialog) { return { name: dialog.name, - id: dialog.occupants_ids.filter(function(id){ - if(id !== app.user.id) return id; + id: dialog.occupants_ids.filter(function (id) { + if (id !== app.user.id) return id; })[0], - color: _.random(1, 10) + color: dialog.color } }); - _.each(peerToPearDialogs, function(user){ - if(!userModule._cache[user.id]){ + _.each(peerToPearDialogs, function (user) { + if (!userModule._cache[user.id]) { userModule._cache[user.id] = user; } }); - _.each(dialogs, function(dialog){ - if(!self._cache[dialog._id]){ + _.each(dialogs, function (dialog) { + if (!self._cache[dialog._id]) { self._cache[dialog._id] = helpers.compileDialogParams(dialog); } self.renderDialog(self._cache[dialog._id]); }); - if(self.dialogId){ + if (self.dialogId) { var dialogElem = document.getElementById(self.dialogId); - if(dialogElem) dialogElem.classList.add('selected'); + if (dialogElem) dialogElem.classList.add('selected'); } - if(dialogs.length < self.limit){ + if (dialogs.length < self.limit) { self.dialogsListContainer.classList.add('full'); } self.dialogsListContainer.classList.remove('loading'); - if(callback) { + if (callback) { callback(); } }); }; -Dialog.prototype.renderDialog = function(dialog, setAsFirst) { +Dialog.prototype.renderDialog = function (dialog, setAsFirst) { var self = this, id = dialog._id, elem = document.getElementById(id); - if(elem) { + if (elem) { self.replaceDialogLink(elem); return elem; } - if(dialog.type !== CONSTANTS.DIALOG_TYPES.CHAT && !dialog.joined) { + if (dialog.type !== CONSTANTS.DIALOG_TYPES.CHAT && !dialog.joined) { self.joinToDialog(id); } var template = helpers.fillTemplate('tpl_userConversations', {dialog: dialog}); - elem = helpers.toHtml(template)[0]; + elem = helpers.toHtml(template)[0]; + + elem.addEventListener('click', function (e) { + if (!app.checkInternetConnection()) { + return false; + } - elem.addEventListener('click', function(e){ self.sidebar.classList.remove('active'); - if(elem.classList.contains('selected') && document.forms.send_message) return false; - var selectedDialog = document.querySelector('.dialog__item.selected'); + if (elem.classList.contains('selected') && document.forms.send_message) return false; + + var selectedDialog = document.querySelector('.dialog__item.selected'), + dialogElem = e.currentTarget; - if(selectedDialog){ + if (selectedDialog) { selectedDialog.classList.remove('selected'); } elem.classList.add('selected'); self.prevDialogId = self.dialogId; - self.dialogId = e.currentTarget.id; - self.renderMessages(e.currentTarget.id); + self.dialogId = dialogElem.id; + self.renderMessages(dialogElem.id); + + self._cache[self.dialogId].unread_messages_count = 0; + + + var unreadCounter = dialogElem.querySelector('.j-dialog_unread_counter'); + + unreadCounter.classList.add('hidden'); + unreadCounter.innerText = ''; }); - if(!setAsFirst) { + if (!setAsFirst) { self.dialogsListContainer.appendChild(elem); } else { self.dialogsListContainer.insertBefore(elem, self.dialogsListContainer.firstElementChild); @@ -148,32 +171,32 @@ Dialog.prototype.renderDialog = function(dialog, setAsFirst) { return elem; }; -Dialog.prototype.replaceDialogLink = function(elem) { +Dialog.prototype.replaceDialogLink = function (elem) { var self = this, elemsCollection = self.dialogsListContainer.children, elemPosition; - elemPosition: for(var i = 0; i < elemsCollection.length; i++) { - if(elemsCollection[i] === elem){ + elemPosition: for (var i = 0; i < elemsCollection.length; i++) { + if (elemsCollection[i] === elem) { elemPosition = i; break elemPosition; } } - if (elemPosition > 5){ + if (elemPosition >= 5) { self.dialogsListContainer.replaceChild(elem, self.dialogsListContainer.firstElementChild); } }; -Dialog.prototype.joinToDialog = function(id){ +Dialog.prototype.joinToDialog = function (id) { var self = this, jidOrUserId = self._cache[id].jidOrUserId; - QB.chat.muc.join(jidOrUserId, function(resultStanza) { + QB.chat.muc.join(jidOrUserId, function (resultStanza) { var joined = true; for (var i = 0; i < resultStanza.childNodes.length; i++) { var elItem = resultStanza.childNodes.item(i); - if (elItem.tagName === 'error'){ + if (elItem.tagName === 'error') { joined = false; } } @@ -181,27 +204,28 @@ Dialog.prototype.joinToDialog = function(id){ }); }; -Dialog.prototype.renderMessages = function(id){ +Dialog.prototype.renderMessages = function (id) { var self = this, dialog = self._cache[id]; document.querySelector('.j-sidebar__create_dilalog').classList.remove('active'); - if(!self.checkCachedUsersInDialog(id)) return false; - if(!document.forms.send_message){ + if (!self.checkCachedUsersInDialog(id)) return false; + + if (!document.forms.send_message) { helpers.clearView(this.content); self.content.innerHTML = helpers.fillTemplate('tpl_conversationContainer', {title: dialog.name}); self.messagesContainer = document.querySelector('.j-messages'); self.attachmentsPreviewContainer = self.content.querySelector('.j-attachments_preview'); self.dialogTitle = document.querySelector('.j-dialog__title'); - document.querySelector('.j-open_sidebar').addEventListener('click', function(e){ + document.querySelector('.j-open_sidebar').addEventListener('click', function (e) { self.sidebar.classList.add('active'); }.bind(self)); messageModule.init(); } else { - if(self.prevDialogId){ + if (self.prevDialogId) { messageModule.sendStopTypingStatus(self.prevDialogId); } @@ -214,14 +238,14 @@ Dialog.prototype.renderMessages = function(id){ document.forms.send_message.message_feald.value = dialog.draft.message; - if(dialog && dialog.messages.length){ - for(var i = 0; i < dialog.messages.length; i++){ + if (dialog && dialog.messages.length) { + for (var i = 0; i < dialog.messages.length; i++) { messageModule.renderMessage(dialog.messages[i], false); } helpers.scrollTo(self.messagesContainer, 'bottom'); - if(dialog.messages.length < messageModule.limit){ + if (dialog.messages.length < messageModule.limit) { messageModule.getMessages(self.dialogId); } } else { @@ -229,19 +253,22 @@ Dialog.prototype.renderMessages = function(id){ } }; -Dialog.prototype.checkCachedUsersInDialog = function(id){ +Dialog.prototype.checkCachedUsersInDialog = function (id) { var self = this, userList = self._cache[id].users, unsetUsers = []; - for(var i = 0; i < userList.length; i++){ - if(!userModule._cache[userList[i]]){ + for (var i = 0; i < userList.length; i++) { + if (!userModule._cache[userList[i]]) { unsetUsers.push(userList[i]); } } - if(unsetUsers.length) { - userModule.getUsersByIds(unsetUsers, function(){ + if (unsetUsers.length) { + userModule.getUsersByIds(unsetUsers, function (err) { + if (err) { + return true; + } self.renderMessages(id); }); } @@ -249,47 +276,68 @@ Dialog.prototype.checkCachedUsersInDialog = function(id){ return !unsetUsers.length; }; -Dialog.prototype.changeLastMessagePreview = function(dialogId, msg){ +Dialog.prototype.changeLastMessagePreview = function (dialogId, msg) { var self = this, - dialog = document.getElementById(dialogId); + dialog = document.getElementById(dialogId), + message = msg.message; + + if (message.indexOf('\n') !== -1) { + message = message.slice(0, message.indexOf('\n')); + } - self._cache[dialogId].last_message = msg.message; + self._cache[dialogId].last_message = message; + self._cache[dialogId].last_message_date_sent = msg.date_sent; - if(dialog){ + if (dialog) { var messagePreview = dialog.querySelector('.j-dialog__last_message '); - if(msg.message) { + if (msg.message) { messagePreview.classList.remove('attachment'); - messagePreview.innerText = msg.message; + messagePreview.innerText = message; } else { messagePreview.classList.add('attachment'); messagePreview.innerText = 'Attachment'; } + + dialog.querySelector('.j-dialog__last_message_date').innerText = msg.date_sent; } }; -Dialog.prototype.createDialog = function(params) { +Dialog.prototype.createDialog = function (params) { + if (!app.checkInternetConnection()) { + return false; + } + var self = this; - QB.chat.dialog.create(params, function(err, createdDialog) { + QB.chat.dialog.create(params, function (err, createdDialog) { if (err) { console.error(err); } else { var id = createdDialog._id; if (params.type !== CONSTANTS.DIALOG_TYPES.CHAT) { var occupants = createdDialog.occupants_ids, - msg = { - type: 'chat', - extension: { - notification_type: 1, - dialog_id: createdDialog._id, - dialog_name: createdDialog.name, - dialog_type: createdDialog.type, - occupants_ids: occupants.join(', ') - } - }; - - for(var i = 0; i < occupants.length; i++){ + message_body = app.user.name + ' created new dialog with: '; + + _.each(occupants, function (occupantId) { + message_body += userModule._cache[occupantId].name; + }); + + var msg = { + type: 'groupchat', + body: message_body, + extension: { + notification_type: 1, + dialog_id: createdDialog._id, + room_name: createdDialog.name, + room_updated_date: Math.floor(Date.now() / 1000), + type: createdDialog.type, + current_occupant_ids: occupants.join(','), + date_sent: Math.floor(Date.now() / 1000) + } + }; + + for (var i = 0; i < occupants.length; i++) { if (occupants[i] != app.user.id) { QB.chat.sendSystemMessage(occupants[i], msg); } @@ -297,7 +345,7 @@ Dialog.prototype.createDialog = function(params) { } /* Check dialog in cache */ - if(!self._cache[id]){ + if (!self._cache[id]) { self._cache[id] = helpers.compileDialogParams(createdDialog); } @@ -305,9 +353,9 @@ Dialog.prototype.createDialog = function(params) { var type = params.type === CONSTANTS.DIALOG_TYPES.PUBLICCHAT ? 'public' : 'chat', activeTab = document.querySelector('.j-sidebar__tab_link.active'); - if(activeTab && type !== activeTab.dataset.type){ + if (activeTab && type !== activeTab.dataset.type) { var tab = document.querySelector('.j-sidebar__tab_link[data-type="chat"]'); - app.loadChatList(tab, function(){ + app.loadChatList(tab, function () { self.renderDialog(self._cache[id], true).click(); }); } else { @@ -317,12 +365,19 @@ Dialog.prototype.createDialog = function(params) { }); }; -Dialog.prototype.getDialogById = function(id, callback) { - var self = this; +Dialog.prototype.getDialogById = function (id, callback) { + if (!app.checkInternetConnection()) { + return false; + } - QB.chat.dialog.list({_id: id}, function(err, res){ + var self = this; - if(!self._cache[id]){ + QB.chat.dialog.list({_id: id}, function (err, res) { + if (err) { + console.error(err); + return; + } + if (!self._cache[id]) { self._cache[id] = helpers.compileDialogParams(res.items[0]); } callback(self._cache[id]); diff --git a/samples/newChat/js/helpers.js b/samples/newChat/js/helpers.js index ed8463c95..cc75320c5 100644 --- a/samples/newChat/js/helpers.js +++ b/samples/newChat/js/helpers.js @@ -1,37 +1,39 @@ 'use strict'; -function Helpers(){} +function Helpers() { +} -Helpers.prototype.redirectToPage = function(page){ +Helpers.prototype.redirectToPage = function (page) { window.location.hash = '#' + page; }; -Helpers.prototype.fillTemplate = function (name, options){ +Helpers.prototype.fillTemplate = function (name, options) { var tpl = _.template(document.querySelector('#' + name).innerHTML); return tpl(options); }; -Helpers.prototype.clearView = function(view){ +Helpers.prototype.clearView = function (view) { var nodeList = view.childNodes; - for(var i = nodeList.length; i > 0; i--){ - view.removeChild(nodeList[i-1]); + for (var i = nodeList.length; i > 0; i--) { + view.removeChild(nodeList[i - 1]); } }; -Helpers.prototype.compileDialogParams = function(dialog){ +Helpers.prototype.compileDialogParams = function (dialog) { var self = this; - return { _id: dialog._id, name: dialog.name, type: dialog.type, + color: dialog.color || getDialogColor() || _.random(1, 10), last_message: dialog.last_message === CONSTANTS.ATTACHMENT.BODY ? 'Attachment' : dialog.last_message, messages: [], attachment: dialog.last_message === CONSTANTS.ATTACHMENT.BODY, // last_message_date_sent comes in UNIX time. last_message_date_sent: self.getTime(dialog.last_message_date_sent ? dialog.last_message_date_sent * 1000 : dialog.updated_at), users: dialog.occupants_ids || [], - jidOrUserId: dialog.xmpp_room_jid || dialog.jidOrUserId ||getRecipientUserId(dialog.occupants_ids), + jidOrUserId: dialog.xmpp_room_jid || dialog.jidOrUserId || getRecipientUserId(dialog.occupants_ids), + unread_messages_count: dialog.unread_messages_count, full: false, draft: { message: '', @@ -40,19 +42,29 @@ Helpers.prototype.compileDialogParams = function(dialog){ joined: false }; - function getRecipientUserId(users){ - if(users.length === 2){ - return users.filter(function(user){ - if(user !== app.user.id){ + function getRecipientUserId(users) { + if (users.length === 2) { + return users.filter(function (user) { + if (user !== app.user.id) { return user; } })[0]; } } + function getDialogColor(){ + if(dialog.type === 3){ + var occupants = dialog.occupants_ids; + for(var i = 0; i < occupants.length; i++){ + if(occupants[i] !== app.user.id){ + return userModule._cache[occupants[i]].color + } + } + } + } }; -Helpers.prototype.getTime = function(time){ +Helpers.prototype.getTime = function (time) { var date = new Date(time), hours = date.getHours() < 10 ? '0' + date.getHours() : date.getHours(), minutes = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes(); @@ -60,47 +72,45 @@ Helpers.prototype.getTime = function(time){ return hours + ':' + minutes; }; -Helpers.prototype.fillMessagePrams = function(message){ +Helpers.prototype.fillMessagePrams = function (message) { var self = this; - - message.message = self.fillMessageBody(message.message); + + message.message = self.fillMessageBody(message.message || ''); // date_sent comes in UNIX time. message.date_sent = self.getTime(message.date_sent * 1000); - if(message.attachments){ + if (message.attachments) { var attachments = message.attachments; - for(var i = 0; i < attachments.length; i++) { + for (var i = 0; i < attachments.length; i++) { attachments[i].src = self.getSrcFromAttachmentId(attachments[i].id); } } - if(message.message === CONSTANTS.ATTACHMENT.BODY){ + if (message.message === CONSTANTS.ATTACHMENT.BODY) { message.message = ''; } return message; }; -Helpers.prototype.fillMessageBody = function(str){ +Helpers.prototype.fillMessageBody = function (str) { // replace links - return str.replace(/(https?:\/\/[^\s]+)/g, function(url){ + return str.replace(/(https?:\/\/[^\s]+)/g, function (url) { return '' + url + ''; }); - - }; -Helpers.prototype.getSrcFromAttachmentId = function(id) { +Helpers.prototype.getSrcFromAttachmentId = function (id) { return QB.content.publicUrl(id) + '.json?token=' + app.token; }; -Helpers.prototype.fillNewMessageParams = function(userId, msg){ +Helpers.prototype.fillNewMessageParams = function (userId, msg) { var self = this, message = { _id: msg.id, attachments: [], created_at: +msg.extension.date_sent || Date.now(), - date_sent: self.getTime(+msg.extension.date_sent || Date.now()), + date_sent: self.getTime(+msg.extension.date_sent * 1000 || Date.now()), delivered_ids: [], message: self.fillMessageBody(msg.body), read_ids: [], @@ -108,24 +118,24 @@ Helpers.prototype.fillNewMessageParams = function(userId, msg){ chat_dialog_id: msg.extension.dialog_id }; - if(msg.extension.attachments){ + if (msg.extension.attachments) { var attachments = msg.extension.attachments; - for(var i = 0; i < attachments.length; i++) { + for (var i = 0; i < attachments.length; i++) { attachments[i].src = self.getSrcFromAttachmentId(attachments[i].id); } message.attachments = attachments; } - if(message.message === CONSTANTS.ATTACHMENT.BODY){ + if (message.message === CONSTANTS.ATTACHMENT.BODY) { message.message = ''; } return message; }; -Helpers.prototype.toHtml = function(str){ +Helpers.prototype.toHtml = function (str) { var tmp = document.createElement('div'), elements = [], nodes; @@ -133,8 +143,8 @@ Helpers.prototype.toHtml = function(str){ tmp.innerHTML = str; nodes = tmp.childNodes; - for(var i = 0; i < nodes.length; i++){ - if(nodes[i].nodeType === 1) elements.push(nodes[i]); + for (var i = 0; i < nodes.length; i++) { + if (nodes[i].nodeType === 1) elements.push(nodes[i]); } return elements; @@ -145,19 +155,19 @@ Helpers.prototype.scrollTo = function (elem, position) { elemHeight = elem.offsetHeight, elemScrollHeight = elem.scrollHeight; - if(position === 'bottom'){ - if((elemScrollHeight - elemHeight) > 0) { + if (position === 'bottom') { + if ((elemScrollHeight - elemHeight) > 0) { elem.scrollTop = elemScrollHeight; } - } else if (position === 'top'){ + } else if (position === 'top') { elem.scrollTop = 0; - } else if(+position) { + } else if (+position) { elem.scrollTop = +position } }; -Helpers.prototype.clearCache = function(){ - if(messageModule._typingTime){ +Helpers.prototype.clearCache = function () { + if (messageModule._typingTime) { messageModule.sendStopTypingStatus(dialogModule.dialogId); } @@ -168,6 +178,7 @@ Helpers.prototype.clearCache = function(){ dialogModule.dialogId = null; dialogModule.prevDialogId = null; + userModule._cache = {}; app.user = null; }; diff --git a/samples/newChat/js/listeners.js b/samples/newChat/js/listeners.js index b3442c932..c9b6b588b 100644 --- a/samples/newChat/js/listeners.js +++ b/samples/newChat/js/listeners.js @@ -18,53 +18,76 @@ */ -function Listeners(){} +function Listeners() { +} -Listeners.prototype.onMessageListener = function(userId, message){ +Listeners.prototype.onMessageListener = function (userId, message) { var msg = helpers.fillNewMessageParams(userId, message), dialog = dialogModule._cache[message.dialog_id]; - if(dialog){ + if (dialog) { dialog.messages.unshift(msg); - dialogModule.renderDialog(dialog, true); + dialogModule.changeLastMessagePreview(msg.chat_dialog_id, msg); + + var activeTab = document.querySelector('.j-sidebar__tab_link.active'), + tabType = activeTab.dataset.type, + dialogType = dialog.type === 1 ? "public" : "chat"; + + if(tabType === dialogType){ + dialogModule.renderDialog(dialog, true); + + if (dialogModule.dialogId === msg.chat_dialog_id) { + messageModule.renderMessage(msg, true); + } else { + dialog.unread_messages_count += 1; + var dialogElem = document.getElementById(msg.chat_dialog_id), + counter = dialogElem.querySelector('.j-dialog_unread_counter'); + + counter.classList.remove('hidden'); + counter.innerText = dialog.unread_messages_count; + } + } + } else { - dialogModule.getDialogById(msg.chat_dialog_id, function(dialog){ + dialogModule.getDialogById(msg.chat_dialog_id, function (dialog) { var type = dialog.type === 1 ? 'public' : 'chat', activeTab = document.querySelector('.j-sidebar__tab_link.active'); - if(activeTab && type === activeTab.dataset.type){ + if (activeTab && type === activeTab.dataset.type) { dialogModule.renderDialog(dialog, true); } }); } - if(dialogModule.dialogId === msg.chat_dialog_id){ - messageModule.renderMessage(msg, true); - } }; -Listeners.prototype.onSentMessageCallback = function(){ +Listeners.prototype.onReconnectFailedListener = function() { + alert('onReconnectFailedListener'); }; -Listeners.prototype.onMessageTypingListener = function(isTyping, userId, dialogId) { +Listeners.prototype.onSentMessageCallback = function () { + +}; + +Listeners.prototype.onMessageTypingListener = function (isTyping, userId, dialogId) { var currentDialogId = dialogModule.dialogId, dialog = dialogModule._cache[currentDialogId]; - if(((dialogId && currentDialogId === dialogId) || (!dialogId && dialog && dialog.jidOrUserId === userId)) && userId !== app.user.id) { + if (((dialogId && currentDialogId === dialogId) || (!dialogId && dialog && dialog.jidOrUserId === userId)) && userId !== app.user.id) { messageModule.setTypingStatuses(isTyping, userId, dialogId || dialog._id); } }; -Listeners.prototype.onReadStatusListener = function(){ +Listeners.prototype.onReadStatusListener = function () { }; -Listeners.prototype.onSystemMessageListener = function(message) { +Listeners.prototype.onSystemMessageListener = function (message) { if (message.extension && (message.extension.notification_type === '1' || message.extension.notification_type === 'creating_dialog')) { - if(message.extension.dialog_id) { - dialogModule.getDialogById(message.extension.dialog_id, function(dialog) { + if (message.extension.dialog_id) { + dialogModule.getDialogById(message.extension.dialog_id, function (dialog) { var type = dialog.type === 1 ? 'public' : 'chat', activeTab = document.querySelector('.j-sidebar__tab_link.active'); @@ -77,10 +100,27 @@ Listeners.prototype.onSystemMessageListener = function(message) { } }; -Listeners.prototype.setListeners = function(){ +Listeners.prototype.updateOnlineStatus = function (e) { + if (!navigator.onLine) { + app.noInternetMessage(); + } else { + var notifications = document.querySelector('.j-notifications'); + + helpers.clearView(notifications); + notifications.classList.add('hidden'); + } + +}; + +Listeners.prototype.setListeners = function () { QB.chat.onMessageListener = this.onMessageListener; QB.chat.onSystemMessageListener = this.onSystemMessageListener; QB.chat.onMessageTypingListener = this.onMessageTypingListener; + + QB.chat.onReconnectFailedListener = this.onReconnectFailedListener; + // lost enternet connection. + window.addEventListener('online', this.updateOnlineStatus); + window.addEventListener('offline', this.updateOnlineStatus); }; var listeners = new Listeners(); diff --git a/samples/newChat/js/message.js b/samples/newChat/js/message.js index 73bbf0c24..625f23bc9 100644 --- a/samples/newChat/js/message.js +++ b/samples/newChat/js/message.js @@ -12,34 +12,45 @@ function Message() { this.typingUsers = {}; } -Message.prototype.init = function(){ +Message.prototype.init = function () { var self = this; self.container = document.querySelector('.j-messages'); self.attachmentPreviewContainer = document.querySelector('.j-attachments_preview'); self.dialogTitle = document.querySelector('.j-content__title'); - document.forms.send_message.addEventListener('submit', function(e){ + document.forms.send_message.addEventListener('submit', function (e) { e.preventDefault(); self.sendMessage(dialogModule.dialogId); + document.forms.send_message.message_feald.focus(); }); document.forms.send_message.attach_file.addEventListener('change', self.prepareToUpload.bind(self)); document.forms.send_message.message_feald.addEventListener('input', self.typingMessage.bind(self)); + document.forms.send_message.message_feald.addEventListener('keydown', function (e) { + var key = e.keyCode; + + if (key === 13) { + if (!e.ctrlKey && !e.shiftKey && !e.metaKey) { + e.preventDefault(); + self.sendMessage(dialogModule.dialogId); + } + } + }); }; -Message.prototype.typingMessage = function(e){ +Message.prototype.typingMessage = function (e) { var self = this, dialogId = dialogModule.dialogId; self._typingTime = Date.now(); - if(!self._typingTimer){ + if (!self._typingTimer) { self.sendIsTypingStatus(dialogId); - self._typingTimer = setInterval(function(){ - if((Date.now() - self._typingTime) / 1000 >= self.typingTymeout){ + self._typingTimer = setInterval(function () { + if ((Date.now() - self._typingTime) / 1000 >= self.typingTymeout) { self.sendStopTypingStatus(dialogId); } }, 500); @@ -48,14 +59,14 @@ Message.prototype.typingMessage = function(e){ dialogModule._cache[dialogId].draft.message = e.currentTarget.value }; -Message.prototype.sendIsTypingStatus = function(dialogId){ +Message.prototype.sendIsTypingStatus = function (dialogId) { var self = this, dialog = dialogModule._cache[dialogId]; QB.chat.sendIsTypingStatus(dialog.jidOrUserId); }; -Message.prototype.sendStopTypingStatus = function(dialogId){ +Message.prototype.sendStopTypingStatus = function (dialogId) { var self = this, dialog = dialogModule._cache[dialogId]; @@ -66,7 +77,11 @@ Message.prototype.sendStopTypingStatus = function(dialogId){ self._typingTime = null; }; -Message.prototype.sendMessage = function(dialogId) { +Message.prototype.sendMessage = function (dialogId) { + if (!app.checkInternetConnection()) { + return false; + } + var self = this, dialog = dialogModule._cache[dialogId], attachments = dialog.draft.attachments, @@ -81,7 +96,7 @@ Message.prototype.sendMessage = function(dialogId) { markable: 1 }; - if(Object.keys(attachments).length){ + if (Object.keys(attachments).length) { msg.extension.attachments = []; for (var attach in attachments) { @@ -90,7 +105,7 @@ Message.prototype.sendMessage = function(dialogId) { msg.body = CONSTANTS.ATTACHMENT.BODY; dialog.draft.attachments = {}; - } else if (dialogModule.dialogId === dialogId && sendMessageForm){ + } else if (dialogModule.dialogId === dialogId && sendMessageForm) { var dialogElem = document.getElementById(dialogId); dialogModule.replaceDialogLink(dialogElem); @@ -99,14 +114,15 @@ Message.prototype.sendMessage = function(dialogId) { } // Don't send empty message - if(!msg.body) return false; + if (!msg.body) return false; msg.id = QB.chat.send(dialog.jidOrUserId, msg); msg.extension.dialog_id = dialogId; + var message = helpers.fillNewMessageParams(app.user.id, msg); - if(dialog.type === 3) { + if (dialog.type === 3) { dialogModule._cache[dialogId].messages.unshift(message); - if(dialogModule.dialogId === dialogId) { + if (dialogModule.dialogId === dialogId) { self.renderMessage(message, true); } } @@ -114,19 +130,19 @@ Message.prototype.sendMessage = function(dialogId) { dialogModule.changeLastMessagePreview(dialogId, message); }; -Message.prototype.setLoadMoreMessagesListener = function(){ +Message.prototype.setLoadMoreMessagesListener = function () { var self = this; self.container.classList.remove('full'); - if(!self.container.dataset.load){ + if (!self.container.dataset.load) { self.container.dataset.load = 'true'; - self.container.addEventListener('scroll', function loadMoreMessages(e){ + self.container.addEventListener('scroll', function loadMoreMessages(e) { var elem = e.currentTarget, dialog = dialogModule._cache[dialogModule.dialogId]; - if(!dialog.full){ - if(elem.scrollTop < 150 && !elem.classList.contains('loading')) { + if (!dialog.full) { + if (elem.scrollTop < 150 && !elem.classList.contains('loading')) { self.getMessages(dialogModule.dialogId); } } else { @@ -137,7 +153,9 @@ Message.prototype.setLoadMoreMessagesListener = function(){ } }; -Message.prototype.getMessages = function(dialogId) { +Message.prototype.getMessages = function (dialogId) { + if(!navigator.onLine) return false; + var self = this, params = { chat_dialog_id: dialogId, @@ -148,19 +166,19 @@ Message.prototype.getMessages = function(dialogId) { self.container.classList.add('loading'); - QB.chat.message.list(params, function(err, messages) { + QB.chat.message.list(params, function (err, messages) { if (!err) { var dialog = dialogModule._cache[dialogId]; dialog.messages = dialog.messages.concat(messages.items); - if(messages.items.length < self.limit){ + if (messages.items.length < self.limit) { dialog.full = true; } if (dialogModule.dialogId !== dialogId) return false; - if(dialogModule._cache[dialogId].type === 1){ + if (dialogModule._cache[dialogId].type === 1) { self.checkUsersInPublicDialogMessages(messages.items, params.skip); } else { for (var i = 0; i < messages.items.length; i++) { @@ -179,27 +197,27 @@ Message.prototype.getMessages = function(dialogId) { }); }; -Message.prototype.checkUsersInPublicDialogMessages = function(items, skip) { +Message.prototype.checkUsersInPublicDialogMessages = function (items, skip) { var self = this, messages = [].concat(items), userList = []; - for(var i = 0; i < messages.length; i++){ + for (var i = 0; i < messages.length; i++) { var id = messages[i].sender_id; - if(userList.indexOf(id) === -1) { + if (userList.indexOf(id) === -1) { userList.push(id); } } - if(!userList.length) return false; - userModule.getUsersByIds(userList, function(err){ - if(err){ + if (!userList.length) return false; + userModule.getUsersByIds(userList, function (err) { + if (err) { console.error(err); return false; } - for(var i = 0; i < messages.length; i++){ + for (var i = 0; i < messages.length; i++) { var message = helpers.fillMessagePrams(messages[i]); self.renderMessage(message, false); } @@ -210,15 +228,15 @@ Message.prototype.checkUsersInPublicDialogMessages = function(items, skip) { }); }; -Message.prototype.renderMessage = function(message, setAsFirst){ +Message.prototype.renderMessage = function (message, setAsFirst) { var self = this, sender = userModule._cache[message.sender_id], messagesHtml = helpers.fillTemplate('tpl_message', {message: message, sender: sender}), elem = helpers.toHtml(messagesHtml)[0]; - if(!sender){ - userModule.getUsersByIds([message.sender_id], function(err){ - if(!err) { + if (!sender) { + userModule.getUsersByIds([message.sender_id], function (err) { + if (!err) { sender = userModule._cache[message.sender_id]; var userIcon = elem.querySelector('.message__avatar'), @@ -231,21 +249,21 @@ Message.prototype.renderMessage = function(message, setAsFirst){ }); } - if(message.attachments.length){ + if (message.attachments.length) { var images = elem.querySelectorAll('.message_attachment'); - for(var i = 0; i < images.length; i++){ - images[i].addEventListener('load', function(e){ + for (var i = 0; i < images.length; i++) { + images[i].addEventListener('load', function (e) { var img = e.target, imgPos = self.container.offsetHeight + self.container.scrollTop - img.offsetTop, scrollHeight = self.container.scrollTop + img.offsetHeight; img.classList.add('loaded'); - if(imgPos >= 0) { + if (imgPos >= 0) { self.container.scrollTop = scrollHeight + 5; } }); - images[i].addEventListener('error', function(e){ + images[i].addEventListener('error', function (e) { var img = e.target, errorMessageTpl = helpers.fillTemplate('tpl_attachmentLoadError'), errorElem = helpers.toHtml(errorMessageTpl)[0]; @@ -255,17 +273,17 @@ Message.prototype.renderMessage = function(message, setAsFirst){ } } - if(setAsFirst) { + if (setAsFirst) { var scrollPosition = self.container.scrollHeight - (self.container.offsetHeight + self.container.scrollTop), typingElem = document.querySelector('.j-istyping'); - if(typingElem) { + if (typingElem) { self.container.insertBefore(elem, typingElem); } else { self.container.appendChild(elem); } - if(scrollPosition < 50){ + if (scrollPosition < 50) { helpers.scrollTo(self.container, 'bottom'); } } else { @@ -275,26 +293,36 @@ Message.prototype.renderMessage = function(message, setAsFirst){ var containerHeightAfterAppend = self.container.scrollHeight - self.container.scrollTop; - if(containerHeightBeforeAppend !== containerHeightAfterAppend) { + if (containerHeightBeforeAppend !== containerHeightAfterAppend) { self.container.scrollTop += containerHeightAfterAppend - containerHeightBeforeAppend; } } }; -Message.prototype.prepareToUpload = function (e){ +Message.prototype.prepareToUpload = function (e) { + if (!app.checkInternetConnection()) { + return false; + } + var self = this, files = e.currentTarget.files, dialogId = dialogModule.dialogId; - for(var i = 0; i < files.length; i++){ + for (var i = 0; i < files.length; i++) { var file = files[i]; self.uploadFilesAndGetIds(file, dialogId); - }; + } + ; e.currentTarget.value = null; }; -Message.prototype.uploadFilesAndGetIds = function(file, dialogId){ +Message.prototype.uploadFilesAndGetIds = function (file, dialogId) { + + if (file.size >= CONSTANTS.ATTACHMENT.MAXSIZE) { + return alert(CONSTANTS.ATTACHMENT.MAXSIZEMESSAGE); + } + var self = this, preview = self.addImagePreview(file); @@ -304,8 +332,8 @@ Message.prototype.uploadFilesAndGetIds = function(file, dialogId){ name: file.name, type: file.type, size: file.size - }, function(err, response){ - if(err) { + }, function (err, response) { + if (err) { preview.classList.remove('m-loading'); preview.classList.add('m-error'); } else { @@ -318,7 +346,7 @@ Message.prototype.uploadFilesAndGetIds = function(file, dialogId){ }); }; -Message.prototype.addImagePreview = function(file){ +Message.prototype.addImagePreview = function (file) { var self = this, data = { id: 'isLoading', @@ -327,24 +355,24 @@ Message.prototype.addImagePreview = function(file){ template = helpers.fillTemplate('tpl_attachmentPreview', data), wrapper = helpers.toHtml(template)[0]; - self.attachmentPreviewContainer.append(wrapper); + self.attachmentPreviewContainer.appendChild(wrapper); return wrapper; }; -Message.prototype.setTypingStatuses = function(isTyping, userId, dialogId){ +Message.prototype.setTypingStatuses = function (isTyping, userId, dialogId) { var self = this; - if(!self.typingUsers[dialogId]){ + if (!self.typingUsers[dialogId]) { self.typingUsers[dialogId] = []; } - if(isTyping) { + if (isTyping) { self.typingUsers[dialogId].push(userId); } else { var list = self.typingUsers[dialogId]; - self.typingUsers[dialogId] = list.filter(function(id){ + self.typingUsers[dialogId] = list.filter(function (id) { return id !== userId; }); } @@ -352,21 +380,21 @@ Message.prototype.setTypingStatuses = function(isTyping, userId, dialogId){ self.renderTypingUsers(dialogId) }; -Message.prototype.renderTypingUsers = function(dialogId){ +Message.prototype.renderTypingUsers = function (dialogId) { var self = this, userList = self.typingUsers[dialogId], typingElem = document.querySelector('.j-istyping'), - users = userList.map(function(user){ - if(userModule._cache[user]){ + users = userList.map(function (user) { + if (userModule._cache[user]) { return userModule._cache[user] } else { userModule.getUsersByIds([user], function (err) { - if(err) return false; + if (err) return false; - var className = 'm-typing_'+user, - userElem = document.querySelector('.'+className); + var className = 'm-typing_' + user, + userElem = document.querySelector('.' + className); - if(!userElem || !userModule._cache[user]) return false; + if (!userElem || !userModule._cache[user]) return false; userElem.classList.remove(className, 'm-typing_uncnown'); userElem.classList.add('m-user__img_' + userModule._cache[user].color); @@ -375,19 +403,17 @@ Message.prototype.renderTypingUsers = function(dialogId){ } }); - if(typingElem){ + if (typingElem) { self.container.removeChild(typingElem); } - if(users.length){ + if (users.length) { var tpl = helpers.fillTemplate('tpl_message__typing', {users: users}), elem = helpers.toHtml(tpl)[0]; var scrollPosition = self.container.scrollHeight - (self.container.offsetHeight + self.container.scrollTop); - - self.container.append(elem); - - if(scrollPosition < 50){ + self.container.appendChild(elem); + if (scrollPosition < 50) { helpers.scrollTo(self.container, 'bottom'); } } diff --git a/samples/newChat/js/user.js b/samples/newChat/js/user.js index a42a9de47..9b9f329fb 100644 --- a/samples/newChat/js/user.js +++ b/samples/newChat/js/user.js @@ -10,7 +10,7 @@ function User() { this.content = null; } -User.prototype.getUsersByIds = function(userList, callback){ +User.prototype.getUsersByIds = function (userList, callback) { var self = this, params = { filter: { @@ -21,19 +21,19 @@ User.prototype.getUsersByIds = function(userList, callback){ per_page: 100 }; - QB.users.listUsers(params, function(err, responce){ - if(err) { + QB.users.listUsers(params, function (err, responce) { + if (err) { callback(err); } else { var users = responce.items; - _.each(userList, function(id){ - var user = users.find(function(item){ + _.each(userList, function (id) { + var user = users.find(function (item) { return item.user.id === id; }); - if(!self._cache[id]){ - if(user){ + if (!self._cache[id]) { + if (user) { self._cache[id] = { name: user.user.full_name || user.user.login, id: id, @@ -53,20 +53,23 @@ User.prototype.getUsersByIds = function(userList, callback){ }); }; -User.prototype.initGettingUsers = function(){ +User.prototype.initGettingUsers = function () { var self = this; self.content = document.querySelector('.j-content'); self.userListConteiner = document.querySelector('.j-group_chat__user_list'); - self.userListConteiner.addEventListener('scroll', function loadMoreUsers(e){ + self.userListConteiner.addEventListener('scroll', function loadMoreUsers(e) { + + if (!navigator.onLine) return false; + var container = self.userListConteiner, position = container.scrollHeight - (container.scrollTop + container.offsetHeight); - if(container.classList.contains('full')){ + if (container.classList.contains('full')) { container.removeEventListener('scroll', loadMoreUsers); } - if(position <= 50 && !container.classList.contains('loading')) { + if (position <= 50 && !container.classList.contains('loading')) { self.getUsers(); } }); @@ -75,7 +78,7 @@ User.prototype.initGettingUsers = function(){ self.getUsers(); }; -User.prototype.getUsers = function(){ +User.prototype.getUsers = function () { var self = this, params = { page: self.page, @@ -84,8 +87,8 @@ User.prototype.getUsers = function(){ self.userListConteiner.classList.add('loading'); - QB.users.listUsers(params, function(err, responce) { - if(err){ + QB.users.listUsers(params, function (err, responce) { + if (err) { console.error(err); return false; } @@ -94,10 +97,10 @@ User.prototype.getUsers = function(){ self.page = ++responce.current_page; - _.each(users, function(data){ + _.each(users, function (data) { var user = data.user; - if(self._cache[user.id]){ + if (self._cache[user.id]) { self._cache[user.id].last_request_at = user.last_request_at; } else { self._cache[user.id] = { @@ -108,33 +111,33 @@ User.prototype.getUsers = function(){ }; } - if(user.id !== app.user.id){ + if (user.id !== app.user.id) { self.buildUserItem(self._cache[user.id]); } }); - if(users.length < self.limit){ + if (users.length < self.limit) { self.userListConteiner.classList.add('full'); } self.userListConteiner.classList.remove('loading'); }); }; -User.prototype.buildUserItem = function(user){ +User.prototype.buildUserItem = function (user) { var self = this, userTpl = helpers.fillTemplate('tpl_newGroupChatUser', {user: user}), elem = helpers.toHtml(userTpl)[0]; - elem.addEventListener('click', function(){ + elem.addEventListener('click', function () { elem.classList.toggle('selected'); - if(self.userListConteiner.querySelectorAll('.selected').length > 0){ + if (self.userListConteiner.querySelectorAll('.selected').length > 0) { document.forms.create_dialog.create_dialog_submit.disabled = false; } else { document.forms.create_dialog.create_dialog_submit.disabled = true; } - if(self.userListConteiner.querySelectorAll('.selected').length >= 2){ + if (self.userListConteiner.querySelectorAll('.selected').length >= 2) { document.forms.create_dialog.dialog_name.disabled = false; } else { document.forms.create_dialog.dialog_name.disabled = true;