react-monaco-editor
Version:
Monaco Editor for React
1 lines • 165 kB
JavaScript
!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t){e.exports='<div class="header">\n <span id="okness"></span>\n <span id="status"></span>\n</div>\n<pre id="errors"></pre>\n<div id="warnings"></div>\n<iframe id="iframe" src="javascript:;" allowfullscreen="allowfullscreen"></iframe>\n'},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},function(e,t,n){var r,o,i={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),a=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,l=[],f=n(1);function d(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=i[r.id];if(o){o.refs++;for(var s=0;s<o.parts.length;s++)o.parts[s](r.parts[s]);for(;s<r.parts.length;s++)o.parts.push(y(r.parts[s],t))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(y(r.parts[s],t));i[r.id]={id:r.id,refs:1,parts:a}}}}function p(e,t){for(var n=[],r={},o=0;o<e.length;o++){var i=e[o],s=t.base?i[0]+t.base:i[0],a={css:i[1],media:i[2],sourceMap:i[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}function h(e,t){var n=a(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),l.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=a(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,o)}}function v(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=l.indexOf(e);t>=0&&l.splice(t,1)}function m(e){var t=document.createElement("style");return e.attrs.type="text/css",g(t,e.attrs),h(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function y(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var s=c++;n=u||(u=m(t)),r=w.bind(null,n,s,!1),o=w.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",g(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=f(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var s=new Blob([r],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}.bind(null,n,t),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return d(n,t),function(e){for(var r=[],o=0;o<n.length;o++){var s=n[o];(a=i[s.id]).refs--,r.push(a)}e&&d(p(e,t),t);for(o=0;o<r.length;o++){var a;if(0===(a=r[o]).refs){for(var u=0;u<a.parts.length;u++)a.parts[u]();delete i[a.id]}}}};var b,x=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function w(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var i=document.createTextNode(o),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(i,s[t]):e.appendChild(i)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}var s;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o<this.length;o++){var i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,'*,\n*:before,\n*:after {\n\t-webkit-box-sizing: border-box;\n\t-moz-box-sizing: border-box;\n\tbox-sizing: border-box;\n}\n\nbody,\nhtml {\n\tmargin: 0;\n\tpadding: 0;\n\theight: 100%;\n\tfont-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n}\n\n.header {\n\twidth: 100%;\n\theight: 30px;\n\tpadding: 0 10px;\n\tborder-left: 10px solid #a3be8c;\n\tfont-size: 12px;\n\tline-height: 30px;\n\tcolor: #eff1f5;\n\tbackground: #343d46;\n\toverflow: hidden;\n}\n\n#iframe {\n\tposition: absolute;\n\ttop: 30px;\n\tright: 0;\n\tbottom: 0;\n\tleft: 0;\n\twidth: 100%;\n\theight: -webkit-calc(100% - 30px);\n\theight: -moz-calc(100% - 30px);\n\theight: -ms-calc(100% - 30px);\n\theight: -o-calc(100% - 30px);\n\theight: calc(100% - 30px);\n\tborder: 0;\n}\n\n#errors {\n\twidth: 100%;\n\tmargin: 0;\n\tpadding: 10px;\n\tfont-family: monospace;\n\tfont-size: 14px;\n\tline-height: 1.4;\n\tcolor: #eff1f5;\n\tbackground: #bf616a;\n\toverflow: auto;\n}\n\n#okness {\n\tfont-weight: bold;\n}\n',""])},function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n(2)(r,o);r.locals&&(e.exports=r.locals)},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(t){var n;e.exports=function e(t,r,o){function i(a,u){if(!r[a]){if(!t[a]){var c="function"==typeof n&&n;if(!u&&c)return n(a,!0);if(s)return s(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var f=r[a]={exports:{}};t[a][0].call(f.exports,function(e){var n=t[a][1][e];return i(n||e)},f,f.exports,e,t,r,o)}return r[a].exports}for(var s="function"==typeof n&&n,a=0;a<o.length;a++)i(o[a]);return i}({1:[function(e,n,r){(function(t){"use strict";var r=e("./transport-list");n.exports=e("./main")(r),"_sockjs_onload"in t&&setTimeout(t._sockjs_onload,1)}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./main":14,"./transport-list":16}],2:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./event");function i(){o.call(this),this.initEvent("close",!1,!1),this.wasClean=!1,this.code=0,this.reason=""}r(i,o),t.exports=i},{"./event":4,inherits:57}],3:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./eventtarget");function i(){o.call(this)}r(i,o),i.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},i.prototype.once=function(e,t){var n=this,r=!1;this.on(e,function o(){n.removeListener(e,o),r||(r=!0,t.apply(this,arguments))})},i.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var n=arguments.length,r=new Array(n-1),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0;i<t.length;i++)t[i].apply(this,r)}},i.prototype.on=i.prototype.addListener=o.prototype.addEventListener,i.prototype.removeListener=o.prototype.removeEventListener,t.exports.EventEmitter=i},{"./eventtarget":5,inherits:57}],4:[function(e,t,n){"use strict";function r(e){this.type=e}r.prototype.initEvent=function(e,t,n){return this.type=e,this.bubbles=t,this.cancelable=n,this.timeStamp=+new Date,this},r.prototype.stopPropagation=function(){},r.prototype.preventDefault=function(){},r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,t.exports=r},{}],5:[function(e,t,n){"use strict";function r(){this._listeners={}}r.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var n=this._listeners[e];-1===n.indexOf(t)&&(n=n.concat([t])),this._listeners[e]=n},r.prototype.removeEventListener=function(e,t){var n=this._listeners[e];if(n){var r=n.indexOf(t);-1===r||(n.length>1?this._listeners[e]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[e])}},r.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,n=1===arguments.length?[e]:Array.apply(null,arguments);if(this["on"+t]&&this["on"+t].apply(this,n),t in this._listeners)for(var r=this._listeners[t],o=0;o<r.length;o++)r[o].apply(this,n)},t.exports=r},{}],6:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./event");function i(e){o.call(this),this.initEvent("message",!1,!1),this.data=e}r(i,o),t.exports=i},{"./event":4,inherits:57}],7:[function(e,t,n){"use strict";var r=e("json3"),o=e("./utils/iframe");function i(e){this._transport=e,e.on("message",this._transportMessage.bind(this)),e.on("close",this._transportClose.bind(this))}i.prototype._transportClose=function(e,t){o.postMessage("c",r.stringify([e,t]))},i.prototype._transportMessage=function(e){o.postMessage("t",e)},i.prototype._send=function(e){this._transport.send(e)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},t.exports=i},{"./utils/iframe":47,json3:58}],8:[function(e,t,n){(function(n){"use strict";var r=e("./utils/url"),o=e("./utils/event"),i=e("json3"),s=e("./facade"),a=e("./info-iframe-receiver"),u=e("./utils/iframe"),c=e("./location"),l=function(){};"production"!==n.env.NODE_ENV&&(l=e("debug")("sockjs-client:iframe-bootstrap")),t.exports=function(e,t){var n,f={};t.forEach(function(e){e.facadeTransport&&(f[e.facadeTransport.transportName]=e.facadeTransport)}),f[a.transportName]=a,e.bootstrap_iframe=function(){var t;u.currentWindowId=c.hash.slice(1),o.attachEvent("message",function(o){if(o.source===parent&&(void 0===n&&(n=o.origin),o.origin===n)){var a;try{a=i.parse(o.data)}catch(e){return void l("bad json",o.data)}if(a.windowId===u.currentWindowId)switch(a.type){case"s":var d;try{d=i.parse(a.data)}catch(e){l("bad json",a.data);break}var p=d[0],h=d[1],v=d[2],m=d[3];if(l(p,h,v,m),p!==e.version)throw new Error('Incompatible SockJS! Main site uses: "'+p+'", the iframe: "'+e.version+'".');if(!r.isOriginEqual(v,c.href)||!r.isOriginEqual(m,c.href))throw new Error("Can't connect to different domain from within an iframe. ("+c.href+", "+v+", "+m+")");t=new s(new f[h](v,m));break;case"m":t._send(a.data);break;case"c":t&&t._close(),t=null}}}),u.postMessage("s")}}}).call(this,{env:{}})},{"./facade":7,"./info-iframe-receiver":10,"./location":13,"./utils/event":46,"./utils/iframe":47,"./utils/url":52,debug:55,json3:58}],9:[function(e,t,n){(function(n){"use strict";var r=e("events").EventEmitter,o=e("inherits"),i=e("json3"),s=e("./utils/object"),a=function(){};function u(e,t){r.call(this);var n=this,o=+new Date;this.xo=new t("GET",e),this.xo.once("finish",function(e,t){var r,u;if(200===e){if(u=+new Date-o,t)try{r=i.parse(t)}catch(e){a("bad json",t)}s.isObject(r)||(r={})}n.emit("finish",r,u),n.removeAllListeners()})}"production"!==n.env.NODE_ENV&&(a=e("debug")("sockjs-client:info-ajax")),o(u,r),u.prototype.close=function(){this.removeAllListeners(),this.xo.close()},t.exports=u}).call(this,{env:{}})},{"./utils/object":49,debug:55,events:3,inherits:57,json3:58}],10:[function(e,t,n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=e("json3"),s=e("./transport/sender/xhr-local"),a=e("./info-ajax");function u(e){var t=this;o.call(this),this.ir=new a(e,s),this.ir.once("finish",function(e,n){t.ir=null,t.emit("message",i.stringify([e,n]))})}r(u,o),u.transportName="iframe-info-receiver",u.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},t.exports=u},{"./info-ajax":9,"./transport/sender/xhr-local":37,events:3,inherits:57,json3:58}],11:[function(e,n,r){(function(t,r){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("json3"),a=e("./utils/event"),u=e("./transport/iframe"),c=e("./info-iframe-receiver"),l=function(){};function f(e,t){var n=this;o.call(this);var i=function(){var r=n.ifr=new u(c.transportName,t,e);r.once("message",function(e){if(e){var t;try{t=s.parse(e)}catch(t){return l("bad json",e),n.emit("finish"),void n.close()}var r=t[0],o=t[1];n.emit("finish",r,o)}n.close()}),r.once("close",function(){n.emit("finish"),n.close()})};r.document.body?i():a.attachEvent("load",i)}"production"!==t.env.NODE_ENV&&(l=e("debug")("sockjs-client:info-iframe")),i(f,o),f.enabled=function(){return u.enabled()},f.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},n.exports=f}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./info-iframe-receiver":10,"./transport/iframe":22,"./utils/event":46,debug:55,events:3,inherits:57,json3:58}],12:[function(e,t,n){(function(n){"use strict";var r=e("events").EventEmitter,o=e("inherits"),i=e("./utils/url"),s=e("./transport/sender/xdr"),a=e("./transport/sender/xhr-cors"),u=e("./transport/sender/xhr-local"),c=e("./transport/sender/xhr-fake"),l=e("./info-iframe"),f=e("./info-ajax"),d=function(){};function p(e,t){d(e);var n=this;r.call(this),setTimeout(function(){n.doXhr(e,t)},0)}"production"!==n.env.NODE_ENV&&(d=e("debug")("sockjs-client:info-receiver")),o(p,r),p._getReceiver=function(e,t,n){return n.sameOrigin?new f(t,u):a.enabled?new f(t,a):s.enabled&&n.sameScheme?new f(t,s):l.enabled()?new l(e,t):new f(t,c)},p.prototype.doXhr=function(e,t){var n=this,r=i.addPath(e,"/info");d("doXhr",r),this.xo=p._getReceiver(e,r,t),this.timeoutRef=setTimeout(function(){d("timeout"),n._cleanup(!1),n.emit("finish")},p.timeout),this.xo.once("finish",function(e,t){d("finish",e,t),n._cleanup(!0),n.emit("finish",e,t)})},p.prototype._cleanup=function(e){d("_cleanup"),clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},p.prototype.close=function(){d("close"),this.removeAllListeners(),this._cleanup(!1)},p.timeout=8e3,t.exports=p}).call(this,{env:{}})},{"./info-ajax":9,"./info-iframe":11,"./transport/sender/xdr":34,"./transport/sender/xhr-cors":35,"./transport/sender/xhr-fake":36,"./transport/sender/xhr-local":37,"./utils/url":52,debug:55,events:3,inherits:57}],13:[function(e,n,r){(function(e){"use strict";n.exports=e.location||{origin:"http://localhost:80",protocol:"http",host:"localhost",port:80,href:"http://localhost/",hash:""}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],14:[function(e,n,r){(function(t,r){"use strict";e("./shims");var o,i=e("url-parse"),s=e("inherits"),a=e("json3"),u=e("./utils/random"),c=e("./utils/escape"),l=e("./utils/url"),f=e("./utils/event"),d=e("./utils/transport"),p=e("./utils/object"),h=e("./utils/browser"),v=e("./utils/log"),m=e("./event/event"),g=e("./event/eventtarget"),y=e("./location"),b=e("./event/close"),x=e("./event/trans-message"),w=e("./info-receiver"),E=function(){};function T(e,t,n){if(!(this instanceof T))return new T(e,t,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");g.call(this),this.readyState=T.CONNECTING,this.extensions="",this.protocol="",(n=n||{}).protocols_whitelist&&v.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{};var r=n.sessionId||8;if("function"==typeof r)this._generateSessionId=r;else{if("number"!=typeof r)throw new TypeError("If sessionId is used in the options, it needs to be a number or a function.");this._generateSessionId=function(){return u.string(r)}}this._server=n.server||u.numberString(1e3);var o=new i(e);if(!o.host||!o.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(o.hash)throw new SyntaxError("The URL must not contain a fragment");if("http:"!==o.protocol&&"https:"!==o.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.");var s="https:"===o.protocol;if("https"===y.protocol&&!s)throw new Error("SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS");t?Array.isArray(t)||(t=[t]):t=[];var a=t.sort();a.forEach(function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<a.length-1&&e===a[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")});var c=l.getOrigin(y.href);this._origin=c?c.toLowerCase():null,o.set("pathname",o.pathname.replace(/\/+$/,"")),this.url=o.href,E("using url",this.url),this._urlInfo={nullOrigin:!h.hasDomain(),sameOrigin:l.isOriginEqual(this.url,y.href),sameScheme:l.isSchemeEqual(this.url,y.href)},this._ir=new w(this.url,this._urlInfo),this._ir.once("finish",this._receiveInfo.bind(this))}function j(e){return 1e3===e||e>=3e3&&e<=4999}"production"!==t.env.NODE_ENV&&(E=e("debug")("sockjs-client:main")),s(T,g),T.prototype.close=function(e,t){if(e&&!j(e))throw new Error("InvalidAccessError: Invalid code");if(t&&t.length>123)throw new SyntaxError("reason argument has an invalid length");this.readyState!==T.CLOSING&&this.readyState!==T.CLOSED&&this._close(e||1e3,t||"Normal closure",!0)},T.prototype.send=function(e){if("string"!=typeof e&&(e=""+e),this.readyState===T.CONNECTING)throw new Error("InvalidStateError: The connection has not been established yet");this.readyState===T.OPEN&&this._transport.send(c.quote(e))},T.version=e("./version"),T.CONNECTING=0,T.OPEN=1,T.CLOSING=2,T.CLOSED=3,T.prototype._receiveInfo=function(e,t){if(E("_receiveInfo",t),this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=p.extend(e,this._urlInfo),E("info",e);var n=o.filterToEnabled(this._transportsWhitelist,e);this._transports=n.main,E(this._transports.length+" enabled transports"),this._connect()}else this._close(1002,"Cannot connect to server")},T.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(E("attempt",e.transportName),e.needBody&&(!r.document.body||void 0!==r.document.readyState&&"complete"!==r.document.readyState&&"interactive"!==r.document.readyState))return E("waiting for body"),this._transports.unshift(e),void f.attachEvent("load",this._connect.bind(this));var t=this._rto*e.roundTrips||5e3;this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),t),E("using timeout",t);var n=l.addPath(this._transUrl,"/"+this._server+"/"+this._generateSessionId()),o=this._transportOptions[e.transportName];E("transport url",n);var i=new e(n,this._transUrl,o);return i.on("message",this._transportMessage.bind(this)),i.once("close",this._transportClose.bind(this)),i.transportName=e.transportName,void(this._transport=i)}this._close(2e3,"All transports failed",!1)},T.prototype._transportTimeout=function(){E("_transportTimeout"),this.readyState===T.CONNECTING&&this._transportClose(2007,"Transport timed out")},T.prototype._transportMessage=function(e){E("_transportMessage",e);var t,n=this,r=e.slice(0,1),o=e.slice(1);switch(r){case"o":return void this._open();case"h":return this.dispatchEvent(new m("heartbeat")),void E("heartbeat",this.transport)}if(o)try{t=a.parse(o)}catch(e){E("bad json",o)}if(void 0!==t)switch(r){case"a":Array.isArray(t)&&t.forEach(function(e){E("message",n.transport,e),n.dispatchEvent(new x(e))});break;case"m":E("message",this.transport,t),this.dispatchEvent(new x(t));break;case"c":Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}else E("empty payload",o)},T.prototype._transportClose=function(e,t){E("_transportClose",this.transport,e,t),this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),j(e)||2e3===e||this.readyState!==T.CONNECTING?this._close(e,t):this._connect()},T.prototype._open=function(){E("_open",this._transport.transportName,this.readyState),this.readyState===T.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=T.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new m("open")),E("connected",this.transport)):this._close(1006,"Server lost session")},T.prototype._close=function(e,t,n){E("_close",this.transport,e,t,n,this.readyState);var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===T.CLOSED)throw new Error("InvalidStateError: SockJS has already been closed");this.readyState=T.CLOSING,setTimeout(function(){this.readyState=T.CLOSED,r&&this.dispatchEvent(new m("error"));var o=new b("close");o.wasClean=n||!1,o.code=e||1e3,o.reason=t,this.dispatchEvent(o),this.onmessage=this.onclose=this.onerror=null,E("disconnected")}.bind(this),0)},T.prototype.countRTO=function(e){return e>100?4*e:300+e},n.exports=function(t){return o=d(t),e("./iframe-bootstrap")(T,t),T}}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./event/close":2,"./event/event":4,"./event/eventtarget":5,"./event/trans-message":6,"./iframe-bootstrap":8,"./info-receiver":12,"./location":13,"./shims":15,"./utils/browser":44,"./utils/escape":45,"./utils/event":46,"./utils/log":48,"./utils/object":49,"./utils/random":50,"./utils/transport":51,"./utils/url":52,"./version":53,debug:55,inherits:57,json3:58,"url-parse":61}],15:[function(e,t,n){"use strict";var r,o=Array.prototype,i=Object.prototype,s=Function.prototype,a=String.prototype,u=o.slice,c=i.toString,l=function(e){return"[object Function]"===i.toString.call(e)},f=function(e){return"[object String]"===c.call(e)},d=Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(e){return!1}}();r=d?function(e,t,n,r){!r&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)};var p=function(e,t,n){for(var o in t)i.hasOwnProperty.call(t,o)&&r(e,o,t[o],n)},h=function(e){if(null==e)throw new TypeError("can't convert "+e+" to object");return Object(e)};function v(){}p(s,{bind:function(e){var t=this;if(!l(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n=u.call(arguments,1),r=Math.max(0,t.length-n.length),o=[],i=0;i<r;i++)o.push("$"+i);var s=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this, arguments); }")(function(){if(this instanceof s){var r=t.apply(this,n.concat(u.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(u.call(arguments)))});return t.prototype&&(v.prototype=t.prototype,s.prototype=new v,v.prototype=null),s}}),p(Array,{isArray:function(e){return"[object Array]"===c.call(e)}});var m,g,y,b=Object("a"),x="a"!==b[0]||!(0 in b);p(o,{forEach:function(e){var t=h(this),n=x&&f(this)?this.split(""):t,r=arguments[1],o=-1,i=n.length>>>0;if(!l(e))throw new TypeError;for(;++o<i;)o in n&&e.call(r,n[o],o,t)}},(m=o.forEach,g=!0,y=!0,m&&(m.call("foo",function(e,t,n){"object"!=typeof n&&(g=!1)}),m.call([1],function(){y="string"==typeof this},"x")),!(m&&g&&y)));var w=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);p(o,{indexOf:function(e){var t=x&&f(this)?this.split(""):h(this),n=t.length>>>0;if(!n)return-1;var r,o,i=0;for(arguments.length>1&&(r=arguments[1],o=void 0,(o=+r)!=o?o=0:0!==o&&o!==1/0&&o!==-1/0&&(o=(o>0||-1)*Math.floor(Math.abs(o))),i=o),i=i>=0?i:Math.max(0,n+i);i<n;i++)if(i in t&&t[i]===e)return i;return-1}},w);var E,T=a.split;2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?(E=void 0===/()??/.exec("")[1],a.split=function(e,t){var n=this;if(void 0===e&&0===t)return[];if("[object RegExp]"!==c.call(e))return T.call(this,e,t);var r,i,s,a,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":""),f=0;for(e=new RegExp(e.source,l+"g"),n+="",E||(r=new RegExp("^"+e.source+"$(?!\\s)",l)),t=void 0===t?-1>>>0:t>>>0;(i=e.exec(n))&&!((s=i.index+i[0].length)>f&&(u.push(n.slice(f,i.index)),!E&&i.length>1&&i[0].replace(r,function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(i[e]=void 0)}),i.length>1&&i.index<n.length&&o.push.apply(u,i.slice(1)),a=i[0].length,f=s,u.length>=t));)e.lastIndex===i.index&&e.lastIndex++;return f===n.length?!a&&e.test("")||u.push(""):u.push(n.slice(f)),u.length>t?u.slice(0,t):u}):"0".split(void 0,0).length&&(a.split=function(e,t){return void 0===e&&0===t?[]:T.call(this,e,t)});var j=a.substr,C="".substr&&"b"!=="0b".substr(-1);p(a,{substr:function(e,t){return j.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},C)},{}],16:[function(e,t,n){"use strict";t.exports=[e("./transport/websocket"),e("./transport/xhr-streaming"),e("./transport/xdr-streaming"),e("./transport/eventsource"),e("./transport/lib/iframe-wrap")(e("./transport/eventsource")),e("./transport/htmlfile"),e("./transport/lib/iframe-wrap")(e("./transport/htmlfile")),e("./transport/xhr-polling"),e("./transport/xdr-polling"),e("./transport/lib/iframe-wrap")(e("./transport/xhr-polling")),e("./transport/jsonp-polling")]},{"./transport/eventsource":20,"./transport/htmlfile":21,"./transport/jsonp-polling":23,"./transport/lib/iframe-wrap":26,"./transport/websocket":38,"./transport/xdr-polling":39,"./transport/xdr-streaming":40,"./transport/xhr-polling":41,"./transport/xhr-streaming":42}],17:[function(e,n,r){(function(t,r){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("../../utils/event"),a=e("../../utils/url"),u=r.XMLHttpRequest,c=function(){};function l(e,t,n,r){c(e,t);var i=this;o.call(this),setTimeout(function(){i._start(e,t,n,r)},0)}"production"!==t.env.NODE_ENV&&(c=e("debug")("sockjs-client:browser:xhr")),i(l,o),l.prototype._start=function(e,t,n,r){var o=this;try{this.xhr=new u}catch(e){}if(!this.xhr)return c("no xhr"),this.emit("finish",0,"no xhr support"),void this._cleanup();t=a.addQuery(t,"t="+ +new Date),this.unloadRef=s.unloadAdd(function(){c("unload cleanup"),o._cleanup(!0)});try{this.xhr.open(e,t,!0),this.timeout&&"timeout"in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){c("xhr timeout"),o.emit("finish",0,""),o._cleanup(!1)})}catch(e){return c("exception",e),this.emit("finish",0,""),void this._cleanup(!1)}if(r&&r.noCredentials||!l.supportsCORS||(c("withCredentials"),this.xhr.withCredentials="true"),r&&r.headers)for(var i in r.headers)this.xhr.setRequestHeader(i,r.headers[i]);this.xhr.onreadystatechange=function(){if(o.xhr){var e,t,n=o.xhr;switch(c("readyState",n.readyState),n.readyState){case 3:try{t=n.status,e=n.responseText}catch(e){}c("status",t),1223===t&&(t=204),200===t&&e&&e.length>0&&(c("chunk"),o.emit("chunk",t,e));break;case 4:t=n.status,c("status",t),1223===t&&(t=204),12005!==t&&12029!==t||(t=0),c("finish",t,n.responseText),o.emit("finish",t,n.responseText),o._cleanup(!1)}}};try{o.xhr.send(n)}catch(e){o.emit("finish",0,""),o._cleanup(!1)}},l.prototype._cleanup=function(e){if(c("cleanup"),this.xhr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},l.prototype.close=function(){c("close"),this._cleanup(!0)},l.enabled=!!u;var f=["Active"].concat("Object").join("X");!l.enabled&&f in r&&(c("overriding xmlhttprequest"),u=function(){try{return new r[f]("Microsoft.XMLHTTP")}catch(e){return null}},l.enabled=!!new u);var d=!1;try{d="withCredentials"in new u}catch(e){}l.supportsCORS=d,n.exports=l}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],18:[function(e,n,r){(function(e){n.exports=e.EventSource}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],19:[function(e,n,r){(function(e){"use strict";var t=e.WebSocket||e.MozWebSocket;n.exports=t?function(e){return new t(e)}:void 0}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],20:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/eventsource"),s=e("./sender/xhr-cors"),a=e("eventsource");function u(e){if(!u.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/eventsource",i,s)}r(u,o),u.enabled=function(){return!!a},u.transportName="eventsource",u.roundTrips=2,t.exports=u},{"./lib/ajax-based":24,"./receiver/eventsource":29,"./sender/xhr-cors":35,eventsource:18,inherits:57}],21:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./receiver/htmlfile"),i=e("./sender/xhr-local"),s=e("./lib/ajax-based");function a(e){if(!o.enabled)throw new Error("Transport created when disabled");s.call(this,e,"/htmlfile",o,i)}r(a,s),a.enabled=function(e){return o.enabled&&e.sameOrigin},a.transportName="htmlfile",a.roundTrips=2,t.exports=a},{"./lib/ajax-based":24,"./receiver/htmlfile":30,"./sender/xhr-local":37,inherits:57}],22:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("json3"),i=e("events").EventEmitter,s=e("../version"),a=e("../utils/url"),u=e("../utils/iframe"),c=e("../utils/event"),l=e("../utils/random"),f=function(){};function d(e,t,n){if(!d.enabled())throw new Error("Transport created when disabled");i.call(this);var r=this;this.origin=a.getOrigin(n),this.baseUrl=n,this.transUrl=t,this.transport=e,this.windowId=l.string(8);var o=a.addPath(n,"/iframe.html")+"#"+this.windowId;f(e,t,o),this.iframeObj=u.createIframe(o,function(e){f("err callback"),r.emit("close",1006,"Unable to load an iframe ("+e+")"),r.close()}),this.onmessageCallback=this._message.bind(this),c.attachEvent("message",this.onmessageCallback)}"production"!==n.env.NODE_ENV&&(f=e("debug")("sockjs-client:transport:iframe")),r(d,i),d.prototype.close=function(){if(f("close"),this.removeAllListeners(),this.iframeObj){c.detachEvent("message",this.onmessageCallback);try{this.postMessage("c")}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},d.prototype._message=function(e){if(f("message",e.data),a.isOriginEqual(e.origin,this.origin)){var t;try{t=o.parse(e.data)}catch(t){return void f("bad json",e.data)}if(t.windowId===this.windowId)switch(t.type){case"s":this.iframeObj.loaded(),this.postMessage("s",o.stringify([s,this.transport,this.transUrl,this.baseUrl]));break;case"t":this.emit("message",t.data);break;case"c":var n;try{n=o.parse(t.data)}catch(e){return void f("bad json",t.data)}this.emit("close",n[0],n[1]),this.close()}else f("mismatched window id",t.windowId,this.windowId)}else f("not same origin",e.origin,this.origin)},d.prototype.postMessage=function(e,t){f("postMessage",e,t),this.iframeObj.post(o.stringify({windowId:this.windowId,type:e,data:t||""}),this.origin)},d.prototype.send=function(e){f("send",e),this.postMessage("m",e)},d.enabled=function(){return u.iframeEnabled},d.transportName="iframe",d.roundTrips=2,t.exports=d}).call(this,{env:{}})},{"../utils/event":46,"../utils/iframe":47,"../utils/random":50,"../utils/url":52,"../version":53,debug:55,events:3,inherits:57,json3:58}],23:[function(e,n,r){(function(t){"use strict";var r=e("inherits"),o=e("./lib/sender-receiver"),i=e("./receiver/jsonp"),s=e("./sender/jsonp");function a(e){if(!a.enabled())throw new Error("Transport created when disabled");o.call(this,e,"/jsonp",s,i)}r(a,o),a.enabled=function(){return!!t.document},a.transportName="jsonp-polling",a.roundTrips=1,a.needBody=!0,n.exports=a}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/sender-receiver":28,"./receiver/jsonp":31,"./sender/jsonp":33,inherits:57}],24:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("../../utils/url"),i=e("./sender-receiver"),s=function(){};function a(e,t,n,r){i.call(this,e,t,function(e){return function(t,n,r){s("create ajax sender",t,n);var i={};"string"==typeof n&&(i.headers={"Content-type":"text/plain"});var a=o.addPath(t,"/xhr_send"),u=new e("POST",a,n,i);return u.once("finish",function(e){if(s("finish",e),u=null,200!==e&&204!==e)return r(new Error("http status "+e));r()}),function(){s("abort"),u.close(),u=null;var e=new Error("Aborted");e.code=1e3,r(e)}}}(r),n,r)}"production"!==n.env.NODE_ENV&&(s=e("debug")("sockjs-client:ajax-based")),r(a,i),t.exports=a}).call(this,{env:{}})},{"../../utils/url":52,"./sender-receiver":28,debug:55,inherits:57}],25:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t){i(e),o.call(this),this.sendBuffer=[],this.sender=t,this.url=e}"production"!==n.env.NODE_ENV&&(i=e("debug")("sockjs-client:buffered-sender")),r(s,o),s.prototype.send=function(e){i("send",e),this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},s.prototype.sendScheduleWait=function(){i("sendScheduleWait");var e,t=this;this.sendStop=function(){i("sendStop"),t.sendStop=null,clearTimeout(e)},e=setTimeout(function(){i("timeout"),t.sendStop=null,t.sendSchedule()},25)},s.prototype.sendSchedule=function(){i("sendSchedule",this.sendBuffer.length);var e=this;if(this.sendBuffer.length>0){var t="["+this.sendBuffer.join(",")+"]";this.sendStop=this.sender(this.url,t,function(t){e.sendStop=null,t?(i("error",t),e.emit("close",t.code||1006,"Sending error: "+t),e.close()):e.sendScheduleWait()}),this.sendBuffer=[]}},s.prototype._cleanup=function(){i("_cleanup"),this.removeAllListeners()},s.prototype.close=function(){i("close"),this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],26:[function(e,n,r){(function(t){"use strict";var r=e("inherits"),o=e("../iframe"),i=e("../../utils/object");n.exports=function(e){function n(t,n){o.call(this,e.transportName,t,n)}return r(n,o),n.enabled=function(n,r){if(!t.document)return!1;var s=i.extend({},r);return s.sameOrigin=!0,e.enabled(s)&&o.enabled()},n.transportName="iframe-"+e.transportName,n.needBody=!0,n.roundTrips=o.roundTrips+e.roundTrips-1,n.facadeTransport=e,n}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/object":49,"../iframe":22,inherits:57}],27:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t,n){i(t),o.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=n,this._scheduleReceiver()}"production"!==n.env.NODE_ENV&&(i=e("debug")("sockjs-client:polling")),r(s,o),s.prototype._scheduleReceiver=function(){i("_scheduleReceiver");var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on("message",function(t){i("message",t),e.emit("message",t)}),t.once("close",function(n,r){i("close",n,r,e.pollIsClosing),e.poll=t=null,e.pollIsClosing||("network"===r?e._scheduleReceiver():(e.emit("close",n||1006,r),e.removeAllListeners()))})},s.prototype.abort=function(){i("abort"),this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],28:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("../../utils/url"),i=e("./buffered-sender"),s=e("./polling"),a=function(){};function u(e,t,n,r,u){var c=o.addPath(e,t);a(c);var l=this;i.call(this,e,n),this.poll=new s(r,c,u),this.poll.on("message",function(e){a("poll message",e),l.emit("message",e)}),this.poll.once("close",function(e,t){a("poll close",e,t),l.poll=null,l.emit("close",e,t),l.close()})}"production"!==n.env.NODE_ENV&&(a=e("debug")("sockjs-client:sender-receiver")),r(u,i),u.prototype.close=function(){i.prototype.close.call(this),a("close"),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},t.exports=u}).call(this,{env:{}})},{"../../utils/url":52,"./buffered-sender":25,"./polling":27,debug:55,inherits:57}],29:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=e("eventsource"),s=function(){};function a(e){s(e),o.call(this);var t=this,n=this.es=new i(e);n.onmessage=function(e){s("message",e.data),t.emit("message",decodeURI(e.data))},n.onerror=function(e){s("error",n.readyState,e);var r=2!==n.readyState?"network":"permanent";t._cleanup(),t._close(r)}}"production"!==n.env.NODE_ENV&&(s=e("debug")("sockjs-client:receiver:eventsource")),r(a,o),a.prototype.abort=function(){s("abort"),this._cleanup(),this._close("user")},a.prototype._cleanup=function(){s("cleanup");var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){s("close",e);var t=this;setTimeout(function(){t.emit("close",null,e),t.removeAllListeners()},200)},t.exports=a}).call(this,{env:{}})},{debug:55,events:3,eventsource:18,inherits:57}],30:[function(e,n,r){(function(t,r){"use strict";var o=e("inherits"),i=e("../../utils/iframe"),s=e("../../utils/url"),a=e("events").EventEmitter,u=e("../../utils/random"),c=function(){};function l(e){c(e),a.call(this);var t=this;i.polluteGlobalNamespace(),this.id="a"+u.string(6),e=s.addQuery(e,"c="+decodeURIComponent(i.WPrefix+"."+this.id)),c("using htmlfile",l.htmlfileEnabled);var n=l.htmlfileEnabled?i.createHtmlfile:i.createIframe;r[i.WPrefix][this.id]={start:function(){c("start"),t.iframeObj.loaded()},message:function(e){c("message",e),t.emit("message",e)},stop:function(){c("stop"),t._cleanup(),t._close("network")}},this.iframeObj=n(e,function(){c("callback"),t._cleanup(),t._close("permanent")})}"production"!==t.env.NODE_ENV&&(c=e("debug")("sockjs-client:receiver:htmlfile")),o(l,a),l.prototype.abort=function(){c("abort"),this._cleanup(),this._close("user")},l.prototype._cleanup=function(){c("_cleanup"),this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete r[i.WPrefix][this.id]},l.prototype._close=function(e){c("_close",e),this.emit("close",null,e),this.removeAllListeners()},l.htmlfileEnabled=!1;var f=["Active"].concat("Object").join("X");if(f in r)try{l.htmlfileEnabled=!!new r[f]("htmlfile")}catch(e){}l.enabled=l.htmlfileEnabled||i.iframeEnabled,n.exports=l}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],31:[function(e,n,r){(function(t,r){"use strict";var o=e("../../utils/iframe"),i=e("../../utils/random"),s=e("../../utils/browser"),a=e("../../utils/url"),u=e("inherits"),c=e("events").EventEmitter,l=function(){};function f(e){l(e);var t=this;c.call(this),o.polluteGlobalNamespace(),this.id="a"+i.string(6);var n=a.addQuery(e,"c="+encodeURIComponent(o.WPrefix+"."+this.id));r[o.WPrefix][this.id]=this._callback.bind(this),this._createScript(n),this.timeoutId=setTimeout(function(){l("timeout"),t._abort(new Error("JSONP script loaded abnormally (timeout)"))},f.timeout)}"production"!==t.env.NODE_ENV&&(l=e("debug")("sockjs-client:receiver:jsonp")),u(f,c),f.prototype.abort=function(){if(l("abort"),r[o.WPrefix][this.id]){var e=new Error("JSONP user aborted read");e.code=1e3,this._abort(e)}},f.timeout=35e3,f.scriptErrorTimeout=1e3,f.prototype._callback=function(e){l("_callback",e),this._cleanup(),this.aborting||(e&&(l("message",e),this.emit("message",e)),this.emit("close",null,"network"),this.removeAllListeners())},f.prototype._abort=function(e){l("_abort",e),this._cleanup(),this.aborting=!0,this.emit("close",e.code,e.message),this.removeAllListeners()},f.prototype._cleanup=function(){if(l("_cleanup"),clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete r[o.WPrefix][this.id]},f.prototype._scriptError=function(){l("_scriptError");var e=this;this.errorTimer||(this.errorTimer=setTimeout(function(){e.loadedOkay||e._abort(new Error("JSONP script loaded abnormally (onerror)"))},f.scriptErrorTimeout))},f.prototype._createScript=function(e){l("_createScript",e);var t,n=this,o=this.script=r.document.createElement("script");if(o.id="a"+i.string(8),o.src=e,o.type="text/javascript",o.charset="UTF-8",o.onerror=this._scriptError.bind(this),o.onload=function(){l("onload"),n._abort(new Error("JSONP script loaded abnormally (onload)"))},o.onreadystatechange=function(){if(l("onreadystatechange",o.readyState),/loaded|closed/.test(o.readyState)){if(o&&o.htmlFor&&o.onclick){n.loadedOkay=!0;try{o.onclick()}catch(e){}}o&&n._abort(new Error("JSONP script loaded abnormally (onreadystatechange)"))}},void 0===o.async&&r.document.attachEvent)if(s.isOpera())(t=this.script2=r.document.createElement("script")).text="try{var a = document.getElementById('"+o.id+"'); if(a)a.onerror();}catch(x){};",o.async=t.async=!1;else{try{o.htmlFor=o.id,o.event="onclick"}catch(e){}o.async=!0}void 0!==o.async&&(o.async=!0);var a=r.document.getElementsByTagName("head")[0];a.insertBefore(o,a.firstChild),t&&a.insertBefore(t,a.firstChild)},n.exports=f}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/iframe":47,"../../utils/random":50,"../../utils/url":52,debug:55,events:3,inherits:57}],32:[function(e,t,n){(function(n){"use strict";var r=e("inherits"),o=e("events").EventEmitter,i=function(){};function s(e,t){i(e),o.call(this);var n=this;this.bufferPosition=0,this.xo=new t("POST",e,null),this.xo.on("chunk",this._chunkHandler.bind(this)),this.xo.once("finish",function(e,t){i("finish",e,t),n._chunkHandler(e,t),n.xo=null;var r=200===e?"network":"permanent";i("close",r),n.emit("close",null,r),n._cleanup()})}"production"!==n.env.NODE_ENV&&(i=e("debug")("sockjs-client:receiver:xhr")),r(s,o),s.prototype._chunkHandler=function(e,t){if(i("_chunkHandler",e),200===e&&t)for(var n=-1;;this.bufferPosition+=n+1){var r=t.slice(this.bufferPosition);if(-1===(n=r.indexOf("\n")))break;var o=r.slice(0,n);o&&(i("message",o),this.emit("message",o))}},s.prototype._cleanup=function(){i("_cleanup"),this.removeAllListeners()},s.prototype.abort=function(){i("abort"),this.xo&&(this.xo.close(),i("close"),this.emit("close",null,"user"),this.xo=null),this._cleanup()},t.exports=s}).call(this,{env:{}})},{debug:55,events:3,inherits:57}],33:[function(e,n,r){(function(t,r){"use strict";var o,i,s=e("../../utils/random"),a=e("../../utils/url"),u=function(){};"production"!==t.env.NODE_ENV&&(u=e("debug")("sockjs-client:sender:jsonp")),n.exports=function(e,t,n){u(e,t),o||(u("createForm"),(o=r.document.createElement("form")).style.display="none",o.style.position="absolute",o.method="POST",o.enctype="application/x-www-form-urlencoded",o.acceptCharset="UTF-8",(i=r.document.createElement("textarea")).name="d",o.appendChild(i),r.document.body.appendChild(o));var c="a"+s.string(8);o.target=c,o.action=a.addQuery(a.addPath(e,"/jsonp_send"),"i="+c);var l=function(e){u("createIframe",e);try{return r.document.createElement('<iframe name="'+e+'">')}catch(n){var t=r.document.createElement("iframe");return t.name=e,t}}(c);l.id=c,l.style.display="none",o.appendChild(l);try{i.value=t}catch(e){}o.submit();var f=function(e){u("completed",c,e),l.onerror&&(l.onreadystatechange=l.onerror=l.onload=null,setTimeout(function(){u("cleaning up",c),l.parentNode.removeChild(l),l=null},500),i.value="",n(e))};return l.onerror=function(){u("onerror",c),f()},l.onload=function(){u("onload",c),f()},l.onreadystatechange=function(e){u("onreadystatechange",c,l.readyState,e),"complete"===l.readyState&&f()},function(){u("aborted",c),f(new Error("Aborted"))}}}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/random":50,"../../utils/url":52,debug:55}],34:[function(e,n,r){(function(t,r){"use strict";var o=e("events").EventEmitter,i=e("inherits"),s=e("../../utils/event"),a=e("../../utils/browser"),u=e("../../utils/url"),c=function(){};function l(e,t,n){c(e,t);var r=this;o.call(this),setTimeout(function(){r._start(e,t,n)},0)}"production"!==t.env.NODE_ENV&&(c=e("debug")("sockjs-client:sender:xdr")),i(l,o),l.prototype._start=function(e,t,n){c("_start");var o=this,i=new r.XDomainRequest;t=u.addQuery(t,"t="+ +new Date),i.onerror=function(){c("onerror"),o._error()},i.ontimeout=function(){c("ontimeout"),o._error()},i.onprogress=function(){c("progress",i.responseText),o.emit("chunk",200,i.responseText)},i.onload=function(){c("load"),o.emit("finish",200,i.responseText),o._cleanup(!1)},this.xdr=i,this.unloadRef=s.unloadAdd(function(){o._cleanup(!0)});try{this.xdr.open(e,t),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(n)}catch(e){this._error()}},l.prototype._error=function(){this.emit("finish",0,""),this._cleanup(!1)},l.prototype._cleanup=function(e){if(c("cleanup",e),this.xdr){if(this.removeAllListeners(),s.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},l.prototype.close=function(){c("close"),this._cleanup(!0)},l.enabled=!(!r.XDomainRequest||!a.hasDomain()),n.exports=l}).call(this,{env:{}},void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../utils/browser":44,"../../utils/event":46,"../../utils/url":52,debug:55,events:3,inherits:57}],35:[function(e,t,n){"use strict";var r=e("inherits"),o=e("../driver/xhr");function i(e,t,n,r){o.call(this,e,t,n,r)}r(i,o),i.enabled=o.enabled&&o.supportsCORS,t.exports=i},{"../driver/xhr":17,inherits:57}],36:[function(e,t,n){"use strict";var r=e("events").EventEmitter,o=e("inherits");function i(){var e=this;r.call(this),this.to=setTimeout(function(){e.emit("finish",200,"{}")},i.timeout)}o(i,r),i.prototype.close=function(){clearTimeout(this.to)},i.timeout=2e3,t.exports=i},{events:3,inherits:57}],37:[function(e,t,n){"use strict";var r=e("inherits"),o=e("../driver/xhr");function i(e,t,n){o.call(this,e,t,n,{noCredentials:!0})}r(i,o),i.enabled=o.enabled,t.exports=i},{"../driver/xhr":17,inherits:57}],38:[function(e,t,n){(function(n){"use strict";var r=e("../utils/event"),o=e("../utils/url"),i=e("inherits"),s=e("events").EventEmitter,a=e("./driver/websocket"),u=function(){};function c(e,t,n){if(!c.enabled())throw new Error("Transport created when disabled");s.call(this),u("constructor",e);var i=this,l=o.addPath(e,"/websocket");l="https"===l.slice(0,5)?"wss"+l.slice(5):"ws"+l.slice(4),this.url=l,this.ws=new a(this.url,[],n),this.ws.onmessage=function(e){u("message event",e.data),i.emit("message",e.data)},this.unloadRef=r.unloadAdd(function(){u("unload"),i.ws.close()}),this.ws.onclose=function(e){u("close event",e.code,e.reason),i.emit("close",e.code,e.reason),i._cleanup()},this.ws.onerror=function(e){u("error event",e),i.emit("close",1006,"WebSocket connection broken"),i._cleanup()}}"production"!==n.env.NODE_ENV&&(u=e("debug")("sockjs-client:websocket")),i(c,s),c.prototype.send=function(e){var t="["+e+"]";u("send",t),this.ws.send(t)},c.prototype.close=function(){u("close");var e=this.ws;this._cleanup(),e&&e.close()},c.prototype._cleanup=function(){u("_cleanup");var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),r.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},c.enabled=function(){return u("enabled"),!!a},c.transportName="websocket",c.roundTrips=2,t.exports=c}).call(this,{env:{}})},{"../utils/event":46,"../utils/url":52,"./driver/websocket":19,debug:55,events:3,inherits:57}],39:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./xdr-streaming"),s=e("./receiver/xhr"),a=e("./sender/xdr");function u(e){if(!a.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr",s,a)}r(u,o),u.enabled=i.enabled,u.transportName="xdr-polling",u.roundTrips=2,t.exports=u},{"./lib/ajax-based":24,"./receiver/xhr":32,"./sender/xdr":34,"./xdr-streaming":40,inherits:57}],40:[function(e,t,n){"use strict";var r=e("inherits"),o=e("./lib/ajax-based"),i=e("./receiver/xhr"),s=e("./sender/xdr");function a(e){if(!s.enabled)throw new Error("Transport created when disabled");o.call(this,e,"/xhr_streaming",i,s)}r(a,o),a.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&s.enabled&&e.sameScheme},a.transportName="xdr-stre