You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
hotkeys/test/hotkeys.test.js

2 lines
123 KiB
JavaScript

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){var u="function"==typeof require&&require;if(!a&&u)return u(s,!0);if(o)return o(s,!0);var f=new Error("Cannot find module '"+s+"'");throw f.code="MODULE_NOT_FOUND",f}var l=r[s]={exports:{}};e[s][0].call(l.exports,function(t){var r=e[s][1][t];return i(r||t)},l,l.exports,t,e,r,n)}return r[s].exports}for(var o="function"==typeof require&&require,s=0;s<n.length;s++)i(n[s]);return i}}()({1:[function(t,e,r){(function(t){!function(n){if("object"==typeof r&&void 0!==e)e.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{("undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:this).hotkeys=n()}}(function(){Array.prototype.indexOf||(Array.prototype.indexOf=function(t){for(var e=0;e<this.length;e++)if(this[e]===t)return e;return-1}),Array.prototype.lastIndexOf||(Array.prototype.lastIndexOf=function(t){for(var e=this.length-1;e>=0;e--)if(this[e]===t)return e;return-1});for(var t,e="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>0,r={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,"⇪":20,capslock:20,",":188,".":190,"/":191,"`":192,"-":e?173:189,"=":e?61:187,";":e?59:186,"'":222,"[":219,"]":221,"\\":220},n="all",i={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":e?224:91,cmd:e?224:91,command:e?224:91},o=[],s={16:"shiftKey",18:"altKey",17:"ctrlKey"},a={16:!1,18:!1,17:!1},u={},f=1;f<20;f++)r["f"+f]=111+f;function l(t){return r[t.toLowerCase()]||t.toUpperCase().charCodeAt(0)}function c(t){n=t||"all"}function h(){return n||"all"}function p(t,e,r){t.addEventListener?t.addEventListener(e,r,!1):t.attachEvent&&t.attachEvent("on"+e,function(){r(window.event)})}function d(t,e,r){var n;if(e.scope===r||"all"===e.scope){for(var i in n=e.mods.length>0,a)(!a[i]&&e.mods.indexOf(+i)>-1||a[i]&&-1===e.mods.indexOf(+i))&&(n=!1);(0!==e.mods.length||a[16]||a[18]||a[17]||a[91])&&!n&&"*"!==e.shortcut||!1===e.method(t,e)&&(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}function g(t,e){for(var r=t.length>=e.length?t:e,n=t.length>=e.length?e:t,i=0;i<r.length;i++)if(-1===n.indexOf(r[i]))return!1;return!0}function y(t){for(var e=t.slice(0,t.length-1),r=0;r<e.length;r++)e[r]=i[e[r].toLowerCase()];return e}function b(t){var e,r;for(t||(t=""),r=(e=(t=t.replace(/\s/g,"")).split(",")).lastIndexOf("");r>=0;)e[r-1]+=",",e.splice(r,1),r=e.lastIndexOf("");return e}function m(t,e,r){var n=b(t),i=[],o=0;for(void 0===r&&(r=e,e="all");o<n.length;o++)i=[],(t=n[o].split("+")).length>1&&(i=y(t)),(t="*"===(t=t[t.length-1])?"*":l(t))in u||(u[t]=[]),u[t].push({shortcut:n[o],scope:e,method:r,key:n[o],mods:i})}for(var v in s[e?224:91]="metaKey",a[e?224:91]=!1,"undefined"!=typeof document&&(p(document,"keydown",function(t){!function(t){var e,r=t.keyCode||t.which||t.charCode,n=u["*"];if(-1===o.indexOf(r)&&o.push(r),93!==r&&224!==r||(r=91),r in a){for(var f in a[r]=!0,i)i[f]===r&&(m[f]=!0);if(!n)return}for(var l in a)a[l]=t[s[l]];if(m.filter.call(this,t)){if(e=h(),n)for(c=0;c<n.length;c++)n[c].scope===e&&d(t,n[c],e);if(r in u)for(var c=0;c<u[r].length;c++)d(t,u[r][c],e)}}(t)}),p(document,"keyup",function(t){!function(t){var e=t.keyCode||t.which||t.charCode,r=o.indexOf(e);r>=0&&o.splice(r,1);93!==e&&224!==e||(e=91);if(e in a)for(var n in a[e]=!1,i)i[n]===e&&(m[n]=!1)}(t)})),t={setScope:c,getScope:h,deleteScope:function(t,e){var r,n,i;for(r in t||(t=h()),u)for(n=u[r],i=0;i<n.length;)n[i].scope===t?n.splice(i,1):i++;h()===t&&c(e||"all")},getPressedKeyCodes:function(){return o.slice(0)},isPressed:function(t){return"string"==typeof t&&(t=l(t)),-1!==o.indexOf(t)},filter:function(t){var e=(t.target||t.srcElement).tagName;return!("INPUT"===e||"SELECT"===e||"TEXTAREA"===e)},unbind:function(t,e){for(var r,n,i=b(t),o=[],s=0;s<i.length;s++){if((r=i[s].split("+")).length>1&&(o=y(r)),t="*"===(t=r[r.length-1])?"*":l(t),e||(e=h()),!u[t])return;for(var a=0;a<u[t].length;a++)(n=u[t][a]).scope===e&&g(n.mods,o)&&(u[t][a]={})}}})m[v]=t[v];if("undefined"!=typeof window){var w=window.hotkeys;m.noConflict=function(t){return t&&window.hotkeys===m&&(window.hotkeys=w),m},window.hotkeys=m}return window.hotkeys=m,m})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(t,e,r){"use strict";r.byteLength=function(t){return 3*t.length/4-f(t)},r.toByteArray=function(t){var e,r,n,s,a,u=t.length;s=f(t),a=new o(3*u/4-s),r=s>0?u-4:u;var l=0;for(e=0;e<r;e+=4)n=i[t.charCodeAt(e)]<<18|i[t.charCodeAt(e+1)]<<12|i[t.charCodeAt(e+2)]<<6|i[t.charCodeAt(e+3)],a[l++]=n>>16&255,a[l++]=n>>8&255,a[l++]=255&n;2===s?(n=i[t.charCodeAt(e)]<<2|i[t.charCodeAt(e+1)]>>4,a[l++]=255&n):1===s&&(n=i[t.charCodeAt(e)]<<10|i[t.charCodeAt(e+1)]<<4|i[t.charCodeAt(e+2)]>>2,a[l++]=n>>8&255,a[l++]=255&n);return a},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o="",s=[],a=0,u=r-i;a<u;a+=16383)s.push(l(t,a,a+16383>u?u:a+16383));1===i?(e=t[r-1],o+=n[e>>2],o+=n[e<<4&63],o+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],o+=n[e>>10],o+=n[e>>4&63],o+=n[e<<2&63],o+="=");return s.push(o),s.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function f(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function l(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16)+(t[a+1]<<8)+t[a+2],s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],3:[function(t,e,r){},{}],4:[function(t,e,r){arguments[4][3][0].apply(r,arguments)},{dup:3}],5:[function(t,e,r){"use strict";var n=t("base64-js"),i=t("ieee754");r.Buffer=a,r.SlowBuffer=function(t){+t!=t&&(t=0);return a.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(t>o)throw new RangeError("Invalid typed array length");var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new Error("If encoding is specified then the first argument must be a string");return l(t)}return u(t,e,r)}function u(t,e,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return B(t)?function(t,e,r){if(e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(r||0))throw new RangeError("'length' is out of bounds");var n;n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r);return n.__proto__=a.prototype,n}(t,e,r):"string"==typeof t?function(t,e){"string"==typeof e&&""!==e||(e="utf8");if(!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,e),n=s(r),i=n.write(t,e);i!==r&&(n=n.slice(0,i));return n}(t,e):function(t){if(a.isBuffer(t)){var e=0|h(t.length),r=s(e);return 0===r.length?r:(t.copy(r,0,0,e),r)}if(t){if(N(t)||"length"in t)return"number"!=typeof t.length||R(t.length)?s(0):c(t);if("Buffer"===t.type&&Array.isArray(t.data))return c(t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function l(t){return f(t),s(t<0?0:0|h(t))}function c(t){for(var e=t.length<0?0:0|h(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function h(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,e){if(a.isBuffer(t))return t.length;if(N(t)||B(t))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(n)return L(t).length;e=(""+e).toLowerCase(),n=!0}}function d(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),R(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=a.from(e,n)),a.isBuffer(e))return 0===e.length?-1:y(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):y(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function f(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var l=-1;for(o=r;o<a;o++)if(f(t,o)===f(e,-1===l?0:o-l)){if(-1===l&&(l=o),o-l+1===u)return l*s}else-1!==l&&(o-=o-l),l=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var c=!0,h=0;h<u;h++)if(f(t,o+h)!==f(e,h)){c=!1;break}if(c)return o}return-1}function b(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(R(a))return s;t[r+s]=a}return s}function m(t,e,r,n){return I(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function v(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function w(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,f=t[i],l=null,c=f>239?4:f>223?3:f>191?2:1;if(i+c<=r)switch(c){case 1:f<128&&(l=f);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&f)<<6|63&o)>127&&(l=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&f)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(l=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&f)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(l=u)}null===l?(l=65533,c=1):l>65535&&(l-=65536,n.push(l>>>10&1023|55296),l=56320|1023&l),n.push(l),i+=c}return function(t){var e=t.length;if(e<=_)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=_));return r}(n)}r.kMaxLength=o,a.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return u(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return i=e,o=r,f(n=t),n<=0?s(n):void 0!==i?"string"==typeof o?s(n).fill(i,o):s(n).fill(i):s(n);var n,i,o},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer},a.compare=function(t,e){if(!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return a.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=a.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(!a.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i),i+=o.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)d(this,e,e+1);return this},a.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)d(this,e,e+3),d(this,e+1,e+2);return this},a.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)d(this,e,e+7),d(this,e+1,e+6),d(this,e+2,e+5),d(this,e+3,e+4);return this},a.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?w(this,0,t):function(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return E(this,e,r);case"utf8":case"utf-8":return w(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return k(this,e,r);case"base64":return v(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}.apply(this,arguments)},a.prototype.equals=function(t){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===a.compare(this,t)},a.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,e).match(/.{2}/g).join(" "),this.length>e&&(t+=" ... ")),"<Buffer "+t+">"},a.prototype.compare=function(t,e,r,n,i){if(!a.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),u=Math.min(o,s),f=this.slice(n,i),l=t.slice(e,r),c=0;c<u;++c)if(f[c]!==l[c]){o=f[c],s=l[c];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},a.prototype.indexOf=function(t,e,r){return g(this,t,e,r,!0)},a.prototype.lastIndexOf=function(t,e,r){return g(this,t,e,r,!1)},a.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o,s,a,u,f,l,c,h,p,d=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return h=e,p=r,I(L(t,(c=this).length-h),c,h,p);case"ascii":return m(this,t,e,r);case"latin1":case"binary":return m(this,t,e,r);case"base64":return u=this,f=e,l=r,I(D(t),u,f,l);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return s=e,a=r,I(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)r=t.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,(o=this).length-s),o,s,a);default:if(d)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var _=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function k(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function E(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=q(t[o]);return i}function S(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function C(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,n,i,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function A(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function T(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function M(t,e,r,n,o){return e=+e,r>>>=0,o||A(t,0,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return n.__proto__=a.prototype,n},a.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},a.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},a.prototype.readUInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||C(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||C(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||C(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||C(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},a.prototype.writeUIntBE=function(t,e,r,n){(t=+t,e>>>=0,r>>>=0,n)||j(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);j(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return T(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return T(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return M(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return M(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=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),t.length-e<n-r&&(n=t.length-e+r);var i,o=n-r;if(this===t&&r<e&&e<n)for(i=o-1;i>=0;--i)t[i+e]=this[i+r];else if(o<1e3)for(i=0;i<o;++i)t[i+e]=this[i+r];else Uint8Array.prototype.set.call(t,this.subarray(r,r+o),e);return o},a.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof t&&(t&=255);if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=a.isBuffer(t)?t:new a(t,n),u=s.length;for(o=0;o<r-e;++o)this[o+e]=s[o%u]}return this};var O=/[^+/0-9A-Za-z-_]/g;function q(t){return t<16?"0"+t.toString(16):t.toString(16)}function L(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=t.trim().replace(O,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function I(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function B(t){return t instanceof ArrayBuffer||null!=t&&null!=t.constructor&&"ArrayBuffer"===t.constructor.name&&"number"==typeof t.byteLength}function N(t){return"function"==typeof ArrayBuffer.isView&&ArrayBuffer.isView(t)}function R(t){return t!=t}},{"base64-js":2,ieee754:27}],6:[function(t,e,r){(function(t){function e(t){return Object.prototype.toString.call(t)}r.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===e(t)},r.isBoolean=function(t){return"boolean"==typeof t},r.isNull=function(t){return null===t},r.isNullOrUndefined=function(t){return null==t},r.isNumber=function(t){return"number"==typeof t},r.isString=function(t){return"string"==typeof t},r.isSymbol=function(t){return"symbol"==typeof t},r.isUndefined=function(t){return void 0===t},r.isRegExp=function(t){return"[object RegExp]"===e(t)},r.isObject=function(t){return"object"==typeof t&&null!==t},r.isDate=function(t){return"[object Date]"===e(t)},r.isError=function(t){return"[object Error]"===e(t)||t instanceof Error},r.isFunction=function(t){return"function"==typeof t},r.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},r.isBuffer=t.isBuffer}).call(this,{isBuffer:t("../../is-buffer/index.js")})},{"../../is-buffer/index.js":29}],7:[function(t,e,r){var n=Array.prototype.slice,i=t("./lib/keys.js"),o=t("./lib/is_arguments.js"),s=e.exports=function(t,e,r){return r||(r={}),t===e||(t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():!t||!e||"object"!=typeof t&&"object"!=typeof e?r.strict?t===e:t==e:function(t,e,r){var f,l;if(a(t)||a(e))return!1;if(t.prototype!==e.prototype)return!1;if(o(t))return!!o(e)&&(t=n.call(t),e=n.call(e),s(t,e,r));if(u(t)){if(!u(e))return!1;if(t.length!==e.length)return!1;for(f=0;f<t.length;f++)if(t[f]!==e[f])return!1;return!0}try{var c=i(t),h=i(e)}catch(t){return!1}if(c.length!=h.length)return!1;for(c.sort(),h.sort(),f=c.length-1;f>=0;f--)if(c[f]!=h[f])return!1;for(f=c.length-1;f>=0;f--)if(l=c[f],!s(t[l],e[l],r))return!1;return typeof t==typeof e}(t,e,r))};function a(t){return null==t}function u(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length)&&("function"==typeof t.copy&&"function"==typeof t.slice&&!(t.length>0&&"number"!=typeof t[0]))}},{"./lib/is_arguments.js":8,"./lib/keys.js":9}],8:[function(t,e,r){var n="[object Arguments]"==function(){return Object.prototype.toString.call(arguments)}();function i(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function o(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Object.prototype.hasOwnProperty.call(t,"callee")&&!Object.prototype.propertyIsEnumerable.call(t,"callee")||!1}(r=e.exports=n?i:o).supported=i,r.unsupported=o},{}],9:[function(t,e,r){function n(t){var e=[];for(var r in t)e.push(r);return e}(e.exports="function"==typeof Object.keys?Object.keys:n).shim=n},{}],10:[function(t,e,r){"use strict";var n=t("object-keys"),i=t("foreach"),o="function"==typeof Symbol&&"symbol"==typeof Symbol(),s=Object.prototype.toString,a=Object.defineProperty&&function(){var t={};try{for(var e in Object.defineProperty(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),u=function(t,e,r,n){var i;e in t&&("function"!=typeof(i=n)||"[object Function]"!==s.call(i)||!n())||(a?Object.defineProperty(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},s=n(e);o&&(s=s.concat(Object.getOwnPropertySymbols(e))),i(s,function(n){u(t,n,e[n],r[n])})};f.supportsDescriptors=!!a,e.exports=f},{foreach:21,"object-keys":34}],11:[function(t,e,r){e.exports=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]}},{}],12:[function(t,e,r){"use strict";var n=t("./helpers/isNaN"),i=t("./helpers/isFinite"),o=t("./helpers/sign"),s=t("./helpers/mod"),a=t("is-callable"),u=t("es-to-primitive/es5"),f=t("has"),l={ToPrimitive:u,ToBoolean:function(t){return!!t},ToNumber:function(t){return Number(t)},ToInteger:function(t){var e=this.ToNumber(t);return n(e)?0:0!==e&&i(e)?o(e)*Math.floor(Math.abs(e)):e},ToInt32:function(t){return this.ToNumber(t)>>0},ToUint32:function(t){return this.ToNumber(t)>>>0},ToUint16:function(t){var e=this.ToNumber(t);if(n(e)||0===e||!i(e))return 0;var r=o(e)*Math.floor(Math.abs(e));return s(r,65536)},ToString:function(t){return String(t)},ToObject:function(t){return this.CheckObjectCoercible(t),Object(t)},CheckObjectCoercible:function(t,e){if(null==t)throw new TypeError(e||"Cannot call method on "+t);return t},IsCallable:a,SameValue:function(t,e){return t===e?0!==t||1/t==1/e:n(t)&&n(e)},Type:function(t){return null===t?"Null":void 0===t?"Undefined":"function"==typeof t||"object"==typeof t?"Object":"number"==typeof t?"Number":"boolean"==typeof t?"Boolean":"string"==typeof t?"String":void 0},IsPropertyDescriptor:function(t){if("Object"!==this.Type(t))return!1;var e={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};for(var r in t)if(f(t,r)&&!e[r])return!1;var n=f(t,"[[Value]]"),i=f(t,"[[Get]]")||f(t,"[[Set]]");if(n&&i)throw new TypeError("Property Descriptors may not be both accessor and data descriptors");return!0},IsAccessorDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new TypeError("Desc must be a Property Descriptor");return!(!f(t,"[[Get]]")&&!f(t,"[[Set]]"))},IsDataDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new TypeError("Desc must be a Property Descriptor");return!(!f(t,"[[Value]]")&&!f(t,"[[Writable]]"))},IsGenericDescriptor:function(t){if(void 0===t)return!1;if(!this.IsPropertyDescriptor(t))throw new TypeError("Desc must be a Property Descriptor");return!this.IsAccessorDescriptor(t)&&!this.IsDataDescriptor(t)},FromPropertyDescriptor:function(t){if(void 0===t)return t;if(!this.IsPropertyDescriptor(t))throw new TypeError("Desc must be a Property Descriptor");if(this.IsDataDescriptor(t))return{value:t["[[Value]]"],writable:!!t["[[Writable]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};if(this.IsAccessorDescriptor(t))return{get:t["[[Get]]"],set:t["[[Set]]"],enumerable:!!t["[[Enumerable]]"],configurable:!!t["[[Configurable]]"]};throw new TypeError("FromPropertyDescriptor must be called with a fully populated Property Descriptor")},ToPropertyDescriptor:function(t){if("Object"!==this.Type(t))throw new TypeError("ToPropertyDescriptor requires an object");var e={};if(f(t,"enumerable")&&(e["[[Enumerable]]"]=this.ToBoolean(t.enumerable)),f(t,"configurable")&&(e["[[Configurable]]"]=this.ToBoolean(t.configurable)),f(t,"value")&&(e["[[Value]]"]=t.value),f(t,"writable")&&(e["[[Writable]]"]=this.ToBoolean(t.writable)),f(t,"get")){var r=t.get;if(void 0!==r&&!this.IsCallable(r))throw new TypeError("getter must be a function");e["[[Get]]"]=r}if(f(t,"set")){var n=t.set;if(void 0!==n&&!this.IsCallable(n))throw new TypeError("setter must be a function");e["[[Set]]"]=n}if((f(e,"[[Get]]")||f(e,"[[Set]]"))&&(f(e,"[[Value]]")||f(e,"[[Writable]]")))throw new TypeError("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return e}};e.exports=l},{"./helpers/isFinite":13,"./helpers/isNaN":14,"./helpers/mod":15,"./helpers/sign":16,"es-to-primitive/es5":17,has:26,"is-callable":30}],13:[function(t,e,r){var n=Number.isNaN||function(t){return t!=t};e.exports=Number.isFinite||function(t){return"number"==typeof t&&!n(t)&&t!==1/0&&t!==-1/0}},{}],14:[function(t,e,r){e.exports=Number.isNaN||function(t){return t!=t}},{}],15:[function(t,e,r){e.exports=function(t,e){var r=t%e;return Math.floor(r>=0?r:r+e)}},{}],16:[function(t,e,r){e.exports=function(t){return t>=0?1:-1}},{}],17:[function(t,e,r){"use strict";var n=Object.prototype.toString,i=t("./helpers/isPrimitive"),o=t("is-callable"),s=function(t,e){var r=e||("[object Date]"===n.call(t)?String:Number);if(r===String||r===Number){var s,a,u=r===String?["toString","valueOf"]:["valueOf","toString"];for(a=0;a<u.length;++a)if(o(t[u[a]])&&(s=t[u[a]](),i(s)))return s;throw new TypeError("No default value")}throw new TypeError("invalid [[DefaultValue]] hint supplied")};e.exports=function(t,e){return i(t)?t:s(t,e)}},{"./helpers/isPrimitive":18,"is-callable":30}],18:[function(t,e,r){e.exports=function(t){return null===t||"function"!=typeof t&&"object"!=typeof t}},{}],19:[function(t,e,r){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"object"==typeof t&&null!==t}function s(t){return void 0===t}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,r,n,a,u,f;if(this._events||(this._events={}),"error"===t&&(!this._events.error||o(this._events.error)&&!this._events.error.length)){if((e=arguments[1])instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(s(r=this._events[t]))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),n=(f=r.slice()).length,u=0;u<n;u++)f[u].apply(this,a);return!0},n.prototype.addListener=function(t,e){var r;if(!i(e))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",t,i(e.listener)?e.listener:e),this._events[t]?o(this._events[t])?this._events[t].push(e):this._events[t]=[this._events[t],e]:this._events[t]=e,o(this._events[t])&&!this._events[t].warned&&(r=s(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&r>0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){if(!i(e))throw TypeError("listener must be a function");var r=!1;function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var r,n,s,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(s=(r=this._events[t]).length,n=-1,r===e||i(r.listener)&&r.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(o(r)){for(a=s;a-- >0;)if(r[a]===e||r[a].listener&&r[a].listener===e){n=a;break}if(n<0)return this;1===r.length?(r.length=0,delete this._events[t]):r.splice(n,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,r;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(i(r=this._events[t]))this.removeListener(t,r);else if(r)for(;r.length;)this.removeListener(t,r[r.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){return this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},{}],20:[function(t,e,r){var n=t("is-function");e.exports=function(t,e,r){if(!n(e))throw new TypeError("iterator must be a function");arguments.length<3&&(r=this);"[object Array]"===i.call(t)?function(t,e,r){for(var n=0,i=t.length;n<i;n++)o.call(t,n)&&e.call(r,t[n],n,t)}(t,e,r):"string"==typeof t?function(t,e,r){for(var n=0,i=t.length;n<i;n++)e.call(r,t.charAt(n),n,t)}(t,e,r):function(t,e,r){for(var n in t)o.call(t,n)&&e.call(r,t[n],n,t)}(t,e,r)};var i=Object.prototype.toString,o=Object.prototype.hasOwnProperty},{"is-function":31}],21:[function(t,e,r){var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=function(t,e,r){if("[object Function]"!==i.call(e))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var s=0;s<o;s++)e.call(r,t[s],s,t);else for(var a in t)n.call(t,a)&&e.call(r,t[a],a,t)}},{}],22:[function(t,e,r){"use strict";var n=Array.prototype.slice,i=Object.prototype.toString;e.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.call(e))throw new TypeError("Function.prototype.bind called on incompatible "+e);for(var r,o=n.call(arguments,1),s=Math.max(0,e.length-o.length),a=[],u=0;u<s;u++)a.push("$"+u);if(r=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof r){var i=e.apply(this,o.concat(n.call(arguments)));return Object(i)===i?i:this}return e.apply(t,o.concat(n.call(arguments)))}),e.prototype){var f=function(){};f.prototype=e.prototype,r.prototype=new f,f.prototype=null}return r}},{}],23:[function(t,e,r){"use strict";var n=t("./implementation");e.exports=Function.prototype.bind||n},{"./implementation":22}],24:[function(t,e,r){e.exports=t("./javascript/diff_match_patch_uncompressed.js").diff_match_patch},{"./javascript/diff_match_patch_uncompressed.js":25}],25:[function(t,e,r){function n(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32}n.Diff,n.prototype.diff_main=function(t,e,r,n){void 0===n&&(n=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var i=n;if(null==t||null==e)throw new Error("Null input. (diff_main)");if(t==e)return t?[[0,t]]:[];void 0===r&&(r=!0);var o=r,s=this.diff_commonPrefix(t,e),a=t.substring(0,s);t=t.substring(s),e=e.substring(s),s=this.diff_commonSuffix(t,e);var u=t.substring(t.length-s);t=t.substring(0,t.length-s),e=e.substring(0,e.length-s);var f=this.diff_compute_(t,e,o,i);return a&&f.unshift([0,a]),u&&f.push([0,u]),this.diff_cleanupMerge(f),f},n.prototype.diff_compute_=function(t,e,r,n){var i;if(!t)return[[1,e]];if(!e)return[[-1,t]];var o=t.length>e.length?t:e,s=t.length>e.length?e:t,a=o.indexOf(s);if(-1!=a)return i=[[1,o.substring(0,a)],[0,s],[1,o.substring(a+s.length)]],t.length>e.length&&(i[0][0]=i[2][0]=-1),i;if(1==s.length)return[[-1,t],[1,e]];var u=this.diff_halfMatch_(t,e);if(u){var f=u[0],l=u[1],c=u[2],h=u[3],p=u[4],d=this.diff_main(f,c,r,n),g=this.diff_main(l,h,r,n);return d.concat([[0,p]],g)}return r&&t.length>100&&e.length>100?this.diff_lineMode_(t,e,n):this.diff_bisect_(t,e,n)},n.prototype.diff_lineMode_=function(t,e,r){t=(l=this.diff_linesToChars_(t,e)).chars1,e=l.chars2;var n=l.lineArray,i=this.diff_main(t,e,!1,r);this.diff_charsToLines_(i,n),this.diff_cleanupSemantic(i),i.push([0,""]);for(var o=0,s=0,a=0,u="",f="";o<i.length;){switch(i[o][0]){case 1:a++,f+=i[o][1];break;case-1:s++,u+=i[o][1];break;case 0:if(s>=1&&a>=1){i.splice(o-s-a,s+a),o=o-s-a;for(var l,c=(l=this.diff_main(u,f,!1,r)).length-1;c>=0;c--)i.splice(o,0,l[c]);o+=l.length}a=0,s=0,u="",f=""}o++}return i.pop(),i},n.prototype.diff_bisect_=function(t,e,r){for(var n=t.length,i=e.length,o=Math.ceil((n+i)/2),s=o,a=2*o,u=new Array(a),f=new Array(a),l=0;l<a;l++)u[l]=-1,f[l]=-1;u[s+1]=0,f[s+1]=0;for(var c=n-i,h=c%2!=0,p=0,d=0,g=0,y=0,b=0;b<o&&!((new Date).getTime()>r);b++){for(var m=-b+p;m<=b-d;m+=2){for(var v=s+m,w=(S=m==-b||m!=b&&u[v-1]<u[v+1]?u[v+1]:u[v-1]+1)-m;S<n&&w<i&&t.charAt(S)==e.charAt(w);)S++,w++;if(u[v]=S,S>n)d+=2;else if(w>i)p+=2;else if(h){if((k=s+c-m)>=0&&k<a&&-1!=f[k])if(S>=(x=n-f[k]))return this.diff_bisectSplit_(t,e,S,w,r)}}for(var _=-b+g;_<=b-y;_+=2){for(var x,k=s+_,E=(x=_==-b||_!=b&&f[k-1]<f[k+1]?f[k+1]:f[k-1]+1)-_;x<n&&E<i&&t.charAt(n-x-1)==e.charAt(i-E-1);)x++,E++;if(f[k]=x,x>n)y+=2;else if(E>i)g+=2;else if(!h){if((v=s+c-_)>=0&&v<a&&-1!=u[v]){var S;w=s+(S=u[v])-v;if(S>=(x=n-x))return this.diff_bisectSplit_(t,e,S,w,r)}}}}return[[-1,t],[1,e]]},n.prototype.diff_bisectSplit_=function(t,e,r,n,i){var o=t.substring(0,r),s=e.substring(0,n),a=t.substring(r),u=e.substring(n),f=this.diff_main(o,s,!1,i),l=this.diff_main(a,u,!1,i);return f.concat(l)},n.prototype.diff_linesToChars_=function(t,e){var r=[],n={};function i(t){for(var e="",i=0,o=-1,s=r.length;o<t.length-1;){-1==(o=t.indexOf("\n",i))&&(o=t.length-1);var a=t.substring(i,o+1);i=o+1,(n.hasOwnProperty?n.hasOwnProperty(a):void 0!==n[a])?e+=String.fromCharCode(n[a]):(e+=String.fromCharCode(s),n[a]=s,r[s++]=a)}return e}return r[0]="",{chars1:i(t),chars2:i(e),lineArray:r}},n.prototype.diff_charsToLines_=function(t,e){for(var r=0;r<t.length;r++){for(var n=t[r][1],i=[],o=0;o<n.length;o++)i[o]=e[n.charCodeAt(o)];t[r][1]=i.join("")}},n.prototype.diff_commonPrefix=function(t,e){if(!t||!e||t.charAt(0)!=e.charAt(0))return 0;for(var r=0,n=Math.min(t.length,e.length),i=n,o=0;r<i;)t.substring(o,i)==e.substring(o,i)?o=r=i:n=i,i=Math.floor((n-r)/2+r);return i},n.prototype.diff_commonSuffix=function(t,e){if(!t||!e||t.charAt(t.length-1)!=e.charAt(e.length-1))return 0;for(var r=0,n=Math.min(t.length,e.length),i=n,o=0;r<i;)t.substring(t.length-i,t.length-o)==e.substring(e.length-i,e.length-o)?o=r=i:n=i,i=Math.floor((n-r)/2+r);return i},n.prototype.diff_commonOverlap_=function(t,e){var r=t.length,n=e.length;if(0==r||0==n)return 0;r>n?t=t.substring(r-n):r<n&&(e=e.substring(0,r));var i=Math.min(r,n);if(t==e)return i;for(var o=0,s=1;;){var a=t.substring(i-s),u=e.indexOf(a);if(-1==u)return o;s+=u,0!=u&&t.substring(i-s)!=e.substring(0,s)||(o=s,s++)}},n.prototype.diff_halfMatch_=function(t,e){if(this.Diff_Timeout<=0)return null;var r=t.length>e.length?t:e,n=t.length>e.length?e:t;if(r.length<4||2*n.length<r.length)return null;var i=this;function o(t,e,r){for(var n,o,s,a,u=t.substring(r,r+Math.floor(t.length/4)),f=-1,l="";-1!=(f=e.indexOf(u,f+1));){var c=i.diff_commonPrefix(t.substring(r),e.substring(f)),h=i.diff_commonSuffix(t.substring(0,r),e.substring(0,f));l.length<h+c&&(l=e.substring(f-h,f)+e.substring(f,f+c),n=t.substring(0,r-h),o=t.substring(r+c),s=e.substring(0,f-h),a=e.substring(f+c))}return 2*l.length>=t.length?[n,o,s,a,l]:null}var s,a,u,f,l,c=o(r,n,Math.ceil(r.length/4)),h=o(r,n,Math.ceil(r.length/2));return c||h?(s=h?c&&c[4].length>h[4].length?c:h:c,t.length>e.length?(a=s[0],u=s[1],f=s[2],l=s[3]):(f=s[0],l=s[1],a=s[2],u=s[3]),[a,u,f,l,s[4]]):null},n.prototype.diff_cleanupSemantic=function(t){for(var e=!1,r=[],n=0,i=null,o=0,s=0,a=0,u=0,f=0;o<t.length;)0==t[o][0]?(r[n++]=o,s=u,a=f,u=0,f=0,i=t[o][1]):(1==t[o][0]?u+=t[o][1].length:f+=t[o][1].length,i&&i.length<=Math.max(s,a)&&i.length<=Math.max(u,f)&&(t.splice(r[n-1],0,[-1,i]),t[r[n-1]+1][0]=1,n--,o=--n>0?r[n-1]:-1,s=0,a=0,u=0,f=0,i=null,e=!0)),o++;for(e&&this.diff_cleanupMerge(t),this.diff_cleanupSemanticLossless(t),o=1;o<t.length;){if(-1==t[o-1][0]&&1==t[o][0]){var l=t[o-1][1],c=t[o][1],h=this.diff_commonOverlap_(l,c),p=this.diff_commonOverlap_(c,l);h>=p?(h>=l.length/2||h>=c.length/2)&&(t.splice(o,0,[0,c.substring(0,h)]),t[o-1][1]=l.substring(0,l.length-h),t[o+1][1]=c.substring(h),o++):(p>=l.length/2||p>=c.length/2)&&(t.splice(o,0,[0,l.substring(0,p)]),t[o-1][0]=1,t[o-1][1]=c.substring(0,c.length-p),t[o+1][0]=-1,t[o+1][1]=l.substring(p),o++),o++}o++}},n.prototype.diff_cleanupSemanticLossless=function(t){function e(t,e){if(!t||!e)return 6;var r=t.charAt(t.length-1),i=e.charAt(0),o=r.match(n.nonAlphaNumericRegex_),s=i.match(n.nonAlphaNumericRegex_),a=o&&r.match(n.whitespaceRegex_),u=s&&i.match(n.whitespaceRegex_),f=a&&r.match(n.linebreakRegex_),l=u&&i.match(n.linebreakRegex_),c=f&&t.match(n.blanklineEndRegex_),h=l&&e.match(n.blanklineStartRegex_);return c||h?5:f||l?4:o&&!a&&u?3:a||u?2:o||s?1:0}for(var r=1;r<t.length-1;){if(0==t[r-1][0]&&0==t[r+1][0]){var i=t[r-1][1],o=t[r][1],s=t[r+1][1],a=this.diff_commonSuffix(i,o);if(a){var u=o.substring(o.length-a);i=i.substring(0,i.length-a),o=u+o.substring(0,o.length-a),s=u+s}for(var f=i,l=o,c=s,h=e(i,o)+e(o,s);o.charAt(0)===s.charAt(0);){i+=o.charAt(0),o=o.substring(1)+s.charAt(0),s=s.substring(1);var p=e(i,o)+e(o,s);p>=h&&(h=p,f=i,l=o,c=s)}t[r-1][1]!=f&&(f?t[r-1][1]=f:(t.splice(r-1,1),r--),t[r][1]=l,c?t[r+1][1]=c:(t.splice(r+1,1),r--))}r++}},n.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,n.whitespaceRegex_=/\s/,n.linebreakRegex_=/[\r\n]/,n.blanklineEndRegex_=/\n\r?\n$/,n.blanklineStartRegex_=/^\r?\n\r?\n/,n.prototype.diff_cleanupEfficiency=function(t){for(var e=!1,r=[],n=0,i=null,o=0,s=!1,a=!1,u=!1,f=!1;o<t.length;)0==t[o][0]?(t[o][1].length<this.Diff_EditCost&&(u||f)?(r[n++]=o,s=u,a=f,i=t[o][1]):(n=0,i=null),u=f=!1):(-1==t[o][0]?f=!0:u=!0,i&&(s&&a&&u&&f||i.length<this.Diff_EditCost/2&&s+a+u+f==3)&&(t.splice(r[n-1],0,[-1,i]),t[r[n-1]+1][0]=1,n--,i=null,s&&a?(u=f=!0,n=0):(o=--n>0?r[n-1]:-1,u=f=!1),e=!0)),o++;e&&this.diff_cleanupMerge(t)},n.prototype.diff_cleanupMerge=function(t){t.push([0,""]);for(var e,r=0,n=0,i=0,o="",s="";r<t.length;)switch(t[r][0]){case 1:i++,s+=t[r][1],r++;break;case-1:n++,o+=t[r][1],r++;break;case 0:n+i>1?(0!==n&&0!==i&&(0!==(e=this.diff_commonPrefix(s,o))&&(r-n-i>0&&0==t[r-n-i-1][0]?t[r-n-i-1][1]+=s.substring(0,e):(t.splice(0,0,[0,s.substring(0,e)]),r++),s=s.substring(e),o=o.substring(e)),0!==(e=this.diff_commonSuffix(s,o))&&(t[r][1]=s.substring(s.length-e)+t[r][1],s=s.substring(0,s.length-e),o=o.substring(0,o.length-e))),0===n?t.splice(r-i,n+i,[1,s]):0===i?t.splice(r-n,n+i,[-1,o]):t.splice(r-n-i,n+i,[-1,o],[1,s]),r=r-n-i+(n?1:0)+(i?1:0)+1):0!==r&&0==t[r-1][0]?(t[r-1][1]+=t[r][1],t.splice(r,1)):r++,i=0,n=0,o="",s=""}""===t[t.length-1][1]&&t.pop();var a=!1;for(r=1;r<t.length-1;)0==t[r-1][0]&&0==t[r+1][0]&&(t[r][1].substring(t[r][1].length-t[r-1][1].length)==t[r-1][1]?(t[r][1]=t[r-1][1]+t[r][1].substring(0,t[r][1].length-t[r-1][1].length),t[r+1][1]=t[r-1][1]+t[r+1][1],t.splice(r-1,1),a=!0):t[r][1].substring(0,t[r+1][1].length)==t[r+1][1]&&(t[r-1][1]+=t[r+1][1],t[r][1]=t[r][1].substring(t[r+1][1].length)+t[r+1][1],t.splice(r+1,1),a=!0)),r++;a&&this.diff_cleanupMerge(t)},n.prototype.diff_xIndex=function(t,e){var r,n=0,i=0,o=0,s=0;for(r=0;r<t.length&&(1!==t[r][0]&&(n+=t[r][1].length),-1!==t[r][0]&&(i+=t[r][1].length),!(n>e));r++)o=n,s=i;return t.length!=r&&-1===t[r][0]?s:s+(e-o)},n.prototype.diff_prettyHtml=function(t){for(var e=[],r=/&/g,n=/</g,i=/>/g,o=/\n/g,s=0;s<t.length;s++){var a=t[s][0],u=t[s][1].replace(r,"&amp;").replace(n,"&lt;").replace(i,"&gt;").replace(o,"&para;<br>");switch(a){case 1:e[s]='<ins style="background:#e6ffe6;">'+u+"</ins>";break;case-1:e[s]='<del style="background:#ffe6e6;">'+u+"</del>";break;case 0:e[s]="<span>"+u+"</span>"}}return e.join("")},n.prototype.diff_text1=function(t){for(var e=[],r=0;r<t.length;r++)1!==t[r][0]&&(e[r]=t[r][1]);return e.join("")},n.prototype.diff_text2=function(t){for(var e=[],r=0;r<t.length;r++)-1!==t[r][0]&&(e[r]=t[r][1]);return e.join("")},n.prototype.diff_levenshtein=function(t){for(var e=0,r=0,n=0,i=0;i<t.length;i++){var o=t[i][0],s=t[i][1];switch(o){case 1:r+=s.length;break;case-1:n+=s.length;break;case 0:e+=Math.max(r,n),r=0,n=0}}return e+=Math.max(r,n)},n.prototype.diff_toDelta=function(t){for(var e=[],r=0;r<t.length;r++)switch(t[r][0]){case 1:e[r]="+"+encodeURI(t[r][1]);break;case-1:e[r]="-"+t[r][1].length;break;case 0:e[r]="="+t[r][1].length}return e.join("\t").replace(/%20/g," ")},n.prototype.diff_fromDelta=function(t,e){for(var r=[],n=0,i=0,o=e.split(/\t/g),s=0;s<o.length;s++){var a=o[s].substring(1);switch(o[s].charAt(0)){case"+":try{r[n++]=[1,decodeURI(a)]}catch(t){throw new Error("Illegal escape in diff_fromDelta: "+a)}break;case"-":case"=":var u=parseInt(a,10);if(isNaN(u)||u<0)throw new Error("Invalid number in diff_fromDelta: "+a);var f=t.substring(i,i+=u);"="==o[s].charAt(0)?r[n++]=[0,f]:r[n++]=[-1,f];break;default:if(o[s])throw new Error("Invalid diff operation in diff_fromDelta: "+o[s])}}if(i!=t.length)throw new Error("Delta length ("+i+") does not equal source text length ("+t.length+").");return r},n.prototype.match_main=function(t,e,r){if(null==t||null==e||null==r)throw new Error("Null input. (match_main)");return r=Math.max(0,Math.min(r,t.length)),t==e?0:t.length?t.substring(r,r+e.length)==e?r:this.match_bitap_(t,e,r):-1},n.prototype.match_bitap_=function(t,e,r){if(e.length>this.Match_MaxBits)throw new Error("Pattern too long for this browser.");var n=this.match_alphabet_(e),i=this;function o(t,n){var o=t/e.length,s=Math.abs(r-n);return i.Match_Distance?o+s/i.Match_Distance:s?1:o}var s=this.Match_Threshold,a=t.indexOf(e,r);-1!=a&&(s=Math.min(o(0,a),s),-1!=(a=t.lastIndexOf(e,r+e.length))&&(s=Math.min(o(0,a),s)));var u,f,l=1<<e.length-1;a=-1;for(var c,h=e.length+t.length,p=0;p<e.length;p++){for(u=0,f=h;u<f;)o(p,r+f)<=s?u=f:h=f,f=Math.floor((h-u)/2+u);h=f;var d=Math.max(1,r-f+1),g=Math.min(r+f,t.length)+e.length,y=Array(g+2);y[g+1]=(1<<p)-1;for(var b=g;b>=d;b--){var m=n[t.charAt(b-1)];if(y[b]=0===p?(y[b+1]<<1|1)&m:(y[b+1]<<1|1)&m|(c[b+1]|c[b])<<1|1|c[b+1],y[b]&l){var v=o(p,b-1);if(v<=s){if(s=v,!((a=b-1)>r))break;d=Math.max(1,2*r-a)}}}if(o(p+1,r)>s)break;c=y}return a},n.prototype.match_alphabet_=function(t){for(var e={},r=0;r<t.length;r++)e[t.charAt(r)]=0;for(r=0;r<t.length;r++)e[t.charAt(r)]|=1<<t.length-r-1;return e},n.prototype.patch_addContext_=function(t,e){if(0!=e.length){for(var r=e.substring(t.start2,t.start2+t.length1),n=0;e.indexOf(r)!=e.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)n+=this.Patch_Margin,r=e.substring(t.start2-n,t.start2+t.length1+n);n+=this.Patch_Margin;var i=e.substring(t.start2-n,t.start2);i&&t.diffs.unshift([0,i]);var o=e.substring(t.start2+t.length1,t.start2+t.length1+n);o&&t.diffs.push([0,o]),t.start1-=i.length,t.start2-=i.length,t.length1+=i.length+o.length,t.length2+=i.length+o.length}},n.prototype.patch_make=function(t,e,r){var i,o;if("string"==typeof t&&"string"==typeof e&&void 0===r)i=t,(o=this.diff_main(i,e,!0)).length>2&&(this.diff_cleanupSemantic(o),this.diff_cleanupEfficiency(o));else if(t&&"object"==typeof t&&void 0===e&&void 0===r)o=t,i=this.diff_text1(o);else if("string"==typeof t&&e&&"object"==typeof e&&void 0===r)i=t,o=e;else{if("string"!=typeof t||"string"!=typeof e||!r||"object"!=typeof r)throw new Error("Unknown call format to patch_make.");i=t,o=r}if(0===o.length)return[];for(var s=[],a=new n.patch_obj,u=0,f=0,l=0,c=i,h=i,p=0;p<o.length;p++){var d=o[p][0],g=o[p][1];switch(u||0===d||(a.start1=f,a.start2=l),d){case 1:a.diffs[u++]=o[p],a.length2+=g.length,h=h.substring(0,l)+g+h.substring(l);break;case-1:a.length1+=g.length,a.diffs[u++]=o[p],h=h.substring(0,l)+h.substring(l+g.length);break;case 0:g.length<=2*this.Patch_Margin&&u&&o.length!=p+1?(a.diffs[u++]=o[p],a.length1+=g.length,a.length2+=g.length):g.length>=2*this.Patch_Margin&&u&&(this.patch_addContext_(a,c),s.push(a),a=new n.patch_obj,u=0,c=h,f=l)}1!==d&&(f+=g.length),-1!==d&&(l+=g.length)}return u&&(this.patch_addContext_(a,c),s.push(a)),s},n.prototype.patch_deepCopy=function(t){for(var e=[],r=0;r<t.length;r++){var i=t[r],o=new n.patch_obj;o.diffs=[];for(var s=0;s<i.diffs.length;s++)o.diffs[s]=i.diffs[s].slice();o.start1=i.start1,o.start2=i.start2,o.length1=i.length1,o.length2=i.length2,e[r]=o}return e},n.prototype.patch_apply=function(t,e){if(0==t.length)return[e,[]];t=this.patch_deepCopy(t);var r=this.patch_addPadding(t);e=r+e+r,this.patch_splitMax(t);for(var n=0,i=[],o=0;o<t.length;o++){var s,a,u=t[o].start2+n,f=this.diff_text1(t[o].diffs),l=-1;if(f.length>this.Match_MaxBits?-1!=(s=this.match_main(e,f.substring(0,this.Match_MaxBits),u))&&(-1==(l=this.match_main(e,f.substring(f.length-this.Match_MaxBits),u+f.length-this.Match_MaxBits))||s>=l)&&(s=-1):s=this.match_main(e,f,u),-1==s)i[o]=!1,n-=t[o].length2-t[o].length1;else if(i[o]=!0,n=s-u,f==(a=-1==l?e.substring(s,s+f.length):e.substring(s,l+this.Match_MaxBits)))e=e.substring(0,s)+this.diff_text2(t[o].diffs)+e.substring(s+f.length);else{var c=this.diff_main(f,a,!1);if(f.length>this.Match_MaxBits&&this.diff_levenshtein(c)/f.length>this.Patch_DeleteThreshold)i[o]=!1;else{this.diff_cleanupSemanticLossless(c);for(var h,p=0,d=0;d<t[o].diffs.length;d++){var g=t[o].diffs[d];0!==g[0]&&(h=this.diff_xIndex(c,p)),1===g[0]?e=e.substring(0,s+h)+g[1]+e.substring(s+h):-1===g[0]&&(e=e.substring(0,s+h)+e.substring(s+this.diff_xIndex(c,p+g[1].length))),-1!==g[0]&&(p+=g[1].length)}}}}return[e=e.substring(r.length,e.length-r.length),i]},n.prototype.patch_addPadding=function(t){for(var e=this.Patch_Margin,r="",n=1;n<=e;n++)r+=String.fromCharCode(n);for(n=0;n<t.length;n++)t[n].start1+=e,t[n].start2+=e;var i=t[0],o=i.diffs;if(0==o.length||0!=o[0][0])o.unshift([0,r]),i.start1-=e,i.start2-=e,i.length1+=e,i.length2+=e;else if(e>o[0][1].length){var s=e-o[0][1].length;o[0][1]=r.substring(o[0][1].length)+o[0][1],i.start1-=s,i.start2-=s,i.length1+=s,i.length2+=s}if(0==(o=(i=t[t.length-1]).diffs).length||0!=o[o.length-1][0])o.push([0,r]),i.length1+=e,i.length2+=e;else if(e>o[o.length-1][1].length){s=e-o[o.length-1][1].length;o[o.length-1][1]+=r.substring(0,s),i.length1+=s,i.length2+=s}return r},n.prototype.patch_splitMax=function(t){for(var e=this.Match_MaxBits,r=0;r<t.length;r++)if(!(t[r].length1<=e)){var i=t[r];t.splice(r--,1);for(var o=i.start1,s=i.start2,a="";0!==i.diffs.length;){var u=new n.patch_obj,f=!0;for(u.start1=o-a.length,u.start2=s-a.length,""!==a&&(u.length1=u.length2=a.length,u.diffs.push([0,a]));0!==i.diffs.length&&u.length1<e-this.Patch_Margin;){var l=i.diffs[0][0],c=i.diffs[0][1];1===l?(u.length2+=c.length,s+=c.length,u.diffs.push(i.diffs.shift()),f=!1):-1===l&&1==u.diffs.length&&0==u.diffs[0][0]&&c.length>2*e?(u.length1+=c.length,o+=c.length,f=!1,u.diffs.push([l,c]),i.diffs.shift()):(c=c.substring(0,e-u.length1-this.Patch_Margin),u.length1+=c.length,o+=c.length,0===l?(u.length2+=c.length,s+=c.length):f=!1,u.diffs.push([l,c]),c==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(c.length))}a=(a=this.diff_text2(u.diffs)).substring(a.length-this.Patch_Margin);var h=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);""!==h&&(u.length1+=h.length,u.length2+=h.length,0!==u.diffs.length&&0===u.diffs[u.diffs.length-1][0]?u.diffs[u.diffs.length-1][1]+=h:u.diffs.push([0,h])),f||t.splice(++r,0,u)}}},n.prototype.patch_toText=function(t){for(var e=[],r=0;r<t.length;r++)e[r]=t[r];return e.join("")},n.prototype.patch_fromText=function(t){var e=[];if(!t)return e;for(var r=t.split("\n"),i=0,o=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<r.length;){var s=r[i].match(o);if(!s)throw new Error("Invalid patch string: "+r[i]);var a=new n.patch_obj;for(e.push(a),a.start1=parseInt(s[1],10),""===s[2]?(a.start1--,a.length1=1):"0"==s[2]?a.length1=0:(a.start1--,a.length1=parseInt(s[2],10)),a.start2=parseInt(s[3],10),""===s[4]?(a.start2--,a.length2=1):"0"==s[4]?a.length2=0:(a.start2--,a.length2=parseInt(s[4],10)),i++;i<r.length;){var u=r[i].charAt(0);try{var f=decodeURI(r[i].substring(1))}catch(t){throw new Error("Illegal escape in patch_fromText: "+f)}if("-"==u)a.diffs.push([-1,f]);else if("+"==u)a.diffs.push([1,f]);else if(" "==u)a.diffs.push([0,f]);else{if("@"==u)break;if(""!==u)throw new Error('Invalid patch mode "'+u+'" in: '+f)}i++}}return e},n.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0},n.patch_obj.prototype.toString=function(){for(var t,e=["@@ -"+(0===this.length1?this.start1+",0":1==this.length1?this.start1+1:this.start1+1+","+this.length1)+" +"+(0===this.length2?this.start2+",0":1==this.length2?this.start2+1:this.start2+1+","+this.length2)+" @@\n"],r=0;r<this.diffs.length;r++){switch(this.diffs[r][0]){case 1:t="+";break;case-1:t="-";break;case 0:t=" "}e[r+1]=t+encodeURI(this.diffs[r][1])+"\n"}return e.join("").replace(/%20/g," ")},this.diff_match_patch=n,this.DIFF_DELETE=-1,this.DIFF_INSERT=1,this.DIFF_EQUAL=0},{}],26:[function(t,e,r){var n=t("function-bind");e.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},{"function-bind":23}],27:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,f=u>>1,l=-7,c=r?i-1:0,h=r?-1:1,p=t[e+c];for(c+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+c],c+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+t[e+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=f}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(s++,u/=2),s+c>=l?(a=0,s=l):s+c>=1?(a=(e*u-1)*Math.pow(2,i),s+=c):(a=e*Math.pow(2,c-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,f+=i;f>0;t[r+p]=255&s,p+=d,s/=256,f-=8);t[r+p-d]|=128*g}},{}],28:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},{}],29:[function(t,e,r){function n(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}e.exports=function(t){return null!=t&&(n(t)||"function"==typeof(e=t).readFloatLE&&"function"==typeof e.slice&&n(e.slice(0,0))||!!t._isBuffer);var e}},{}],30:[function(t,e,r){"use strict";var n=Function.prototype.toString,i=/^\s*class /,o=function(t){try{var e=n.call(t).replace(/\/\/.*\n/g,"").replace(/\/\*[.\s\S]*\*\//g,"").replace(/\n/gm," ").replace(/ {2}/g," ");return i.test(e)}catch(t){return!1}},s=Object.prototype.toString,a="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag;e.exports=function(t){if(!t)return!1;if("function"!=typeof t&&"object"!=typeof t)return!1;if(a)return function(t){try{return!o(t)&&(n.call(t),!0)}catch(t){return!1}}(t);if(o(t))return!1;var e=s.call(t);return"[object Function]"===e||"[object GeneratorFunction]"===e}},{}],31:[function(t,e,r){e.exports=function(t){var e=n.call(t);return"[object Function]"===e||"function"==typeof t&&"[object RegExp]"!==e||"undefined"!=typeof window&&(t===window.setTimeout||t===window.alert||t===window.confirm||t===window.prompt)};var n=Object.prototype.toString},{}],32:[function(t,e,r){var n={}.toString;e.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},{}],33:[function(t,e,r){var n="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=n&&i&&"function"==typeof i.get?i.get:null,s=n&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,u=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,f=a&&u&&"function"==typeof u.get?u.get:null,l=a&&Set.prototype.forEach,c=Boolean.prototype.valueOf,h=Object.prototype.toString;function p(t){return"[object Array]"===y(t)}e.exports=function t(e,r,n,i){if(void 0===e)return"undefined";if(null===e)return"null";if("boolean"==typeof e)return e?"true":"false";if("string"==typeof e)return"'"+e.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,b)+"'";if("number"==typeof e)return 0===e?1/0/e>0?"0":"-0":String(e);r||(r={});var a,u=void 0===r.depth?5:r.depth;if(void 0===n&&(n=0),n>=u&&u>0&&"object"==typeof e)return"[Object]";if(void 0===i)i=[];else if(function(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}(i,e)>=0)return"[Circular]";function h(e,o){return o&&(i=i.slice()).push(o),t(e,r,n+1,i)}if("function"==typeof e){var d=function(t){if(t.name)return t.name;var e=String(t).match(/^function\s*([\w$]+)/);if(e)return e[1]}(e);return"[Function"+(d?": "+d:"")+"]"}if("[object Symbol]"===y(e)){var g=Symbol.prototype.toString.call(e);return"object"==typeof e?m(g):g}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(e)){for(var _="<"+String(e.nodeName).toLowerCase(),x=e.attributes||[],k=0;k<x.length;k++)_+=" "+x[k].name+'="'+(a=x[k].value,String(a).replace(/"/g,"&quot;"))+'"';return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+String(e.nodeName).toLowerCase()+">"}if(p(e))return 0===e.length?"[]":"[ "+w(e,h).join(", ")+" ]";if("[object Error]"===y(e))return 0===(E=w(e,h)).length?"["+String(e)+"]":"{ ["+String(e)+"] "+E.join(", ")+" }";if("object"==typeof e&&"function"==typeof e.inspect)return e.inspect();if(function(t){if(!o)return!1;try{o.call(t);try{f.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(e)){var E=[];return s.call(e,function(t,r){E.push(h(r,e)+" => "+h(t,e))}),v("Map",o.call(e),E)}if(function(t){if(!f)return!1;try{f.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(e)){E=[];return l.call(e,function(t){E.push(h(t,e))}),v("Set",f.call(e),E)}if("[object Number]"===y(e))return m(Number(e));if("[object Boolean]"===y(e))return m(c.call(e));if("[object String]"===y(e))return m(h(String(e)));if("[object Date]"!==y(e)&&"[object RegExp]"!==y(e)){var S=w(e,h);return 0===S.length?"{}":"{ "+S.join(", ")+" }"}return String(e)};var d=Object.prototype.hasOwnProperty||function(t){return t in this};function g(t,e){return d.call(t,e)}function y(t){return h.call(t)}function b(t){var e=t.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return r?"\\"+r:"\\x"+(e<16?"0":"")+e.toString(16)}function m(t){return"Object("+t+")"}function v(t,e,r){return t+" ("+e+") {"+r.join(", ")+"}"}function w(t,e){var r=p(t),n=[];if(r){n.length=t.length;for(var i=0;i<t.length;i++)n[i]=g(t,i)?e(t[i],t):""}for(var o in t)g(t,o)&&(r&&String(Number(o))===o&&o<t.length||(/[^\w$]/.test(o)?n.push(e(o,t)+": "+e(t[o],t)):n.push(o+": "+e(t[o],t))));return n}},{}],34:[function(t,e,r){"use strict";var n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,o=Array.prototype.slice,s=t("./isArguments"),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),f=a.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],c=function(t){var e=t.constructor;return e&&e.prototype===t},h={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!h["$"+t]&&n.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{c(window[t])}catch(t){return!0}}catch(t){return!0}return!1}(),d=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===i.call(t),o=s(t),a=e&&"[object String]"===i.call(t),h=[];if(!e&&!r&&!o)throw new TypeError("Object.keys called on a non-object");var d=f&&r;if(a&&t.length>0&&!n.call(t,0))for(var g=0;g<t.length;++g)h.push(String(g));if(o&&t.length>0)for(var y=0;y<t.length;++y)h.push(String(y));else for(var b in t)d&&"prototype"===b||!n.call(t,b)||h.push(String(b));if(u)for(var m=function(t){if("undefined"==typeof window||!p)return c(t);try{return c(t)}catch(t){return!1}}(t),v=0;v<l.length;++v)m&&"constructor"===l[v]||!n.call(t,l[v])||h.push(l[v]);return h};d.shim=function(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var t=Object.keys;Object.keys=function(e){return s(e)?t(o.call(e)):t(e)}}}else Object.keys=d;return Object.keys||d},e.exports=d},{"./isArguments":35}],35:[function(t,e,r){"use strict";var n=Object.prototype.toString;e.exports=function(t){var e=n.call(t),r="[object Arguments]"===e;return r||(r="[object Array]"!==e&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===n.call(t.callee)),r}},{}],36:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var n=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/,i=function(t){return n.exec(t).slice(1)};function o(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}r.resolve=function(){for(var r="",n=!1,i=arguments.length-1;i>=-1&&!n;i--){var s=i>=0?arguments[i]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,n="/"===s.charAt(0))}return(n?"/":"")+(r=e(o(r.split("/"),function(t){return!!t}),!n).join("/"))||"."},r.normalize=function(t){var n=r.isAbsolute(t),i="/"===s(t,-1);return(t=e(o(t.split("/"),function(t){return!!t}),!n).join("/"))||n||(t="."),t&&i&&(t+="/"),(n?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(o(t,function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}var f=[];for(u=a;u<i.length;u++)f.push("..");return(f=f.concat(o.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){var e=i(t),r=e[0],n=e[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},r.basename=function(t,e){var r=i(t)[2];return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){return i(t)[3]};var s="b"==="ab".substr(-1)?function(t,e,r){return t.substr(e,r)}:function(t,e,r){return e<0&&(e=t.length+e),t.substr(e,r)}}).call(this,t("_process"))},{_process:38}],37:[function(t,e,r){(function(t){"use strict";!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports=function(e,r,n,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,r)});case 3:return t.nextTick(function(){e.call(null,r,n)});case 4:return t.nextTick(function(){e.call(null,r,n,i)});default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return t.nextTick(function(){e.apply(null,o)})}}:e.exports=t.nextTick}).call(this,t("_process"))},{_process:38}],38:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var f,l=[],c=!1,h=-1;function p(){c&&f&&(c=!1,f.length?l=f.concat(l):h=-1,l.length&&d())}function d(){if(!c){var t=u(p);c=!0;for(var e=l.length;e;){for(f=l,l=[];++h<e;)f&&f[h].run();h=-1,e=l.length}f=null,c=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];l.push(new g(t,e)),1!==l.length||c||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],39:[function(t,e,r){e.exports=t("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":40}],40:[function(t,e,r){"use strict";var n=t("process-nextick-args"),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=c;var o=t("core-util-is");o.inherits=t("inherits");var s=t("./_stream_readable"),a=t("./_stream_writable");o.inherits(c,s);for(var u=i(a.prototype),f=0;f<u.length;f++){var l=u[f];c.prototype[l]||(c.prototype[l]=a.prototype[l])}function c(t){if(!(this instanceof c))return new c(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n(p,this)}function p(t){t.end()}Object.defineProperty(c.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),c.prototype._destroy=function(t,e){this.push(null),this.end(),n(e,t)}},{"./_stream_readable":42,"./_stream_writable":44,"core-util-is":6,inherits:28,"process-nextick-args":37}],41:[function(t,e,r){"use strict";e.exports=o;var n=t("./_stream_transform"),i=t("core-util-is");function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=t("inherits"),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},{"./_stream_transform":43,"core-util-is":6,inherits:28}],42:[function(t,e,r){(function(r,n){"use strict";var i=t("process-nextick-args");e.exports=v;var o,s=t("isarray");v.ReadableState=m;t("events").EventEmitter;var a=function(t,e){return t.listeners(e).length},u=t("./internal/streams/stream"),f=t("safe-buffer").Buffer,l=n.Uint8Array||function(){};var c=t("core-util-is");c.inherits=t("inherits");var h=t("util"),p=void 0;p=h&&h.debuglog?h.debuglog("stream"):function(){};var d,g=t("./internal/streams/BufferList"),y=t("./internal/streams/destroy");c.inherits(v,u);var b=["error","close","destroy","pause","resume"];function m(e,r){o=o||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,r instanceof o&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var n=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:i,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(d||(d=t("string_decoder/").StringDecoder),this.decoder=new d(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||t("./_stream_duplex"),!(this instanceof v))return new v(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s,a,u=t._readableState;null===e?(u.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,E(t)}(t,u)):(i||(o=function(t,e){var r;n=e,f.isBuffer(n)||n instanceof l||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));var n;return r}(u,e)),o?t.emit("error",o):u.objectMode||e&&e.length>0?("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===f.prototype||(s=e,e=f.from(s)),n?u.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,u,e,!0):u.ended?t.emit("error",new Error("stream.push() after EOF")):(u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?_(t,u,e,!1):C(t,u)):_(t,u,e,!1))):n||(u.reading=!1));return!(a=u).ended&&(a.needReadable||a.length<a.highWaterMark||0===a.length)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&E(t)),C(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=f.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},v.prototype.unshift=function(t){return w(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return d||(d=t("string_decoder/").StringDecoder),this._readableState.decoder=new d(e),this._readableState.encoding=e,this};var x=8388608;function k(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=((r=t)>=x?r=x:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),r)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0));var r}function E(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i(S,t):S(t))}function S(t){p("emit readable"),t.emit("readable"),M(t)}function C(t,e){e.readingMore||(e.readingMore=!0,i(j,t,e))}function j(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function A(t){p("readable nexttick read 0"),t.read(0)}function T(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),M(t),e.flowing&&!e.reading&&t.read(0)}function M(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;t-=i.length;for(;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0===(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=f.allocUnsafe(t),n=e.head,i=1;n.data.copy(r),t-=n.data.length;for(;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e);return n}(t,e.buffer,e.decoder),r);var r}function q(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i(L,e,t))}function L(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function D(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?q(this):E(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&q(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=k(r,e))),null===(n=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&q(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=(!e||!1!==e.end)&&t!==r.stdout&&t!==r.stderr?l:w;function f(e,r){p("onunpipe"),e===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,p("cleanup"),t.removeListener("close",m),t.removeListener("finish",v),t.removeListener("drain",h),t.removeListener("error",b),t.removeListener("unpipe",f),n.removeListener("end",l),n.removeListener("end",w),n.removeListener("data",y),d=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||h())}function l(){p("onend"),t.end()}o.endEmitted?i(u):n.once("end",u),t.on("unpipe",f);var c,h=(c=n,function(){var t=c._readableState;p("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(c,"data")&&(t.flowing=!0,M(c))});t.on("drain",h);var d=!1;var g=!1;function y(e){p("ondata"),g=!1,!1!==t.write(e)||g||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==D(o.pipes,t))&&!d&&(p("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,g=!0),n.pause())}function b(e){p("onerror",e),w(),t.removeListener("error",b),0===a(t,"error")&&t.emit("error",e)}function m(){t.removeListener("finish",v),w()}function v(){p("onfinish"),t.removeListener("close",m),w()}function w(){p("unpipe"),n.unpipe(t)}return n.on("data",y),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?s(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",b),t.once("close",m),t.once("finish",v),t.emit("pipe",n),o.flowing||(p("pipe resume"),n.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=D(e.pipes,t);return-1===s?this:(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)},v.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&E(this):i(A,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t,e,r=this._readableState;return r.flowing||(p("resume"),r.flowing=!0,t=this,(e=r).resumeScheduled||(e.resumeScheduled=!0,i(T,t,e))),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this._readableState,r=!1,n=this;for(var i in t.on("end",function(){if(p("wrapped end"),e.decoder&&!e.ended){var t=e.decoder.end();t&&t.length&&n.push(t)}n.push(null)}),t.on("data",function(i){(p("wrapped data"),e.decoder&&(i=e.decoder.write(i)),e.objectMode&&null==i)||(e.objectMode||i&&i.length)&&(n.push(i)||(r=!0,t.pause()))}),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<b.length;o++)t.on(b[o],n.emit.bind(n,b[o]));return n._read=function(e){p("wrapped _read",e),r&&(r=!1,t.resume())},n},v._fromList=O}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":40,"./internal/streams/BufferList":45,"./internal/streams/destroy":46,"./internal/streams/stream":47,_process:38,"core-util-is":6,events:19,inherits:28,isarray:32,"process-nextick-args":37,"safe-buffer":53,"string_decoder/":59,util:3}],43:[function(t,e,r){"use strict";e.exports=s;var n=t("./_stream_duplex"),i=t("core-util-is");function o(t){this.afterTransform=function(e,r){return function(t,e,r){var n=t._transformState;n.transforming=!1;var i=n.writecb;if(!i)return t.emit("error",new Error("write callback called multiple times"));n.writechunk=null,n.writecb=null,null!=r&&t.push(r);i(e);var o=t._readableState;o.reading=!1,(o.needReadable||o.length<o.highWaterMark)&&t._read(o.highWaterMark)}(t,e,r)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState=new o(this);var e=this;this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.once("prefinish",function(){"function"==typeof this._flush?this._flush(function(t,r){a(e,t,r)}):a(e)})}function a(t,e,r){if(e)return t.emit("error",e);null!=r&&t.push(r);var n=t._writableState,i=t._transformState;if(n.length)throw new Error("Calling transform done when ws.length != 0");if(i.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=t("inherits"),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,function(t){e(t),r.emit("close")})}},{"./_stream_duplex":40,"core-util-is":6,inherits:28}],44:[function(t,e,r){(function(r,n){"use strict";var i=t("process-nextick-args");function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;t.entry=null;for(;n;){var i=n.callback;e.pendingcb--,i(r),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}e.exports=b;var s,a=!r.browser&&["v0.10","v0.9."].indexOf(r.version.slice(0,5))>-1?setImmediate:i;b.WritableState=y;var u=t("core-util-is");u.inherits=t("inherits");var f={deprecate:t("util-deprecate")},l=t("./internal/streams/stream"),c=t("safe-buffer").Buffer,h=n.Uint8Array||function(){};var p,d=t("./internal/streams/destroy");function g(){}function y(e,r){s=s||t("./_stream_duplex"),e=e||{},this.objectMode=!!e.objectMode,r instanceof s&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var n=e.highWaterMark,u=this.objectMode?16:16384;this.highWaterMark=n||0===n?n:u,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if(p=r,p.writing=!1,p.writecb=null,p.length-=p.writelen,p.writelen=0,e)u=t,f=r,l=n,c=e,h=o,--f.pendingcb,l?(i(h,c),i(k,u,f),u._writableState.errorEmitted=!0,u.emit("error",c)):(h(c),u._writableState.errorEmitted=!0,u.emit("error",c),k(u,f));else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?a(v,t,r,s,o):v(t,r,s,o)}var u,f,l,c,h;var p}(r,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function b(e){if(s=s||t("./_stream_duplex"),!(p.call(b,this)||this instanceof s))return new b(e);this._writableState=new y(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),l.call(this)}function m(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function v(t,e,r,n){var i,o;r||(i=t,0===(o=e).length&&o.needDrain&&(o.needDrain=!1,i.emit("drain"))),e.pendingcb--,n(),k(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,m(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e)}else{for(;r;){var f=r.chunk,l=r.encoding,c=r.callback;if(m(t,e,!1,e.objectMode?1:f.length,f,l,c),r=r.next,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequestCount=0,e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function x(t,e){t._final(function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),k(t,e)})}function k(t,e){var r,n,o=_(e);return o&&(r=t,(n=e).prefinished||n.finalCalled||("function"==typeof r._final?(n.pendingcb++,n.finalCalled=!0,i(x,r,n)):(n.prefinished=!0,r.emit("prefinish"))),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),o}u.inherits(b,l),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:f.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(p=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!p.call(this,t)||t&&t._writableState instanceof y}})):p=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,o,s,a,u,f,l,p,d,y,b,v=this._writableState,w=!1,_=(n=t,(c.isBuffer(n)||n instanceof h)&&!v.objectMode);return _&&!c.isBuffer(t)&&(o=t,t=c.from(o)),"function"==typeof e&&(r=e,e=null),_?e="buffer":e||(e=v.defaultEncoding),"function"!=typeof r&&(r=g),v.ended?(d=this,y=r,b=new Error("write after end"),d.emit("error",b),i(y,b)):(_||(s=this,a=v,f=r,l=!0,p=!1,null===(u=t)?p=new TypeError("May not write null values to stream"):"string"==typeof u||void 0===u||a.objectMode||(p=new TypeError("Invalid non-string/buffer chunk")),p&&(s.emit("error",p),i(f,p),l=!1),l))&&(v.pendingcb++,w=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r));return e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;u||(e.needDrain=!0);if(e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,n,i,o);return u}(this,v,_,t,e,r)),w},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,k(t,e),r&&(e.finished?i(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}}).call(this,t("_process"),"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":40,"./internal/streams/destroy":46,"./internal/streams/stream":47,_process:38,"core-util-is":6,inherits:28,"process-nextick-args":37,"safe-buffer":53,"util-deprecate":67}],45:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer;e.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i,o=n.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=o,i=a,e.copy(r,i),a+=s.data.length,s=s.next;return o},t}()},{"safe-buffer":53}],46:[function(t,e,r){"use strict";var n=t("process-nextick-args");function i(t,e){t.emit("error",e)}e.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;o||s?e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n(i,this,t):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(t){!e&&t?(n(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)}))},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},{"process-nextick-args":37}],47:[function(t,e,r){e.exports=t("events").EventEmitter},{events:19}],48:[function(t,e,r){e.exports=t("./readable").PassThrough},{"./readable":49}],49:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":40,"./lib/_stream_passthrough.js":41,"./lib/_stream_readable.js":42,"./lib/_stream_transform.js":43,"./lib/_stream_writable.js":44}],50:[function(t,e,r){e.exports=t("./readable").Transform},{"./readable":49}],51:[function(t,e,r){e.exports=t("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":44}],52:[function(t,e,r){(function(r){var n=t("through"),i="undefined"!=typeof setImmediate?setImmediate:r.nextTick;e.exports=function(t,e){var r=n(t,e);r.pause();var o=r.resume,s=r.pause,a=!1;return r.pause=function(){return a=!0,s.apply(this,arguments)},r.resume=function(){return a=!1,o.apply(this,arguments)},i(function(){a||r.resume()}),r}}).call(this,t("_process"))},{_process:38,through:66}],53:[function(t,e,r){var n=t("buffer"),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,r),r.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},{buffer:5}],54:[function(t,e,r){e.exports=i;var n=t("events").EventEmitter;function i(){n.call(this)}t("inherits")(i,n),i.Readable=t("readable-stream/readable.js"),i.Writable=t("readable-stream/writable.js"),i.Duplex=t("readable-stream/duplex.js"),i.Transform=t("readable-stream/transform.js"),i.PassThrough=t("readable-stream/passthrough.js"),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function f(t){if(l(),0===n.listenerCount(this,"error"))throw t}function l(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",f),t.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),t.removeListener("close",l)}return r.on("error",f),t.on("error",f),r.on("end",l),r.on("close",l),t.on("close",l),t.emit("pipe",r),t}},{events:19,inherits:28,"readable-stream/duplex.js":39,"readable-stream/passthrough.js":48,"readable-stream/readable.js":49,"readable-stream/transform.js":50,"readable-stream/writable.js":51}],55:[function(t,e,r){"use strict";var n=t("function-bind"),i=t("es-abstract/es5"),o=n.call(Function.call,String.prototype.replace),s=/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,a=/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;e.exports=function(){var t=i.ToString(i.CheckObjectCoercible(this));return o(o(t,s,""),a,"")}},{"es-abstract/es5":12,"function-bind":23}],56:[function(t,e,r){"use strict";var n=t("function-bind"),i=t("define-properties"),o=t("./implementation"),s=t("./polyfill"),a=t("./shim"),u=n.call(Function.call,s());i(u,{getPolyfill:s,implementation:o,shim:a}),e.exports=u},{"./implementation":55,"./polyfill":57,"./shim":58,"define-properties":10,"function-bind":23}],57:[function(t,e,r){"use strict";var n=t("./implementation");e.exports=function(){return String.prototype.trim&&""==="".trim()?String.prototype.trim:n}},{"./implementation":55}],58:[function(t,e,r){"use strict";var n=t("define-properties"),i=t("./polyfill");e.exports=function(){var t=i();return n(String.prototype,{trim:t},{trim:function(){return String.prototype.trim!==t}}),t}},{"./polyfill":57,"define-properties":10}],59:[function(t,e,r){"use strict";var n=t("safe-buffer").Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.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}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=f,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=l,this.end=c,e=3;break;default:return this.write=h,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:-1}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"<22>".repeat(r);if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"<22>".repeat(r+1);if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"<22>".repeat(r+2)}}(this,t,e);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function f(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function l(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function c(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function h(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}r.StringDecoder=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"<22>".repeat(this.lastTotal-this.lastNeed):e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);if(i>=0)return i>0&&(t.lastNeed=i-1),i;if(--n<r)return 0;if((i=s(e[n]))>=0)return i>0&&(t.lastNeed=i-2),i;if(--n<r)return 0;if((i=s(e[n]))>=0)return i>0&&(2===i?i=0:t.lastNeed=i-3),i;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},{"safe-buffer":53}],60:[function(t,e,r){"use strict";var n,i,o=new(t("googlediff")),s=t("./tape_css");function a(t,e){var r=t.actual,n=t.expected;r&&n&&"object"==typeof r&&"object"==typeof n&&(r=JSON.stringify(r),n=JSON.stringify(n));var i=document.createElement("SPAN");i.setAttribute("class","actual"),i.appendChild(document.createTextNode(r)),e.appendChild(i);var s=document.createElement("SPAN");if(s.setAttribute("class","expected"),s.appendChild(document.createTextNode(n)),e.appendChild(s),t.file){var a=document.createElement("SPAN");a.setAttribute("class","line");var u=/\/([^\/]+)$/.exec(t.file)[1];a.appendChild(document.createTextNode(u)),e.appendChild(a),console.warn(t.error.stack)}if(r&&n&&r.constructor==String&&n.constructor==String){var f=document.createElement("P");f.setAttribute("class","diff"),f.innerHTML=function(t,e){var r=o.diff_main(e,t);o.diff_cleanupSemantic(r);var n,i="";return r.forEach(function(t){switch(t[0]){case 0:n="span";break;case 1:n="ins";break;case-1:n="del"}i+="<"+n+">"+t[1]+"</"+n+">"}),i}(r,n),e.appendChild(f)}}function u(t){if("test"===t.type)i=function(t){var e=document.createElement("DIV");e.id=t.id,e.setAttribute("class","test");var r=document.createElement("P");return r.setAttribute("class","name"),r.appendChild(document.createTextNode(t.name)),e.appendChild(r),i=e,n.appendChild(e),e}(t);else if("assert"===t.type){var e=function(t,e){var r=document.createElement("P");r.setAttribute("class","assert "+(t.ok?"ok":"fail"));var n=document.createElement("SPAN");if(n.setAttribute("class","ok"),n.appendChild(document.createTextNode(t.ok?"OK":"FAIL")),r.appendChild(n),t.name){var i=document.createElement("SPAN");i.setAttribute("class","name"),i.appendChild(document.createTextNode(t.name)),r.appendChild(i)}return e.appendChild(r),r.scrollIntoView({block:"end",behavior:"smooth"}),r}(t,i);t.ok||a(t,e)}else"end"===t.type?(u=i,(f=document.createElement("P")).setAttribute("class","end"),u.appendChild(f),i=i.parentNode):t.constructor===String?(r=t,o=i,(s=document.createElement("P")).setAttribute("class","comment"),s.appendChild(document.createTextNode(r)),o.appendChild(s)):console.warn("tape-dom row",t.type,t);var r,o,s,u,f}function f(t){t.createStream({objectMode:!0}).on("data",u)}function l(){var t=document.createElement("style");t.setAttribute("type","text/css");var e=document.createTextNode(s);t.appendChild(e),document.head.appendChild(t)}function c(t){return"object"==typeof window&&(l(),f(t)),c}"object"==typeof document&&((n=document.getElementById("tests"))||((n=document.createElement("div")).setAttribute("id","tests"),document.body.appendChild(n)),i=n),c.installCSS=l,c.stream=f,e.exports=c},{"./tape_css":61,googlediff:24}],61:[function(t,e,r){"use strict";e.exports="div.test{width:100%;border-top:1px dotted grey;margin-top:1em;background:#eef;font-weight:700;margin-bottom:1em}div#tests{margin-bottom:5em}p.assert{margin-top:0;margin-bottom:0;font-weight:400;width:100%}p.assert.ok{background:#efe;color:grey}p.assert.fail{background:#faa}p.comment{background:#eef;color:grey;font-style:italic;margin-top:.2em;margin-bottom:.2em;padding-left:2.4em}p.end{border-bottom:1px dotted grey;margin-top:1em;background:#eef;margin-top:.2em;margin-bottom:.2em}p.diff{background:#ffe;margin-top:0;margin-bottom:0;padding-top:.25em;padding-bottom:.25em;padding-left:4em;font-weight:400;white-space:pre-wrap}ins{background:#afa}del{background:#faa;text-decoration:strike}span.ok{font-weight:700}span.actual,span.expected,span.name{padding-left:1em;font-style:italic;max-width:25em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:inline-block}p.assert.fail span.name{color:#555}span.expected:before{content:'!=';padding-right:1em}span.line{padding-left:1em;float:right;text-align:right;overflow:hidden;text-overflow:ellipsis;font-family:monospace;color:#888}"},{}],62:[function(t,e,r){(function(n){var i=t("defined"),o=t("./lib/default_stream"),s=t("./lib/test"),a=t("./lib/results"),u=t("through"),f=void 0!==n&&n&&"function"==typeof n.on&&!0!==n.browser,l=void 0!==n&&n&&"function"==typeof n.exit;"undefined"!=typeof setImmediate?setImmediate:n.nextTick;function c(t){t||(t={});var e=a();!1!==t.autoclose&&e.once("done",function(){e.close()});var r=function(t,n,i){var o=new s(t,n,i);return r._tests.push(o),function t(e){e.on("test",function(e){t(e)}),e.on("result",function(t){t.ok||"string"==typeof t||(r._exitCode=1)})}(o),e.push(o),o};r._results=e,r._tests=[],r.createStream=function(t){return e.createStream(t)},r.onFinish=function(t){e.on("done",t)};var n=!1;return r.only=function(){if(n)throw new Error("there can only be one only test");n=!0;var t=r.apply(null,arguments);return e.only(t),t},r._exitCode=0,r.close=function(){e.close()},r}(r=e.exports=function(){var t,e=function(){return r().apply(this,arguments)};return e.only=function(){return r().only.apply(this,arguments)},e.createStream=function(e){if(e||(e={}),!t){var n=u();return r({stream:n,objectMode:e.objectMode}),n}return t.createStream(e)},e.onFinish=function(){return r().onFinish.apply(this,arguments)},e.getHarness=r,e;function r(e){return e||(e={}),e.autoclose=!f,t||(t=function(t){t||(t={});var e=c({autoclose:i(t.autoclose,!1)}),r=e.createStream({objectMode:t.objectMode}),s=r.pipe(t.stream||o());f&&s.on("error",function(t){e._exitCode=1});var a=!1;if(r.on("end",function(){a=!0}),!1===t.exit)return e;if(!f||!l)return e;return n.on("exit",function(t){if(0===t){if(!a)for(var r=e._results._only,i=0;i<e._tests.length;i++){var o=e._tests[i];r&&o!==r||o._exit()}e.close(),n.exit(t||e._exitCode)}}),e}(e)),t}}()).createHarness=c,r.Test=s,r.test=r,r.test.skip=s.skip}).call(this,t("_process"))},{"./lib/default_stream":63,"./lib/results":64,"./lib/test":65,_process:38,defined:11,through:66}],63:[function(t,e,r){(function(r){var n=t("through"),i=t("fs");e.exports=function(){var t="",e=n(function(e){for(var r=0;r<e.length;r++){var n="string"==typeof e?e.charAt(r):String.fromCharCode(e[r]);"\n"===n?o():t+=n}},o);return e;function o(){if(i.writeSync&&/^win/.test(r.platform))try{i.writeSync(1,t+"\n")}catch(t){e.emit("error",t)}else try{console.log(t)}catch(t){e.emit("error",t)}t=""}}}).call(this,t("_process"))},{_process:38,fs:4,through:66}],64:[function(t,e,r){(function(r){var n=t("defined"),i=t("events").EventEmitter,o=t("inherits"),s=t("through"),a=t("resumer"),u=t("object-inspect"),f=t("function-bind"),l=t("has"),c=f.call(Function.call,RegExp.prototype.test),h=/\:|\-|\?/,p="undefined"!=typeof setImmediate?setImmediate:r.nextTick;function d(){if(!(this instanceof d))return new d;this.count=0,this.fail=0,this.pass=0,this._stream=s(),this.tests=[],this._only=null}function g(t){if(!t._only)return t.tests.shift();do{var e=t.tests.shift();if(e&&t._only===e)return e}while(0!==t.tests.length)}function y(t){return c(h,t)}e.exports=d,o(d,i),d.prototype.createStream=function(t){t||(t={});var e,r=this,n=0;return t.objectMode?(e=s(),r.on("_push",function t(r,i){i||(i={});var o=n++;r.once("prerun",function(){var t={type:"test",name:r.name,id:o};l(i,"parent")&&(t.parent=i.parent),e.queue(t)}),r.on("test",function(e){t(e,{parent:o})}),r.on("result",function(t){t.test=o,t.type="assert",e.queue(t)}),r.on("end",function(){e.queue({type:"end",test:o})})}),r.on("done",function(){e.queue(null)})):((e=a()).queue("TAP version 13\n"),r._stream.pipe(e)),p(function t(){for(var e;e=g(r);)if(e.run(),!e.ended)return e.once("end",function(){p(t)});r.emit("done")}),e},d.prototype.push=function(t){this.tests.push(t),this._watch(t),this.emit("_push",t)},d.prototype.only=function(t){this._only=t},d.prototype._watch=function(t){var e=this,r=function(t){e._stream.queue(t)};t.once("prerun",function(){r("# "+t.name+"\n")}),t.on("result",function(t){"string"!=typeof t?(r(function(t,e){var r="";r+=(t.ok?"ok ":"not ok ")+e,r+=t.name?" "+t.name.toString().replace(/\s+/g," "):"",t.skip?r+=" # SKIP":t.todo&&(r+=" # TODO");if(r+="\n",t.ok)return r;var i=" ";if(r+=" ---\n",r+=i+"operator: "+t.operator+"\n",l(t,"expected")||l(t,"actual")){var o=u(t.expected,{depth:t.objectPrintDepth}),s=u(t.actual,{depth:t.objectPrintDepth});Math.max(o.length,s.length)>65||y(o)||y(s)?(r+=" expected: |-\n "+o+"\n",r+=" actual: |-\n "+s+"\n"):(r+=i+"expected: "+o+"\n",r+=i+"actual: "+s+"\n")}t.at&&(r+=i+"at: "+t.at+"\n");var a=t.actual&&t.actual.stack,f=t.error&&t.error.stack,c=n(a,f);if(c){var h=String(c).split("\n");r+=i+"stack: |-\n";for(var p=0;p<h.length;p++)r+=i+" "+h[p]+"\n"}return r+=" ...\n"}(t,e.count+1)),e.count++,t.ok?e.pass++:e.fail++):r("# "+t+"\n")}),t.on("test",function(t){e._watch(t)})},d.prototype.close=function(){var t=this;t.closed&&t._stream.emit("error",new Error("ALREADY CLOSED")),t.closed=!0;var e=function(e){t._stream.queue(e)};e("\n1.."+t.count+"\n"),e("# tests "+t.count+"\n"),e("# pass "+t.pass+"\n"),t.fail?e("# fail "+t.fail+"\n"):e("\n# ok\n"),t._stream.queue(null)}}).call(this,t("_process"))},{_process:38,defined:11,events:19,"function-bind":23,has:26,inherits:28,"object-inspect":33,resumer:52,through:66}],65:[function(t,e,r){(function(r,n){var i=t("deep-equal"),o=t("defined"),s=t("path"),a=t("inherits"),u=t("events").EventEmitter,f=t("has"),l=t("string.prototype.trim"),c=t("function-bind"),h=t("for-each"),p=c.call(Function.call,Object.prototype.propertyIsEnumerable);e.exports=b;var d="undefined"!=typeof setImmediate?setImmediate:r.nextTick,g=setTimeout;a(b,u);var y=function(t,e,r){for(var n,i="(anonymous)",o={},s=0;s<arguments.length;s++){var a=arguments[s],u=typeof a;"string"===u?i=a:"object"===u?o=a||o:"function"===u&&(n=a)}return{name:i,opts:o,cb:n}};function b(t,e,r){if(!(this instanceof b))return new b(t,e,r);var n=y(t,e,r);for(var i in this.readable=!0,this.name=n.name||"(anonymous)",this.assertCount=0,this.pendingCount=0,this._skip=n.opts.skip||!1,this._timeout=n.opts.timeout,this._objectPrintDepth=n.opts.objectPrintDepth||5,this._plan=void 0,this._cb=n.cb,this._progeny=[],this._ok=!0,this)this[i]=function(t,e){return"function"==typeof e?function(){return e.apply(t,arguments)}:e}(this,this[i])}b.prototype.run=function(){if(this._skip&&this.comment("SKIP "+this.name),!this._cb||this._skip)return this._end();null!=this._timeout&&this.timeoutAfter(this._timeout),this.emit("prerun"),this._cb(this),this.emit("run")},b.prototype.test=function(t,e,r){var n=this,i=new b(t,e,r);this._progeny.push(i),this.pendingCount++,this.emit("test",i),i.on("prerun",function(){n.assertCount++}),n._pendingAsserts()||d(function(){n._end()}),d(function(){n._plan||n.pendingCount!=n._progeny.length||n._end()})},b.prototype.comment=function(t){var e=this;h(l(t).split("\n"),function(t){e.emit("result",l(t).replace(/^#\s*/,""))})},b.prototype.plan=function(t){this._plan=t,this.emit("plan",t)},b.prototype.timeoutAfter=function(t){if(!t)throw new Error("timeoutAfter requires a timespan");var e=this,r=g(function(){e.fail("test timed out after "+t+"ms"),e.end()},t);this.once("end",function(){clearTimeout(r)})},b.prototype.end=function(t){arguments.length>=1&&t&&this.ifError(t),this.calledEnd&&this.fail(".end() called twice"),this.calledEnd=!0,this._end()},b.prototype._end=function(t){var e=this;if(this._progeny.length){var r=this._progeny.shift();return r.on("end",function(){e._end()}),void r.run()}this.ended||this.emit("end");var n=this._pendingAsserts();!this._planError&&void 0!==this._plan&&n&&(this._planError=!0,this.fail("plan != count",{expected:this._plan,actual:this.assertCount})),this.ended=!0},b.prototype._exit=function(){void 0===this._plan||this._planError||this.assertCount===this._plan?this.ended||this.fail("test exited without ending",{exiting:!0}):(this._planError=!0,this.fail("plan != count",{expected:this._plan,actual:this.assertCount,exiting:!0}))},b.prototype._pendingAsserts=function(){return void 0===this._plan?1:this._plan-(this._progeny.length+this.assertCount)},b.prototype._assert=function(t,e){var r=this,i=e.extra||{},a={id:r.assertCount++,ok:Boolean(t),skip:o(i.skip,e.skip),name:o(i.message,e.message,"(unnamed assert)"),operator:o(i.operator,e.operator),objectPrintDepth:r._objectPrintDepth};if((f(e,"actual")||f(i,"actual"))&&(a.actual=o(i.actual,e.actual)),(f(e,"expected")||f(i,"expected"))&&(a.expected=o(i.expected,e.expected)),this._ok=Boolean(this._ok&&t),t||(a.error=o(i.error,e.error,new Error(a.name))),!t)for(var u=(new Error("exception").stack||"").split("\n"),l=s.dirname(n)+s.sep,c=0;c<u.length;c++){var h=/^[^\s]*\s*\bat\s+(.+)/.exec(u[c]);if(h){var p=h[1].split(/\s+/),g=/((?:\/|[A-Z]:\\)[^:\s]+:(\d+)(?::(\d+))?)/.exec(p[1]);if((g||(g=/((?:\/|[A-Z]:\\)[^:\s]+:(\d+)(?::(\d+))?)/.exec(p[2]))||(g=/((?:\/|[A-Z]:\\)[^:\s]+:(\d+)(?::(\d+))?)/.exec(p[3])))&&g[1].slice(0,l.length)!==l){a.functionName=p[0],a.file=g[1],a.line=Number(g[2]),g[3]&&(a.column=g[3]),a.at=h[1];break}}}r.emit("result",a);var y=r._pendingAsserts();y||(i.exiting?r._end():d(function(){r._end()})),!r._planError&&y<0&&(r._planError=!0,r.fail("plan != count",{expected:r._plan,actual:r._plan-y}))},b.prototype.fail=function(t,e){this._assert(!1,{message:t,operator:"fail",extra:e})},b.prototype.pass=function(t,e){this._assert(!0,{message:t,operator:"pass",extra:e})},b.prototype.skip=function(t,e){this._assert(!0,{message:t,operator:"skip",skip:!0,extra:e})},b.prototype.ok=b.prototype.true=b.prototype.assert=function(t,e,r){this._assert(t,{message:o(e,"should be truthy"),operator:"ok",expected:!0,actual:t,extra:r})},b.prototype.notOk=b.prototype.false=b.prototype.notok=function(t,e,r){this._assert(!t,{message:o(e,"should be falsy"),operator:"notOk",expected:!1,actual:t,extra:r})},b.prototype.error=b.prototype.ifError=b.prototype.ifErr=b.prototype.iferror=function(t,e,r){this._assert(!t,{message:o(e,String(t)),operator:"error",actual:t,extra:r})},b.prototype.equal=b.prototype.equals=b.prototype.isEqual=b.prototype.is=b.prototype.strictEqual=b.prototype.strictEquals=function(t,e,r,n){this._assert(t===e,{message:o(r,"should be equal"),operator:"equal",actual:t,expected:e,extra:n})},b.prototype.notEqual=b.prototype.notEquals=b.prototype.notStrictEqual=b.prototype.notStrictEquals=b.prototype.isNotEqual=b.prototype.isNot=b.prototype.not=b.prototype.doesNotEqual=b.prototype.isInequal=function(t,e,r,n){this._assert(t!==e,{message:o(r,"should not be equal"),operator:"notEqual",actual:t,notExpected:e,extra:n})},b.prototype.deepEqual=b.prototype.deepEquals=b.prototype.isEquivalent=b.prototype.same=function(t,e,r,n){this._assert(i(t,e,{strict:!0}),{message:o(r,"should be equivalent"),operator:"deepEqual",actual:t,expected:e,extra:n})},b.prototype.deepLooseEqual=b.prototype.looseEqual=b.prototype.looseEquals=function(t,e,r,n){this._assert(i(t,e),{message:o(r,"should be equivalent"),operator:"deepLooseEqual",actual:t,expected:e,extra:n})},b.prototype.notDeepEqual=b.prototype.notEquivalent=b.prototype.notDeeply=b.prototype.notSame=b.prototype.isNotDeepEqual=b.prototype.isNotDeeply=b.prototype.isNotEquivalent=b.prototype.isInequivalent=function(t,e,r,n){this._assert(!i(t,e,{strict:!0}),{message:o(r,"should not be equivalent"),operator:"notDeepEqual",actual:t,notExpected:e,extra:n})},b.prototype.notDeepLooseEqual=b.prototype.notLooseEqual=b.prototype.notLooseEquals=function(t,e,r,n){this._assert(!i(t,e),{message:o(r,"should be equivalent"),operator:"notDeepLooseEqual",actual:t,expected:e,extra:n})},b.prototype.throws=function(t,e,r,n){"string"==typeof e&&(r=e,e=void 0);var i=void 0;try{t()}catch(t){if(i={error:t},!(null==t||p(t,"message")&&f(t,"message"))){var s=t.message;delete t.message,t.message=s}}var a=i;e instanceof RegExp&&(a=e.test(i&&i.error),e=String(e)),"function"==typeof e&&i&&(a=i.error instanceof e,i.error=i.error.constructor),this._assert("function"==typeof t&&a,{message:o(r,"should throw"),operator:"throws",actual:i&&i.error,expected:e,error:!a&&i&&i.error,extra:n})},b.prototype.doesNotThrow=function(t,e,r,n){"string"==typeof e&&(r=e,e=void 0);var i=void 0;try{t()}catch(t){i={error:t}}this._assert(!i,{message:o(r,"should not throw"),operator:"throws",actual:i&&i.error,expected:e,error:i&&i.error,extra:n})},b.skip=function(t,e,r){var n=y.apply(null,arguments);return n.opts.skip=!0,b(n.name,n.opts,n.cb)}}).call(this,t("_process"),"/node_modules/tape/lib")},{_process:38,"deep-equal":7,defined:11,events:19,"for-each":20,"function-bind":23,has:26,inherits:28,path:36,"string.prototype.trim":56}],66:[function(t,e,r){(function(r){var n=t("stream");function i(t,e,i){t=t||function(t){this.queue(t)},e=e||function(){this.queue(null)};var o=!1,s=!1,a=[],u=!1,f=new n;function l(){for(;a.length&&!f.paused;){var t=a.shift();if(null===t)return f.emit("end");f.emit("data",t)}}return f.readable=f.writable=!0,f.paused=!1,f.autoDestroy=!(i&&!1===i.autoDestroy),f.write=function(e){return t.call(this,e),!f.paused},f.queue=f.push=function(t){return u?f:(null===t&&(u=!0),a.push(t),l(),f)},f.on("end",function(){f.readable=!1,!f.writable&&f.autoDestroy&&r.nextTick(function(){f.destroy()})}),f.end=function(t){if(!o)return o=!0,arguments.length&&f.write(t),f.writable=!1,e.call(f),!f.readable&&f.autoDestroy&&f.destroy(),f},f.destroy=function(){if(!s)return s=!0,o=!0,a.length=0,f.writable=f.readable=!1,f.emit("close"),f},f.pause=function(){if(!f.paused)return f.paused=!0,f},f.resume=function(){return f.paused&&(f.paused=!1,f.emit("resume")),l(),f.paused||f.emit("drain"),f},f}e.exports=i,i.through=i}).call(this,t("_process"))},{_process:38,stream:54}],67:[function(t,e,r){(function(t){function r(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=function(t,e){if(r("noDeprecation"))return t;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw new Error(e);r("traceDeprecation")?console.trace(e):console.warn(e),n=!0}return t.apply(this,arguments)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],68:[function(t,e,r){var n=t("tape");t("tape-dom")(n);var i=t("../dist/hotkeys.js"),o=navigator.userAgent.toLowerCase().indexOf("firefox")>0;function s(t,e,r){var n=document.createEventObject?document.createEventObject():document.createEvent("Events");if(n.initEvent&&n.initEvent("keydown",!0,!0),n.keyCode=e,n.which=e,r)for(var i in r)n[i]=r[i];t.dispatchEvent?t.dispatchEvent(n):t.fireEvent("onkeydown",n)}n("hotkeys 单元测试",function(t){i("w",function(e){t.equal(e.keyCode,87,"单个按键 w keyCode == 87")}),s(document.body,87),i("enter",function(e){t.equal(e.keyCode,13,"单个特殊键按键 enterenter验证 keyCode == 13")}),i("return",function(e){t.equal(e.keyCode,13,"单个特殊键按键 returnreturn验证 keyCode == 13")}),s(document.body,13),i("space",function(e){t.equal(e.keyCode,32,"单个特殊键按键 spacespace验证 keyCode == 32")}),s(document.body,32),i("backspace",function(e){t.equal(e.keyCode,8,"单个特殊键按键 backspacebackspace 验证 keyCode == 8")}),s(document.body,8),i("tab",function(e){t.equal(e.keyCode,9,"单个特殊键按键 tabtab 验证 keyCode == 9")}),s(document.body,9),i("clear",function(e){t.equal(e.keyCode,12,"单个特殊键按键 clearclear 验证 keyCode == 12")}),s(document.body,12),i(",",function(e){t.equal(e.keyCode,188,"单个特殊键按键 , , 验证 keyCode == 188")}),s(document.body,188),i(".",function(e){t.equal(e.keyCode,190,"单个特殊键按键 . . 验证 keyCode == 190")}),s(document.body,190),i(".",function(e){t.equal(e.keyCode,190,"单个特殊键按键 . . 验证 keyCode == 190")}),s(document.body,190),i("/",function(e){t.equal(e.keyCode,191,"单个特殊键按键 / / 验证 keyCode == 191")}),s(document.body,191),i("`",function(e){t.equal(e.keyCode,192,"单个特殊键按键 ` ` 验证 keyCode == 192")}),s(document.body,192),i("-",function(e){t.equal(e.keyCode,o?173:189,"单个特殊键按键 -- 验证 keyCode == 火狐?173:189")}),s(document.body,o?173:189),i("=",function(e){t.equal(e.keyCode,o?61:187,"单个特殊键按键 == 验证 keyCode == 火狐?61:187")}),s(document.body,o?61:187),i(";",function(e){t.equal(e.keyCode,o?59:186,"单个特殊键按键 ; ; 验证 keyCode == 火狐?59:186")}),s(document.body,o?59:186),i("'".toString(),function(e){t.equal(e.keyCode,222,"单个特殊键按键 ' ' 验证 keyCode == 222 ")}),s(document.body,222),i("\\".toString(),function(e){t.equal(e.keyCode,220,"单个特殊键按键 \\ \\ 验证 keyCode == 220 ")}),s(document.body,220),i("[".toString(),function(e){t.equal(e.keyCode,219,"单个特殊键按键 [ [ 验证 keyCode == 219 ")}),s(document.body,219),i("]".toString(),function(e){t.equal(e.keyCode,221,"单个特殊键按键 ] ] 验证 keyCode == 221 ")}),s(document.body,221),i("left",function(e){t.equal(e.keyCode,37,"单个特殊键按键 leftleft 验证 keyCode == 37")}),s(document.body,37),i("up",function(e){t.equal(e.keyCode,38,"单个特殊键按键 upup 验证 keyCode == 38")}),s(document.body,38),i("del",function(e){t.equal(e.keyCode,46,"单个特殊键按键 deldel 验证 keyCode == 46")}),i("delete",function(e){t.equal(e.keyCode,46,"单个特殊键按键 deletedelete 验证 keyCode == 46")}),s(document.body,46),i("home",function(e){t.equal(e.keyCode,36,"单个特殊键按键 homehome 验证 keyCode == 36")}),s(document.body,36),i("pageup",function(e){t.equal(e.keyCode,33,"单个特殊键按键 pageuppageup 验证 keyCode == 33")}),s(document.body,33),i("pagedown",function(e){t.equal(e.keyCode,34,"单个特殊键按键 pagedownpagedown 验证 keyCode == 34")}),s(document.body,34),i("end",function(e){t.equal(e.keyCode,35,"单个特殊键按键 endend 验证 keyCode == 35")}),s(document.body,35),i("right",function(e){t.equal(e.keyCode,39,"单个特殊键按键 rightright 验证 keyCode == 39")}),s(document.body,39),i("down",function(e){t.equal(e.keyCode,40,"单个特殊键按键 downdown 验证 keyCode == 40")}),s(document.body,40),i("esc",function(e){t.equal(e.keyCode,27,"单个特殊键按键 escesc 验证 keyCode == 27")}),i("escape",function(e){t.equal(e.keyCode,27,"单个特殊键按键 escapeescape 验证 keyCode == 27")}),s(document.body,27),i("CapsLock",function(e){t.equal(e.keyCode,20,"单个特殊键按键 CapsLockCapsLock验证 keyCode == 20")}),i("⇪",function(e){t.equal(e.keyCode,20,"单个特殊键按键 ⇪,⇪验证 keyCode == 20")}),s(document.body,20),i("⌘+d",function(e){return t.equal(e.keyCode,82,"组合键 ⌘+dd验证 keyCode == 82"),t.equal(e.metaKey,!0,"组合键 ⌘+dalt验证 metaKey == true"),!1}),s(document.body,82,{metaKey:!0}),i("alt+d",function(e){t.equal(e.keyCode,68,"组合键 alt+dd验证 keyCode == 68"),t.equal(e.altKey,!0,"组合键 alt+dalt验证 altKey == true")}),s(document.body,68,{altKey:!0}),i("shift+a",function(e){t.equal(e.keyCode,65,"组合键 shift+aa验证 keyCode == 65"),t.equal(e.shiftKey,!0,"组合键 shift+ashift验证 shiftKey == true")}),s(document.body,65,{shiftKey:!0}),i("⇧+a",function(e){t.equal(e.keyCode,65,"组合键 ⇧+aa验证 keyCode == 65"),t.equal(e.shiftKey,!0,"组合键 ⇧+a⇧验证 shiftKey == true")}),s(document.body,65,{shiftKey:!0}),i("⌘+a",function(e){t.equal(e.keyCode,65,"组合键 ⌘+aa验证 keyCode == 65"),t.equal(e.metaKey,!0,"组合键 ⌘+a⌘验证 metaKey == true")}),s(document.body,65,{metaKey:!0}),i("⌃+a",function(e){t.equal(e.keyCode,65,"组合键 ⌃+aa验证 keyCode == 65"),t.equal(e.ctrlKey,!0,"组合键 ⌃+a⌃验证 ctrlKey == true")}),s(document.body,65,{ctrlKey:!0}),i.unbind("⌃+a"),i("⌥+a",function(e){t.equal(e.keyCode,65,"组合键 ⌥+aa验证 keyCode == 65"),t.equal(e.altKey,!0,"组合键 ⌥+a⌥验证 altKey == true")}),s(document.body,65,{altKey:!0}),i("ctrl+,,ctrl+d",function(e){t.equal(e.keyCode,188,"组合键 ctrl+,,验证 keyCode == 65"),t.equal(e.ctrlKey,!0,"组合键 ctrl+,ctrl验证 ctrlKey == true")}),s(document.body,188,{ctrlKey:!0}),i.unbind("ctrl+,,ctrl+d"),i("Ctrl+A",function(e){t.equal(e.keyCode,65,"大小写组合键 Ctrl+AA验证 keyCode == 65"),t.equal(e.ctrlKey,!0,"大小写组合键 Ctrl+ACtrl验证 ctrlKey == true")}),s(document.body,65,{ctrlKey:!0}),i.unbind("Ctrl+A"),i("CTRL+A",function(e){t.equal(e.keyCode,65,"大小写组合键 CTRL+AA验证 keyCode == 65"),t.equal(e.ctrlKey,!0,"大小写组合键 CTRL+ACTRL验证 ctrlKey == true")}),s(document.body,65,{ctrlKey:!0}),i.unbind("CTRL+A"),i("⌃+a",function(){t.equal(i.getScope(),"all"," 验证 getScope() == all")}),s(document.body,65,{ctrlKey:!0}),i.unbind("⌃+a"),i("⌃+a","scope1",function(){t.equal(i.getScope(),"scope1"," 验证 getScope() == scope1")}),s(document.body,65,{ctrlKey:!0}),i("⌃+a","scope2",function(){t.equal(i.getScope(),"scope2"," 验证 getScope() == scope2")}),i.setScope("scope1"),s(document.body,65,{ctrlKey:!0}),i.setScope("scope2"),s(document.body,65,{ctrlKey:!0})})},{"../dist/hotkeys.js":1,tape:62,"tape-dom":60}]},{},[68]);