1function _get(){return(_get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var o=_superPropBase(e,t);if(o)return(o=Object.getOwnPropertyDescriptor(o,t)).get?o.get.call(arguments.length<3?e:n):o.value}).apply(this,arguments)}function _superPropBase(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=_getPrototypeOf(e)););return e}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_setPrototypeOf(e,t)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _createSuper(n){var o=_isNativeReflectConstruct();return function(){var e,t=_getPrototypeOf(n);return _possibleConstructorReturn(this,o?(e=_getPrototypeOf(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments))}}function _possibleConstructorReturn(e,t){if(t&&("object"===_typeof2(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(e)}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function _isNativeReflectConstruct(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function _regeneratorRuntime(){"use strict";_regeneratorRuntime=function(){return c};var c={},e=Object.prototype,a=e.hasOwnProperty,u=Object.defineProperty||function(e,t,n){e[t]=n.value},t="function"==typeof Symbol?Symbol:{},o=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(e){i=function(e,t,n){return e[t]=n}}function s(e,t,n,o){var r,i,c,s,t=t&&t.prototype instanceof d?t:d,t=Object.create(t.prototype),o=new k(o||[]);return u(t,"_invoke",{value:(r=e,i=n,c=o,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return w()}for(c.method=e,c.arg=t;;){var n=c.delegate;if(n){n=function e(t,n){var o=n.method,r=t.iterator[o];if(void 0===r)return n.delegate=null,"throw"===o&&t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),h;o=l(r,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;r=o.arg;return r?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,h):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}(n,c);if(n){if(n===h)continue;return n}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===s)throw s="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);s="executing";n=l(r,i,c);if("normal"===n.type){if(s=c.done?"completed":"suspendedYield",n.arg===h)continue;return{value:n.arg,done:c.done}}"throw"===n.type&&(s="completed",c.method="throw",c.arg=n.arg)}})}),t}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}c.wrap=s;var h={};function d(){}function f(){}function y(){}var t={},p=(i(t,o,function(){return this}),Object.getPrototypeOf),p=p&&p(p(S([]))),m=(p&&p!==e&&a.call(p,o)&&(t=p),y.prototype=d.prototype=Object.create(t));function g(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function v(c,s){var t;u(this,"_invoke",{value:function(n,o){function e(){return new s(function(e,t){!function t(e,n,o,r){var i,e=l(c[e],c,n);if("throw"!==e.type)return(n=(i=e.arg).value)&&"object"==_typeof2(n)&&a.call(n,"__await")?s.resolve(n.__await).then(function(e){t("next",e,o,r)},function(e){t("throw",e,o,r)}):s.resolve(n).then(function(e){i.value=e,o(i)},function(e){return t("throw",e,o,r)});r(e.arg)}(n,o,e,t)})}return t=t?t.then(e,e):e()}})}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function k(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function S(t){if(t){var n,e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(a.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e}).next=e}return{next:w}}function w(){return{value:void 0,done:!0}}return u(m,"constructor",{value:f.prototype=y,configurable:!0}),u(y,"constructor",{value:f,configurable:!0}),f.displayName=i(y,r,"GeneratorFunction"),c.isGeneratorFunction=function(e){e="function"==typeof e&&e.constructor;return!!e&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e.__proto__=y,i(e,r,"GeneratorFunction")),e.prototype=Object.create(m),e},c.awrap=function(e){return{__await:e}},g(v.prototype),i(v.prototype,n,function(){return this}),c.AsyncIterator=v,c.async=function(e,t,n,o,r){void 0===r&&(r=Promise);var i=new v(s(e,t,n,o),r);return c.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},g(m),i(m,r,"Generator"),i(m,o,function(){return this}),i(m,"toString",function(){return"[object Generator]"}),c.keys=function(e){var t,n=Object(e),o=[];for(t in n)o.push(t);return o.reverse(),function e(){for(;o.length;){var t=o.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},c.values=S,k.prototype={constructor:k,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
1h(b),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var o=this;function e(e,t){return i.type="throw",i.arg=n,o.next=e,t&&(o.method="next",o.arg=void 0),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t],i=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var c=a.call(r,"catchLoc"),s=a.call(r,"finallyLoc");if(c&&s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}var i=(r=r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc?null:r)?r.completion:{};return i.type=e,i.arg=t,r?(this.method="next",this.next=r.finallyLoc,h):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,o,r=this.tryEntries[t];if(r.tryLoc===e)return"throw"===(n=r.completion).type&&(o=n.arg,b(r)),o}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:S(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},c}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i,c,s=[],a=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;a=!1}else for(;!(a=(o=i.call(n)).done)&&(s.push(o.value),s.length!==t);a=!0);}catch(e){u=!0,r=e}finally{try{if(!a&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(u)throw r}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var n,o,r,i,c="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(c)return o=!(n=!0),{s:function(){c=c.call(e)},n:function(){var e=c.next();return n=e.done,e},e:function(e){o=!0,r=e},f:function(){try{n||null==c.return||c.return()}finally{if(o)throw r}}};if(Array.isArray(e)||(c=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return c&&(e=c),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"===_typeof2(e)?e:String(e)}function _toPrimitive(e,t){if("object"!==_typeof2(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!==_typeof2(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _typeof2(e){return(_typeof2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==_typeof2(Symbol.iterator)?function(e){return _typeof2(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":_typeof2(e)})(e)}!function(e,t){"object"==("undefined"==typeof exports?"undefined":_typeof2(exports))&&"object"==("undefined"==typeof module?"undefined":_typeof2(module))?module.exports=t():"function"==typeof define&&define.amd?define("StompJs",[],t):"object"==("undefined"==typeof exports?"undefined":_typeof2(exports))?exports.StompJs=t():e.StompJs=t()}("undefined"!=typeof self?self:this,function(){return n=[function(e,t,n){e.exports=n(1)},function(e,t,n){"use strict";n.r(t),n.d(t,"Client",function(){return l}),n.d(t,"FrameImpl",function(){return s}),n.d(t,"Parser",function(){return c}),n.d(t,"StompConfig",function(){return h}),n.d(t,"StompHeaders",function(){return d}),n.d(t,"StompSubscription",function(){return f}),n.d(t,"StompSocketState",function(){return r}),n.d(t,"ActivationState",function(){return i}),n.d(t,"Versions",function(){return a}),n.d(t,"CompatClient",function(){return p}),n.d(t,"Stomp",function(){return m});function o(e,c,s,a){return new(s=s||Promise)(function(n,t){function o(e){try{i(a.next(e))}catch(e){t(e)}}function r(e){try{i(a.throw(e))}catch(e){t(e)}}function i(e){var t;e.done?n(e.value):((t=e.value)instanceof s?t:new s(function(e){e(t)})).then(o,r)}i((a=a.apply(e,c||[])).next())})}var r,i,s=function(){function u(e){_classCallCheck(this,u);var t=e.command,n=e.headers,o=e.body,r=e.binaryBody,i=e.escapeHeaderValues,e=e.skipContentLengthHeader;this.command=t,this.headers=Object.assign({},n||{}),r?(this._binaryBody=r,this.isBinaryBody=!0):(this._body=o||"",this.isBinaryBody=!1),this.escapeHeaderValues=i||!1,this.skipContentLengthHeader=e||!1}return _createClass(u,[{key:"body",get:function(){return!this._body&&this.isBinaryBody&&(this._body=(new TextDecoder).decode(this._binaryBody)),this._body}},{key:"binaryBody",get:function(){return this._binaryBody||this.isBinaryBody||(this._binaryBody=(new TextEncoder).encode(this._body)),this._binaryBody}},{key:"toString",value:function(){return this.serializeCmdAndHeaders()}},{key:"serialize",value:function(){var e=this.serializeCmdAndHeaders();return this.isBinaryBody?u.toUnit8Array(e,this._binaryBody).buffer:e+this._body+"\0"}},{key:"serializeCmdAndHeaders",value:function(){var e=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(var t=0,n=Object.keys(this.headers||{});t<n.length;t++){var o=n[t],r=this.headers[o];this.escapeHeaderValues&&"CONNECT"!==this.command&&"CONNECTED"!==this.command?e.push("".concat(o,":").concat(u.hdrValueEscape(""+r))):e.push("".concat(o,":").concat(r))}return!this.isBinaryBody&&(this.isBodyEmpty()||this.skipContentLengthHeader)||e.push("content-length:"+this.bodyLength()),e.join("\n")+"\n\n"}},{key:"isBodyEmpty",value:function(){return 0===this.bodyLength()}},{key:"bodyLength",value:function(){var e=this.binaryBody;return e?e.length:0}}],[{key:"fromRawFrame",value:function(e,t){function n(e){return e.replace(/^\s+|\s+$/g,"")}var o,r={},i=_createForOfIteratorHelper(e.headers.reverse());try{for(i.s();!(o=i.n()).done;){var c=o.value,s=(c.indexOf(":"),n(c[0])),a=n(c[1]);t&&"CONNECT"!==e.command&&"CONNECTED"!==e.command&&(a=u.hdrValueUnEscape(a)),r[s]=a}}catch(e){i.e(e)}finally{i.f()}return new u({command:e.command,headers:r,binaryBody:e.binaryBody,escapeHeaderValues:t})}},{key:"sizeOfUTF8",value:function(e){return e?(new TextEncoder).encode(e).length:0}},{key:"toUnit8Array",value:function(e,t){var e=(new TextEncoder).encode(e),n=new Uint8Array([0]),o=new Uint8Array(e.length+t.length+n.length);return o.set(e),o.set(t,e.length),o.set(n,e.length+t.length),o}},{key:"marshall",value:function(e){return new u(e).serialize()}},{key:"hdrValueEscape",value:function(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")}},{key:"hdrValueUnEscape",value:function(e){return e.replace(/\\r/g,"\r").replace(/\\n
1/g,"\n").replace(/\\c/g,":").replace(/\\\\/g,"\\")}}]),u}(),c=function(){function n(e,t){_classCallCheck(this,n),this.onFrame=e,this.onIncomingPing=t,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}return _createClass(n,[{key:"parseChunk",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=e instanceof ArrayBuffer?new Uint8Array(e):this._encoder.encode(e);t&&0!==n[n.length-1]&&((e=new Uint8Array(n.length+1)).set(n,0),e[n.length]=0,n=e);for(var o=0;o<n.length;o++){var r=n[o];this._onByte(r)}}},{key:"_collectFrame",value:function(e){0!==e&&13!==e&&(10!==e?(this._onByte=this._collectCommand,this._reinjectByte(e)):this.onIncomingPing())}},{key:"_collectCommand",value:function(e){if(13!==e)return 10===e?(this._results.command=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaders)):void this._consumeByte(e)}},{key:"_collectHeaders",value:function(e){13!==e&&(10!==e?(this._onByte=this._collectHeaderKey,this._reinjectByte(e)):this._setupCollectBody())}},{key:"_reinjectByte",value:function(e){this._onByte(e)}},{key:"_collectHeaderKey",value:function(e){58===e?(this._headerKey=this._consumeTokenAsUTF8(),this._onByte=this._collectHeaderValue):this._consumeByte(e)}},{key:"_collectHeaderValue",value:function(e){if(13!==e)return 10===e?(this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,void(this._onByte=this._collectHeaders)):void this._consumeByte(e)}},{key:"_setupCollectBody",value:function(){var e=this._results.headers.filter(function(e){return"content-length"===e[0]})[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}},{key:"_collectBodyNullTerminated",value:function(e){0!==e?this._consumeByte(e):this._retrievedBody()}},{key:"_collectBodyFixedSize",value:function(e){0!=this._bodyBytesRemaining--?this._consumeByte(e):this._retrievedBody()}},{key:"_retrievedBody",value:function(){this._results.binaryBody=this._consumeTokenAsRaw(),this.onFrame(this._results),this._initState()}},{key:"_consumeByte",value:function(e){this._token.push(e)}},{key:"_consumeTokenAsUTF8",value:function(){return this._decoder.decode(this._consumeTokenAsRaw())}},{key:"_consumeTokenAsRaw",value:function(){var e=new Uint8Array(this._token);return this._token=[],e}},{key:"_initState",value:function(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}}]),n}(),a=((n=r=r||{})[n.CONNECTING=0]="CONNECTING",n[n.OPEN=1]="OPEN",n[n.CLOSING=2]="CLOSING",n[n.CLOSED=3]="CLOSED",(t=i=i||{})[t.ACTIVE=0]="ACTIVE",t[t.DEACTIVATING=1]="DEACTIVATING",t[t.INACTIVE=2]="INACTIVE",function(){function t(e){_classCallCheck(this,t),this.versions=e}return _createClass(t,[{key:"supportedVersions",value:function(){return this.versions.join(",")}},{key:"protocolVersions",value:function(){return this.versions.map(function(e){return"v".concat(e.replace(".",""),".stomp")})}}]),t}()),u=(a.V1_0="1.0",a.V1_1="1.1",a.V1_2="1.2",a.default=new a([a.V1_0,a.V1_1,a.V1_2]),function(){function o(e,t){var i=this,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};_classCallCheck(this,o),this._client=e,this._webSocket=t,this._serverFrameHandlers={CONNECTED:function(e){i.debug("connected to server "+e.headers.server),i._connected=!0,i._connectedVersion=e.headers.version,i._connectedVersion===a.V1_2&&(i._escapeHeaderValues=!0),i._setupHeartbeat(e.headers),i.onConnect(e)},MESSAGE:function(e){var t=e.headers.subscription,n=i._subscriptions[t]||i.onUnhandledMessage,o=i,r=i._connectedVersion===a.V1_2?e.headers.ack:e.headers["message-id"];e.ack=function(){return o.ack(r,t,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})},e.nack=function(){return o.nack(r,t,0<arguments.length&&void 0!==arguments[0]?arguments[0]:{})},n(e)},RECEIPT:function(e){var t=i._receiptWatchers[e.headers["receipt-id"]];t?(t(e),delete i._receiptWatchers[e.headers["receipt-id"]]):i.onUnhandledReceipt(e)},ERROR:function(e){i.onStompError(e)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.configure(n)}
1return _createClass(o,[{key:"connectedVersion",get:function(){return this._connectedVersion}},{key:"connected",get:function(){return this._connected}},{key:"configure",value:function(e){Object.assign(this,e)}},{key:"start",value:function(){var n=this,o=new c(function(e){e=s.fromRawFrame(e,n._escapeHeaderValues);n.logRawCommunication||n.debug("<<< "+e),(n._serverFrameHandlers[e.command]||n.onUnhandledFrame)(e)},function(){n.debug("<<< PONG")});this._webSocket.onmessage=function(e){var t;n.debug("Received data"),n._lastServerActivityTS=Date.now(),n.logRawCommunication&&(t=e.data instanceof ArrayBuffer?(new TextDecoder).decode(e.data):e.data,n.debug("<<< "+t)),o.parseChunk(e.data,n.appendMissingNULLonIncoming)},this._onclose=function(e){n.debug("Connection closed to "+n._client.brokerURL),n._cleanUp(),n.onWebSocketClose(e)},this._webSocket.onclose=this._onclose,this._webSocket.onerror=function(e){n.onWebSocketError(e)},this._webSocket.onopen=function(){var e=Object.assign({},n.connectHeaders);n.debug("Web Socket Opened..."),e["accept-version"]=n.stompVersions.supportedVersions(),e["heart-beat"]=[n.heartbeatOutgoing,n.heartbeatIncoming].join(","),n._transmit({command:"CONNECT",headers:e})}}},{key:"_setupHeartbeat",value:function(e){var t,n,o=this;e.version!==a.V1_1&&e.version!==a.V1_2||e["heart-beat"]&&(t=(e=_slicedToArray(e["heart-beat"].split(",").map(function(e){return parseInt(e,10)}),2))[0],e=e[1],0!==this.heartbeatOutgoing&&0!==e&&(e=Math.max(this.heartbeatOutgoing,e),this.debug("send PING every ".concat(e,"ms")),this._pinger=setInterval(function(){o._webSocket.readyState===r.OPEN&&(o._webSocket.send("\n"),o.debug(">>> PING"))},e)),0!==this.heartbeatIncoming)&&0!==t&&(n=Math.max(this.heartbeatIncoming,t),this.debug("check PONG every ".concat(n,"ms")),this._ponger=setInterval(function(){var e=Date.now()-o._lastServerActivityTS;2*n<e&&(o.debug("did not receive server activity for the last ".concat(e,"ms")),o._closeOrDiscardWebsocket())},n))}},{key:"_closeOrDiscardWebsocket",value:function(){this.discardWebsocketOnCommFailure?(this.debug("Discarding websocket, the underlying socket may linger for a while"),this._discardWebsocket()):(this.debug("Issuing close on the websocket"),this._closeWebsocket())}},{key:"forceDisconnect",value:function(){!this._webSocket||this._webSocket.readyState!==r.CONNECTING&&this._webSocket.readyState!==r.OPEN||this._closeOrDiscardWebsocket()}},{key:"_closeWebsocket",value:function(){this._webSocket.onmessage=function(){},this._webSocket.close()}},{key:"_discardWebsocket",value:function(){var e,o,t=this;this._webSocket.terminate||(e=this._webSocket,o=function(e){return t.debug(e)},e.terminate=function(){function e(){}this.onerror=e,this.onmessage=e,this.onopen=e;var n=new Date,t=this.onclose;this.onclose=function(e){var t=(new Date).getTime()-n.getTime();o("Discarded socket closed after ".concat(t,"ms, with code/reason: ").concat(e.code,"/").concat(e.reason))},this.close(),t.call(this,{code:4001,reason:"Heartbeat failure, discarding the socket",wasClean:!1})}),this._webSocket.terminate()}},{key:"_transmit",value:function(e){var t=e.command,n=e.headers,o=e.body,r=e.binaryBody,e=e.skipContentLengthHeader,t=new s({command:t,headers:n,body:o,binaryBody:r,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:e}),n=t.serialize();if(this.logRawCommunication?this.debug(">>> "+n):this.debug(">>> "+t),"string"==typeof(n=this.forceBinaryWSFrames&&"string"==typeof n?(new TextEncoder).encode(n):n)&&this.splitLargeFrames)for(var i=n;0<i.length;){var c=i.substring(0,this.maxWebSocketChunkSize),i=i.substring(this.maxWebSocketChunkSize);this._webSocket.send(c),this.debug("chunk sent = ".concat(c.length,", remaining = ").concat(i.length))}else this._webSocket.send(n)}},{key:"dispose",value:function(){var t=this;if(this.connected)try{var e=Object.assign({},this.disconnectHeaders);e.receipt||(e.receipt="close-"+this._counter++),this.watchForReceipt(e.receipt,function(e){t._closeWebsocket(),t._cleanUp(),t.onDisconnect(e)}),this._transmit({command:"DISCONNECT",headers:e})}catch(e){this.debug("Ignoring error during disconnect "+e)}else this._webSocket.readyState!==r.CONNECTING&&this._webSocket.readyState!==r.OPEN||this._closeWebsocket()}},{key:"_cleanUp",value:function(){this._connected=!1,this._pinger&&clearInterval(this._pinger),this._ponger&&clearInterval(this._ponger)}},{key:"publish",value:function(e){var t=e.destination,n=e.headers,o=e.body,r=e.binaryBody,e=e.skipContentLengthHeader,t=Object.assign({destination:t},n);this._transmit({command:"SEND",headers:t,body:o,binaryBody:r,skipContentLengthHeader:e})}},{key:"watchForReceipt",value:function(e,t){this._receiptWatchers[e]=t}},{key:"subscribe",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=((n=Object.assign({},n)).id||(n.id="sub-"+this._counter++),n.destination=e,this._subscriptions[n.id]=t,this._transmit({command:"SUBSCRIBE",headers:n}),this);return{id:n.id,unsubscribe:function(e){return o.unsubscribe(n.id,e)}}}},{key:"unsubscribe",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},t=Object.assign({},t);delete this._subscriptions[e],t.id=e,this._transmit({command:"UNSUBSCRIBE",headers:t})}},{key:"begin",value:function(e){var t=e||"tx-"+this._counter++,n=(this._transmit({command:"BEGIN",headers:{transaction:t}}),this);return{id:t,commit:function(){n.commit(t)},abort:function(){n.abort(t)}}}},{key:"commit",value:function(e){this._transmit({command:"COMMIT",headers:{transaction:e}})}},{key:"abort",value:function(e){this._transmit({command:"ABORT",headers:{transaction:e}})}},{key:"ack",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=Object.assign({},n);this._connectedVersion===a.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"ACK",headers:n})}},{key:"nack",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},n=Object.assign({},n);return this._connectedVersion===a.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"NACK",headers:n})}}]),o}()),l=function(){function n(){function e(){}var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,n),this.stompVersions=a.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8192,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.state=i.INACTIVE;this.debug=e,this.beforeConnect=e,this.onConnect=e,this.onDisconnect=e,this.onUnhandledMessage=e,this.onUnhandledReceipt=e,this.onUnhandledFrame=e,this.onStompError=e,this.onWeb
1SocketClose=e,this.onWebSocketError=e,this.logRawCommunication=!1,this.onChangeState=e,this.connectHeaders={},this._disconnectHeaders={},this.configure(t)}return _createClass(n,[{key:"webSocket",get:function(){return this._stompHandler?this._stompHandler._webSocket:void 0}},{key:"disconnectHeaders",get:function(){return this._disconnectHeaders},set:function(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}},{key:"connected",get:function(){return!!this._stompHandler&&this._stompHandler.connected}},{key:"connectedVersion",get:function(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}},{key:"active",get:function(){return this.state===i.ACTIVE}},{key:"_changeState",value:function(e){this.state=e,this.onChangeState(e)}},{key:"configure",value:function(e){Object.assign(this,e)}},{key:"activate",value:function(){if(this.state===i.DEACTIVATING)throw this.debug("Still DEACTIVATING, please await call to deactivate before trying to re-activate"),new Error("Still DEACTIVATING, can not activate now");this.active?this.debug("Already ACTIVE, ignoring request to activate"):(this._changeState(i.ACTIVE),this._connect())}},{key:"_connect",value:function(){return o(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(this.connected)return e.abrupt("return",void this.debug("STOMP: already connected, nothing to do"));e.next=2;break;case 2:return e.next=4,this.beforeConnect();case 4:if(this.active){e.next=6;break}return e.abrupt("return",void this.debug("Client has been marked inactive, will not attempt to connect"));case 6:0<this.connectionTimeout&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout(function(){n.connected||(n.debug("Connection not established in ".concat(n.connectionTimeout,"ms, closing socket")),n.forceDisconnect())},this.connectionTimeout)),this.debug("Opening Web Socket..."),t=this._createWebSocket(),this._stompHandler=new u(this,t,{debug:this.debug,stompVersions:this.stompVersions,connectHeaders:this.connectHeaders,disconnectHeaders:this._disconnectHeaders,heartbeatIncoming:this.heartbeatIncoming,heartbeatOutgoing:this.heartbeatOutgoing,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:function(e){n._connectionWatcher&&(clearTimeout(n._connectionWatcher),n._connectionWatcher=void 0),n.active?n.onConnect(e):(n.debug("STOMP got connected while deactivate was issued, will disconnect now"),n._disposeStompHandler())},onDisconnect:function(e){n.onDisconnect(e)},onStompError:function(e){n.onStompError(e)},onWebSocketClose:function(e){n._stompHandler=void 0,n.state===i.DEACTIVATING&&(n._resolveSocketClose(),n._resolveSocketClose=void 0,n._changeState(i.INACTIVE)),n.onWebSocketClose(e),n.active&&n._schedule_reconnect()},onWebSocketError:function(e){n.onWebSocketError(e)},onUnhandledMessage:function(e){n.onUnhandledMessage(e)},onUnhandledReceipt:function(e){n.onUnhandledReceipt(e)},onUnhandledFrame:function(e){n.onUnhandledFrame(e)}}),this._stompHandler.start();case 9:case"end":return e.stop()}},e,this)}))}},{key:"_createWebSocket",value:function(){var e=this.webSocketFactory?this.webSocketFactory():new WebSocket(this.brokerURL,this.stompVersions.protocolVersions());return e.binaryType="arraybuffer",e}},{key:"_schedule_reconnect",value:function(){var e=this;0<this.reconnectDelay&&(this.debug("STOMP: scheduling reconnection in ".concat(this.reconnectDelay,"ms")),this._reconnector=setTimeout(function(){e._connect()},this.reconnectDelay))}},{key:"deactivate",value:function(){return o(this,void 0,void 0,_regeneratorRuntime().mark(function e(){var t,n=this;return _regeneratorRuntime().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.state!==i.ACTIVE?(this.debug("Already ".concat(i[this.state],", ignoring call to deactivate")),Promise.resolve()):(this._changeState(i.DEACTIVATING),this._reconnector&&clearTimeout(this._reconnector),this._stompHandler&&this.webSocket.readyState!==r.CLOSED?(t=ne
1w Promise(function(e,t){n._resolveSocketClose=e}),this._disposeStompHandler(),t):(this._changeState(i.INACTIVE),Promise.resolve())));case 1:case"end":return e.stop()}},e,this)}))}},{key:"forceDisconnect",value:function(){this._stompHandler&&this._stompHandler.forceDisconnect()}},{key:"_disposeStompHandler",value:function(){this._stompHandler&&(this._stompHandler.dispose(),this._stompHandler=null)}},{key:"publish",value:function(e){this._stompHandler.publish(e)}},{key:"watchForReceipt",value:function(e,t){this._stompHandler.watchForReceipt(e,t)}},{key:"subscribe",value:function(e,t){return this._stompHandler.subscribe(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{})}},{key:"unsubscribe",value:function(e){this._stompHandler.unsubscribe(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{})}},{key:"begin",value:function(e){return this._stompHandler.begin(e)}},{key:"commit",value:function(e){this._stompHandler.commit(e)}},{key:"abort",value:function(e){this._stompHandler.abort(e)}},{key:"ack",value:function(e,t){this._stompHandler.ack(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{})}},{key:"nack",value:function(e,t){this._stompHandler.nack(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:{})}}]),n}(),h=_createClass(function e(){_classCallCheck(this,e)}),d=_createClass(function e(){_classCallCheck(this,e)}),f=_createClass(function e(){_classCallCheck(this,e)}),y=function(){function t(e){_classCallCheck(this,t),this.client=e}return _createClass(t,[{key:"outgoing",get:function(){return this.client.heartbeatOutgoing},set:function(e){this.client.heartbeatOutgoing=e}},{key:"incoming",get:function(){return this.client.heartbeatIncoming},set:function(e){this.client.heartbeatIncoming=e}}]),t}(),p=function(){_inherits(o,l);var n=_createSuper(o);function o(e){var t;return _classCallCheck(this,o),(t=n.call(this)).maxWebSocketFrameSize=16384,t._heartbeatInfo=new y(_assertThisInitialized(t)),t.reconnect_delay=0,t.webSocketFactory=e,t.debug=function(){var e;(e=console).log.apply(e,arguments)},t}return _createClass(o,[{key:"_parseConnect",value:function(){for(var e,t,n,o={},r=arguments.length,i=new Array(r),c=0;c<r;c++)i[c]=arguments[c];if(i.length<2)throw new Error("Connect requires at least 2 arguments");return"function"==typeof i[1]?(o=i[0],t=i[1],n=i[2],e=i[3]):6===i.length?(o.login=i[0],o.passcode=i[1],t=i[2],n=i[3],e=i[4],o.host=i[5]):(o.login=i[0],o.passcode=i[1],t=i[2],n=i[3],e=i[4]),[o,t,n,e]}},{key:"connect",value:function(){var e=this._parseConnect.apply(this,arguments);e[0]&&(this.connectHeaders=e[0]),e[1]&&(this.onConnect=e[1]),e[2]&&(this.onStompError=e[2]),e[3]&&(this.onWebSocketClose=e[3]),_get(_getPrototypeOf(o.prototype),"activate",this).call(this)}},{key:"disconnect",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};e&&(this.onDisconnect=e),this.disconnectHeaders=t,_get(_getPrototypeOf(o.prototype),"deactivate",this).call(this)}},{key:"send",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=!1===(t=Object.assign({},t))["content-length"];o&&delete t["content-length"],this.publish({destination:e,headers:t,body:n,skipContentLengthHeader:o})}},{key:"reconnect_delay",set:function(e){this.reconnectDelay=e}},{key:"ws",get:function(){return this.webSocket}},{key:"version",get:function(){return this.connectedVersion}},{key:"onreceive",get:function(){return this.onUnhandledMessage},set:function(e){this.onUnhandledMessage=e}},{key:"onreceipt",get:function(){return this.onUnhandledReceipt},set:function(e){this.onUnhandledReceipt=e}},{key:"heartbeat",get:function(){return this._heartbeatInfo},set:function(e){this.heartbeatIncoming=e.incoming,this.heartbeatOutgoing=e.outgoing}}]),o}(),m=function(){function n(){_classCallCheck(this,n)}return _createClass(n,null,[{key:"client",value:function(e,t){return null==t&&(t=a.default.protocolVersions()),new p(function(){return new(n.WebSocketClass||WebSocket)(e,t)})}},{key:"over",value:function(e){var t="function"==typeof e?e:(console.warn("Stomp.over did not receive a factory, auto reconnect will not work. Please see https://stomp-js.github.io/api-docs/latest/classe
1s/Stomp.html#over"),function(){return e});return new p(t)}}]),n}();m.WebSocketClass=null}],o={},r.m=n,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==_typeof2(t)&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0);function r(e){var t;return(o[e]||(t=o[e]={i:e,l:!1,exports:{}},n[e].call(t.exports,t,t.exports,r),t.l=!0,t)).exports}var n,o});var runtime=function(c){"use strict";var a,e=Object.prototype,u=e.hasOwnProperty,t="function"==typeof Symbol?Symbol:{},o=t.iterator||"@@iterator",n=t.asyncIterator||"@@asyncIterator",r=t.toStringTag||"@@toStringTag";function s(e,t,n,o){var r,i,c,s,t=t&&t.prototype instanceof m?t:m,t=Object.create(t.prototype),o=new C(o||[]);return t._invoke=(r=e,i=n,c=o,s=h,function(e,t){if(s===f)throw new Error("Generator is already running");if(s===y){if("throw"===e)throw t;return T()}for(c.method=e,c.arg=t;;){var n=c.delegate;if(n){var o=function e(t,n){var o=t.iterator[n.method];if(o===a){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=a,e(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}}else{if("throw"===(o=l(o,t.iterator,n.arg)).type)n.method="throw",n.arg=o.arg;else if(o=o.arg){if(!o.done)return o;n[t.resultName]=o.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=a)}else n.method="throw",n.arg=new TypeError("iterator result is not an object");n.delegate=null}return p}(n,c);if(o){if(o===p)continue;return o}}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if(s===h)throw s=y,c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(s=f,"normal"===(o=l(r,i,c)).type){if(s=c.done?y:d,o.arg!==p)return{value:o.arg,done:c.done}}else"throw"===o.type&&(s=y,c.method="throw",c.arg=o.arg)}}),t}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}c.wrap=s;var h="suspendedStart",d="suspendedYield",f="executing",y="completed",p={};function m(){}function i(){}function g(){}var v={},_=(v[o]=function(){return this},(t=(t=Object.getPrototypeOf)&&t(t(E([]))))&&t!==e&&u.call(t,o)&&(v=t),g.prototype=m.prototype=Object.create(v));function b(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function k(c,s){var t;this._invoke=function(n,o){function e(){return new s(function(e,t){!function t(e,n,o,r){var i;return"throw"!==(e=l(c[e],c,n)).type?(n=(i=e.arg).value)&&"object"===_typeof(n)&&u.call(n,"__await")?s.resolve(n.__await).then(function(e){t("next",e,o,r)},function(e){t("throw",e,o,r)}):s.resolve(n).then(function(e){i.value=e,o(i)},function(e){return t("throw",e,o,r)}):void r(e.arg)}(n,o,e,t)})}return t=t?t.then(e,e):e()}}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function w(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function E(t){if(t){var n,e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return n=-1,(e=function e(){for(;++n<t.length;)if(u.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=a,e.done=!0,e}).next=e}return{next:T}}function T(){return{value:a,done:!0}}return(i.prototype=_.constructor=g).constructor=i,g[r]=i.displayName="GeneratorFunction",c.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===i||"GeneratorFunction"===(e.displayName||e.name))},c.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,r in e||(e[r]="GeneratorFunction")),e.prototype=Object.create(_),e},c.awrap=function(e){return{__await:e}},b(k.prototype),k.prototype[n]=function(){return this},c.AsyncIterator=k,c.async=function(e,t,n,o,r){void 0===r&&(r=Promise);var i=new k(s(e,t,n,o),r);return c.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},b(_),_[r]="Generator",_[o]=function(){return this},_.toString=function(){return"[object Generator]"},c.keys=function(n){var e,o=[];for(e in n)o.push(e);return o.reverse(),function e(){for(;o.length;){var t=o.pop();if(t in n)return e.value=t,e.done=!1,e}return e.done=!0,e}},c.values=E,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEac
1h(w),!e)for(var t in this)"t"===t.charAt(0)&&u.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=a)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(n){if(this.done)throw n;var o=this;function e(e,t){return i.type="throw",i.arg=n,o.next=e,t&&(o.method="next",o.arg=a),!!t}for(var t=this.tryEntries.length-1;0<=t;--t){var r=this.tryEntries[t],i=r.completion;if("root"===r.tryLoc)return e("end");if(r.tryLoc<=this.prev){var c=u.call(r,"catchLoc"),s=u.call(r,"finallyLoc");if(c&&s){if(this.prev<r.catchLoc)return e(r.catchLoc,!0);if(this.prev<r.finallyLoc)return e(r.finallyLoc)}else if(c){if(this.prev<r.catchLoc)return e(r.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return e(r.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&u.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}var i=(r=r&&("break"===e||"continue"===e)&&r.tryLoc<=t&&t<=r.finallyLoc?null:r)?r.completion:{};return i.type=e,i.arg=t,r?(this.method="next",this.next=r.finallyLoc,p):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),w(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,o,r=this.tryEntries[t];if(r.tryLoc===e)return"throw"===(o=r.completion).type&&(n=o.arg,w(r)),n}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=a),p}},c}("object"===("undefined"==typeof module?"undefined":_typeof(module))?module.exports:{});try{regeneratorRuntime=runtime}catch(e){Function("r","regeneratorRuntime = r")(runtime)}var socketIsReady,stompClient,socketConnectionTimeout,perf1,perf2,domWsContainer=document.querySelector("#js-ws-superstructure"),user_id=domWsContainer.getAttribute("data-user-id"),debugHash="socket_debug",_domWsContainer$datas=(myWedState.socketHandlers.socketIsReady=!1,domWsContainer.dataset),apiHost=_domWsContainer$datas.apiHost,apiHealthCheck=_domWsContainer$datas.apiHealthCheck,reconnectSocketTime=_domWsContainer$datas.reconnectSocketTime,reconnectApiTime=_domWsContainer$datas.reconnectApiTime,refreshSocketTime=_domWsContainer$datas.refreshSocketTime,refreshSessionUrl=_domWsContainer$datas.refreshSessionUrl,initSocketPromise=function(){socketIsReady=new Promise(function(e){var t;myWedState.socketHandlers.socketIsReady?e():t=setInterval(function(){myWedState.socketHandlers.socketIsReady&&(clearInterval(t),e())},50)})},setSocketConnectionTimeout=(initSocketPromise(),function(){clearTimeout(socketConnectionTimeout),socketConnectionTimeout=setTimeout(function(){stompClient.forceDisconnect()},Number(refreshSocketTime))});function socketSend(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(void 0===stompClient||null==(o=stompClient)||!o.connected)return console.log("no connection SockJS established"),!1;var o=t,r="";"function"==typeof n?(r="method_"+Math.ceil(1e16*Math.random()),myWedState.socketHandlers[r]=function(e){n(e),delete myWedState.socketHandlers[r]}):r=n,n&&(o.handler=r),setSocketConnectionTimeout(),stompClient.publish({destination:e,body:JSON.stringify(o)})}function socketListener(e){var e=JSON.parse(e.body),t=myWedState.socketHandlers[e.handler];t&&t(e)}var isSockInit=isDOMReady=sockInitTimeoutPassed=!1,SOCKET_EVENT_TRIGGERS=["click","scroll","keypress","wheel","mousemove","touchmove","touchstart"];function initSocket(){var e,n;!isSockInit&&isDOMReady&&(isSockInit=!0,SOCKET_EVENT_TRIGGERS.forEach(function(e){return window.removeEventListener(e,initSocket)}),e={webSocketFactory:function(){return new WebSocket(apiHost)},reconnectDelay:Number(reconnectSocketTime)},location.hash.substring(1)==debugHash&&(e.debug=function(e){console.log(e)}),stompClient=new StompJs.Client(e),n=!1,stompClient.beforeConnect=function(){return n?(mwdebug("пÑовеÑка доÑÑÑпноÑÑи","blue"),new Promise(function(e,t){(function t(){Promise.all([getCookie(myWedState.sessName)?Promise.resolve():fetch(refreshSessionUrl,{method:"HEAD",credentials:"include"}),fetch(apiHealthCheck,{method:"HEAD",credentials:"include"})]).then(function(){n=!1,e()}).catch(function(e){mwdebug("не оÑвеÑаеÑ","red"),setTimeout(t,Number(reconnectApiTime))}).finally(function(){perf2=performance.now()})})()})):Promise.resolve()},stompClient.onConnect=function(e){var t;myWedState.socketHandlers.socketIsReady=!0,setSocketConnectionTimeout(),console.log("WS connected"),perf1=performance.now(),null!=(t=mwdebug)&&t("ÑÑÑановка ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ð·Ð°Ð½Ñла "+(perf1-perf2).toFixed(1)+" ms","green"),stompClient.subscribe("/user/default",function(e){socketListener(e)})},stompClient.onStompError=function(e){console.log("STOMP Broker reported error: "+e.headers.message,!0),console.log("Additional details: "+e.body,!0),myWedState.socketHandlers.socketIsReady=!1,n||initSocketPromise(),n=!0},stompClient.onDisconnect=function(e){myWedState.socketHandlers.socketIsReady=!1,n||(console.log("onDisconnect",new Date),initSocketPromise()),n=!0},stompClient.onWebSocketClose=function(e){myWedState.socketHandlers.socketIsReady=!1,n||(console.log("onWebSocketClose",new Date),initSocketPromise()),n=!0},stompClient.onWebSocketError=function(e){myWedState.socketHandlers.socketIsReady=!1,n||(console.log("onWebSocketError",new Date),initSocketPromise()),n=!0},stompClient.onUnhandledMessage=function(e){console.log("onUnhandledMessage",e)},perf2=performance.now(),null!=(e=mwdebug)&&e("наÑало ÑÐ¾ÐµÐ´Ð¸Ð½ÐµÐ½Ð¸Ñ Ñ ÑокеÑом","green"),stompClient.activate())}SOCKET_EVENT_TRIGGERS.forEach(function(e){return window.addEventListener(e,initSocket,{passive:!0})}),document.addEventListener("readystatechange",function(){"interactive"==this.readyState&&(isDOMReady=!0,sockInitTimeoutPassed)&&initSocket(),"complete"==this.readyState&&(isDOMReady=!0,initSocket())}),setTimeout(function(){sockInitTimeoutPassed=!0,initSocket()},5e3);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.