UNPKG

@umijs/deps

Version:

Pre-compiled umi deps.

1 lines 88.5 kB
module.exports=(()=>{var e={3363:(e,t,r)=>{"use strict";var i=r(2413).Stream,s=r(1669),n=r(7685),o=r(7404),a=r(696),h=r(6878),c=r(4546);var u=function(e,t,r){this.writable=true;r=r||{};this._stream=t.socket;this._ping=r.ping||this.DEFAULT_PING;this._retry=r.retry||this.DEFAULT_RETRY;var i=n.isSecureRequest(e)?"https:":"http:";this.url=i+"//"+e.headers.host+e.url;this.lastEventId=e.headers["last-event-id"]||"";this.readyState=a.CONNECTING;var s=new o,h=this;if(r.headers){for(var c in r.headers)s.set(c,r.headers[c])}if(!this._stream||!this._stream.writable)return;process.nextTick(function(){h._open()});this._stream.setTimeout(0);this._stream.setNoDelay(true);var u="HTTP/1.1 200 OK\r\n"+"Content-Type: text/event-stream\r\n"+"Cache-Control: no-cache, no-store\r\n"+"Connection: close\r\n"+s.toString()+"\r\n"+"retry: "+Math.floor(this._retry*1e3)+"\r\n\r\n";this._write(u);this._stream.on("drain",function(){h.emit("drain")});if(this._ping)this._pingTimer=setInterval(function(){h.ping()},this._ping*1e3);["error","end"].forEach(function(e){h._stream.on(e,function(){h.close()})})};s.inherits(u,i);u.isEventSource=function(e){if(e.method!=="GET")return false;var t=(e.headers.accept||"").split(/\s*,\s*/);return t.indexOf("text/event-stream")>=0};var f={DEFAULT_PING:10,DEFAULT_RETRY:5,_write:function(e){if(!this.writable)return false;try{return this._stream.write(e,"utf8")}catch(e){return false}},_open:function(){if(this.readyState!==a.CONNECTING)return;this.readyState=a.OPEN;var e=new c("open");e.initEvent("open",false,false);this.dispatchEvent(e)},write:function(e){return this.send(e)},end:function(e){if(e!==undefined)this.write(e);this.close()},send:function(e,t){if(this.readyState>a.OPEN)return false;e=String(e).replace(/(\r\n|\r|\n)/g,"$1data: ");t=t||{};var r="";if(t.event)r+="event: "+t.event+"\r\n";if(t.id)r+="id: "+t.id+"\r\n";r+="data: "+e+"\r\n\r\n";return this._write(r)},ping:function(){return this._write(":\r\n\r\n")},close:function(){if(this.readyState>a.OPEN)return false;this.readyState=a.CLOSED;this.writable=false;if(this._pingTimer)clearInterval(this._pingTimer);if(this._stream)this._stream.end();var e=new c("close");e.initEvent("close",false,false);this.dispatchEvent(e);return true}};for(var p in f)u.prototype[p]=f[p];for(var l in h)u.prototype[l]=h[l];e.exports=u},9173:(e,t,r)=>{"use strict";var i=r(1669),s=r(7685),n=r(696);var o=function(e,t,r,i,o){o=o||{};this._stream=t;this._driver=s.http(e,{maxLength:o.maxLength,protocols:i});var a=this;if(!this._stream||!this._stream.writable)return;if(!this._stream.readable)return this._stream.end();var h=function(){a._stream.removeListener("data",h)};this._stream.on("data",h);n.call(this,o);process.nextTick(function(){a._driver.start();a._driver.io.write(r)})};i.inherits(o,n);o.isWebSocket=function(e){return s.isWebSocket(e)};o.validateOptions=function(e,t){s.validateOptions(e,t)};o.WebSocket=o;o.Client=r(4657);o.EventSource=r(3363);e.exports=o},696:(e,t,r)=>{"use strict";var i=r(2413).Stream,s=r(1669),n=r(7685),o=r(6878),a=r(4546);var h=function(e){e=e||{};n.validateOptions(e,["headers","extensions","maxLength","ping","proxy","tls","ca"]);this.readable=this.writable=true;var t=e.headers;if(t){for(var r in t)this._driver.setHeader(r,t[r])}var i=e.extensions;if(i){[].concat(i).forEach(this._driver.addExtension,this._driver)}this._ping=e.ping;this._pingId=0;this.readyState=h.CONNECTING;this.bufferedAmount=0;this.protocol="";this.url=this._driver.url;this.version=this._driver.version;var s=this;this._driver.on("open",function(e){s._open()});this._driver.on("message",function(e){s._receiveMessage(e.data)});this._driver.on("close",function(e){s._beginClose(e.reason,e.code)});this._driver.on("error",function(e){s._emitError(e.message)});this.on("error",function(){});this._driver.messages.on("drain",function(){s.emit("drain")});if(this._ping)this._pingTimer=setInterval(function(){s._pingId+=1;s.ping(s._pingId.toString())},this._ping*1e3);this._configureStream();if(!this._proxy){this._stream.pipe(this._driver.io);this._driver.io.pipe(this._stream)}};s.inherits(h,i);h.CONNECTING=0;h.OPEN=1;h.CLOSING=2;h.CLOSED=3;h.CLOSE_TIMEOUT=3e4;var c={write:function(e){return this.send(e)},end:function(e){if(e!==undefined)this.send(e);this.close()},pause:function(){return this._driver.messages.pause()},resume:function(){return this._driver.messages.resume()},send:function(e){if(this.readyState>h.OPEN)return false;if(!(e instanceof Buffer))e=String(e);return this._driver.messages.write(e)},ping:function(e,t){if(this.readyState>h.OPEN)return false;return this._driver.ping(e,t)},close:function(e,t){if(e===undefined)e=1e3;if(t===undefined)t="";if(e!==1e3&&(e<3e3||e>4999))throw new Error("Failed to execute 'close' on WebSocket: "+"The code must be either 1000, or between 3000 and 4999. "+e+" is neither.");if(this.readyState!==h.CLOSED)this.readyState=h.CLOSING;var r=this;this._closeTimer=setTimeout(function(){r._beginClose("",1006)},h.CLOSE_TIMEOUT);this._driver.close(t,e)},_configureStream:function(){var e=this;this._stream.setTimeout(0);this._stream.setNoDelay(true);["close","end"].forEach(function(t){this._stream.on(t,function(){e._finalizeClose()})},this);this._stream.on("error",function(t){e._emitError("Network error: "+e.url+": "+t.message);e._finalizeClose()})},_open:function(){if(this.readyState!==h.CONNECTING)return;this.readyState=h.OPEN;this.protocol=this._driver.protocol||"";var e=new a("open");e.initEvent("open",false,false);this.dispatchEvent(e)},_receiveMessage:function(e){if(this.readyState>h.OPEN)return false;if(this.readable)this.emit("data",e);var t=new a("message",{data:e});t.initEvent("message",false,false);this.dispatchEvent(t)},_emitError:function(e){if(this.readyState>=h.CLOSING)return;var t=new a("error",{message:e});t.initEvent("error",false,false);this.dispatchEvent(t)},_beginClose:function(e,t){if(this.readyState===h.CLOSED)return;this.readyState=h.CLOSING;this._closeParams=[e,t];if(this._stream){this._stream.destroy();if(!this._stream.readable)this._finalizeClose()}},_finalizeClose:function(){if(this.readyState===h.CLOSED)return;this.readyState=h.CLOSED;if(this._closeTimer)clearTimeout(this._closeTimer);if(this._pingTimer)clearInterval(this._pingTimer);if(this._stream)this._stream.end();if(this.readable)this.emit("end");this.readable=this.writable=false;var e=this._closeParams?this._closeParams[0]:"",t=this._closeParams?this._closeParams[1]:1006;var r=new a("close",{code:t,reason:e});r.initEvent("close",false,false);this.dispatchEvent(r)}};for(var u in c)h.prototype[u]=c[u];for(var f in o)h.prototype[f]=o[f];e.exports=h},4546:e=>{"use strict";var t=function(e,t){this.type=e;for(var r in t)this[r]=t[r]};t.prototype.initEvent=function(e,t,r){this.type=e;this.bubbles=t;this.cancelable=r};t.prototype.stopPropagation=function(){};t.prototype.preventDefault=function(){};t.CAPTURING_PHASE=1;t.AT_TARGET=2;t.BUBBLING_PHASE=3;e.exports=t},6878:(e,t,r)=>{"use strict";var i=r(4546);var s={onopen:null,onmessage:null,onerror:null,onclose:null,addEventListener:function(e,t,r){this.on(e,t)},removeEventListener:function(e,t,r){this.removeListener(e,t)},dispatchEvent:function(e){e.target=e.currentTarget=this;e.eventPhase=i.AT_TARGET;if(this["on"+e.type])this["on"+e.type](e);this.emit(e.type,e)}};e.exports=s},4657:(e,t,r)=>{"use strict";var i=r(1669),s=r(1631),n=r(4016),o=r(8835),a=r(7685),h=r(696),c=r(4546);var u={"http:":80,"https:":443,"ws:":80,"wss:":443},f=["https:","wss:"];var p=function(e,t,r){r=r||{};this.url=e;this._driver=a.client(this.url,{maxLength:r.maxLength,protocols:t});["open","error"].forEach(function(e){this._driver.on(e,function(){g.headers=g._driver.headers;g.statusCode=g._driver.statusCode})},this);var i=r.proxy||{},c=o.parse(i.origin||this.url),p=c.port||u[c.protocol],l=f.indexOf(c.protocol)>=0,d=function(){g._onConnect()},_=r.net||{},v=r.tls||{},y=i.origin?i.tls||{}:v,g=this;_.host=y.host=c.hostname;_.port=y.port=p;v.ca=v.ca||r.ca;y.servername=y.servername||c.hostname;this._stream=l?n.connect(y,d):s.connect(_,d);if(i.origin)this._configureProxy(i,v);h.call(this,r)};i.inherits(p,h);p.prototype._onConnect=function(){var e=this._proxy||this._driver;e.start()};p.prototype._configureProxy=function(e,t){var r=o.parse(this.url),i=f.indexOf(r.protocol)>=0,s=this,a;this._proxy=this._driver.proxy(e.origin);if(e.headers){for(a in e.headers)this._proxy.setHeader(a,e.headers[a])}this._proxy.pipe(this._stream,{end:false});this._stream.pipe(this._proxy);this._proxy.on("connect",function(){if(i){var e={socket:s._stream,servername:r.hostname};for(a in t)e[a]=t[a];s._stream=n.connect(e);s._configureStream()}s._driver.io.pipe(s._stream);s._stream.pipe(s._driver.io);s._driver.start()});this._proxy.on("error",function(e){s._driver.emit("error",e)})};e.exports=p},7119:(e,t,r)=>{var i;var s=r(2357);t.m=HTTPParser;function HTTPParser(e){s.ok(e===HTTPParser.REQUEST||e===HTTPParser.RESPONSE||e===undefined);if(e===undefined){}else{this.initialize(e)}}HTTPParser.prototype.initialize=function(e,t){s.ok(e===HTTPParser.REQUEST||e===HTTPParser.RESPONSE);this.type=e;this.state=e+"_LINE";this.info={headers:[],upgrade:false};this.trailers=[];this.line="";this.isChunked=false;this.connection="";this.headerSize=0;this.body_bytes=null;this.isUserCall=false;this.hadError=false};HTTPParser.encoding="ascii";HTTPParser.maxHeaderSize=80*1024;HTTPParser.REQUEST="REQUEST";HTTPParser.RESPONSE="RESPONSE";var n=HTTPParser.kOnHeaders=1;var o=HTTPParser.kOnHeadersComplete=2;var a=HTTPParser.kOnBody=3;var h=HTTPParser.kOnMessageComplete=4;HTTPParser.prototype[n]=HTTPParser.prototype[o]=HTTPParser.prototype[a]=HTTPParser.prototype[h]=function(){};var c=true;Object.defineProperty(HTTPParser,"kOnExecute",{get:function(){c=false;return 99}});var u=i=HTTPParser.methods=["DELETE","GET","HEAD","POST","PUT","CONNECT","OPTIONS","TRACE","COPY","LOCK","MKCOL","MOVE","PROPFIND","PROPPATCH","SEARCH","UNLOCK","BIND","REBIND","UNBIND","ACL","REPORT","MKACTIVITY","CHECKOUT","MERGE","M-SEARCH","NOTIFY","SUBSCRIBE","UNSUBSCRIBE","PATCH","PURGE","MKCALENDAR","LINK","UNLINK"];var f=u.indexOf("CONNECT");HTTPParser.prototype.reinitialize=HTTPParser;HTTPParser.prototype.close=HTTPParser.prototype.pause=HTTPParser.prototype.resume=HTTPParser.prototype.free=function(){};HTTPParser.prototype._compatMode0_11=false;HTTPParser.prototype.getAsyncId=function(){return 0};var p={REQUEST_LINE:true,RESPONSE_LINE:true,HEADER:true};HTTPParser.prototype.execute=function(e,t,r){if(!(this instanceof HTTPParser)){throw new TypeError("not a HTTPParser")}t=t||0;r=typeof r==="number"?r:e.length;this.chunk=e;this.offset=t;var i=this.end=t+r;try{while(this.offset<i){if(this[this.state]()){break}}}catch(e){if(this.isUserCall){throw e}this.hadError=true;return e}this.chunk=null;r=this.offset-t;if(p[this.state]){this.headerSize+=r;if(this.headerSize>HTTPParser.maxHeaderSize){return new Error("max header size exceeded")}}return r};var l={REQUEST_LINE:true,RESPONSE_LINE:true,BODY_RAW:true};HTTPParser.prototype.finish=function(){if(this.hadError){return}if(!l[this.state]){return new Error("invalid state for EOF")}if(this.state==="BODY_RAW"){this.userCall()(this[h]())}};HTTPParser.prototype.consume=HTTPParser.prototype.unconsume=HTTPParser.prototype.getCurrentBuffer=function(){};HTTPParser.prototype.userCall=function(){this.isUserCall=true;var e=this;return function(t){e.isUserCall=false;return t}};HTTPParser.prototype.nextRequest=function(){this.userCall()(this[h]());this.reinitialize(this.type)};HTTPParser.prototype.consumeLine=function(){var e=this.end,t=this.chunk;for(var r=this.offset;r<e;r++){if(t[r]===10){var i=this.line+t.toString(HTTPParser.encoding,this.offset,r);if(i.charAt(i.length-1)==="\r"){i=i.substr(0,i.length-1)}this.line="";this.offset=r+1;return i}}this.line+=t.toString(HTTPParser.encoding,this.offset,this.end);this.offset=this.end};var d=/^([^: \t]+):[ \t]*((?:.*[^ \t])|)/;var _=/^[ \t]+(.*[^ \t])/;HTTPParser.prototype.parseHeader=function(e,t){if(e.indexOf("\r")!==-1){throw parseErrorCode("HPE_LF_EXPECTED")}var r=d.exec(e);var i=r&&r[1];if(i){t.push(i);t.push(r[2])}else{var s=_.exec(e);if(s&&t.length){if(t[t.length-1]){t[t.length-1]+=" "}t[t.length-1]+=s[1]}}};var v=/^([A-Z-]+) ([^ ]+) HTTP\/(\d)\.(\d)$/;HTTPParser.prototype.REQUEST_LINE=function(){var e=this.consumeLine();if(!e){return}var t=v.exec(e);if(t===null){throw parseErrorCode("HPE_INVALID_CONSTANT")}this.info.method=this._compatMode0_11?t[1]:u.indexOf(t[1]);if(this.info.method===-1){throw new Error("invalid request method")}this.info.url=t[2];this.info.versionMajor=+t[3];this.info.versionMinor=+t[4];this.body_bytes=0;this.state="HEADER"};var y=/^HTTP\/(\d)\.(\d) (\d{3}) ?(.*)$/;HTTPParser.prototype.RESPONSE_LINE=function(){var e=this.consumeLine();if(!e){return}var t=y.exec(e);if(t===null){throw parseErrorCode("HPE_INVALID_CONSTANT")}this.info.versionMajor=+t[1];this.info.versionMinor=+t[2];var r=this.info.statusCode=+t[3];this.info.statusMessage=t[4];if((r/100|0)===1||r===204||r===304){this.body_bytes=0}this.state="HEADER"};HTTPParser.prototype.shouldKeepAlive=function(){if(this.info.versionMajor>0&&this.info.versionMinor>0){if(this.connection.indexOf("close")!==-1){return false}}else if(this.connection.indexOf("keep-alive")===-1){return false}if(this.body_bytes!==null||this.isChunked){return true}return false};HTTPParser.prototype.HEADER=function(){var e=this.consumeLine();if(e===undefined){return}var t=this.info;if(e){this.parseHeader(e,t.headers)}else{var r=t.headers;var i=false;var s;var n=false;for(var a=0;a<r.length;a+=2){switch(r[a].toLowerCase()){case"transfer-encoding":this.isChunked=r[a+1].toLowerCase()==="chunked";break;case"content-length":s=+r[a+1];if(i){if(s!==this.body_bytes){throw parseErrorCode("HPE_UNEXPECTED_CONTENT_LENGTH")}}else{i=true;this.body_bytes=s}break;case"connection":this.connection+=r[a+1].toLowerCase();break;case"upgrade":n=true;break}}if(this.isChunked&&i){i=false;this.body_bytes=null}if(n&&this.connection.indexOf("upgrade")!=-1){t.upgrade=this.type===HTTPParser.REQUEST||t.statusCode===101}else{t.upgrade=t.method===f}if(this.isChunked&&t.upgrade){this.isChunked=false}t.shouldKeepAlive=this.shouldKeepAlive();var h;if(c){h=this.userCall()(this[o](t))}else{h=this.userCall()(this[o](t.versionMajor,t.versionMinor,t.headers,t.method,t.url,t.statusCode,t.statusMessage,t.upgrade,t.shouldKeepAlive))}if(h===2){this.nextRequest();return true}else if(this.isChunked&&!h){this.state="BODY_CHUNKHEAD"}else if(h||this.body_bytes===0){this.nextRequest();return t.upgrade}else if(this.body_bytes===null){this.state="BODY_RAW"}else{this.state="BODY_SIZED"}}};HTTPParser.prototype.BODY_CHUNKHEAD=function(){var e=this.consumeLine();if(e===undefined){return}this.body_bytes=parseInt(e,16);if(!this.body_bytes){this.state="BODY_CHUNKTRAILERS"}else{this.state="BODY_CHUNK"}};HTTPParser.prototype.BODY_CHUNK=function(){var e=Math.min(this.end-this.offset,this.body_bytes);this.userCall()(this[a](this.chunk,this.offset,e));this.offset+=e;this.body_bytes-=e;if(!this.body_bytes){this.state="BODY_CHUNKEMPTYLINE"}};HTTPParser.prototype.BODY_CHUNKEMPTYLINE=function(){var e=this.consumeLine();if(e===undefined){return}s.equal(e,"");this.state="BODY_CHUNKHEAD"};HTTPParser.prototype.BODY_CHUNKTRAILERS=function(){var e=this.consumeLine();if(e===undefined){return}if(e){this.parseHeader(e,this.trailers)}else{if(this.trailers.length){this.userCall()(this[n](this.trailers,""))}this.nextRequest()}};HTTPParser.prototype.BODY_RAW=function(){var e=this.end-this.offset;this.userCall()(this[a](this.chunk,this.offset,e));this.offset=this.end};HTTPParser.prototype.BODY_SIZED=function(){var e=Math.min(this.end-this.offset,this.body_bytes);this.userCall()(this[a](this.chunk,this.offset,e));this.offset+=e;this.body_bytes-=e;if(!this.body_bytes){this.nextRequest()}};["Headers","HeadersComplete","Body","MessageComplete"].forEach(function(e){var t=HTTPParser["kOn"+e];Object.defineProperty(HTTPParser.prototype,"on"+e,{get:function(){return this[t]},set:function(e){this._compatMode0_11=true;f="CONNECT";return this[t]=e}})});function parseErrorCode(e){var t=new Error("Parse Error");t.code=e;return t}},1867:(e,t,r)=>{var i=r(4293);var s=i.Buffer;function copyProps(e,t){for(var r in e){t[r]=e[r]}}if(s.from&&s.alloc&&s.allocUnsafe&&s.allocUnsafeSlow){e.exports=i}else{copyProps(i,t);t.Buffer=SafeBuffer}function SafeBuffer(e,t,r){return s(e,t,r)}SafeBuffer.prototype=Object.create(s.prototype);copyProps(s,SafeBuffer);SafeBuffer.from=function(e,t,r){if(typeof e==="number"){throw new TypeError("Argument must not be a number")}return s(e,t,r)};SafeBuffer.alloc=function(e,t,r){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}var i=s(e);if(t!==undefined){if(typeof r==="string"){i.fill(t,r)}else{i.fill(t)}}else{i.fill(0)}return i};SafeBuffer.allocUnsafe=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return s(e)};SafeBuffer.allocUnsafeSlow=function(e){if(typeof e!=="number"){throw new TypeError("Argument must be a number")}return i.SlowBuffer(e)}},640:(e,t,r)=>{e.exports=r(1314)},4300:function(e,t,r){(function(){var e;e=r(2666);t.app={chunking_test:function(t,r,i,s){var n;r.setHeader("Content-Type","application/javascript; charset=UTF-8");r.writeHead(200);n=function(e){return function(e){var t;try{return r.write(e+"\n")}catch(e){t=e}}}(this);e.timeout_chain([[0,function(e){return function(){return n("h")}}(this)],[1,function(e){return function(){return n(Array(2049).join(" ")+"h")}}(this)],[5,function(e){return function(){return n("h")}}(this)],[25,function(e){return function(){return n("h")}}(this)],[125,function(e){return function(){return n("h")}}(this)],[625,function(e){return function(){return n("h")}}(this)],[3125,function(e){return function(){n("h");return r.end()}}(this)]]);return true},info:function(t,r,i){var s;s={websocket:this.options.websocket,origins:!this.options.disable_cors?["*:*"]:void 0,cookie_needed:!!this.options.jsessionid,entropy:e.random32()};if(typeof this.options.base_url==="function"){s.base_url=this.options.base_url()}else if(this.options.base_url){s.base_url=this.options.base_url}r.setHeader("Content-Type","application/json; charset=UTF-8");r.writeHead(200);return r.end(JSON.stringify(s))},info_options:function(e,t){t.statusCode=204;t.setHeader("Access-Control-Allow-Methods","OPTIONS, GET");t.setHeader("Access-Control-Max-Age",t.cache_for);return""}}}).call(this)},9351:function(e,t,r){(function(){var e,i;i=r(2666);e='<!DOCTYPE html>\n<html>\n<head>\n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n <script src="{{ sockjs_url }}"><\/script>\n <script>\n document.domain = document.domain;\n SockJS.bootstrap_iframe();\n <\/script>\n</head>\n<body>\n <h2>Don\'t panic!</h2>\n <p>This is a SockJS hidden iframe. It\'s used for cross domain magic.</p>\n</body>\n</html>';t.app={iframe:function(t,r){var s,n,o,a;n={"{{ sockjs_url }}":this.options.sockjs_url};s=e;for(o in n){s=s.replace(o,n[o])}a='"'+i.md5_hex(s)+'"';if("if-none-match"in t.headers&&t.headers["if-none-match"]===a){r.statusCode=304;return""}r.setHeader("Content-Type","text/html; charset=UTF-8");r.setHeader("ETag",a);return s}}}).call(this)},1314:function(e,t,r){(function(){var e,i,s,n,o,a,h,c,u,f,p,l,d,_,v,y,g=function(e,t){for(var r in t){if(m.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},m={}.hasOwnProperty,S=function(e,t){return function(){return e.apply(t,arguments)}};o=r(8614);a=r(5747);y=r(8399);v=r(2666);d=r(9527);l=r(3709);_=r(3720);c=r(9351);f=r(9729);p=r(158);n=r(4300);u=function(){var e,t;try{e=a.readFileSync(r.ab+"package.json","utf-8")}catch(e){t=e}if(e){return JSON.parse(e).version}else{return null}};e=function(e){g(App,e);function App(){return App.__super__.constructor.apply(this,arguments)}App.prototype.welcome_screen=function(e,t){t.setHeader("content-type","text/plain; charset=UTF-8");t.writeHead(200);t.end("Welcome to SockJS!\n");return true};App.prototype.handle_404=function(e,t){t.setHeader("content-type","text/plain; charset=UTF-8");t.writeHead(404);t.end("404 Error: Page not found\n");return true};App.prototype.disabled_transport=function(e,t,r){return this.handle_404(e,t,r)};App.prototype.h_sid=function(e,t,r){var i;e.cookies=v.parseCookie(e.headers.cookie);if(typeof this.options.jsessionid==="function"){this.options.jsessionid(e,t)}else if(this.options.jsessionid&&t.setHeader){i=e.cookies["JSESSIONID"]||"dummy";t.setHeader("Set-Cookie","JSESSIONID="+i+"; path=/")}return r};App.prototype.log=function(e,t){return this.options.log(e,t)};return App}(y.GenericApp);v.objectExtend(e.prototype,c.app);v.objectExtend(e.prototype,n.app);v.objectExtend(e.prototype,d.app);v.objectExtend(e.prototype,l.app);v.objectExtend(e.prototype,_.app);v.objectExtend(e.prototype,f.app);v.objectExtend(e.prototype,p.app);h=function(e){var t,r,i,s,n;r=function(t){return function(t){return new RegExp("^"+e.prefix+t+"[/]?$")}}(this);s=function(e){return function(e){return[r("/([^/.]+)/([^/.]+)"+e),"server","session"]}}(this);t=function(e){if(e==null){e="xhr_options"}return["h_sid","xhr_cors","cache_for",e,"expose"]};i=[["GET",r(""),["welcome_screen"]],["GET",r("/iframe[0-9-.a-z_]*.html"),["iframe","cache_for","expose"]],["OPTIONS",r("/info"),t("info_options")],["GET",r("/info"),["xhr_cors","h_no_cache","info","expose"]],["OPTIONS",r("/chunking_test"),t()],["POST",r("/chunking_test"),["xhr_cors","expect_xhr","chunking_test"]]];n=[["GET",s("/jsonp"),["h_sid","h_no_cache","jsonp"]],["POST",s("/jsonp_send"),["h_sid","h_no_cache","expect_form","jsonp_send"]],["POST",s("/xhr"),["h_sid","h_no_cache","xhr_cors","xhr_poll"]],["OPTIONS",s("/xhr"),t()],["POST",s("/xhr_send"),["h_sid","h_no_cache","xhr_cors","expect_xhr","xhr_send"]],["OPTIONS",s("/xhr_send"),t()],["POST",s("/xhr_streaming"),["h_sid","h_no_cache","xhr_cors","xhr_streaming"]],["OPTIONS",s("/xhr_streaming"),t()],["GET",s("/eventsource"),["h_sid","h_no_cache","eventsource"]],["GET",s("/htmlfile"),["h_sid","h_no_cache","htmlfile"]]];if(e.websocket){i.push(["GET",r("/websocket"),["raw_websocket"]]);n.push(["GET",s("/websocket"),["sockjs_websocket"]])}else{i.push(["GET",r("/websocket"),["cache_for","disabled_transport"]]);n.push(["GET",s("/websocket"),["cache_for","disabled_transport"]])}return i.concat(n)};i=function(){function Listener(t,r){this.options=t;this.handler=S(this.handler,this);this.app=new e;this.app.options=this.options;this.app.emit=r;this.app.log("debug","SockJS v"+u()+" "+"bound to "+JSON.stringify(this.options.prefix));this.dispatcher=h(this.options);this.webjs_handler=y.generateHandler(this.app,this.dispatcher);this.path_regexp=new RegExp("^"+this.options.prefix+"([/].+|[/]?)$")}Listener.prototype.handler=function(e,t,r){if(!e.url.match(this.path_regexp)){return false}this.webjs_handler(e,t,r);return true};Listener.prototype.getHandler=function(){return function(e){return function(t,r,i){return e.handler(t,r,i)}}(this)};return Listener}();s=function(e){g(Server,e);function Server(e){this.options={prefix:"",response_limit:128*1024,websocket:true,faye_server_options:null,jsessionid:false,heartbeat_delay:25e3,disconnect_delay:5e3,log:function(e,t){return console.log(t)},sockjs_url:"https://cdn.jsdelivr.net/npm/sockjs-client@1/dist/sockjs.min.js"};if(e){v.objectExtend(this.options,e)}}Server.prototype.listener=function(e){var t;t=v.objectExtend({},this.options);if(e){v.objectExtend(t,e)}return new i(t,function(e){return function(){return e.emit.apply(e,arguments)}}(this))};Server.prototype.installHandlers=function(e,t){var r;r=this.listener(t).getHandler();v.overshadowListeners(e,"request",r);v.overshadowListeners(e,"upgrade",r);return true};Server.prototype.middleware=function(e){var t;t=this.listener(e).getHandler();t.upgrade=t;return t};return Server}(o.EventEmitter);t.createServer=function(e){return new s(e)};t.listen=function(e,r){var i;i=t.createServer(r);if(e){i.installHandlers(e)}return i}}).call(this)},9729:function(e,t,r){(function(){var e,i,s,n=function(e,t){for(var r in t){if(o.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},o={}.hasOwnProperty;s=r(2666);i=r(931);e=function(e){n(EventSourceReceiver,e);function EventSourceReceiver(){return EventSourceReceiver.__super__.constructor.apply(this,arguments)}EventSourceReceiver.prototype.protocol="eventsource";EventSourceReceiver.prototype.doSendFrame=function(e){var t;t=["data: ",s.escape_selected(e,"\r\n\0"),"\r\n\r\n"];return EventSourceReceiver.__super__.doSendFrame.call(this,t.join(""))};return EventSourceReceiver}(i.ResponseReceiver);t.app={eventsource:function(t,r){var s,n;if(!t.headers["origin"]||t.headers["origin"]==="null"){n="*"}else{n=t.headers["origin"];r.setHeader("Access-Control-Allow-Credentials","true")}r.setHeader("Content-Type","text/event-stream");r.setHeader("Access-Control-Allow-Origin",n);r.setHeader("Vary","Origin");s=t.headers["access-control-request-headers"];if(s){r.setHeader("Access-Control-Allow-Headers",s)}r.writeHead(200);r.write("\r\n");i.register(t,this,new e(t,r,this.options));return true}}}).call(this)},158:function(e,t,r){(function(){var e,i,s,n,o=function(e,t){for(var r in t){if(a.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},a={}.hasOwnProperty;n=r(2666);s=r(931);i='<!doctype html>\n<html><head>\n <meta http-equiv="X-UA-Compatible" content="IE=edge" />\n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n</head><body><h2>Don\'t panic!</h2>\n <script>\n document.domain = document.domain;\n var c = parent.{{ callback }};\n c.start();\n function p(d) {c.message(d);};\n window.onload = function() {c.stop();};\n <\/script>';i+=Array(1024-i.length+14).join(" ");i+="\r\n\r\n";e=function(e){o(HtmlFileReceiver,e);function HtmlFileReceiver(){return HtmlFileReceiver.__super__.constructor.apply(this,arguments)}HtmlFileReceiver.prototype.protocol="htmlfile";HtmlFileReceiver.prototype.doSendFrame=function(e){return HtmlFileReceiver.__super__.doSendFrame.call(this,"<script>\np("+JSON.stringify(e)+");\n<\/script>\r\n")};return HtmlFileReceiver}(s.ResponseReceiver);t.app={htmlfile:function(t,r){var n;if(!("c"in t.query||"callback"in t.query)){throw{status:500,message:'"callback" parameter required'}}n="c"in t.query?t.query["c"]:t.query["callback"];if(/[^a-zA-Z0-9-_.]/.test(n)){throw{status:500,message:'invalid "callback" parameter'}}r.setHeader("Content-Type","text/html; charset=UTF-8");r.writeHead(200);r.write(i.replace(/{{ callback }}/g,n));s.register(t,this,new e(t,r,this.options));return true}}}).call(this)},3709:function(e,t,r){(function(){var e,i,s=function(e,t){for(var r in t){if(n.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},n={}.hasOwnProperty;i=r(931);e=function(e){s(JsonpReceiver,e);JsonpReceiver.prototype.protocol="jsonp-polling";JsonpReceiver.prototype.max_response_size=1;function JsonpReceiver(e,t,r,i){this.callback=i;JsonpReceiver.__super__.constructor.call(this,e,t,r)}JsonpReceiver.prototype.doSendFrame=function(e){return JsonpReceiver.__super__.doSendFrame.call(this,"/**/"+this.callback+"("+JSON.stringify(e)+");\r\n")};return JsonpReceiver}(i.ResponseReceiver);t.app={jsonp:function(t,r,s,n){var o;if(!("c"in t.query||"callback"in t.query)){throw{status:500,message:'"callback" parameter required'}}o="c"in t.query?t.query["c"]:t.query["callback"];if(/[^a-zA-Z0-9-_.]/.test(o)||o.length>32){throw{status:500,message:'invalid "callback" parameter'}}r.setHeader("X-Content-Type-Options","nosniff");r.setHeader("Content-Type","application/javascript; charset=UTF-8");r.writeHead(200);i.register(t,this,new e(t,r,this.options,o));return true},jsonp_send:function(e,t,r){var s,n,o,a,h,c;if(!r){throw{status:500,message:"Payload expected."}}if(typeof r==="string"){try{s=JSON.parse(r)}catch(e){c=e;throw{status:500,message:"Broken JSON encoding."}}}else{s=r.d}if(typeof s==="string"&&s){try{s=JSON.parse(s)}catch(e){c=e;throw{status:500,message:"Broken JSON encoding."}}}if(!s||s.__proto__.constructor!==Array){throw{status:500,message:"Payload expected."}}o=i.Session.bySessionId(e.session);if(o===null){throw{status:404}}for(n=0,a=s.length;n<a;n++){h=s[n];o.didMessage(h)}t.setHeader("Content-Length","2");t.setHeader("Content-Type","text/plain; charset=UTF-8");t.writeHead(200);t.end("ok");return true}}}).call(this)},9527:function(e,t,r){(function(){var e,i,s,n,o,a,h=function(e,t){for(var r in t){if(c.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},c={}.hasOwnProperty;e=r(9173);a=r(2666);o=r(931);t.app={_websocket_check:function(t,r,i){if(!e.isWebSocket(t)){throw{status:400,message:"Not a valid websocket request"}}},sockjs_websocket:function(t,r,i){var s;this._websocket_check(t,r,i);s=new e(t,r,i,null,this.options.faye_server_options);s.onopen=function(e){return function(){return o.registerNoSession(t,e,new n(s,r))}}(this);return true},raw_websocket:function(t,r,s){var n,o;this._websocket_check(t,r,s);n=t.headers["sec-websocket-version"]||"";if(["8","13"].indexOf(n)===-1){throw{status:400,message:"Only supported WebSocket protocol is RFC 6455."}}o=new e(t,r,s,null,this.options.faye_server_options);o.onopen=function(e){return function(){return new i(t,r,e,o)}}(this);return true}};n=function(e){h(WebSocketReceiver,e);WebSocketReceiver.prototype.protocol="websocket";function WebSocketReceiver(e,t){var r;this.ws=e;this.connection=t;try{this.connection.setKeepAlive(true,5e3);this.connection.setNoDelay(true)}catch(e){r=e}this.ws.addEventListener("message",function(e){return function(t){return e.didMessage(t.data)}}(this));this.heartbeat_cb=function(e){return function(){return e.heartbeat_timeout()}}(this);WebSocketReceiver.__super__.constructor.call(this,this.connection)}WebSocketReceiver.prototype.setUp=function(){WebSocketReceiver.__super__.setUp.apply(this,arguments);return this.ws.addEventListener("close",this.thingy_end_cb)};WebSocketReceiver.prototype.tearDown=function(){this.ws.removeEventListener("close",this.thingy_end_cb);return WebSocketReceiver.__super__.tearDown.apply(this,arguments)};WebSocketReceiver.prototype.didMessage=function(e){var t,r,i,s,n,o;if(this.ws&&this.session&&e.length>0){try{i=JSON.parse(e)}catch(e){o=e;return this.didClose(3e3,"Broken framing.")}if(e[0]==="["){n=[];for(t=0,r=i.length;t<r;t++){s=i[t];n.push(this.session.didMessage(s))}return n}else{return this.session.didMessage(i)}}};WebSocketReceiver.prototype.doSendFrame=function(e){var t;if(this.ws){try{this.ws.send(e);return true}catch(e){t=e}}return false};WebSocketReceiver.prototype.didClose=function(e,t){var r;if(e==null){e=1e3}if(t==null){t="Normal closure"}WebSocketReceiver.__super__.didClose.apply(this,arguments);try{this.ws.close(e,t,false)}catch(e){r=e}this.ws=null;return this.connection=null};WebSocketReceiver.prototype.heartbeat=function(){var e,t;t=this.ws.ping(null,function(){return clearTimeout(e)});if(t){return e=setTimeout(this.heartbeat_cb,1e4)}else{return WebSocketReceiver.__super__.heartbeat.apply(this,arguments)}};WebSocketReceiver.prototype.heartbeat_timeout=function(){if(this.session!=null){return this.session.close(3e3,"No response from heartbeat")}};return WebSocketReceiver}(o.GenericReceiver);s=o.Transport;i=function(e){h(RawWebsocketSessionReceiver,e);function RawWebsocketSessionReceiver(e,t,r,i){this.ws=i;this.prefix=r.options.prefix;this.readyState=s.OPEN;this.recv={connection:t,protocol:"websocket-raw"};this.connection=new o.SockJSConnection(this);this.decorateConnection(e);r.emit("connection",this.connection);this._end_cb=function(e){return function(){return e.didClose()}}(this);this.ws.addEventListener("close",this._end_cb);this._message_cb=function(e){return function(t){return e.didMessage(t)}}(this);this.ws.addEventListener("message",this._message_cb)}RawWebsocketSessionReceiver.prototype.didMessage=function(e){if(this.readyState===s.OPEN){this.connection.emit("data",e.data)}};RawWebsocketSessionReceiver.prototype.send=function(e){if(this.readyState!==s.OPEN){return false}this.ws.send(e);return true};RawWebsocketSessionReceiver.prototype.close=function(e,t){if(e==null){e=1e3}if(t==null){t="Normal closure"}if(this.readyState!==s.OPEN){return false}this.readyState=s.CLOSING;this.ws.close(e,t,false);return true};RawWebsocketSessionReceiver.prototype.didClose=function(){var e;if(!this.ws){return}this.ws.removeEventListener("message",this._message_cb);this.ws.removeEventListener("close",this._end_cb);try{this.ws.close(1e3,"Normal closure",false)}catch(t){e=t}this.ws=null;this.readyState=s.CLOSED;this.connection.emit("end");this.connection.emit("close");return this.connection=null};return RawWebsocketSessionReceiver}(o.Session)}).call(this)},3720:function(e,t,r){(function(){var e,i,s,n,o=function(e,t){for(var r in t){if(a.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},a={}.hasOwnProperty;s=r(931);n=r(2666);i=function(e){o(XhrStreamingReceiver,e);function XhrStreamingReceiver(){return XhrStreamingReceiver.__super__.constructor.apply(this,arguments)}XhrStreamingReceiver.prototype.protocol="xhr-streaming";XhrStreamingReceiver.prototype.doSendFrame=function(e){return XhrStreamingReceiver.__super__.doSendFrame.call(this,e+"\n")};return XhrStreamingReceiver}(s.ResponseReceiver);e=function(e){o(XhrPollingReceiver,e);function XhrPollingReceiver(){return XhrPollingReceiver.__super__.constructor.apply(this,arguments)}XhrPollingReceiver.prototype.protocol="xhr-polling";XhrPollingReceiver.prototype.max_response_size=1;return XhrPollingReceiver}(i);t.app={xhr_options:function(e,t){t.statusCode=204;t.setHeader("Access-Control-Allow-Methods","OPTIONS, POST");t.setHeader("Access-Control-Max-Age",t.cache_for);return""},xhr_send:function(e,t,r){var i,n,o,a,h,c;if(!r){throw{status:500,message:"Payload expected."}}try{i=JSON.parse(r)}catch(e){c=e;throw{status:500,message:"Broken JSON encoding."}}if(!i||i.__proto__.constructor!==Array){throw{status:500,message:"Payload expected."}}o=s.Session.bySessionId(e.session);if(!o){throw{status:404}}for(n=0,a=i.length;n<a;n++){h=i[n];o.didMessage(h)}t.setHeader("Content-Type","text/plain; charset=UTF-8");t.writeHead(204);t.end();return true},xhr_cors:function(e,t,r){var i,s;if(this.options.disable_cors){return r}if(!e.headers["origin"]){s="*"}else{s=e.headers["origin"];t.setHeader("Access-Control-Allow-Credentials","true")}t.setHeader("Access-Control-Allow-Origin",s);t.setHeader("Vary","Origin");i=e.headers["access-control-request-headers"];if(i){t.setHeader("Access-Control-Allow-Headers",i)}return r},xhr_poll:function(t,r,i,n){r.setHeader("Content-Type","application/javascript; charset=UTF-8");r.writeHead(200);s.register(t,this,new e(t,r,this.options));return true},xhr_streaming:function(e,t,r,n){t.setHeader("Content-Type","application/javascript; charset=UTF-8");t.writeHead(200);t.write(Array(2049).join("h")+"\n");s.register(e,this,new i(e,t,this.options));return true}}}).call(this)},931:function(e,t,r){(function(){var e,i,s,n,o,a,h,c,u,f,p,l=function(e,t){for(var r in t){if(d.call(t,r))e[r]=t[r]}function ctor(){this.constructor=e}ctor.prototype=t.prototype;e.prototype=new ctor;e.__super__=t.prototype;return e},d={}.hasOwnProperty;u=r(2413);p=r(824);f=r(2666);a=function(){function Transport(){}return Transport}();a.CONNECTING=0;a.OPEN=1;a.CLOSING=2;a.CLOSED=3;h=function(e,t){return"c"+JSON.stringify([e,t])};o=function(e){l(SockJSConnection,e);function SockJSConnection(e){this._session=e;this.id=p();this.headers={};this.prefix=this._session.prefix}SockJSConnection.prototype.toString=function(){return"<SockJSConnection "+this.id+">"};SockJSConnection.prototype.write=function(e){return this._session.send(""+e)};SockJSConnection.prototype.end=function(e){if(e){this.write(e)}this.close();return null};SockJSConnection.prototype.close=function(e,t){return this._session.close(e,t)};SockJSConnection.prototype.destroy=function(){this.end();return this.removeAllListeners()};SockJSConnection.prototype.destroySoon=function(){return this.destroy()};return SockJSConnection}(u.Stream);o.prototype.__defineGetter__("readable",function(){return this._session.readyState===a.OPEN});o.prototype.__defineGetter__("writable",function(){return this._session.readyState===a.OPEN});o.prototype.__defineGetter__("readyState",function(){return this._session.readyState});i={};n=function(){function Session(e,t){this.session_id=e;this.heartbeat_delay=t.options.heartbeat_delay;this.disconnect_delay=t.options.disconnect_delay;this.prefix=t.options.prefix;this.send_buffer=[];this.is_closing=false;this.readyState=a.CONNECTING;if(this.session_id){i[this.session_id]=this}this.timeout_cb=function(e){return function(){return e.didTimeout()}}(this);this.to_tref=setTimeout(this.timeout_cb,this.disconnect_delay);this.connection=new o(this);this.emit_open=function(e){return function(){e.emit_open=null;return t.emit("connection",e.connection)}}(this)}Session.prototype.register=function(e,t){if(this.recv){t.doSendFrame(h(2010,"Another connection still open"));t.didClose();return}if(this.to_tref){clearTimeout(this.to_tref);this.to_tref=null}if(this.readyState===a.CLOSING){this.flushToRecv(t);t.doSendFrame(this.close_frame);t.didClose();this.to_tref=setTimeout(this.timeout_cb,this.disconnect_delay);return}this.recv=t;this.recv.session=this;this.decorateConnection(e);if(this.readyState===a.CONNECTING){this.recv.doSendFrame("o");this.readyState=a.OPEN;process.nextTick(this.emit_open)}if(!this.recv){return}this.tryFlush()};Session.prototype.decorateConnection=function(e){var t,r,i,s,n,o,a,h,c,u;if(!(c=this.recv.connection)){c=this.recv.response.connection}try{a=c.remoteAddress;h=c.remotePort;t=c.address()}catch(e){u=e}if(a){this.connection.remoteAddress=a;this.connection.remotePort=h;this.connection.address=t}this.connection.url=e.url;this.connection.pathname=e.pathname;this.connection.protocol=this.recv.protocol;r={};o=["referer","x-client-ip","x-forwarded-for","x-forwarded-host","x-forwarded-port","x-cluster-client-ip","via","x-real-ip","x-forwarded-proto","x-ssl","dnt","host","user-agent","accept-language"];for(i=0,n=o.length;i<n;i++){s=o[i];if(e.headers[s]){r[s]=e.headers[s]}}if(r){return this.connection.headers=r}};Session.prototype.unregister=function(){var e;e=this.recv.delay_disconnect;this.recv.session=null;this.recv=null;if(this.to_tref){clearTimeout(this.to_tref)}if(e){return this.to_tref=setTimeout(this.timeout_cb,this.disconnect_delay)}else{return this.timeout_cb()}};Session.prototype.flushToRecv=function(e){var t,r;if(this.send_buffer.length>0){t=[this.send_buffer,[]],r=t[0],this.send_buffer=t[1];e.doSendBulk(r);return true}return false};Session.prototype.tryFlush=function(){var e;if(!this.flushToRecv(this.recv)||!this.to_tref){if(this.to_tref){clearTimeout(this.to_tref)}e=function(t){return function(){if(t.recv){t.to_tref=setTimeout(e,t.heartbeat_delay);return t.recv.heartbeat()}}}(this);this.to_tref=setTimeout(e,this.heartbeat_delay)}};Session.prototype.didTimeout=function(){if(this.to_tref){clearTimeout(this.to_tref);this.to_tref=null}if(this.readyState!==a.CONNECTING&&this.readyState!==a.OPEN&&this.readyState!==a.CLOSING){throw Error("INVALID_STATE_ERR")}if(this.recv){throw Error("RECV_STILL_THERE")}this.readyState=a.CLOSED;this.connection.emit("end");this.connection.emit("close");this.connection=null;if(this.session_id){delete i[this.session_id];return this.session_id=null}};Session.prototype.didMessage=function(e){if(this.readyState===a.OPEN){this.connection.emit("data",e)}};Session.prototype.send=function(e){if(this.readyState!==a.OPEN){return false}this.send_buffer.push(""+e);if(this.recv){this.tryFlush()}return true};Session.prototype.close=function(e,t){if(e==null){e=1e3}if(t==null){t="Normal closure"}if(this.readyState!==a.OPEN){return false}this.readyState=a.CLOSING;this.close_frame=h(e,t);if(this.recv){this.recv.doSendFrame(this.close_frame);if(this.recv){this.recv.didClose()}if(this.recv){this.unregister()}}return true};return Session}();n.bySessionId=function(e){if(!e){return null}return i[e]||null};c=function(e,t,r,i){var s;s=n.bySessionId(r);if(!s){s=new n(r,t)}s.register(e,i);return s};t.register=function(e,t,r){return c(e,t,e.session,r)};t.registerNoSession=function(e,t,r){return c(e,t,void 0,r)};e=function(){function GenericReceiver(e){this.thingy=e;this.setUp(this.thingy)}GenericReceiver.prototype.setUp=function(){this.thingy_end_cb=function(e){return function(){return e.didAbort()}}(this);this.thingy.addListener("close",this.thingy_end_cb);return this.thingy.addListener("end",this.thingy_end_cb)};GenericReceiver.prototype.tearDown=function(){this.thingy.removeListener("close",this.thingy_end_cb);this.thingy.removeListener("end",this.thingy_end_cb);return this.thingy_end_cb=null};GenericReceiver.prototype.didAbort=function(){this.delay_disconnect=false;return this.didClose()};GenericReceiver.prototype.didClose=function(){if(this.thingy){this.tearDown(this.thingy);this.thingy=null}if(this.session){return this.session.unregister()}};GenericReceiver.prototype.doSendBulk=function(e){var t,r;r=function(){var r,i,s;s=[];for(r=0,i=e.length;r<i;r++){t=e[r];s.push(f.quote(t))}return s}();return this.doSendFrame("a"+"["+r.join(",")+"]")};GenericReceiver.prototype.heartbeat=function(){return this.doSendFrame("h")};return GenericReceiver}();s=function(e){l(ResponseReceiver,e);ResponseReceiver.prototype.max_response_size=void 0;ResponseReceiver.prototype.delay_disconnect=true;function ResponseReceiver(e,t,r){var i;this.request=e;this.response=t;this.options=r;this.curr_response_size=0;try{this.request.connection.setKeepAlive(true,5e3)}catch(e){i=e}ResponseReceiver.__super__.constructor.call(this,this.request.connection);if(this.max_response_size===void 0){this.max_response_size=this.options.response_limit}}ResponseReceiver.prototype.doSendFrame=function(e){var t,r;this.curr_response_size+=e.length;t=false;try{this.response.write(e);t=true}catch(e){r=e}if(this.max_response_size&&this.curr_response_size>=this.max_response_size){this.didClose()}return t};ResponseReceiver.prototype.didClose=function(){var e;ResponseReceiver.__super__.didClose.apply(this,arguments);try{this.response.end()}catch(t){e=t}return this.response=null};return ResponseReceiver}(e);t.GenericReceiver=e;t.Transport=a;t.Session=n;t.ResponseReceiver=s;t.SockJSConnection=o}).call(this)},2666:function(e,t,r){(function(){var e,i,s,n,o;i=r(6417);t.array_intersection=e=function(e,t){var r,i,s,n;n=[];for(i=0,s=e.length;i<s;i++){r=e[i];if(t.indexOf(r)!==-1){n.push(r)}}return n};t.escape_selected=function(e,t){var r,i,s,n,o,a,h,c,u,f;a={};t="%"+t;for(s=0,o=t.length;s<o;s++){r=t[s];a[r]=escape(r)}c=new RegExp("(["+t+"])");h=e.split(c);for(i=n=0,u=h.length;0<=u?n<u:n>u;i=0<=u?++n:--n){f=h[i];if(f.length===1&&f in a){h[i]=a[f]}}return h.join("")};t.buffer_concat=function(e,t){var r;r=new Buffer(e.length+t.length);e.copy(r);t.copy(r,e.length);return r};t.md5_hex=function(e){return i.createHash("md5").update(e).digest("hex")};t.sha1_base64=function(e){return i.createHash("sha1").update(e).digest("base64")};t.timeout_chain=function(e){var r,i,s,n;e=e.slice(0);if(!e.length){return}i=e.shift(),s=i[0],n=i[1];r=function(r){return function(){n();return t.timeout_chain(e)}}(this);return setTimeout(r,s)};t.objectExtend=function(e,t){var r;for(r in t){if(t.hasOwnProperty(r)){e[r]=t[r]}}return e};t.overshadowListeners=function(e,t,r){var i,s;s=e.listeners(t).slice(0);e.removeAllListeners(t);i=function(){var e,t,i;if(r.apply(this,arguments)!==true){for(e=0,t=s.length;e<t;e++){i=s[e];i.apply(this,arguments)}return false}return true};return e.addListener(t,i)};s=/[\x00-\x1f\ud800-\udfff\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufff0-\uffff]/g;o=function(e){var t,r,i;i={};t=function(){var e,t;t=[];for(r=e=0;e<65536;r=++e){t.push(String.fromCharCode(r))}return t}();e.lastIndex=0;t.join("").replace(e,function(e){return i[e]="\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)});return i};n=o(s);t.quote=function(e){var t;t=JSON.stringify(e);s.lastIndex=0;if(!s.test(t)){return t}return t.replace(s,function(e){return n[e]})};t.parseCookie=function(e){var t,r,i,s,n,o;r={};if(e){o=e.split(";");for(i=0,s=o.length;i<s;i++){t=o[i];n=t.split("=");r[n[0].trim()]=(n[1]||"").trim()}}return r};t.random32=function(){var e,t;e=i.randomBytes(4);t=[e[0],e[1],e[2],e[3]];return t[0]+t[1]*256+t[2]*256*256+t[3]*256*256*256}}).call(this)},8399:function(e,t,r){(function(){var e,i,s,n,o,a,h,c;h=r(8835);a=r(1191);n=r(5747);o=r(8605);c=r(2666);i=function(e,t,r,i,s){var n,o,a;try{o=[];while(t.length>0){n=t.shift();r.last_fun=n;o.push(s=e[n](r,i,s,r.next_filter))}return o}catch(t){a=t;if(typeof a==="object"&&"status"in a){if(a.status===0){return}else if("handle_"+a.status in e){e["handle_"+a.status](r,i,a)}else{e["handle_error"](r,i,a)}}else{e["handle_error"](r,i,a)}return e["log_request"](r,i,true)}};s=function(e,t){var r;r={Connection:"close"};t.writeHead=function(i,s){var n,a,h;if(s==null){s={}}a=[];a.push("HTTP/"+e.httpVersion+" "+i+" "+o.STATUS_CODES[i]);c.objectExtend(r,s);for(n in r){a.push(n+": "+r[n])}a=a.concat(["",""]);try{return t.write(a.join("\r\n"))}catch(e){h=e}};return t.setHeader=function(e,t){return r[e]=t}};t.generateHandler=function(e,t){return function(r,n,o){var a,u,f,p,l,d,_,v,y,g,m,S;if(typeof n.writeHead==="undefined"){s(r,n)}c.objectExtend(r,h.parse(r.url,true));r.start_date=new Date;u=false;a=[];for(l=0,_=t.length;l<_;l++){S=t[l];y=S[0],g=S[1],f=S[2];if(g.constructor!==Array){g=[g]}v=r.pathname.match(g[0]);if(!v){continue}if(!r.method.match(new RegExp(y))){a.push(y);continue}for(p=d=1,m=g.length;1<=m?d<m:d>m;p=1<=m?++d:--d){r[g[p]]=v[p]}f=f.slice(0);f.push("log_request");r.next_filter=function(t){return i(e,f,r,n,t)};r.next_filter(o);u=true;break}if(!u){if(a.length!==0){e["handle_405"](r,n,a)}else{e["handle_404"](r,n)}e["log_request"](r,n,true)}}};t.GenericApp=e=function(){function GenericApp(){}GenericApp.prototype.handle_404=function(e,t,r){if(t.finished){return r}t.writeHead(404,{});t.end();return true};GenericApp.prototype.handle_405=function(e,t,r){t.writeHead(405,{Allow:r.join(", ")});t.end();return true};GenericApp.prototype.handle_error=function(e,t,r){if(t.finished){return r}if(typeof r==="object"&&"status"in r){t.writeHead(r.status,{});t.end(r.message||"")}else{try{t.writeHead(500,{});t.end("500 - Internal Server Error")}catch(e){r=e}this.log("error",'Exception on "'+e.method+" "+e.href+'" in filter "'+e.last_fun+'":\n'+(r.stack||r))}return true};GenericApp.prototype.log_request=function(e,t,r){var i;i=new Date-e.start_date;this.log("info",e.method+" "+e.url+" "+i+"ms "+(t.finished?t.statusCode:"(unfinished)"));return r};GenericApp.prototype.log=function(e,t){return console.log(t)};GenericApp.prototype.expose_html=function(e,t,r){if(t.finished){return r}if(!t.getHeader("Content-Type")){t.setHeader("Content-Type","text/html; charset=UTF-8")}return this.expose(e,t,r)};GenericApp.prototype.expose_json=function(e,t,r){if(t.finished){return r}if(!t.getHeader("Content-Type")){t.setHeader("Content-Type","application/json")}return this.expose(e,t,JSON.stringify(r))};GenericApp.prototype.expose=function(e,t,r){if(t.finished){return r}if(r&&!t.getHeader("Content-Type")){t.setHeader("Content-Type","text/plain")}if(r){t.setHeader("Content-Length",r.length)}t.writeHead(t.statusCode);t.end(r,"utf8");return true};GenericApp.prototype.serve_file=function(e,t,r,i){var s;s=function(e,r){if(e){t.writeHead(500);t.end("can't read file")}else{t.setHeader("Content-length",r.length);t.writeHead(t.statusCode,t.headers);t.end(r,"utf8")}return i(true)};n.readFile(r,s);throw{status:0}};GenericApp.prototype.cache_for=function(e,t,r){var i;t.cache_for=t.cache_for||365*24*60*60;t.setHeader("Cache-Control","public, max-age="+t.cache_for);i=new Date;i.setTime(i.getTime()+t.cache_for*1e3);t.setHeader("Expires",i.toGMTString());return r};GenericApp.prototype.h_no_cache=function(e,t,r){t.setHeader("Cache-Control","no-store, no-cache, no-transform, must-revalidate, max-age=0");return r};GenericApp.prototype.expect_form=function(e,t,r,i){var s;s=new Buffer(0);e.on("data",function(e){return function(e){return s=c.buffer_concat(s,new Buffer(e,"binary"))}}(this));e.on("end",function(t){return function(){var r;s=s.toString("utf-8");switch((e.headers["content-type"]||"").split(";")[0]){case"application/x-www-form-urlencoded":r=a.parse(s);break;case"text/plain":case"":r=s;break;default:t.log("error","Unsupported content-type "+e.headers["content-type"]);r=void 0}return i(r)}}(this));throw{status:0}};GenericApp.prototype.expect_xhr=function(e,t,r,i){var s;s=new Buffer(0);e.on("data",function(e){return function(e){return s=c.buffer_concat(s,new Buffer(e,"binary"))}}(this));e.on("end",function(t){return function(){var r;s=s.toString("utf-8");switch((e.headers["content-type"]||"").split(";")[0]){case"text/plain":case"T":case"application/json":case"application/xml":case"":case"text/xml":r=s;break;default:t.log("error","Unsupported content-type "+e.headers["content-type"]);r=void 0}return i(r)}}(this));throw{status:0}};return GenericApp}()}).call(this)},2707:e=>{var t=[];for(var r=0;r<256;++r){t[r]=(r+256).toString(16).substr(1)}function bytesToUuid(e,r){var i=r||0;var s=t;return[s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],"-",s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]],s[e[i++]]].join("")}e.exports=bytesToUuid},5859:(e,t,r)=>{var i=r(6417);e.exports=function nodeRNG(){return i.randomBytes(16)}},824:(e,t,r)=>{var i=r(5859);var s=r(2707);function v4(e,t,r){var n=t&&r||0;if(typeof e=="string"){t=e==="binary"?new Array(16):null;e=null}e=e||{};var o=e