Skip to content

Instantly share code, notes, and snippets.

@thlorenz
Created July 8, 2013 02:05
Show Gist options
  • Save thlorenz/5945749 to your computer and use it in GitHub Desktop.
Save thlorenz/5945749 to your computer and use it in GitHub Desktop.
made with requirebin.com
var term = require('hypernal')();
term.appendTo(document.body);
var difflet = require('difflet')({
indent : 2
, comma : 'first'
, comment: true
});
var diff = difflet.compare({ a : [1, 2, 3 ], c : 5 }, { a : [1, 2, 3, 4 ], b : 4 });
term.write(diff);
require=function(t,e,r){function n(r,o){if(!e[r]){if(!t[r]){var s="function"==typeof require&&require;if(!o&&s)return s(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var a=e[r]={exports:{}};t[r][0].call(a.exports,function(e){var i=t[r][1][e];return n(i?i:e)},a,a.exports)}return e[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({1:[function(t,e){function r(){n.EventEmitter.call(this)}var n=t("events"),i=t("util");i.inherits(r,n.EventEmitter),e.exports=r,r.Stream=r,r.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function i(){c||(c=!0,t._pipeCount--,a(),t._pipeCount>0||t.end())}function o(){c||(c=!0,t._pipeCount--,a(),t._pipeCount>0||t.destroy())}function s(t){if(a(),0===this.listeners("error").length)throw t}function a(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",i),u.removeListener("close",o),u.removeListener("error",s),t.removeListener("error",s),u.removeListener("end",a),u.removeListener("close",a),t.removeListener("end",a),t.removeListener("close",a)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(t._pipeCount=t._pipeCount||0,t._pipeCount++,u.on("end",i),u.on("close",o));var c=!1;return u.on("error",s),t.on("error",s),u.on("end",a),u.on("close",a),t.on("end",a),t.on("close",a),t.emit("pipe",u),t}},{events:2,util:3}],difflet:[function(t,e){e.exports=t("1aKI/4")},{}],4:[function(t,e){var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var r=[];return window.addEventListener("message",function(t){if(t.source===window&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var e=r.shift();e()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],"1aKI/4":[function(t,e){(function(r){function n(t,e,n){function c(e){0===v&&t.start(e,p),v++}function h(e){0===--v&&t.stop(e,p)}function f(t,r,n){var s=n.indent;if(t)var a=o.get(e,this.path||[]);var f,p=t&&void 0===a;try{f=s?Array(((this.path||[]).length+1)*s+1).join(" "):""}catch(l){f=""}if(y&&(f=f.slice(s)),Array.isArray(r)){var g=(a||o.has(e,this.path))&&!Array.isArray(a);g&&c("updated"),n.comment&&!Array.isArray(a)&&(s=0),this.before(function(){p&&c("inserted"),s&&y?0===(this.path||[]).length||Array.isArray(this.parent.node)?d("[ "):d("\n"+f+"[ "):s?d("[\n"+f):d("[")}),this.post(function(t){t.isLast||s&&y||d(",");var e=a&&a[t.key];s&&n.comment&&t.node!==e&&("object"!=typeof t.node||"object"!=typeof e)&&(c("comment"),d(" // != "),o(e).forEach(function(t){b.call(this,t,{indent:0})}),h("comment")),t.isLast||(s&&y?d("\n"+f+", "):s&&d("\n"+f))}),this.after(function(){s&&y?d("\n"+f):s&&d("\n"+f.slice(s)),d("]"),g&&h("updated"),p&&h("inserted")})}else if(i(r))this.block(),p?(c("inserted"),d(""+r),h("inserted")):t&&a!==r?(c("updated"),d(""+r),h("updated")):d(""+r);else if("object"==typeof r&&r&&"function"==typeof r.inspect)this.block(),p?(c("inserted"),d(r.inspect()),h("inserted")):a&&"function"==typeof a.inspect&&a.inspect()===r.inspect()?d(r.inspect()):(c("updated"),d(r.inspect()),h("updated"));else if("object"==typeof r&&null!==r){var v=!1,m=t&&"object"==typeof a&&a?Object.keys(a).filter(function(t){return!Object.hasOwnProperty.call(r,t)}):[];this.before(function(){p&&c("inserted"),d(s&&y&&!this.isRoot?"\n"+f+"{ ":"{")}),this.pre(function(r,n){if(t){var i=o.get(e,this.path.concat(n));void 0===i&&(v=!0,c("inserted"))}s&&!y&&d("\n"+f),b(n),d(s?" : ":":")}),this.post(function(t){t.isLast||s&&y||d(","),t.isLast&&m.length?(v&&h("inserted"),v=!1):v&&(h("inserted"),v=!1);var e=a&&a[t.key];s&&n.comment&&t.node!==e&&("object"!=typeof t.node||"object"!=typeof e)&&(c("comment"),d(" // != "),o(e).forEach(function(t){b.call(this,t,{indent:0})}),h("comment")),t.isLast&&m.length?(v&&h("inserted"),v=!1,s&&y?d("\n"+f+", "):n.comment&&s?d("\n"+f):s?d(",\n"+f):d(",")):t.isLast||s&&y&&d("\n"+f+", ")}),this.after(function(){p&&h("inserted"),m.length&&(s&&!y&&0===Object.keys(r).length&&d("\n"+f),c("deleted"),m.forEach(function(e,r){s&&n.comment&&(h("deleted"),c("comment"),d("// "),h("comment"),c("deleted")),b(e),d(s?" : ":":"),o(a[e]).forEach(function(t){b.call(this,t,{indent:0})});var i=r===m.length-1;t&&!i&&(s&&y?d("\n"+f+", "):s?d(",\n"+f):d(","))}),h("deleted")),y&&s?d(f.slice(s)+" }"):s?d("\n"+f.slice(s)+"}"):d("}")})}else{var w=!1;p?c("inserted"):t&&!u(a,r)&&(w=!0,c("updated")),"string"==typeof r?d('"'+(""+r).replace(/"/g,'\\"')+'"'):i(r)?d(""+r):"function"==typeof r?d(r.name?"[Function: "+r.name+"]":"[Function]"):void 0===r?d("undefined"):null===r?d("null"):d(""+r),p?h("inserted"):w&&h("updated")}}var p=t.stream||new s;if(t.stream||(p.readable=!0,p.writable=!0,p.write=function(t){this.emit("data",t)},p.end=function(){this.emit("end")}),t||(t={}),void 0===t.start&&void 0===t.stop){var l=a(p);t.start=function(t){l.foreground({inserted:"green",updated:"blue",deleted:"red",comment:"cyan"}[t]),l.display("bright")},t.stop=function(){l.display("reset")}}var d=function(e){t.write?t.write(e,p):p.write(e)},y="first"===t.comma,g=function(e,r){return f.call(this,!0,e,r||t)},b=function(e,r){return f.call(this,!1,e,r||t)},v=0;return t.stream?o(n).forEach(g):r.nextTick(function(){o(n).forEach(g),p.emit("end")}),p}function i(t){return t instanceof RegExp||t&&"function"==typeof t.test&&"function"==typeof t.exec&&"function"==typeof t.compile&&t.constructor&&"RegExp"===t.constructor.name}var o=t("traverse"),s=t("stream").Stream,a=t("charm"),u=t("deep-is"),c=e.exports=function(t){var e=n.bind(null,t);return e.compare=function(e,r){var i=Object.keys(t||{}).reduce(function(e,r){return e[r]=t[r],e},{}),o=i.stream=new s,a="";return o.write=function(t){a+=t},o.end=function(){},o.readable=!0,o.writable=!0,n(i,e,r),a},e};c.compare=function(t,e){return c({}).compare(t,e)}})(t("__browserify_process"))},{stream:1,traverse:5,charm:6,"deep-is":7,__browserify_process:4}],2:[function(t,e,r){(function(t){function e(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;t.length>r;r++)if(e===t[r])return r;return-1}t.EventEmitter||(t.EventEmitter=function(){});var n=r.EventEmitter=t.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=10;n.prototype.setMaxListeners=function(t){this._events||(this._events={}),this._events.maxListeners=t},n.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);e.apply(this,r)}return!0}if(i(e)){for(var r=Array.prototype.slice.call(arguments,1),n=e.slice(),o=0,s=n.length;s>o;o++)n[o].apply(this,r);return!0}return!1},n.prototype.addListener=function(t,e){if("function"!=typeof e)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",t,e),this._events[t])if(i(this._events[t])){if(!this._events[t].warned){var r;r=void 0!==this._events.maxListeners?this._events.maxListeners:o,r&&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),console.trace())}this._events[t].push(e)}else this._events[t]=[this._events[t],e];else this._events[t]=e;return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){var r=this;return r.on(t,function n(){r.removeListener(t,n),e.apply(this,arguments)}),this},n.prototype.removeListener=function(t,r){if("function"!=typeof r)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var n=this._events[t];if(i(n)){var o=e(n,r);if(0>o)return this;n.splice(o,1),0==n.length&&delete this._events[t]}else this._events[t]===r&&delete this._events[t];return this},n.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},n.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),i(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}})(t("__browserify_process"))},{__browserify_process:4}],3:[function(t,e,r){function n(t){return t instanceof Array||Array.isArray(t)||t&&t!==Object.prototype&&n(t.__proto__)}function i(t){return t instanceof RegExp||"object"==typeof t&&"[object RegExp]"===Object.prototype.toString.call(t)}function o(t){if(t instanceof Date)return!0;if("object"!=typeof t)return!1;var e=Date.prototype&&a(Date.prototype),r=t.__proto__&&a(t.__proto__);return JSON.stringify(r)===JSON.stringify(e)}t("events"),r.isArray=n,r.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},r.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},r.print=function(){},r.puts=function(){},r.debug=function(){},r.inspect=function(t,e,u,c){function h(t,u){if(t&&"function"==typeof t.inspect&&t!==r&&(!t.constructor||t.constructor.prototype!==t))return t.inspect(u);switch(typeof t){case"undefined":return p("undefined","undefined");case"string":var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return p(c,"string");case"number":return p(""+t,"number");case"boolean":return p(""+t,"boolean")}if(null===t)return p("null","null");var l=s(t),d=e?a(t):l;if("function"==typeof t&&0===d.length){if(i(t))return p(""+t,"regexp");var y=t.name?": "+t.name:"";return p("[Function"+y+"]","special")}if(o(t)&&0===d.length)return p(t.toUTCString(),"date");var g,b,v;if(n(t)?(b="Array",v=["[","]"]):(b="Object",v=["{","}"]),"function"==typeof t){var m=t.name?": "+t.name:"";g=i(t)?" "+t:" [Function"+m+"]"}else g="";if(o(t)&&(g=" "+t.toUTCString()),0===d.length)return v[0]+g+v[1];if(0>u)return i(t)?p(""+t,"regexp"):p("[Object]","special");f.push(t);var w=d.map(function(e){var r,i;if(t.__lookupGetter__&&(t.__lookupGetter__(e)?i=t.__lookupSetter__(e)?p("[Getter/Setter]","special"):p("[Getter]","special"):t.__lookupSetter__(e)&&(i=p("[Setter]","special"))),0>l.indexOf(e)&&(r="["+e+"]"),i||(0>f.indexOf(t[e])?(i=null===u?h(t[e]):h(t[e],u-1),i.indexOf("\n")>-1&&(i=n(t)?i.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+i.split("\n").map(function(t){return" "+t}).join("\n"))):i=p("[Circular]","special")),r===void 0){if("Array"===b&&e.match(/^\d+$/))return i;r=JSON.stringify(""+e),r.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=p(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=p(r,"string"))}return r+": "+i});f.pop();var k=0,E=w.reduce(function(t,e){return k++,e.indexOf("\n")>=0&&k++,t+e.length+1},0);return w=E>50?v[0]+(""===g?"":g+"\n ")+" "+w.join(",\n ")+" "+v[1]:v[0]+g+" "+w.join(", ")+" "+v[1]}var f=[],p=function(t,e){var r={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[e];return n?"["+r[n][0]+"m"+t+"["+r[n][1]+"m":t};return c||(p=function(t){return t}),h(t,u===void 0?2:u)},r.log=function(){},r.pump=null;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.hasOwnProperty.call(t,r)&&e.push(r);return e},u=Object.create||function(t,e){var r;if(null===t)r={__proto__:null};else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var n=function(){};n.prototype=t,r=new n,r.__proto__=t}return e!==void 0&&Object.defineProperties&&Object.defineProperties(r,e),r};r.inherits=function(t,e){t.super_=e,t.prototype=u(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};var c=/%[sdj%]/g;r.format=function(t){if("string"!=typeof t){for(var e=[],n=0;arguments.length>n;n++)e.push(r.inspect(arguments[n]));return e.join(" ")}for(var n=1,i=arguments,o=i.length,s=(t+"").replace(c,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return i[n++]+"";case"%d":return Number(i[n++]);case"%j":return JSON.stringify(i[n++]);default:return t}}),a=i[n];o>n;a=i[++n])s+=null===a||"object"!=typeof a?" "+a:" "+r.inspect(a);return s}},{events:2}],5:[function(t,e){function r(t){this.value=t}function n(t,e,r){var n=[],o=[],s=!0;return function a(t){function u(){if("object"==typeof p.node&&null!==p.node){p.keys&&p.node_===p.node||(p.keys=l(p.node)),p.isLeaf=0==p.keys.length;for(var e=0;o.length>e;e++)if(o[e].node_===t){p.circular=o[e];break}}else p.isLeaf=!0,p.keys=null;p.notLeaf=!p.isLeaf,p.notRoot=!p.isRoot}var c=r?i(t):t,h={},f=!0,p={node:c,node_:t,path:[].concat(n),parent:o[o.length-1],parents:o,key:n.slice(-1)[0],isRoot:0===n.length,level:n.length,circular:null,update:function(t,e){p.isRoot||(p.parent.node[p.key]=t),p.node=t,e&&(f=!1)},"delete":function(t){delete p.parent.node[p.key],t&&(f=!1)},remove:function(t){d(p.parent.node)?p.parent.node.splice(p.key,1):delete p.parent.node[p.key],t&&(f=!1)},keys:null,before:function(t){h.before=t},after:function(t){h.after=t},pre:function(t){h.pre=t},post:function(t){h.post=t},stop:function(){s=!1},block:function(){f=!1}};if(!s)return p;u();var g=e.call(p,p.node);return void 0!==g&&p.update&&p.update(g),h.before&&h.before.call(p,p.node),f?("object"!=typeof p.node||null===p.node||p.circular||(o.push(p),u(),y(p.keys,function(t,e){n.push(t),h.pre&&h.pre.call(p,p.node[t],t);var i=a(p.node[t]);r&&Object.hasOwnProperty.call(p.node,t)&&(p.node[t]=i.node),i.isLast=e==p.keys.length-1,i.isFirst=0==e,h.post&&h.post.call(p,i),n.pop()}),o.pop()),h.after&&h.after.call(p,p.node),p):p}(t).node}function i(t){if("object"==typeof t&&null!==t){var e;if(d(t))e=[];else if(s(t))e=new Date(t);else if(a(t))e=RegExp(t);else if(u(t))e={message:t.message};else if(c(t))e=new Boolean(t);else if(h(t))e=new Number(t);else if(f(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var r=t.constructor&&t.constructor.prototype||t.__proto__||{},n=function(){};n.prototype=r,e=new n}return y(l(t),function(r){e[r]=t[r]}),e}return t}function o(t){return Object.prototype.toString.call(t)}function s(t){return"[object Date]"===o(t)}function a(t){return"[object RegExp]"===o(t)}function u(t){return"[object Error]"===o(t)}function c(t){return"[object Boolean]"===o(t)}function h(t){return"[object Number]"===o(t)}function f(t){return"[object String]"===o(t)}var p=e.exports=function(t){return new r(t)};r.prototype.get=function(t){for(var e=this.value,r=0;t.length>r;r++){var n=t[r];if(!Object.hasOwnProperty.call(e,n)){e=void 0;break}e=e[n]}return e},r.prototype.has=function(t){for(var e=this.value,r=0;t.length>r;r++){var n=t[r];if(!Object.hasOwnProperty.call(e,n))return!1;e=e[n]}return!0},r.prototype.set=function(t,e){for(var r=this.value,n=0;t.length-1>n;n++){var i=t[n];Object.hasOwnProperty.call(r,i)||(r[i]={}),r=r[i]}return r[t[n]]=e,e},r.prototype.map=function(t){return n(this.value,t,!0)},r.prototype.forEach=function(t){return this.value=n(this.value,t,!1),this.value},r.prototype.reduce=function(t,e){var r=1===arguments.length,n=r?this.value:e;return this.forEach(function(e){this.isRoot&&r||(n=t.call(this,n,e))}),n},r.prototype.paths=function(){var t=[];return this.forEach(function(){t.push(this.path)}),t},r.prototype.nodes=function(){var t=[];return this.forEach(function(){t.push(this.node)}),t},r.prototype.clone=function(){var t=[],e=[];return function r(n){for(var o=0;t.length>o;o++)if(t[o]===n)return e[o];if("object"==typeof n&&null!==n){var s=i(n);return t.push(n),e.push(s),y(l(n),function(t){s[t]=r(n[t])}),t.pop(),e.pop(),s}return n}(this.value)};var l=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},d=Array.isArray||function d(t){return"[object Array]"===Object.prototype.toString.call(t)},y=function(t,e){if(t.forEach)return t.forEach(e);for(var r=0;t.length>r;r++)e(t[r],r,t)};y(l(r.prototype),function(t){p[t]=function(e){var n=[].slice.call(arguments,1),i=new r(e);return i[t].apply(i,n)}})},{}],7:[function(t,e){function r(t){return null===t||void 0===t}function n(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function i(t){return"number"==typeof t&&t!==t}function o(t,e){return 1/t===1/e}function s(t,e){if(r(t)||r(e))return!1;if(t.prototype!==e.prototype)return!1;if(n(t))return n(e)?(t=a.call(t),e=a.call(e),c(t,e)):!1;try{var i,o,s=u(t),h=u(e)}catch(f){return!1}if(s.length!=h.length)return!1;for(s.sort(),h.sort(),o=s.length-1;o>=0;o--)if(s[o]!=h[o])return!1;for(o=s.length-1;o>=0;o--)if(i=s[o],!c(t[i],e[i]))return!1;return!0}var a=Array.prototype.slice,u="function"==typeof Object.keys?Object.keys:function(t){var e=[];for(var r in t)e.push(r);return e},c=e.exports=function(t,e){return 0===t&&0===e?o(t,e):t===e?!0:t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():i(t)?i(e):"object"!=typeof t&&"object"!=typeof e?t==e:s(t,e)}},{}],8:[function(t,e,r){r.isatty=function(){},r.setRawMode=function(){}},{}],6:[function(t,e){(function(r){var n=t("tty"),i=t("./lib/encode"),o=t("events").EventEmitter,s=e.exports=function(){function t(t){if(r)throw Error("multiple inputs specified");r=t}function e(t){if(n)throw Error("multiple outputs specified");n=t}for(var r=null,n=null,i=0;arguments.length>i;i++){var o=arguments[i];o&&(o.readable?t(o):(o.stdin||o.input)&&t(o.stdin||o.input),o.writable?e(o):(o.stdout||o.output)&&e(o.stdout||o.output))}return new a(r,n)},a=s.Charm=function(t,e){var i=this;i.input=t,i.output=e,i.pending=[],e||i.emit("error",Error("output stream required")),t&&"number"==typeof t.fd&&n.isatty(t.fd)&&(r.stdin.setRawMode?r.stdin.setRawMode(!0):n.setRawMode(!0),t.resume()),t&&t.on("data",function(t){if(i.pending.length){for(var e=u(t),r=!1,n=0;e.length>n;n++)for(var o=0;i.pending.length>o;o++){var s=i.pending[o];if(s(e[n])){r=!0,i.pending.splice(o,1);break}}if(r)return}i.emit("data",t),1===t.length&&(3===t[0]&&i.emit("^C"),4===t[0]&&i.emit("^D"))})};a.prototype=new o,a.prototype.destroy=function(){this.input&&this.input.destroy()},a.prototype.write=function(t){return this.output.write(t),this},a.prototype.reset=function(){return this.write(i("c")),this},a.prototype.position=function(t,e){if("function"==typeof t){var r=t;this.pending.push(function(t){if(27===t[0]&&t[1]===i.ord("[")&&t[t.length-1]===i.ord("R")){var e=(""+t).slice(2,-1).split(";").map(Number);return r(e[1],e[0]),!0}}),this.write(i("[6n"))}else this.write(i("["+Math.floor(e)+";"+Math.floor(t)+"f"));return this},a.prototype.move=function(t,e){return 0>e?this.up(-e):e>0&&this.down(e),t>0?this.right(t):0>t&&this.left(-t),this},a.prototype.up=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"A")),this},a.prototype.down=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"B")),this},a.prototype.right=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"C")),this},a.prototype.left=function(t){return void 0===t&&(t=1),this.write(i("["+Math.floor(t)+"D")),this},a.prototype.column=function(t){return this.write(i("["+Math.floor(t)+"G")),this},a.prototype.push=function(t){return this.write(i(t?"7":"[s")),this},a.prototype.pop=function(t){return this.write(i(t?"8":"[u")),this},a.prototype.erase=function(t){return"end"===t||"$"===t?this.write(i("[K")):"start"===t||"^"===t?this.write(i("[1K")):"line"===t?this.write(i("[2K")):"down"===t?this.write(i("[J")):"up"===t?this.write(i("[1J")):"screen"===t?this.write(i("[1J")):this.emit("error",Error("Unknown erase type: "+t)),this},a.prototype.display=function(t){var e={reset:0,bright:1,dim:2,underscore:4,blink:5,reverse:7,hidden:8}[t];return void 0===e&&this.emit("error",Error("Unknown attribute: "+t)),this.write(i("["+e+"m")),this},a.prototype.foreground=function(t){if("number"==typeof t)(0>t||t>=256)&&this.emit("error",Error("Color out of range: "+t)),this.write(i("[38;5;"+t+"m"));else{var e={black:30,red:31,green:32,yellow:33,blue:34,magenta:35,cyan:36,white:37}[t.toLowerCase()];e||this.emit("error",Error("Unknown color: "+t)),this.write(i("["+e+"m"))}return this},a.prototype.background=function(t){if("number"==typeof t)(0>t||t>=256)&&this.emit("error",Error("Color out of range: "+t)),this.write(i("[48;5;"+t+"m"));else{var e={black:40,red:41,green:42,yellow:43,blue:44,magenta:45,cyan:46,white:47}[t.toLowerCase()];e||this.emit("error",Error("Unknown color: "+t)),this.write(i("["+e+"m"))}return this},a.prototype.cursor=function(t){return this.write(i(t?"[?25h":"[?25l")),this};var u=s.extractCodes=function(t){for(var e=[],r=-1,n=0;t.length>n;n++)27===t[n]?(r>=0&&e.push(t.slice(r,n)),r=n):r>=0&&n===t.length-1&&e.push(t.slice(r));return e}})(t("__browserify_process"))},{tty:8,events:2,"./lib/encode":9,__browserify_process:4}],10:[function(t,e){t=function(t,e,r,n){function i(n){if(!r[n]){if(!e[n]){if(t)return t(n);throw Error("Cannot find module '"+n+"'")}var o=r[n]={exports:{}};e[n][0](function(t){var r=e[n][1][t];return i(r?r:t)},o,o.exports)}return r[n].exports}for(var o=0;n.length>o;o++)i(n[o]);return i}(t!==void 0&&t,{1:[function(t,e){function r(t){if(Object.keys)return Object.keys(t);var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}function n(t,e){return void 0===e?""+e:"number"!=typeof e||!isNaN(e)&&isFinite(e)?"function"==typeof e||e instanceof RegExp?""+e:e:""+e}function i(t,e){return"string"==typeof t?e>t.length?t:t.slice(0,e):t}function o(t,e,r,n,i){throw new g.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:i})}function s(t,e){t||o(t,!0,e,"==",g.ok)}function a(t,e){if(t===e)return!0;if(d.isBuffer(t)&&d.isBuffer(e)){if(t.length!=e.length)return!1;for(var r=0;t.length>r;r++)if(t[r]!==e[r])return!1;return!0}return t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():"object"!=typeof t&&"object"!=typeof e?t==e:h(t,e)}function u(t){return null===t||void 0===t}function c(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function h(t,e){if(u(t)||u(e))return!1;if(t.prototype!==e.prototype)return!1;if(c(t))return c(e)?(t=y.call(t),e=y.call(e),a(t,e)):!1;try{var n,i,o=r(t),s=r(e)}catch(h){return!1}if(o.length!=s.length)return!1;for(o.sort(),s.sort(),i=o.length-1;i>=0;i--)if(o[i]!=s[i])return!1;for(i=o.length-1;i>=0;i--)if(n=o[i],!a(t[n],e[n]))return!1;return!0}function f(t,e){return t&&e?e instanceof RegExp?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function p(t,e,r,n){var i;"string"==typeof r&&(n=r,r=null);try{e()}catch(s){i=s}if(n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!i&&o("Missing expected exception"+n),!t&&f(i,r)&&o("Got unwanted exception"+n),t&&i&&r&&!f(i,r)||!t&&i)throw i}var l=t("util"),d=t("buffer").Buffer,y=Array.prototype.slice,g=e.exports=s;g.AssertionError=function(t){this.name="AssertionError",this.message=t.message,this.actual=t.actual,this.expected=t.expected,this.operator=t.operator;var e=t.stackStartFunction||o;Error.captureStackTrace&&Error.captureStackTrace(this,e)},l.inherits(g.AssertionError,Error),g.AssertionError.prototype.toString=function(){return this.message?[this.name+":",this.message].join(" "):[this.name+":",i(JSON.stringify(this.actual,n),128),this.operator,i(JSON.stringify(this.expected,n),128)].join(" ")},g.AssertionError.__proto__=Error.prototype,g.fail=o,g.ok=s,g.equal=function(t,e,r){t!=e&&o(t,e,r,"==",g.equal)},g.notEqual=function(t,e,r){t==e&&o(t,e,r,"!=",g.notEqual)},g.deepEqual=function(t,e,r){a(t,e)||o(t,e,r,"deepEqual",g.deepEqual)},g.notDeepEqual=function(t,e,r){a(t,e)&&o(t,e,r,"notDeepEqual",g.notDeepEqual)},g.strictEqual=function(t,e,r){t!==e&&o(t,e,r,"===",g.strictEqual)},g.notStrictEqual=function(t,e,r){t===e&&o(t,e,r,"!==",g.notStrictEqual)},g.throws=function(){p.apply(this,[!0].concat(y.call(arguments)))},g.doesNotThrow=function(){p.apply(this,[!1].concat(y.call(arguments)))},g.ifError=function(t){if(t)throw t}},{util:2,buffer:3}],2:[function(t,e,r){function n(t){return t instanceof Array||Array.isArray(t)||t&&t!==Object.prototype&&n(t.__proto__)}function i(t){return t instanceof RegExp||"object"==typeof t&&"[object RegExp]"===Object.prototype.toString.call(t)}function o(t){if(t instanceof Date)return!0;if("object"!=typeof t)return!1;var e=Date.prototype&&a(Date.prototype),r=t.__proto__&&a(t.__proto__);return JSON.stringify(r)===JSON.stringify(e)}t("events"),r.isArray=n,r.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},r.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},r.print=function(){},r.puts=function(){},r.debug=function(){},r.inspect=function(t,e,u,c){function h(t,u){if(t&&"function"==typeof t.inspect&&t!==r&&(!t.constructor||t.constructor.prototype!==t))return t.inspect(u);switch(typeof t){case"undefined":return p("undefined","undefined");case"string":var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return p(c,"string");case"number":return p(""+t,"number");case"boolean":return p(""+t,"boolean")}if(null===t)return p("null","null");var l=s(t),d=e?a(t):l;if("function"==typeof t&&0===d.length){if(i(t))return p(""+t,"regexp");var y=t.name?": "+t.name:"";return p("[Function"+y+"]","special")}if(o(t)&&0===d.length)return p(t.toUTCString(),"date");var g,b,v;if(n(t)?(b="Array",v=["[","]"]):(b="Object",v=["{","}"]),"function"==typeof t){var m=t.name?": "+t.name:"";g=i(t)?" "+t:" [Function"+m+"]"}else g="";if(o(t)&&(g=" "+t.toUTCString()),0===d.length)return v[0]+g+v[1];if(0>u)return i(t)?p(""+t,"regexp"):p("[Object]","special");f.push(t);var w=d.map(function(e){var r,i;if(t.__lookupGetter__&&(t.__lookupGetter__(e)?i=t.__lookupSetter__(e)?p("[Getter/Setter]","special"):p("[Getter]","special"):t.__lookupSetter__(e)&&(i=p("[Setter]","special"))),0>l.indexOf(e)&&(r="["+e+"]"),i||(0>f.indexOf(t[e])?(i=null===u?h(t[e]):h(t[e],u-1),i.indexOf("\n")>-1&&(i=n(t)?i.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+i.split("\n").map(function(t){return" "+t}).join("\n"))):i=p("[Circular]","special")),r===void 0){if("Array"===b&&e.match(/^\d+$/))return i;r=JSON.stringify(""+e),r.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=p(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=p(r,"string"))}return r+": "+i});f.pop();var k=0,E=w.reduce(function(t,e){return k++,e.indexOf("\n")>=0&&k++,t+e.length+1},0);return w=E>50?v[0]+(""===g?"":g+"\n ")+" "+w.join(",\n ")+" "+v[1]:v[0]+g+" "+w.join(", ")+" "+v[1]}var f=[],p=function(t,e){var r={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[e];return n?"["+r[n][0]+"m"+t+"["+r[n][1]+"m":t};return c||(p=function(t){return t}),h(t,u===void 0?2:u)},r.log=function(){},r.pump=null;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.hasOwnProperty.call(t,r)&&e.push(r);return e},u=Object.create||function(t,e){var r;if(null===t)r={__proto__:null};else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var n=function(){};n.prototype=t,r=new n,r.__proto__=t}return e!==void 0&&Object.defineProperties&&Object.defineProperties(r,e),r};r.inherits=function(t,e){t.super_=e,t.prototype=u(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};var c=/%[sdj%]/g;r.format=function(t){if("string"!=typeof t){for(var e=[],n=0;arguments.length>n;n++)e.push(r.inspect(arguments[n]));return e.join(" ")}for(var n=1,i=arguments,o=i.length,s=(t+"").replace(c,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return i[n++]+"";case"%d":return Number(i[n++]);case"%j":return JSON.stringify(i[n++]);default:return t}}),a=i[n];o>n;a=i[++n])s+=null===a||"object"!=typeof a?" "+a:" "+r.inspect(a);return s}},{events:4}],5:[function(t,e,r){r.readIEEE754=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,h=-7,f=r?0:i-1,p=r?1:-1,l=t[e+f];for(f+=p,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=p,h-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(l?-1:1);s+=Math.pow(2,n),o-=c}return(l?-1:1)*s*Math.pow(2,o-n)},r.writeIEEE754=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,f=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?o-1:0,d=n?-1:1,y=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),1>e*(u=Math.pow(2,-s))&&(s--,u*=2),e+=s+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+l]=255&a,l+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+l]=255&s,l+=d,s/=256,c-=8);t[r+l-d]|=128*y}},{}],6:[function(t,e){var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var r=[];return window.addEventListener("message",function(t){if(t.source===window&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var e=r.shift();e()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],4:[function(t,e,r){(function(t){function e(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;t.length>r;r++)if(e===t[r])return r;return-1}t.EventEmitter||(t.EventEmitter=function(){});var n=r.EventEmitter=t.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=10;n.prototype.setMaxListeners=function(t){this._events||(this._events={}),this._events.maxListeners=t},n.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);e.apply(this,r)}return!0}if(i(e)){for(var r=Array.prototype.slice.call(arguments,1),n=e.slice(),o=0,s=n.length;s>o;o++)n[o].apply(this,r);return!0}return!1},n.prototype.addListener=function(t,e){if("function"!=typeof e)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",t,e),this._events[t])if(i(this._events[t])){if(!this._events[t].warned){var r;
r=void 0!==this._events.maxListeners?this._events.maxListeners:o,r&&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),console.trace())}this._events[t].push(e)}else this._events[t]=[this._events[t],e];else this._events[t]=e;return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){var r=this;return r.on(t,function n(){r.removeListener(t,n),e.apply(this,arguments)}),this},n.prototype.removeListener=function(t,r){if("function"!=typeof r)throw Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var n=this._events[t];if(i(n)){var o=e(n,r);if(0>o)return this;n.splice(o,1),0==n.length&&delete this._events[t]}else this._events[t]===r&&delete this._events[t];return this},n.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},n.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),i(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}})(t("__browserify_process"))},{__browserify_process:6}],"buffer-browserify":[function(t,e){e.exports=t("q9TxCC")},{}],q9TxCC:[function(t,e,r){function n(t){this.length=t}function i(t){return 16>t?"0"+t.toString(16):t.toString(16)}function o(t){for(var e=[],r=0;t.length>r;r++)if(127>=t.charCodeAt(r))e.push(t.charCodeAt(r));else for(var n=encodeURIComponent(t.charAt(r)).substr(1).split("%"),i=0;n.length>i;i++)e.push(parseInt(n[i],16));return e}function s(t){for(var e=[],r=0;t.length>r;r++)e.push(255&t.charCodeAt(r));return e}function a(e){return t("base64-js").toByteArray(e)}function u(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);)e[i+r]=t[i],i++;return i}function c(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function h(t){return t=~~Math.ceil(+t),0>t?0:t}function f(t,e,r){if(!(this instanceof f))return new f(t,e,r);var i;if("number"==typeof r)this.length=h(e),this.parent=t,this.offset=r;else{switch(i=typeof t){case"number":this.length=h(t);break;case"string":this.length=f.byteLength(t,e);break;case"object":this.length=h(t.length);break;default:throw Error("First argument needs to be a number, array or string.")}if(this.length>f.poolSize?(this.parent=new n(this.length),this.offset=0):((!O||O.length-O.used<this.length)&&l(),this.parent=O,this.offset=O.used,O.used+=this.length),p(t))for(var o=0;this.length>o;o++)this.parent[o+this.offset]=t instanceof f?t.readUInt8(o):t[o];else"string"==i&&(this.length=this.write(t,0,e))}}function p(t){return Array.isArray(t)||f.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function l(){O=new n(f.poolSize),O.used=0}function d(t,e,r,n){var i=0;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+1,"Trying to read beyond buffer length")),e>=t.length?0:(r?(i=t.parent[t.offset+e]<<8,t.length>e+1&&(i|=t.parent[t.offset+e+1])):(i=t.parent[t.offset+e],t.length>e+1&&(i|=t.parent[t.offset+e+1]<<8)),i)}function y(t,e,r,n){var i=0;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+3,"Trying to read beyond buffer length")),e>=t.length?0:(r?(t.length>e+1&&(i=t.parent[t.offset+e+1]<<16),t.length>e+2&&(i|=t.parent[t.offset+e+2]<<8),t.length>e+3&&(i|=t.parent[t.offset+e+3]),i+=t.parent[t.offset+e]<<24>>>0):(t.length>e+2&&(i=t.parent[t.offset+e+2]<<16),t.length>e+1&&(i|=t.parent[t.offset+e+1]<<8),i|=t.parent[t.offset+e],t.length>e+3&&(i+=t.parent[t.offset+e+3]<<24>>>0)),i)}function g(t,e,r,n){var i,o;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+1,"Trying to read beyond buffer length")),o=d(t,e,r,n),i=32768&o,i?-1*(65535-o+1):o}function b(t,e,r,n){var i,o;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+3,"Trying to read beyond buffer length")),o=y(t,e,r,n),i=2147483648&o,i?-1*(4294967295-o+1):o}function v(e,r,n,i){return i||(j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(e.length>r+3,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,r,n,23,4)}function m(e,r,n,i){return i||(j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(e.length>r+7,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,r,n,52,8)}function w(t,e){j.ok("number"==typeof t,"cannot write a non-number as a number"),j.ok(t>=0,"specified a negative value for writing an unsigned value"),j.ok(e>=t,"value is larger than maximum value for type"),j.ok(Math.floor(t)===t,"value has a fractional component")}function k(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+1,"trying to write beyond buffer length"),w(e,65535));for(var o=0;Math.min(t.length-r,2)>o;o++)t.parent[t.offset+r+o]=(e&255<<8*(n?1-o:o))>>>8*(n?1-o:o)}function E(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+3,"trying to write beyond buffer length"),w(e,4294967295));for(var o=0;Math.min(t.length-r,4)>o;o++)t.parent[t.offset+r+o]=255&e>>>8*(n?3-o:o)}function _(t,e,r){j.ok("number"==typeof t,"cannot write a non-number as a number"),j.ok(e>=t,"value larger than maximum allowed value"),j.ok(t>=r,"value smaller than minimum allowed value"),j.ok(Math.floor(t)===t,"value has a fractional component")}function x(t,e,r){j.ok("number"==typeof t,"cannot write a non-number as a number"),j.ok(e>=t,"value larger than maximum allowed value"),j.ok(t>=r,"value smaller than minimum allowed value")}function L(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+1,"Trying to write beyond buffer length"),_(e,32767,-32768)),e>=0?k(t,e,r,n,i):k(t,65535+e+1,r,n,i)}function S(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+3,"Trying to write beyond buffer length"),_(e,2147483647,-2147483648)),e>=0?E(t,e,r,n,i):E(t,4294967295+e+1,r,n,i)}function A(e,r,n,i,o){o||(j.ok(void 0!==r&&null!==r,"missing value"),j.ok("boolean"==typeof i,"missing or invalid endian"),j.ok(void 0!==n&&null!==n,"missing offset"),j.ok(e.length>n+3,"Trying to write beyond buffer length"),x(r,3.4028234663852886e38,-3.4028234663852886e38)),t("./buffer_ieee754").writeIEEE754(e,r,n,i,23,4)}function I(e,r,n,i,o){o||(j.ok(void 0!==r&&null!==r,"missing value"),j.ok("boolean"==typeof i,"missing or invalid endian"),j.ok(void 0!==n&&null!==n,"missing offset"),j.ok(e.length>n+7,"Trying to write beyond buffer length"),x(r,1.7976931348623157e308,-1.7976931348623157e308)),t("./buffer_ieee754").writeIEEE754(e,r,n,i,52,8)}var j=t("assert");r.INSPECT_MAX_BYTES=50,n.byteLength=function(t,e){switch(e||"utf8"){case"hex":return t.length/2;case"utf8":case"utf-8":return o(t).length;case"ascii":case"binary":return t.length;case"base64":return a(t).length;default:throw Error("Unknown encoding")}},n.prototype.utf8Write=function(t,e,r){return n._charsWritten=u(o(t),this,e,r)},n.prototype.asciiWrite=function(t,e,r){return n._charsWritten=u(s(t),this,e,r)},n.prototype.binaryWrite=n.prototype.asciiWrite,n.prototype.base64Write=function(t,e,r){return n._charsWritten=u(a(t),this,e,r)},n.prototype.base64Slice=function(){var e=Array.prototype.slice.apply(this,arguments);return t("base64-js").fromByteArray(e)},n.prototype.utf8Slice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",r="",n=0;t.length>n;)127>=t[n]?(e+=c(r)+String.fromCharCode(t[n]),r=""):r+="%"+t[n].toString(16),n++;return e+c(r)},n.prototype.asciiSlice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",r=0;t.length>r;r++)e+=String.fromCharCode(t[r]);return e},n.prototype.binarySlice=n.prototype.asciiSlice,n.prototype.inspect=function(){for(var t=[],e=this.length,n=0;e>n;n++)if(t[n]=i(this[n]),n==r.INSPECT_MAX_BYTES){t[n+1]="...";break}return"<SlowBuffer "+t.join(" ")+">"},n.prototype.hexSlice=function(t,e){var r=this.length;(!t||0>t)&&(t=0),(!e||0>e||e>r)&&(e=r);for(var n="",o=t;e>o;o++)n+=i(this[o]);return n},n.prototype.toString=function(t,e,r){if(t=((t||"utf8")+"").toLowerCase(),e=+e||0,r===void 0&&(r=this.length),+r==e)return"";switch(t){case"hex":return this.hexSlice(e,r);case"utf8":case"utf-8":return this.utf8Slice(e,r);case"ascii":return this.asciiSlice(e,r);case"binary":return this.binarySlice(e,r);case"base64":return this.base64Slice(e,r);case"ucs2":case"ucs-2":return this.ucs2Slice(e,r);default:throw Error("Unknown encoding")}},n.prototype.hexWrite=function(t,e,r){e=+e||0;var i=this.length-e;r?(r=+r,r>i&&(r=i)):r=i;var o=t.length;if(o%2)throw Error("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;r>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw Error("Invalid hex string");this[e+s]=a}return n._charsWritten=2*s,s},n.prototype.write=function(t,e,r,n){if(isFinite(e))isFinite(r)||(n=r,r=void 0);else{var i=n;n=e,e=r,r=i}e=+e||0;var o=this.length-e;switch(r?(r=+r,r>o&&(r=o)):r=o,n=((n||"utf8")+"").toLowerCase()){case"hex":return this.hexWrite(t,e,r);case"utf8":case"utf-8":return this.utf8Write(t,e,r);case"ascii":return this.asciiWrite(t,e,r);case"binary":return this.binaryWrite(t,e,r);case"base64":return this.base64Write(t,e,r);case"ucs2":case"ucs-2":return this.ucs2Write(t,e,r);default:throw Error("Unknown encoding")}},n.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw Error("oob");if(t>e)throw Error("oob");return new f(this,e-t,+t)},n.prototype.copy=function(t,e,r,n){for(var i=[],o=r;n>o;o++)j.ok(this[o]!==void 0,"copying undefined buffer bytes!"),i.push(this[o]);for(var o=e;e+i.length>o;o++)t[o]=i[o-e]},n.prototype.fill=function(t,e,r){if(r>this.length)throw Error("oob");if(e>r)throw Error("oob");for(var n=e;r>n;n++)this[n]=t},r.SlowBuffer=n,r.Buffer=f,f.poolSize=8192;var O;f.isBuffer=function(t){return t instanceof f||t instanceof n},f.concat=function(t,e){if(!Array.isArray(t))throw Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===t.length)return new f(0);if(1===t.length)return t[0];if("number"!=typeof e){e=0;for(var r=0;t.length>r;r++){var n=t[r];e+=n.length}}for(var i=new f(e),o=0,r=0;t.length>r;r++){var n=t[r];n.copy(i,o),o+=n.length}return i},f.prototype.inspect=function(){for(var t=[],e=this.length,n=0;e>n;n++)if(t[n]=i(this.parent[n+this.offset]),n==r.INSPECT_MAX_BYTES){t[n+1]="...";break}return"<Buffer "+t.join(" ")+">"},f.prototype.get=function(t){if(0>t||t>=this.length)throw Error("oob");return this.parent[this.offset+t]},f.prototype.set=function(t,e){if(0>t||t>=this.length)throw Error("oob");return this.parent[this.offset+t]=e},f.prototype.write=function(t,e,r,i){if(isFinite(e))isFinite(r)||(i=r,r=void 0);else{var o=i;i=e,e=r,r=o}e=+e||0;var s=this.length-e;r?(r=+r,r>s&&(r=s)):r=s,i=((i||"utf8")+"").toLowerCase();var a;switch(i){case"hex":a=this.parent.hexWrite(t,this.offset+e,r);break;case"utf8":case"utf-8":a=this.parent.utf8Write(t,this.offset+e,r);break;case"ascii":a=this.parent.asciiWrite(t,this.offset+e,r);break;case"binary":a=this.parent.binaryWrite(t,this.offset+e,r);break;case"base64":a=this.parent.base64Write(t,this.offset+e,r);break;case"ucs2":case"ucs-2":a=this.parent.ucs2Write(t,this.offset+e,r);break;default:throw Error("Unknown encoding")}return f._charsWritten=n._charsWritten,a},f.prototype.toString=function(t,e,r){switch(t=((t||"utf8")+"").toLowerCase(),e===void 0||0>e?e=0:e>this.length&&(e=this.length),r===void 0||r>this.length?r=this.length:0>r&&(r=0),e+=this.offset,r+=this.offset,t){case"hex":return this.parent.hexSlice(e,r);case"utf8":case"utf-8":return this.parent.utf8Slice(e,r);case"ascii":return this.parent.asciiSlice(e,r);case"binary":return this.parent.binarySlice(e,r);case"base64":return this.parent.base64Slice(e,r);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(e,r);default:throw Error("Unknown encoding")}},f.byteLength=n.byteLength,f.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw Error("value is not a number");if(e>r)throw Error("end < start");if(r===e)return 0;if(0==this.length)return 0;if(0>e||e>=this.length)throw Error("start out of bounds");if(0>r||r>this.length)throw Error("end out of bounds");return this.parent.fill(t,e+this.offset,r+this.offset)},f.prototype.copy=function(t,e,r,n){var i=this;if(r||(r=0),n||(n=this.length),e||(e=0),r>n)throw Error("sourceEnd < sourceStart");if(n===r)return 0;if(0==t.length||0==i.length)return 0;if(0>e||e>=t.length)throw Error("targetStart out of bounds");if(0>r||r>=i.length)throw Error("sourceStart out of bounds");if(0>n||n>i.length)throw Error("sourceEnd out of bounds");return n>this.length&&(n=this.length),n-r>t.length-e&&(n=t.length-e+r),this.parent.copy(t.parent,e+t.offset,r+this.offset,n+this.offset)},f.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw Error("oob");if(t>e)throw Error("oob");return new f(this.parent,e-t,+t+this.offset)},f.prototype.utf8Slice=function(t,e){return this.toString("utf8",t,e)},f.prototype.binarySlice=function(t,e){return this.toString("binary",t,e)},f.prototype.asciiSlice=function(t,e){return this.toString("ascii",t,e)},f.prototype.utf8Write=function(t,e){return this.write(t,e,"utf8")},f.prototype.binaryWrite=function(t,e){return this.write(t,e,"binary")},f.prototype.asciiWrite=function(t,e){return this.write(t,e,"ascii")},f.prototype.readUInt8=function(t,e){var r=this;return e||(j.ok(void 0!==t&&null!==t,"missing offset"),j.ok(r.length>t,"Trying to read beyond buffer length")),t>=r.length?void 0:r.parent[r.offset+t]},f.prototype.readUInt16LE=function(t,e){return d(this,t,!1,e)},f.prototype.readUInt16BE=function(t,e){return d(this,t,!0,e)},f.prototype.readUInt32LE=function(t,e){return y(this,t,!1,e)},f.prototype.readUInt32BE=function(t,e){return y(this,t,!0,e)},f.prototype.readInt8=function(t,e){var r,n=this;return e||(j.ok(void 0!==t&&null!==t,"missing offset"),j.ok(n.length>t,"Trying to read beyond buffer length")),t>=n.length?void 0:(r=128&n.parent[n.offset+t],r?-1*(255-n.parent[n.offset+t]+1):n.parent[n.offset+t])},f.prototype.readInt16LE=function(t,e){return g(this,t,!1,e)},f.prototype.readInt16BE=function(t,e){return g(this,t,!0,e)},f.prototype.readInt32LE=function(t,e){return b(this,t,!1,e)},f.prototype.readInt32BE=function(t,e){return b(this,t,!0,e)},f.prototype.readFloatLE=function(t,e){return v(this,t,!1,e)},f.prototype.readFloatBE=function(t,e){return v(this,t,!0,e)},f.prototype.readDoubleLE=function(t,e){return m(this,t,!1,e)},f.prototype.readDoubleBE=function(t,e){return m(this,t,!0,e)},f.prototype.writeUInt8=function(t,e,r){var n=this;r||(j.ok(void 0!==t&&null!==t,"missing value"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(n.length>e,"trying to write beyond buffer length"),w(t,255)),n.length>e&&(n.parent[n.offset+e]=t)},f.prototype.writeUInt16LE=function(t,e,r){k(this,t,e,!1,r)},f.prototype.writeUInt16BE=function(t,e,r){k(this,t,e,!0,r)},f.prototype.writeUInt32LE=function(t,e,r){E(this,t,e,!1,r)},f.prototype.writeUInt32BE=function(t,e,r){E(this,t,e,!0,r)},f.prototype.writeInt8=function(t,e,r){var n=this;r||(j.ok(void 0!==t&&null!==t,"missing value"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(n.length>e,"Trying to write beyond buffer length"),_(t,127,-128)),t>=0?n.writeUInt8(t,e,r):n.writeUInt8(255+t+1,e,r)},f.prototype.writeInt16LE=function(t,e,r){L(this,t,e,!1,r)},f.prototype.writeInt16BE=function(t,e,r){L(this,t,e,!0,r)},f.prototype.writeInt32LE=function(t,e,r){S(this,t,e,!1,r)},f.prototype.writeInt32BE=function(t,e,r){S(this,t,e,!0,r)},f.prototype.writeFloatLE=function(t,e,r){A(this,t,e,!1,r)},f.prototype.writeFloatBE=function(t,e,r){A(this,t,e,!0,r)},f.prototype.writeDoubleLE=function(t,e,r){I(this,t,e,!1,r)},f.prototype.writeDoubleBE=function(t,e,r){I(this,t,e,!0,r)},n.prototype.readUInt8=f.prototype.readUInt8,n.prototype.readUInt16LE=f.prototype.readUInt16LE,n.prototype.readUInt16BE=f.prototype.readUInt16BE,n.prototype.readUInt32LE=f.prototype.readUInt32LE,n.prototype.readUInt32BE=f.prototype.readUInt32BE,n.prototype.readInt8=f.prototype.readInt8,n.prototype.readInt16LE=f.prototype.readInt16LE,n.prototype.readInt16BE=f.prototype.readInt16BE,n.prototype.readInt32LE=f.prototype.readInt32LE,n.prototype.readInt32BE=f.prototype.readInt32BE,n.prototype.readFloatLE=f.prototype.readFloatLE,n.prototype.readFloatBE=f.prototype.readFloatBE,n.prototype.readDoubleLE=f.prototype.readDoubleLE,n.prototype.readDoubleBE=f.prototype.readDoubleBE,n.prototype.writeUInt8=f.prototype.writeUInt8,n.prototype.writeUInt16LE=f.prototype.writeUInt16LE,n.prototype.writeUInt16BE=f.prototype.writeUInt16BE,n.prototype.writeUInt32LE=f.prototype.writeUInt32LE,n.prototype.writeUInt32BE=f.prototype.writeUInt32BE,n.prototype.writeInt8=f.prototype.writeInt8,n.prototype.writeInt16LE=f.prototype.writeInt16LE,n.prototype.writeInt16BE=f.prototype.writeInt16BE,n.prototype.writeInt32LE=f.prototype.writeInt32LE,n.prototype.writeInt32BE=f.prototype.writeInt32BE,n.prototype.writeFloatLE=f.prototype.writeFloatLE,n.prototype.writeFloatBE=f.prototype.writeFloatBE,n.prototype.writeDoubleLE=f.prototype.writeDoubleLE,n.prototype.writeDoubleBE=f.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":5,"base64-js":7}],7:[function(t,e){(function(){"use strict";function t(t){var e,r,i,o,s,a;if(t.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(s=t.indexOf("="),s=s>0?t.length-s:0,a=[],i=s>0?t.length-4:t.length,e=0,r=0;i>e;e+=4,r+=3)o=n.indexOf(t[e])<<18|n.indexOf(t[e+1])<<12|n.indexOf(t[e+2])<<6|n.indexOf(t[e+3]),a.push((16711680&o)>>16),a.push((65280&o)>>8),a.push(255&o);return 2===s?(o=n.indexOf(t[e])<<2|n.indexOf(t[e+1])>>4,a.push(255&o)):1===s&&(o=n.indexOf(t[e])<<10|n.indexOf(t[e+1])<<4|n.indexOf(t[e+2])>>2,a.push(255&o>>8),a.push(255&o)),a}function r(t){function e(t){return n[63&t>>18]+n[63&t>>12]+n[63&t>>6]+n[63&t]}var r,i,o,s=t.length%3,a="";for(r=0,o=t.length-s;o>r;r+=3)i=(t[r]<<16)+(t[r+1]<<8)+t[r+2],a+=e(i);switch(s){case 1:i=t[t.length-1],a+=n[i>>2],a+=n[63&i<<4],a+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],a+=n[i>>10],a+=n[63&i>>4],a+=n[63&i<<2],a+="="}return a}var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports.toByteArray=t,e.exports.fromByteArray=r})()},{}],8:[function(t,e,r){r.readIEEE754=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,h=-7,f=r?0:i-1,p=r?1:-1,l=t[e+f];for(f+=p,o=l&(1<<-h)-1,l>>=-h,h+=a;h>0;o=256*o+t[e+f],f+=p,h-=8);for(s=o&(1<<-h)-1,o>>=-h,h+=n;h>0;s=256*s+t[e+f],f+=p,h-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(l?-1:1);s+=Math.pow(2,n),o-=c}return(l?-1:1)*s*Math.pow(2,o-n)},r.writeIEEE754=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,h=(1<<c)-1,f=h>>1,p=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,l=n?o-1:0,d=n?-1:1,y=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(a=isNaN(e)?1:0,s=h):(s=Math.floor(Math.log(e)/Math.LN2),1>e*(u=Math.pow(2,-s))&&(s--,u*=2),e+=s+f>=1?p/u:p*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=h?(a=0,s=h):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[r+l]=255&a,l+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+l]=255&s,l+=d,s/=256,c-=8);t[r+l-d]|=128*y}},{}],3:[function(t,e,r){function n(t){this.length=t}function i(t){return 16>t?"0"+t.toString(16):t.toString(16)}function o(t){for(var e=[],r=0;t.length>r;r++)if(127>=t.charCodeAt(r))e.push(t.charCodeAt(r));else for(var n=encodeURIComponent(t.charAt(r)).substr(1).split("%"),i=0;n.length>i;i++)e.push(parseInt(n[i],16));return e}function s(t){for(var e=[],r=0;t.length>r;r++)e.push(255&t.charCodeAt(r));return e}function a(e){return t("base64-js").toByteArray(e)}function u(t,e,r,n){for(var i=0;n>i&&!(i+r>=e.length||i>=t.length);)e[i+r]=t[i],i++;return i}function c(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function h(t){return t=~~Math.ceil(+t),0>t?0:t}function f(t,e,r){if(!(this instanceof f))return new f(t,e,r);var i;if("number"==typeof r)this.length=h(e),this.parent=t,this.offset=r;else{switch(i=typeof t){case"number":this.length=h(t);break;case"string":this.length=f.byteLength(t,e);break;case"object":this.length=h(t.length);break;default:throw Error("First argument needs to be a number, array or string.")}if(this.length>f.poolSize?(this.parent=new n(this.length),this.offset=0):((!O||O.length-O.used<this.length)&&l(),this.parent=O,this.offset=O.used,O.used+=this.length),p(t))for(var o=0;this.length>o;o++)this.parent[o+this.offset]=t[o];else"string"==i&&(this.length=this.write(t,0,e))}}function p(t){return Array.isArray(t)||f.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function l(){O=new n(f.poolSize),O.used=0}function d(t,e,r,n){var i=0;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+1,"Trying to read beyond buffer length")),r?(i=t.parent[t.offset+e]<<8,i|=t.parent[t.offset+e+1]):(i=t.parent[t.offset+e],i|=t.parent[t.offset+e+1]<<8),i}function y(t,e,r,n){var i=0;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+3,"Trying to read beyond buffer length")),r?(i=t.parent[t.offset+e+1]<<16,i|=t.parent[t.offset+e+2]<<8,i|=t.parent[t.offset+e+3],i+=t.parent[t.offset+e]<<24>>>0):(i=t.parent[t.offset+e+2]<<16,i|=t.parent[t.offset+e+1]<<8,i|=t.parent[t.offset+e],i+=t.parent[t.offset+e+3]<<24>>>0),i}function g(t,e,r,n){var i,o;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+1,"Trying to read beyond buffer length")),o=d(t,e,r,n),i=32768&o,i?-1*(65535-o+1):o}function b(t,e,r,n){var i,o;return n||(j.ok("boolean"==typeof r,"missing or invalid endian"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(t.length>e+3,"Trying to read beyond buffer length")),o=y(t,e,r,n),i=2147483648&o,i?-1*(4294967295-o+1):o}function v(e,r,n,i){return i||(j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(e.length>r+3,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,r,n,23,4)}function m(e,r,n,i){return i||(j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(e.length>r+7,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,r,n,52,8)}function w(t,e){j.ok("number"==typeof t,"cannot write a non-number as a number"),j.ok(t>=0,"specified a negative value for writing an unsigned value"),j.ok(e>=t,"value is larger than maximum value for type"),j.ok(Math.floor(t)===t,"value has a fractional component")}function k(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+1,"trying to write beyond buffer length"),w(e,65535)),n?(t.parent[t.offset+r]=(65280&e)>>>8,t.parent[t.offset+r+1]=255&e):(t.parent[t.offset+r+1]=(65280&e)>>>8,t.parent[t.offset+r]=255&e)}function E(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+3,"trying to write beyond buffer length"),w(e,4294967295)),n?(t.parent[t.offset+r]=255&e>>>24,t.parent[t.offset+r+1]=255&e>>>16,t.parent[t.offset+r+2]=255&e>>>8,t.parent[t.offset+r+3]=255&e):(t.parent[t.offset+r+3]=255&e>>>24,t.parent[t.offset+r+2]=255&e>>>16,t.parent[t.offset+r+1]=255&e>>>8,t.parent[t.offset+r]=255&e)}function _(t,e,r){j.ok("number"==typeof t,"cannot write a non-number as a number"),j.ok(e>=t,"value larger than maximum allowed value"),j.ok(t>=r,"value smaller than minimum allowed value"),j.ok(Math.floor(t)===t,"value has a fractional component")}function x(t,e,r){j.ok("number"==typeof t,"cannot write a non-number as a number"),j.ok(e>=t,"value larger than maximum allowed value"),j.ok(t>=r,"value smaller than minimum allowed value")}function L(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+1,"Trying to write beyond buffer length"),_(e,32767,-32768)),e>=0?k(t,e,r,n,i):k(t,65535+e+1,r,n,i)}function S(t,e,r,n,i){i||(j.ok(void 0!==e&&null!==e,"missing value"),j.ok("boolean"==typeof n,"missing or invalid endian"),j.ok(void 0!==r&&null!==r,"missing offset"),j.ok(t.length>r+3,"Trying to write beyond buffer length"),_(e,2147483647,-2147483648)),e>=0?E(t,e,r,n,i):E(t,4294967295+e+1,r,n,i)}function A(e,r,n,i,o){o||(j.ok(void 0!==r&&null!==r,"missing value"),j.ok("boolean"==typeof i,"missing or invalid endian"),j.ok(void 0!==n&&null!==n,"missing offset"),j.ok(e.length>n+3,"Trying to write beyond buffer length"),x(r,3.4028234663852886e38,-3.4028234663852886e38)),t("./buffer_ieee754").writeIEEE754(e,r,n,i,23,4)}function I(e,r,n,i,o){o||(j.ok(void 0!==r&&null!==r,"missing value"),j.ok("boolean"==typeof i,"missing or invalid endian"),j.ok(void 0!==n&&null!==n,"missing offset"),j.ok(e.length>n+7,"Trying to write beyond buffer length"),x(r,1.7976931348623157e308,-1.7976931348623157e308)),t("./buffer_ieee754").writeIEEE754(e,r,n,i,52,8)}var j=t("assert");r.INSPECT_MAX_BYTES=50,n.byteLength=function(t,e){switch(e||"utf8"){case"hex":return t.length/2;case"utf8":case"utf-8":return o(t).length;case"ascii":return t.length;case"base64":return a(t).length;default:throw Error("Unknown encoding")}},n.prototype.utf8Write=function(t,e,r){return n._charsWritten=u(o(t),this,e,r)},n.prototype.asciiWrite=function(t,e,r){return n._charsWritten=u(s(t),this,e,r)},n.prototype.base64Write=function(t,e,r){return n._charsWritten=u(a(t),this,e,r)},n.prototype.base64Slice=function(){var e=Array.prototype.slice.apply(this,arguments);return t("base64-js").fromByteArray(e)},n.prototype.utf8Slice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",r="",n=0;t.length>n;)127>=t[n]?(e+=c(r)+String.fromCharCode(t[n]),r=""):r+="%"+t[n].toString(16),n++;return e+c(r)},n.prototype.asciiSlice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",r=0;t.length>r;r++)e+=String.fromCharCode(t[r]);return e},n.prototype.inspect=function(){for(var t=[],e=this.length,n=0;e>n;n++)if(t[n]=i(this[n]),n==r.INSPECT_MAX_BYTES){t[n+1]="...";break}return"<SlowBuffer "+t.join(" ")+">"},n.prototype.hexSlice=function(t,e){var r=this.length;(!t||0>t)&&(t=0),(!e||0>e||e>r)&&(e=r);for(var n="",o=t;e>o;o++)n+=i(this[o]);return n},n.prototype.toString=function(t,e,r){if(t=((t||"utf8")+"").toLowerCase(),e=+e||0,r===void 0&&(r=this.length),+r==e)return"";switch(t){case"hex":return this.hexSlice(e,r);case"utf8":case"utf-8":return this.utf8Slice(e,r);case"ascii":return this.asciiSlice(e,r);case"binary":return this.binarySlice(e,r);case"base64":return this.base64Slice(e,r);case"ucs2":case"ucs-2":return this.ucs2Slice(e,r);default:throw Error("Unknown encoding")}},n.prototype.hexWrite=function(t,e,r){e=+e||0;var i=this.length-e;r?(r=+r,r>i&&(r=i)):r=i;var o=t.length;if(o%2)throw Error("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;r>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw Error("Invalid hex string");this[e+s]=a}return n._charsWritten=2*s,s},n.prototype.write=function(t,e,r,n){if(isFinite(e))isFinite(r)||(n=r,r=void 0);else{var i=n;n=e,e=r,r=i}e=+e||0;var o=this.length-e;switch(r?(r=+r,r>o&&(r=o)):r=o,n=((n||"utf8")+"").toLowerCase()){case"hex":return this.hexWrite(t,e,r);case"utf8":case"utf-8":return this.utf8Write(t,e,r);case"ascii":return this.asciiWrite(t,e,r);case"binary":return this.binaryWrite(t,e,r);case"base64":return this.base64Write(t,e,r);case"ucs2":case"ucs-2":return this.ucs2Write(t,e,r);default:throw Error("Unknown encoding")}},n.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw Error("oob");if(t>e)throw Error("oob");return new f(this,e-t,+t)},n.prototype.copy=function(t,e,r,n){for(var i=[],o=r;n>o;o++)j.ok(this[o]!==void 0,"copying undefined buffer bytes!"),i.push(this[o]);for(var o=e;e+i.length>o;o++)t[o]=i[o-e]},r.SlowBuffer=n,r.Buffer=f,f.poolSize=8192;var O;f.isBuffer=function(t){return t instanceof f||t instanceof n},f.concat=function(t,e){if(!Array.isArray(t))throw Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===t.length)return new f(0);if(1===t.length)return t[0];if("number"!=typeof e){e=0;for(var r=0;t.length>r;r++){var n=t[r];e+=n.length}}for(var i=new f(e),o=0,r=0;t.length>r;r++){var n=t[r];n.copy(i,o),o+=n.length}return i},f.prototype.inspect=function(){for(var t=[],e=this.length,n=0;e>n;n++)if(t[n]=i(this.parent[n+this.offset]),n==r.INSPECT_MAX_BYTES){t[n+1]="...";break}return"<Buffer "+t.join(" ")+">"},f.prototype.get=function(t){if(0>t||t>=this.length)throw Error("oob");return this.parent[this.offset+t]},f.prototype.set=function(t,e){if(0>t||t>=this.length)throw Error("oob");return this.parent[this.offset+t]=e},f.prototype.write=function(t,e,r,i){if(isFinite(e))isFinite(r)||(i=r,r=void 0);else{var o=i;i=e,e=r,r=o}e=+e||0;var s=this.length-e;r?(r=+r,r>s&&(r=s)):r=s,i=((i||"utf8")+"").toLowerCase();var a;switch(i){case"hex":a=this.parent.hexWrite(t,this.offset+e,r);break;case"utf8":case"utf-8":a=this.parent.utf8Write(t,this.offset+e,r);break;case"ascii":a=this.parent.asciiWrite(t,this.offset+e,r);break;case"binary":a=this.parent.binaryWrite(t,this.offset+e,r);break;case"base64":a=this.parent.base64Write(t,this.offset+e,r);break;case"ucs2":case"ucs-2":a=this.parent.ucs2Write(t,this.offset+e,r);break;default:throw Error("Unknown encoding")}return f._charsWritten=n._charsWritten,a},f.prototype.toString=function(t,e,r){switch(t=((t||"utf8")+"").toLowerCase(),e===void 0||0>e?e=0:e>this.length&&(e=this.length),r===void 0||r>this.length?r=this.length:0>r&&(r=0),e+=this.offset,r+=this.offset,t){case"hex":return this.parent.hexSlice(e,r);case"utf8":case"utf-8":return this.parent.utf8Slice(e,r);case"ascii":return this.parent.asciiSlice(e,r);case"binary":return this.parent.binarySlice(e,r);case"base64":return this.parent.base64Slice(e,r);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(e,r);default:throw Error("Unknown encoding")}},f.byteLength=n.byteLength,f.prototype.fill=function(t,e,r){if(t||(t=0),e||(e=0),r||(r=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw Error("value is not a number");if(e>r)throw Error("end < start");if(r===e)return 0;if(0==this.length)return 0;if(0>e||e>=this.length)throw Error("start out of bounds");if(0>r||r>this.length)throw Error("end out of bounds");return this.parent.fill(t,e+this.offset,r+this.offset)},f.prototype.copy=function(t,e,r,n){var i=this;if(r||(r=0),n||(n=this.length),e||(e=0),r>n)throw Error("sourceEnd < sourceStart");if(n===r)return 0;if(0==t.length||0==i.length)return 0;if(0>e||e>=t.length)throw Error("targetStart out of bounds");if(0>r||r>=i.length)throw Error("sourceStart out of bounds");if(0>n||n>i.length)throw Error("sourceEnd out of bounds");return n>this.length&&(n=this.length),n-r>t.length-e&&(n=t.length-e+r),this.parent.copy(t.parent,e+t.offset,r+this.offset,n+this.offset)},f.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw Error("oob");if(t>e)throw Error("oob");return new f(this.parent,e-t,+t+this.offset)},f.prototype.utf8Slice=function(t,e){return this.toString("utf8",t,e)},f.prototype.binarySlice=function(t,e){return this.toString("binary",t,e)},f.prototype.asciiSlice=function(t,e){return this.toString("ascii",t,e)
},f.prototype.utf8Write=function(t,e){return this.write(t,e,"utf8")},f.prototype.binaryWrite=function(t,e){return this.write(t,e,"binary")},f.prototype.asciiWrite=function(t,e){return this.write(t,e,"ascii")},f.prototype.readUInt8=function(t,e){var r=this;return e||(j.ok(void 0!==t&&null!==t,"missing offset"),j.ok(r.length>t,"Trying to read beyond buffer length")),r.parent[r.offset+t]},f.prototype.readUInt16LE=function(t,e){return d(this,t,!1,e)},f.prototype.readUInt16BE=function(t,e){return d(this,t,!0,e)},f.prototype.readUInt32LE=function(t,e){return y(this,t,!1,e)},f.prototype.readUInt32BE=function(t,e){return y(this,t,!0,e)},f.prototype.readInt8=function(t,e){var r,n=this;return e||(j.ok(void 0!==t&&null!==t,"missing offset"),j.ok(n.length>t,"Trying to read beyond buffer length")),r=128&n.parent[n.offset+t],r?-1*(255-n.parent[n.offset+t]+1):n.parent[n.offset+t]},f.prototype.readInt16LE=function(t,e){return g(this,t,!1,e)},f.prototype.readInt16BE=function(t,e){return g(this,t,!0,e)},f.prototype.readInt32LE=function(t,e){return b(this,t,!1,e)},f.prototype.readInt32BE=function(t,e){return b(this,t,!0,e)},f.prototype.readFloatLE=function(t,e){return v(this,t,!1,e)},f.prototype.readFloatBE=function(t,e){return v(this,t,!0,e)},f.prototype.readDoubleLE=function(t,e){return m(this,t,!1,e)},f.prototype.readDoubleBE=function(t,e){return m(this,t,!0,e)},f.prototype.writeUInt8=function(t,e,r){var n=this;r||(j.ok(void 0!==t&&null!==t,"missing value"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(n.length>e,"trying to write beyond buffer length"),w(t,255)),n.parent[n.offset+e]=t},f.prototype.writeUInt16LE=function(t,e,r){k(this,t,e,!1,r)},f.prototype.writeUInt16BE=function(t,e,r){k(this,t,e,!0,r)},f.prototype.writeUInt32LE=function(t,e,r){E(this,t,e,!1,r)},f.prototype.writeUInt32BE=function(t,e,r){E(this,t,e,!0,r)},f.prototype.writeInt8=function(t,e,r){var n=this;r||(j.ok(void 0!==t&&null!==t,"missing value"),j.ok(void 0!==e&&null!==e,"missing offset"),j.ok(n.length>e,"Trying to write beyond buffer length"),_(t,127,-128)),t>=0?n.writeUInt8(t,e,r):n.writeUInt8(255+t+1,e,r)},f.prototype.writeInt16LE=function(t,e,r){L(this,t,e,!1,r)},f.prototype.writeInt16BE=function(t,e,r){L(this,t,e,!0,r)},f.prototype.writeInt32LE=function(t,e,r){S(this,t,e,!1,r)},f.prototype.writeInt32BE=function(t,e,r){S(this,t,e,!0,r)},f.prototype.writeFloatLE=function(t,e,r){A(this,t,e,!1,r)},f.prototype.writeFloatBE=function(t,e,r){A(this,t,e,!0,r)},f.prototype.writeDoubleLE=function(t,e,r){I(this,t,e,!1,r)},f.prototype.writeDoubleBE=function(t,e,r){I(this,t,e,!0,r)},n.prototype.readUInt8=f.prototype.readUInt8,n.prototype.readUInt16LE=f.prototype.readUInt16LE,n.prototype.readUInt16BE=f.prototype.readUInt16BE,n.prototype.readUInt32LE=f.prototype.readUInt32LE,n.prototype.readUInt32BE=f.prototype.readUInt32BE,n.prototype.readInt8=f.prototype.readInt8,n.prototype.readInt16LE=f.prototype.readInt16LE,n.prototype.readInt16BE=f.prototype.readInt16BE,n.prototype.readInt32LE=f.prototype.readInt32LE,n.prototype.readInt32BE=f.prototype.readInt32BE,n.prototype.readFloatLE=f.prototype.readFloatLE,n.prototype.readFloatBE=f.prototype.readFloatBE,n.prototype.readDoubleLE=f.prototype.readDoubleLE,n.prototype.readDoubleBE=f.prototype.readDoubleBE,n.prototype.writeUInt8=f.prototype.writeUInt8,n.prototype.writeUInt16LE=f.prototype.writeUInt16LE,n.prototype.writeUInt16BE=f.prototype.writeUInt16BE,n.prototype.writeUInt32LE=f.prototype.writeUInt32LE,n.prototype.writeUInt32BE=f.prototype.writeUInt32BE,n.prototype.writeInt8=f.prototype.writeInt8,n.prototype.writeInt16LE=f.prototype.writeInt16LE,n.prototype.writeInt16BE=f.prototype.writeInt16BE,n.prototype.writeInt32LE=f.prototype.writeInt32LE,n.prototype.writeInt32BE=f.prototype.writeInt32BE,n.prototype.writeFloatLE=f.prototype.writeFloatLE,n.prototype.writeFloatBE=f.prototype.writeFloatBE,n.prototype.writeDoubleLE=f.prototype.writeDoubleLE,n.prototype.writeDoubleBE=f.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":8,"base64-js":9}],9:[function(t,e){(function(){"use strict";function t(t){var e,r,i,o,s,a;if(t.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(s=t.indexOf("="),s=s>0?t.length-s:0,a=[],i=s>0?t.length-4:t.length,e=0,r=0;i>e;e+=4,r+=3)o=n.indexOf(t[e])<<18|n.indexOf(t[e+1])<<12|n.indexOf(t[e+2])<<6|n.indexOf(t[e+3]),a.push((16711680&o)>>16),a.push((65280&o)>>8),a.push(255&o);return 2===s?(o=n.indexOf(t[e])<<2|n.indexOf(t[e+1])>>4,a.push(255&o)):1===s&&(o=n.indexOf(t[e])<<10|n.indexOf(t[e+1])<<4|n.indexOf(t[e+2])>>2,a.push(255&o>>8),a.push(255&o)),a}function r(t){function e(t){return n[63&t>>18]+n[63&t>>12]+n[63&t>>6]+n[63&t]}var r,i,o,s=t.length%3,a="";for(r=0,o=t.length-s;o>r;r+=3)i=(t[r]<<16)+(t[r+1]<<8)+t[r+2],a+=e(i);switch(s){case 1:i=t[t.length-1],a+=n[i>>2],a+=n[63&i<<4],a+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],a+=n[i>>10],a+=n[63&i>>4],a+=n[63&i<<2],a+="="}return a}var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports.toByteArray=t,e.exports.fromByteArray=r})()},{}]},{},[]),e.exports=t("buffer-browserify")},{}],9:[function(t,e){(function(t){var r=e.exports=function(e){function r(t){return"string"==typeof t?t.split("").map(n):Array.isArray(t)?t.reduce(function(t,e){return t.concat(r(e))},[]):void 0}return new t([27].concat(r(e)))},n=r.ord=function n(t){return t.charCodeAt(0)}})(t("__browserify_Buffer").Buffer)},{__browserify_Buffer:10}]},{},[]),require=function(t,e,r){function n(r,o){if(!e[r]){if(!t[r]){var s="function"==typeof require&&require;if(!o&&s)return s(r,!0);if(i)return i(r,!0);throw Error("Cannot find module '"+r+"'")}var a=e[r]={exports:{}};t[r][0].call(a.exports,function(e){var i=t[r][1][e];return n(i?i:e)},a,a.exports)}return e[r].exports}for(var i="function"==typeof require&&require,o=0;r.length>o;o++)n(r[o]);return n}({hypernal:[function(t,e){e.exports=t("y4/znu")},{}],"y4/znu":[function(t,e){"use strict";function r(t){t&&(t.scrollTop=t.scrollHeight)}var n=t("./term"),i=t("through");e.exports=function(t){var e=new n(t);e.open();var o=i(e.write.bind(e));return o.appendTo=function(t){"string"==typeof t&&(t=document.querySelector(t)),t.appendChild(e.element),t.setAttribute("style","overflow-y : auto;"),o.container=t,e.element.style.position="relative"},o.writeln=function(t){e.writeln(t),o.tail&&r(o.container)},o.write=function(t){e.write(t),o.tail&&r(o.container)},o.reset=e.reset.bind(e),o.element=e.element,o.term=e,o}},{"./term":1,through:2}],1:[function(t,e){"use strict";function r(t){if(t=t||{},!(this instanceof r))return new r(t);this.cols=t.cols||500,this.rows=t.rows||100,this.ybase=0,this.ydisp=0,this.x=0,this.y=0,this.cursorState=0,this.cursorHidden=!1,this.convertEol=!1,this.state=n.normal,this.queue="",this.scrollTop=0,this.scrollBottom=this.rows-1,this.applicationKeypad=!1,this.originMode=!1,this.insertMode=!1,this.wraparoundMode=!1,this.normal=null,this.charset=null,this.gcharset=null,this.glevel=0,this.charsets=[null],this.element,this.children,this.refreshStart,this.refreshEnd,this.savedX,this.savedY,this.savedCols,this.readable=!0,this.writable=!0,this.defAttr=131840,this.curAttr=this.defAttr,this.params=[],this.currentParam=0,this.prefix="",this.postfix="",this.lines=[];for(var e=this.rows;e--;)this.lines.push(this.blankLine());this.tabs,this.setupStops()}var n=t("./lib/states");e.exports=r,t("./lib/colors")(r),t("./lib/options")(r),t("./lib/open")(r),t("./lib/destroy")(r),t("./lib/refresh")(r),t("./lib/write")(r),t("./lib/setgLevel"),t("./lib/setgCharset"),t("./lib/debug")(r),t("./lib/stops")(r),t("./lib/erase")(r),t("./lib/blankLine")(r),t("./lib/range")(r),t("./lib/util")(r),t("./lib/esc/index.js")(r),t("./lib/esc/reset.js")(r),t("./lib/esc/tabSet.js")(r),t("./lib/csi/charAttributes")(r),t("./lib/csi/insert-delete")(r),t("./lib/csi/position")(r),t("./lib/csi/cursor")(r),t("./lib/csi/repeatPrecedingCharacter")(r),t("./lib/csi/tabClear")(r),t("./lib/csi/softReset")(r),t("./lib/charsets.js")(r)},{"./lib/esc/index.js":3,"./lib/esc/reset.js":4,"./lib/esc/tabSet.js":5,"./lib/charsets.js":6,"./lib/colors":7,"./lib/states":8,"./lib/options":9,"./lib/open":10,"./lib/destroy":11,"./lib/refresh":12,"./lib/write":13,"./lib/setgLevel":14,"./lib/setgCharset":15,"./lib/debug":16,"./lib/stops":17,"./lib/erase":18,"./lib/blankLine":19,"./lib/range":20,"./lib/util":21,"./lib/csi/charAttributes":22,"./lib/csi/insert-delete":23,"./lib/csi/position":24,"./lib/csi/cursor":25,"./lib/csi/repeatPrecedingCharacter":26,"./lib/csi/softReset":27,"./lib/csi/tabClear":28}],4:[function(t,e){"use strict";e.exports=function(t){t.prototype.reset=function(){t.call(this,this.cols,this.rows),this.refresh(0,this.rows-1)}}},{}],6:[function(t,e){"use strict";e.exports=function(t){t.charsets={},t.charsets.SCLD={"`":"◆",a:"▒",b:" ",c:"\f",d:"\r",e:"\n",f:"°",g:"±",h:"␤",i:" ",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},t.charsets.UK=null,t.charsets.US=null,t.charsets.Dutch=null,t.charsets.Finnish=null,t.charsets.French=null,t.charsets.FrenchCanadian=null,t.charsets.German=null,t.charsets.Italian=null,t.charsets.NorwegianDanish=null,t.charsets.Spanish=null,t.charsets.Swedish=null,t.charsets.Swiss=null,t.charsets.ISOLatin=null}},{}],7:[function(t,e){"use strict";e.exports=function(t){t.colors=["#2e3436","#cc0000","#4e9a06","#c4a000","#3465a4","#75507b","#06989a","#d3d7cf","#555753","#ef2929","#8ae234","#fce94f","#729fcf","#ad7fa8","#34e2e2","#eeeeec"],t.colors=function(){function e(t,e,n){i.push("#"+r(t)+r(e)+r(n))}function r(t){return t=t.toString(16),2>t.length?"0"+t:t}var n,i=t.colors,o=[0,95,135,175,215,255];for(n=0;216>n;n++)e(o[0|n/36%6],o[0|n/6%6],o[n%6]);for(n=0;24>n;n++)o=8+10*n,e(o,o,o);return i}(),t.defaultColors={bg:"#000000",fg:"#f0f0f0"},t.colors[256]=t.defaultColors.bg,t.colors[257]=t.defaultColors.fg}},{}],9:[function(t,e){"use strict";e.exports=function(t){t.termName="xterm",t.geometry=[80,24],t.cursorBlink=!0,t.visualBell=!1,t.popOnBell=!1,t.scrollback=1e3,t.screenKeys=!1,t.programFeatures=!1,t.debug=!1}},{}],8:[function(t,e){"use strict";e.exports={normal:0,escaped:1,csi:2,osc:3,charset:4,dcs:5,ignore:6}},{}],10:[function(t,e){"use strict";function r(){var t=document.createElement("span");t.innerHTML="hello world",document.body.appendChild(t);var e=t.scrollWidth;t.style.fontWeight="bold";var r=t.scrollWidth;return document.body.removeChild(t),e!==r}e.exports=function(t){t.prototype.open=function(){var e,n=0;for(this.element=document.createElement("div"),this.element.className="terminal",this.children=[];this.rows>n;n++)e=document.createElement("div"),this.element.appendChild(e),this.children.push(e);this.refresh(0,this.rows-1),null===t.brokenBold&&(t.brokenBold=r()),this.element.style.backgroundColor=t.defaultColors.bg,this.element.style.color=t.defaultColors.fg}}},{}],11:[function(t,e){"use strict";e.exports=function(t){t.prototype.destroy=function(){this.readable=!1,this.writable=!1,this._events={},this.handler=function(){},this.write=function(){}}}},{}],12:[function(t,e){"use strict";e.exports=function(t){t.prototype.refresh=function(e,r){var n,i,o,s,a,u,c,h,f,p,l,d,y,g;for(c=this.cols,i=e;r>=i;i++){if(y=i+this.ydisp,s=this.lines[y],!s)return this.reset();for(a="",n=i===this.y&&this.cursorState&&this.ydisp===this.ybase&&!this.cursorHidden?this.x:-1,f=this.defAttr,o=0;c>o;o++){switch(h=s[o][0],u=s[o][1],o===n&&(h=-1),h!==f&&(f!==this.defAttr&&(a+="</span>"),h!==this.defAttr&&(-1===h?a+='<span class="reverse-video">':(a+='<span style="',l=511&h,p=511&h>>9,d=h>>18,1&d&&(t.brokenBold||(a+="font-weight:bold;"),8>p&&(p+=8)),2&d&&(a+="text-decoration:underline;"),256!==l&&(a+="background-color:"+t.colors[l]+";"),257!==p&&(a+="color:"+t.colors[p]+";"),a+='">'))),u){case"&":a+="&";break;case"<":a+="<";break;case">":a+=">";break;default:a+=" ">=u?" ":u}f=h}f!==this.defAttr&&(a+="</span>"),this.children[i].innerHTML=a}g&&g.appendChild(this.element)}}},{}],14:[function(t,e){"use strict";e.exports=function(t){t.prototype.setgLevel=function(t){this.glevel=t,this.charset=this.charsets[t]}}},{}],15:[function(t,e){"use strict";e.exports=function(t){t.prototype.setgCharset=function(t,e){this.charsets[t]=e,this.glevel===t&&(this.charset=e)}}},{}],16:[function(t,e){"use strict";e.exports=function(t){t.prototype.log=function(){if(t.debug&&window.console&&window.console.log){var e=Array.prototype.slice.call(arguments);window.console.log.apply(window.console,e)}},t.prototype.error=function(){if(t.debug&&window.console&&window.console.error){var e=Array.prototype.slice.call(arguments);window.console.error.apply(window.console,e)}}}},{}],17:[function(t,e){"use strict";e.exports=function(t){t.prototype.setupStops=function(t){for(null!=t?this.tabs[t]||(t=this.prevStop(t)):(this.tabs={},t=0);this.cols>t;t+=8)this.tabs[t]=!0},t.prototype.prevStop=function(t){for(null==t&&(t=this.x);!this.tabs[--t]&&t>0;);return t>=this.cols?this.cols-1:0>t?0:t},t.prototype.nextStop=function(t){for(null==t&&(t=this.x);!this.tabs[++t]&&this.cols>t;);return t>=this.cols?this.cols-1:0>t?0:t}}},{}],18:[function(t,e){"use strict";e.exports=function(t){t.prototype.eraseRight=function(t,e){for(var r=this.lines[this.ybase+e],n=[this.curAttr," "];this.cols>t;t++)r[t]=n;this.updateRange(e)},t.prototype.eraseLeft=function(t,e){var r=this.lines[this.ybase+e],n=[this.curAttr," "];for(t++;t--;)r[t]=n;this.updateRange(e)},t.prototype.eraseLine=function(t){this.eraseRight(0,t)},t.prototype.eraseInDisplay=function(t){var e;switch(t[0]){case 0:for(this.eraseRight(this.x,this.y),e=this.y+1;this.rows>e;e++)this.eraseLine(e);break;case 1:for(this.eraseLeft(this.x,this.y),e=this.y;e--;)this.eraseLine(e);break;case 2:for(e=this.rows;e--;)this.eraseLine(e);break;case 3:}},t.prototype.eraseInLine=function(t){switch(t[0]){case 0:this.eraseRight(this.x,this.y);break;case 1:this.eraseLeft(this.x,this.y);break;case 2:this.eraseLine(this.y)}}}},{}],19:[function(t,e){"use strict";e.exports=function(t){t.prototype.blankLine=function(t){for(var e=t?this.curAttr:this.defAttr,r=[e," "],n=[],i=0;this.cols>i;i++)n[i]=r;return n}}},{}],20:[function(t,e){"use strict";function r(){for(;this.y>=this.rows;){this.lines.push(this.blankLine());var t=document.createElement("div");this.element.appendChild(t),this.children.push(t),this.rows++}}e.exports=function(t){t.prototype.updateRange=function(t){this.refreshStart>t&&(this.refreshStart=t),t>this.refreshEnd&&(this.refreshEnd=t),r.bind(this)()},t.prototype.maxRange=function(){this.refreshStart=0,this.refreshEnd=this.rows-1}}},{}],21:[function(t,e){"use strict";e.exports=function(t){t.prototype.ch=function(t){return t?[this.curAttr," "]:[this.defAttr," "]},t.prototype.is=function(e){var r=this.termName||t.termName;return 0===(r+"").indexOf(e)}}},{}],22:[function(t,e){"use strict";e.exports=function(t){t.prototype.charAttributes=function(t){for(var e,r,n,i=t.length,o=0;i>o;o++)if(n=t[o],n>=30&&37>=n)this.curAttr=-261633&this.curAttr|n-30<<9;else if(n>=40&&47>=n)this.curAttr=-512&this.curAttr|n-40;else if(n>=90&&97>=n)n+=8,this.curAttr=-261633&this.curAttr|n-90<<9;else if(n>=100&&107>=n)n+=8,this.curAttr=-512&this.curAttr|n-100;else if(0===n)this.curAttr=this.defAttr;else if(1===n)this.curAttr=this.curAttr|1<<18;else if(4===n)this.curAttr=this.curAttr|2<<18;else if(7===n||27===n){if(7===n){if(4&this.curAttr>>18)continue;this.curAttr=this.curAttr|4<<18}else if(27===n){if(4&~(this.curAttr>>18))continue;this.curAttr=-1048577&this.curAttr}e=511&this.curAttr,r=511&this.curAttr>>9,this.curAttr=-262144&this.curAttr|(e<<9|r)}else if(22===n)this.curAttr=-262145&this.curAttr;else if(24===n)this.curAttr=-524289&this.curAttr;else if(39===n)this.curAttr=-261633&this.curAttr,this.curAttr=this.curAttr|(511&this.defAttr>>9)<<9;else if(49===n)this.curAttr=-512&this.curAttr,this.curAttr=this.curAttr|511&this.defAttr;else if(38===n){if(5!==t[o+1])continue;o+=2,n=255&t[o],this.curAttr=-261633&this.curAttr|n<<9}else if(48===n){if(5!==t[o+1])continue;o+=2,n=255&t[o],this.curAttr=-512&this.curAttr|n}}}},{}],23:[function(t,e){"use strict";e.exports=function(t){t.prototype.insertChars=function(t){var e,r,n,i;for(e=t[0],1>e&&(e=1),r=this.y+this.ybase,n=this.x,i=[this.curAttr," "];e--&&this.cols>n;)this.lines[r].splice(n++,0,i),this.lines[r].pop()},t.prototype.insertLines=function(t){var e,r,n;for(e=t[0],1>e&&(e=1),r=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n+1;e--;)this.lines.splice(r,0,this.blankLine(!0)),this.lines.splice(n,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},t.prototype.deleteLines=function(t){var e,r,n;for(e=t[0],1>e&&(e=1),r=this.y+this.ybase,n=this.rows-1-this.scrollBottom,n=this.rows-1+this.ybase-n;e--;)this.lines.splice(n+1,0,this.blankLine(!0)),this.lines.splice(r,1);this.updateRange(this.y),this.updateRange(this.scrollBottom)},t.prototype.deleteChars=function(t){var e,r,n;for(e=t[0],1>e&&(e=1),r=this.y+this.ybase,n=[this.curAttr," "];e--;)this.lines[r].splice(this.x,1),this.lines[r].push(n)},t.prototype.eraseChars=function(t){var e,r,n,i;for(e=t[0],1>e&&(e=1),r=this.y+this.ybase,n=this.x,i=[this.curAttr," "];e--&&this.cols>n;)this.lines[r][n++]=i}}},{}],24:[function(t,e){"use strict";e.exports=function(t){t.prototype.charPosAbsolute=function(t){var e=t[0];1>e&&(e=1),this.x=e-1,this.x>=this.cols&&(this.x=this.cols-1)},t.prototype.HPositionRelative=function(t){var e=t[0];1>e&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},t.prototype.linePosAbsolute=function(t){var e=t[0];1>e&&(e=1),this.y=e-1,this.y>=this.rows&&(this.y=this.rows-1)},t.prototype.VPositionRelative=function(t){var e=t[0];1>e&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},t.prototype.HVPosition=function(t){1>t[0]&&(t[0]=1),1>t[1]&&(t[1]=1),this.y=t[0]-1,this.y>=this.rows&&(this.y=this.rows-1),this.x=t[1]-1,this.x>=this.cols&&(this.x=this.cols-1)}}},{}],25:[function(t,e){"use strict";e.exports=function(t){t.prototype.saveCursor=function(){this.savedX=this.x,this.savedY=this.y},t.prototype.restoreCursor=function(){this.x=this.savedX||0,this.y=this.savedY||0},t.prototype.cursorUp=function(t){var e=t[0];1>e&&(e=1),this.y-=e,0>this.y&&(this.y=0)},t.prototype.cursorDown=function(t){var e=t[0];1>e&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1)},t.prototype.cursorForward=function(t){var e=t[0];1>e&&(e=1),this.x+=e,this.x>=this.cols&&(this.x=this.cols-1)},t.prototype.cursorBackward=function(t){var e=t[0];1>e&&(e=1),this.x-=e,0>this.x&&(this.x=0)},t.prototype.cursorPos=function(t){var e,r;e=t[0]-1,r=t.length>=2?t[1]-1:0,0>e?e=0:e>=this.rows&&(e=this.rows-1),0>r?r=0:r>=this.cols&&(r=this.cols-1),this.x=r,this.y=e},t.prototype.cursorNextLine=function(t){var e=t[0];1>e&&(e=1),this.y+=e,this.y>=this.rows&&(this.y=this.rows-1),this.x=0},t.prototype.cursorPrecedingLine=function(t){var e=t[0];1>e&&(e=1),this.y-=e,0>this.y&&(this.y=0),this.x=0},t.prototype.cursorCharAbsolute=function(t){var e=t[0];1>e&&(e=1),this.x=e-1},t.prototype.cursorForwardTab=function(t){for(var e=t[0]||1;e--;)this.x=this.nextStop()},t.prototype.cursorBackwardTab=function(t){for(var e=t[0]||1;e--;)this.x=this.prevStop()}}},{}],26:[function(t,e){"use strict";e.exports=function(t){t.prototype.repeatPrecedingCharacter=function(t){for(var e=t[0]||1,r=this.lines[this.ybase+this.y],n=r[this.x-1]||[this.defAttr," "];e--;)r[this.x++]=n}}},{}],27:[function(t,e){"use strict";e.exports=function(t){t.prototype.softReset=function(){this.cursorHidden=!1,this.insertMode=!1,this.originMode=!1,this.wraparoundMode=!1,this.applicationKeypad=!1,this.scrollTop=0,this.scrollBottom=this.rows-1,this.curAttr=this.defAttr,this.x=this.y=0,this.charset=null,this.glevel=0,this.charsets=[null]}}},{}],28:[function(t,e){"use strict";e.exports=function(t){t.prototype.tabClear=function(t){var e=t[0];0>=e?delete this.tabs[this.x]:3===e&&(this.tabs={})}}},{}],29:[function(t,e){var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var r=[];return window.addEventListener("message",function(t){if(t.source===window&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var e=r.shift();e()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.binding=function(){throw Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw Error("process.chdir is not supported")}},{}],2:[function(t,e,r){(function(n){function i(t,e){function r(){for(;u.length&&!c.paused;){var t=u.shift();if(null===t)return c.emit("end");c.emit("data",t)}}function i(){c.writable=!1,e.call(c),c.readable||c.destroy()}t=t||function(t){this.queue(t)},e=e||function(){this.queue(null)};var s=!1,a=!1,u=[],c=new o;return c.readable=c.writable=!0,c.paused=!1,c.write=function(e){return t.call(this,e),!c.paused},c.queue=c.push=function(t){return u.push(t),r(),c},c.on("end",function(){c.readable=!1,c.writable||n.nextTick(function(){c.destroy()})}),c.end=function(t){return s?void 0:(s=!0,arguments.length&&c.write(t),i(),c)},c.destroy=function(){return a?void 0:(a=!0,s=!0,u.length=0,c.writable=c.readable=!1,c.emit("close"),c)},c.pause=function(){return c.paused?void 0:(c.paused=!0,c.emit("pause"),c)},c.resume=function(){return c.paused&&(c.paused=!1),r(),c.paused||c.emit("drain"),c},c}var o=t("stream");r=e.exports=i,i.through=i})(t("__browserify_process"))},{stream:30,__browserify_process:29}],30:[function(t,e){function r(){n.EventEmitter.call(this)}var n=t("events"),i=t("util");i.inherits(r,n.EventEmitter),e.exports=r,r.Stream=r,r.prototype.pipe=function(t,e){function r(e){t.writable&&!1===t.write(e)&&u.pause&&u.pause()}function n(){u.readable&&u.resume&&u.resume()}function i(){c||(c=!0,t._pipeCount--,a(),t._pipeCount>0||t.end())}function o(){c||(c=!0,t._pipeCount--,a(),t._pipeCount>0||t.destroy())}function s(t){if(a(),0===this.listeners("error").length)throw t}function a(){u.removeListener("data",r),t.removeListener("drain",n),u.removeListener("end",i),u.removeListener("close",o),u.removeListener("error",s),t.removeListener("error",s),u.removeListener("end",a),u.removeListener("close",a),t.removeListener("end",a),t.removeListener("close",a)}var u=this;u.on("data",r),t.on("drain",n),t._isStdio||e&&e.end===!1||(t._pipeCount=t._pipeCount||0,t._pipeCount++,u.on("end",i),u.on("close",o));var c=!1;return u.on("error",s),t.on("error",s),u.on("end",a),u.on("close",a),t.on("end",a),t.on("close",a),t.emit("pipe",u),t}},{events:31,util:32}],13:[function(t,e){"use strict";function r(t){return t.replace(/([^\r])\n/g,"$1\r\n")}function n(t){return/(^|\n) /.test(t)?t.split("\n").map(function(t){for(var e=0;" "===t.charAt(0);)t=t.slice(1),e++;for(;e--;)t="&nbsp;"+t;return t}).join("\r\n"):t}var i=t("./states");e.exports=function(t){t.prototype.write=function(e){e=r(e),e=n(e);var o,s,a=e.length,u=0;for(this.refreshStart=this.y,this.refreshEnd=this.y,this.ybase!==this.ydisp&&(this.ydisp=this.ybase,this.maxRange());a>u;u++)switch(s=e[u],this.state){case i.normal:switch(s){case"":this.bell();break;case"\n":case" ":case"\f":this.convertEol&&(this.x=0),this.y++;break;case"\r":this.x=0;break;case"\b":this.x>0&&this.x--;break;case" ":this.x=this.nextStop();break;case"":this.setgLevel(1);break;case"":this.setgLevel(0);break;case"":this.state=i.escaped;break;default:s>=" "&&(this.charset&&this.charset[s]&&(s=this.charset[s]),this.x>=this.cols&&(this.x=0,this.y++),this.lines[this.y+this.ybase]&&(this.lines[this.y+this.ybase][this.x]=[this.curAttr,s]),this.x++,this.updateRange(this.y))}break;case i.escaped:switch(s){case"[":this.params=[],this.currentParam=0,this.state=i.csi;break;case"]":this.params=[],this.currentParam=0,this.state=i.osc;break;case"P":this.params=[],this.currentParam=0,this.state=i.dcs;break;case"_":this.stateType="apc",this.state=i.ignore;break;case"^":this.stateType="pm",this.state=i.ignore;break;case"c":this.reset();break;case"E":this.x=0;break;case"D":this.index();break;case"M":this.reverseIndex();break;case"%":this.setgLevel(0),this.setgCharset(0,t.charsets.US),this.state=i.normal,u++;break;case"(":case")":case"*":case"+":case"-":case".":switch(s){case"(":this.gcharset=0;break;case")":this.gcharset=1;break;case"*":this.gcharset=2;break;case"+":this.gcharset=3;break;case"-":this.gcharset=1;break;case".":this.gcharset=2}this.state=i.charset;break;case"/":this.gcharset=3,this.state=i.charset,u--;break;case"N":break;case"O":break;case"n":this.setgLevel(2);break;case"o":this.setgLevel(3);break;case"|":this.setgLevel(3);break;case"}":this.setgLevel(2);break;case"~":this.setgLevel(1);break;case"7":this.saveCursor(),this.state=i.normal;break;case"8":this.restoreCursor(),this.state=i.normal;break;case"#":this.state=i.normal,u++;break;case"H":this.tabSet();break;case"=":this.log("Serial port requested application keypad."),this.applicationKeypad=!0,this.state=i.normal;break;case">":this.log("Switching back to normal keypad."),this.applicationKeypad=!1,this.state=i.normal;break;default:this.state=i.normal,this.error("Unknown ESC control: %s.",s)}break;case i.charset:switch(s){case"0":o=t.charsets.SCLD;break;case"A":o=t.charsets.UK;break;case"B":o=t.charsets.US;break;case"4":o=t.charsets.Dutch;break;case"C":case"5":o=t.charsets.Finnish;break;case"R":o=t.charsets.French;break;case"Q":o=t.charsets.FrenchCanadian;break;case"K":o=t.charsets.German;break;case"Y":o=t.charsets.Italian;break;case"E":case"6":o=t.charsets.NorwegianDanish;break;case"Z":o=t.charsets.Spanish;break;case"H":case"7":o=t.charsets.Swedish;break;case"=":o=t.charsets.Swiss;break;case"/":o=t.charsets.ISOLatin,u++;break;default:o=t.charsets.US}this.setgCharset(this.gcharset,o),this.gcharset=null,this.state=i.normal;break;case i.osc:if(""===s||""===s){switch(""===s&&u++,this.params.push(this.currentParam),this.params[0]){case 0:case 1:case 2:this.params[1]&&(this.title=this.params[1],this.handleTitle(this.title));break;case 3:break;case 4:case 5:break;case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:break;case 46:break;case 50:break;case 51:break;case 52:break;case 104:case 105:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:}this.params=[],this.currentParam=0,this.state=i.normal}else this.params.length?this.currentParam+=s:s>="0"&&"9">=s?this.currentParam=10*this.currentParam+s.charCodeAt(0)-48:";"===s&&(this.params.push(this.currentParam),this.currentParam="");break;case i.csi:if("?"===s||">"===s||"!"===s){this.prefix=s;break}if(s>="0"&&"9">=s){this.currentParam=10*this.currentParam+s.charCodeAt(0)-48;break}if("$"===s||'"'===s||" "===s||"'"===s){this.postfix=s;break}if(this.params.push(this.currentParam),this.currentParam=0,";"===s)break;switch(this.state=i.normal,s){case"A":this.cursorUp(this.params);break;case"B":this.cursorDown(this.params);break;case"C":this.cursorForward(this.params);break;case"D":this.cursorBackward(this.params);break;case"H":this.cursorPos(this.params);break;case"J":this.eraseInDisplay(this.params);break;case"K":this.eraseInLine(this.params);break;case"m":this.charAttributes(this.params);break;case"n":this.deviceStatus(this.params);break;case"@":this.insertChars(this.params);break;case"E":this.cursorNextLine(this.params);break;case"F":this.cursorPrecedingLine(this.params);break;case"G":this.cursorCharAbsolute(this.params);break;case"L":this.insertLines(this.params);break;case"M":this.deleteLines(this.params);break;case"P":this.deleteChars(this.params);break;case"X":this.eraseChars(this.params);break;case"`":this.charPosAbsolute(this.params);break;case"a":this.HPositionRelative(this.params);break;case"c":break;case"d":this.linePosAbsolute(this.params);break;case"e":this.VPositionRelative(this.params);break;case"f":this.HVPosition(this.params);break;case"h":break;case"l":break;case"r":break;case"s":this.saveCursor(this.params);break;case"u":this.restoreCursor(this.params);break;case"I":this.cursorForwardTab(this.params);break;case"S":break;case"T":2>this.params.length&&!this.prefix;break;case"Z":this.cursorBackwardTab(this.params);break;case"b":this.repeatPrecedingCharacter(this.params);break;case"g":this.tabClear(this.params);break;case"p":switch(this.prefix){case"!":this.softReset(this.params)}break;default:this.error("Unknown CSI code: %s.",s)}this.prefix="",this.postfix="";break;case i.dcs:if(""===s||""===s){switch(""===s&&u++,this.prefix){case"":break;case"$q":var c=this.currentParam;switch(c){case'"q':c='0"q';break;case'"p':c='61"p';break;case"r":c=""+(this.scrollTop+1)+";"+(this.scrollBottom+1)+"r";break;case"m":c="0m";break;default:this.error("Unknown DCS Pt: %s.",c),c=""}break;case"+p":break;default:this.error("Unknown DCS prefix: %s.",this.prefix)}this.currentParam=0,this.prefix="",this.state=i.normal}else this.currentParam?this.currentParam+=s:this.prefix||"$"===s||"+"===s?2===this.prefix.length?this.currentParam=s:this.prefix+=s:this.currentParam=s;break;case i.ignore:""===s||""===s?(""===s&&u++,this.stateData="",this.state=i.normal):(this.stateData||(this.stateData=""),this.stateData+=s)}this.updateRange(this.y),this.refresh(this.refreshStart,this.refreshEnd)},t.prototype.writeln=function(t){t=t.replace(/ /g,"&nbsp;"),this.write(t+" \r\n")}}},{"./states":8}],3:[function(t,e){"use strict";var r=t("../states");e.exports=function(t){t.prototype.index=function(){this.y++,this.y>this.scrollBottom&&(this.y--,this.scroll()),this.state=r.normal},t.prototype.reverseIndex=function(){var t;this.y--,this.y<this.scrollTop&&(this.y++,this.lines.splice(this.y+this.ybase,0,this.blankLine(!0)),t=this.rows-1-this.scrollBottom,this.lines.splice(this.rows-1+this.ybase-t+1,1),this.updateRange(this.scrollTop),this.updateRange(this.scrollBottom)),this.state=r.normal}}},{"../states":8}],5:[function(t,e){"use strict";var r=t("../states");e.exports=function(t){t.prototype.tabSet=function(){this.tabs[this.x]=!0,this.state=r.normal}}},{"../states":8}],31:[function(t,e,r){(function(t){function e(t,e){if(t.indexOf)return t.indexOf(e);for(var r=0;t.length>r;r++)if(e===t[r])return r;return-1}t.EventEmitter||(t.EventEmitter=function(){});var n=r.EventEmitter=t.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=10;n.prototype.setMaxListeners=function(t){this._events||(this._events={}),this._events.maxListeners=t},n.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var r=Array.prototype.slice.call(arguments,1);e.apply(this,r)}return!0}if(i(e)){for(var r=Array.prototype.slice.call(arguments,1),n=e.slice(),o=0,s=n.length;s>o;o++)n[o].apply(this,r);return!0}return!1},n.prototype.addListener=function(t,e){if("function"!=typeof e)throw Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",t,e),this._events[t])if(i(this._events[t])){if(!this._events[t].warned){var r;r=void 0!==this._events.maxListeners?this._events.maxListeners:o,r&&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),console.trace())}this._events[t].push(e)}else this._events[t]=[this._events[t],e];else this._events[t]=e;return this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){var r=this;return r.on(t,function n(){r.removeListener(t,n),e.apply(this,arguments)}),this},n.prototype.removeListener=function(t,r){if("function"!=typeof r)throw Error("removeListener only takes instances of Function");
if(!this._events||!this._events[t])return this;var n=this._events[t];if(i(n)){var o=e(n,r);if(0>o)return this;n.splice(o,1),0==n.length&&delete this._events[t]}else this._events[t]===r&&delete this._events[t];return this},n.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},n.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),i(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}})(t("__browserify_process"))},{__browserify_process:29}],32:[function(t,e,r){function n(t){return t instanceof Array||Array.isArray(t)||t&&t!==Object.prototype&&n(t.__proto__)}function i(t){return t instanceof RegExp||"object"==typeof t&&"[object RegExp]"===Object.prototype.toString.call(t)}function o(t){if(t instanceof Date)return!0;if("object"!=typeof t)return!1;var e=Date.prototype&&a(Date.prototype),r=t.__proto__&&a(t.__proto__);return JSON.stringify(r)===JSON.stringify(e)}t("events"),r.isArray=n,r.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},r.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},r.print=function(){},r.puts=function(){},r.debug=function(){},r.inspect=function(t,e,u,c){function h(t,u){if(t&&"function"==typeof t.inspect&&t!==r&&(!t.constructor||t.constructor.prototype!==t))return t.inspect(u);switch(typeof t){case"undefined":return p("undefined","undefined");case"string":var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return p(c,"string");case"number":return p(""+t,"number");case"boolean":return p(""+t,"boolean")}if(null===t)return p("null","null");var l=s(t),d=e?a(t):l;if("function"==typeof t&&0===d.length){if(i(t))return p(""+t,"regexp");var y=t.name?": "+t.name:"";return p("[Function"+y+"]","special")}if(o(t)&&0===d.length)return p(t.toUTCString(),"date");var g,b,v;if(n(t)?(b="Array",v=["[","]"]):(b="Object",v=["{","}"]),"function"==typeof t){var m=t.name?": "+t.name:"";g=i(t)?" "+t:" [Function"+m+"]"}else g="";if(o(t)&&(g=" "+t.toUTCString()),0===d.length)return v[0]+g+v[1];if(0>u)return i(t)?p(""+t,"regexp"):p("[Object]","special");f.push(t);var w=d.map(function(e){var r,i;if(t.__lookupGetter__&&(t.__lookupGetter__(e)?i=t.__lookupSetter__(e)?p("[Getter/Setter]","special"):p("[Getter]","special"):t.__lookupSetter__(e)&&(i=p("[Setter]","special"))),0>l.indexOf(e)&&(r="["+e+"]"),i||(0>f.indexOf(t[e])?(i=null===u?h(t[e]):h(t[e],u-1),i.indexOf("\n")>-1&&(i=n(t)?i.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+i.split("\n").map(function(t){return" "+t}).join("\n"))):i=p("[Circular]","special")),r===void 0){if("Array"===b&&e.match(/^\d+$/))return i;r=JSON.stringify(""+e),r.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=p(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=p(r,"string"))}return r+": "+i});f.pop();var k=0,E=w.reduce(function(t,e){return k++,e.indexOf("\n")>=0&&k++,t+e.length+1},0);return w=E>50?v[0]+(""===g?"":g+"\n ")+" "+w.join(",\n ")+" "+v[1]:v[0]+g+" "+w.join(", ")+" "+v[1]}var f=[],p=function(t,e){var r={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},n={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[e];return n?"["+r[n][0]+"m"+t+"["+r[n][1]+"m":t};return c||(p=function(t){return t}),h(t,u===void 0?2:u)},r.log=function(){},r.pump=null;var s=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e},a=Object.getOwnPropertyNames||function(t){var e=[];for(var r in t)Object.hasOwnProperty.call(t,r)&&e.push(r);return e},u=Object.create||function(t,e){var r;if(null===t)r={__proto__:null};else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var n=function(){};n.prototype=t,r=new n,r.__proto__=t}return e!==void 0&&Object.defineProperties&&Object.defineProperties(r,e),r};r.inherits=function(t,e){t.super_=e,t.prototype=u(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};var c=/%[sdj%]/g;r.format=function(t){if("string"!=typeof t){for(var e=[],n=0;arguments.length>n;n++)e.push(r.inspect(arguments[n]));return e.join(" ")}for(var n=1,i=arguments,o=i.length,s=(t+"").replace(c,function(t){if("%%"===t)return"%";if(n>=o)return t;switch(t){case"%s":return i[n++]+"";case"%d":return Number(i[n++]);case"%j":return JSON.stringify(i[n++]);default:return t}}),a=i[n];o>n;a=i[++n])s+=null===a||"object"!=typeof a?" "+a:" "+r.inspect(a);return s}},{events:31}]},{},[]);var term=require("hypernal")();term.appendTo(document.body);var difflet=require("difflet")({indent:2,comma:"first",comment:!0}),diff=difflet.compare({a:[1,2,3],c:5},{a:[1,2,3,4],b:4});term.write(diff);
<style type='text/css'> html, body { margin: 0; padding: 0; border: 0; } </style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment