m2pool_web_frontend/mining-pool/test/js/chunk-vendors-89d5c698.2190...

16 lines
33 KiB
JavaScript

(self["webpackChunkmining_pool"]=self["webpackChunkmining_pool"]||[]).push([[853],{23606:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t["default"]=void 0,n(44114),n(18111),n(22489),n(7588),n(61701),n(13579);var i=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,i){return e[0]===t&&(n=i,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var s=i[n];e.call(t,s[1],s[0])}},t}()}(),s="undefined"!==typeof window&&"undefined"!==typeof document&&window.document===document,o=function(){return"undefined"!==typeof n.g&&n.g.Math===Math?n.g:"undefined"!==typeof self&&self.Math===Math?self:"undefined"!==typeof window&&window.Math===Math?window:Function("return this")()}(),r=function(){return"function"===typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout((function(){return e(Date.now())}),1e3/60)}}(),c=2;function a(e,t){var n=!1,i=!1,s=0;function o(){n&&(n=!1,e()),i&&h()}function a(){r(o)}function h(){var e=Date.now();if(n){if(e-s<c)return;i=!0}else n=!0,i=!1,setTimeout(a,t);s=e}return h}var h=20,d=["top","right","bottom","left","width","height","size","weight"],u="undefined"!==typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=a(this.refresh.bind(this),h)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){var e=this.updateObservers_();e&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter((function(e){return e.gatherActive(),e.hasActive()}));return e.forEach((function(e){return e.broadcastActive()})),e.length>0},e.prototype.connect_=function(){s&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),u?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){s&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t,i=d.some((function(e){return!!~n.indexOf(e)}));i&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),m=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var s=i[n];Object.defineProperty(e,s,{value:t[s],enumerable:!1,writable:!1,configurable:!0})}return e},_=function(e){var t=e&&e.ownerDocument&&e.ownerDocument.defaultView;return t||o},p=E(0,0,0,0);function b(e){return parseFloat(e)||0}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce((function(t,n){var i=e["border-"+n+"-width"];return t+b(i)}),0)}function f(e){for(var t=["top","right","bottom","left"],n={},i=0,s=t;i<s.length;i++){var o=s[i],r=e["padding-"+o];n[o]=b(r)}return n}function y(e){var t=e.getBBox();return E(0,0,t.width,t.height)}function v(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return p;var i=_(e).getComputedStyle(e),s=f(i),o=s.left+s.right,r=s.top+s.bottom,c=b(i.width),a=b(i.height);if("border-box"===i.boxSizing&&(Math.round(c+o)!==t&&(c-=g(i,"left","right")+o),Math.round(a+r)!==n&&(a-=g(i,"top","bottom")+r)),!k(e)){var h=Math.round(c+o)-t,d=Math.round(a+r)-n;1!==Math.abs(h)&&(c-=h),1!==Math.abs(d)&&(a-=d)}return E(s.left,s.top,c,a)}var w=function(){return"undefined"!==typeof SVGGraphicsElement?function(e){return e instanceof _(e).SVGGraphicsElement}:function(e){return e instanceof _(e).SVGElement&&"function"===typeof e.getBBox}}();function k(e){return e===_(e).document.documentElement}function S(e){return s?w(e)?y(e):v(e):p}function C(e){var t=e.x,n=e.y,i=e.width,s=e.height,o="undefined"!==typeof DOMRectReadOnly?DOMRectReadOnly:Object,r=Object.create(o.prototype);return m(r,{x:t,y:n,width:i,height:s,top:n,right:t+i,bottom:s+n,left:t}),r}function E(e,t,n,i){return{x:e,y:t,width:n,height:i}}var O=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=E(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=S(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),T=function(){function e(e,t){var n=C(t);m(this,{target:e,contentRect:n})}return e}(),I=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new i,"function"!==typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new O(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!==typeof Element&&Element instanceof Object){if(!(e instanceof _(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach((function(t){t.isActive()&&e.activeObservations_.push(t)}))},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map((function(e){return new T(e.target,e.broadcastRect())}));this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),A="undefined"!==typeof WeakMap?new WeakMap:new i,H=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),i=new I(t,n,this);A.set(this,i)}return e}();["observe","unobserve","disconnect"].forEach((function(e){H.prototype[e]=function(){var t;return(t=A.get(this))[e].apply(t,arguments)}}));var N=function(){return"undefined"!==typeof o.ResizeObserver?o.ResizeObserver:H}();t["default"]=N},32456:function(e){var t,n,i,s,o,r,c,a,h,d,u,l,m,_,p,b=!1;function g(){if(!b){b=!0;var e=navigator.userAgent,g=/(?:MSIE.(\d+\.\d+))|(?:(?:Firefox|GranParadiso|Iceweasel).(\d+\.\d+))|(?:Opera(?:.+Version.|.)(\d+\.\d+))|(?:AppleWebKit.(\d+(?:\.\d+)?))|(?:Trident\/\d+\.\d+.*rv:(\d+\.\d+))/.exec(e),f=/(Mac OS X)|(Windows)|(Linux)/.exec(e);if(l=/\b(iPhone|iP[ao]d)/.exec(e),m=/\b(iP[ao]d)/.exec(e),d=/Android/i.exec(e),_=/FBAN\/\w+;/i.exec(e),p=/Mobile/i.exec(e),u=!!/Win64/.exec(e),g){t=g[1]?parseFloat(g[1]):g[5]?parseFloat(g[5]):NaN,t&&document&&document.documentMode&&(t=document.documentMode);var y=/(?:Trident\/(\d+.\d+))/.exec(e);r=y?parseFloat(y[1])+4:t,n=g[2]?parseFloat(g[2]):NaN,i=g[3]?parseFloat(g[3]):NaN,s=g[4]?parseFloat(g[4]):NaN,s?(g=/(?:Chrome\/(\d+\.\d+))/.exec(e),o=g&&g[1]?parseFloat(g[1]):NaN):o=NaN}else t=n=i=o=s=NaN;if(f){if(f[1]){var v=/(?:Mac OS X (\d+(?:[._]\d+)?))/.exec(e);c=!v||parseFloat(v[1].replace("_","."))}else c=!1;a=!!f[2],h=!!f[3]}else c=a=h=!1}}var f={ie:function(){return g()||t},ieCompatibilityMode:function(){return g()||r>t},ie64:function(){return f.ie()&&u},firefox:function(){return g()||n},opera:function(){return g()||i},webkit:function(){return g()||s},safari:function(){return f.webkit()},chrome:function(){return g()||o},windows:function(){return g()||a},osx:function(){return g()||c},linux:function(){return g()||h},iphone:function(){return g()||l},mobile:function(){return g()||l||m||d||p},nativeApp:function(){return g()||_},android:function(){return g()||d},ipad:function(){return g()||m}};e.exports=f},34811:function(e,t,n){e.exports=n(99438)},50586:function(e,t,n){"use strict";var i,s=n(96083);
/**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @param {?boolean} capture Check if the capture phase is supported.
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*/
function o(e,t){if(!s.canUseDOM||t&&!("addEventListener"in document))return!1;var n="on"+e,o=n in document;if(!o){var r=document.createElement("div");r.setAttribute(n,"return;"),o="function"===typeof r[n]}return!o&&i&&"wheel"===e&&(o=document.implementation.hasFeature("Events.wheel","3.0")),o}s.canUseDOM&&(i=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("","")),e.exports=o},92500:function(e,t,n){n(44114),n(16573),n(78100),n(77936),n(18111),n(22489),n(61701),n(37467),n(44732),n(79577),n(14603),n(47566),n(98721),function(e,n){n(t)}(0,(function(e){"use strict";function t(e,t){e.terminate=function(){const n=()=>{};this.onerror=n,this.onmessage=n,this.onopen=n;const i=new Date,s=Math.random().toString().substring(2,8),o=this.onclose;this.onclose=e=>{const n=(new Date).getTime()-i.getTime();t(`Discarded socket (#${s}) closed after ${n}ms, with code/reason: ${e.code}/${e.reason}`)},this.close(),o?.call(e,{code:4001,reason:`Quick discarding socket (#${s}) without waiting for the shutdown sequence.`,wasClean:!1})}}const n={LF:"\n",NULL:"\0"};class i{get body(){return!this._body&&this.isBinaryBody&&(this._body=(new TextDecoder).decode(this._binaryBody)),this._body||""}get binaryBody(){return this._binaryBody||this.isBinaryBody||(this._binaryBody=(new TextEncoder).encode(this._body)),this._binaryBody}constructor(e){const{command:t,headers:n,body:i,binaryBody:s,escapeHeaderValues:o,skipContentLengthHeader:r}=e;this.command=t,this.headers=Object.assign({},n||{}),s?(this._binaryBody=s,this.isBinaryBody=!0):(this._body=i||"",this.isBinaryBody=!1),this.escapeHeaderValues=o||!1,this.skipContentLengthHeader=r||!1}static fromRawFrame(e,t){const n={},s=e=>e.replace(/^\s+|\s+$/g,"");for(const o of e.headers.reverse()){o.indexOf(":");const r=s(o[0]);let c=s(o[1]);t&&"CONNECT"!==e.command&&"CONNECTED"!==e.command&&(c=i.hdrValueUnEscape(c)),n[r]=c}return new i({command:e.command,headers:n,binaryBody:e.binaryBody,escapeHeaderValues:t})}toString(){return this.serializeCmdAndHeaders()}serialize(){const e=this.serializeCmdAndHeaders();return this.isBinaryBody?i.toUnit8Array(e,this._binaryBody).buffer:e+this._body+n.NULL}serializeCmdAndHeaders(){const e=[this.command];this.skipContentLengthHeader&&delete this.headers["content-length"];for(const t of Object.keys(this.headers||{})){const n=this.headers[t];this.escapeHeaderValues&&"CONNECT"!==this.command&&"CONNECTED"!==this.command?e.push(`${t}:${i.hdrValueEscape(`${n}`)}`):e.push(`${t}:${n}`)}return(this.isBinaryBody||!this.isBodyEmpty()&&!this.skipContentLengthHeader)&&e.push(`content-length:${this.bodyLength()}`),e.join(n.LF)+n.LF+n.LF}isBodyEmpty(){return 0===this.bodyLength()}bodyLength(){const e=this.binaryBody;return e?e.length:0}static sizeOfUTF8(e){return e?(new TextEncoder).encode(e).length:0}static toUnit8Array(e,t){const n=(new TextEncoder).encode(e),i=new Uint8Array([0]),s=new Uint8Array(n.length+t.length+i.length);return s.set(n),s.set(t,n.length),s.set(i,n.length+t.length),s}static marshall(e){const t=new i(e);return t.serialize()}static hdrValueEscape(e){return e.replace(/\\/g,"\\\\").replace(/\r/g,"\\r").replace(/\n/g,"\\n").replace(/:/g,"\\c")}static hdrValueUnEscape(e){return e.replace(/\\r/g,"\r").replace(/\\n/g,"\n").replace(/\\c/g,":").replace(/\\\\/g,"\\")}}const s=0,o=10,r=13,c=58;class a{constructor(e,t){this.onFrame=e,this.onIncomingPing=t,this._encoder=new TextEncoder,this._decoder=new TextDecoder,this._token=[],this._initState()}parseChunk(e,t=!1){let n;if(n="string"===typeof e?this._encoder.encode(e):new Uint8Array(e),t&&0!==n[n.length-1]){const e=new Uint8Array(n.length+1);e.set(n,0),e[n.length]=0,n=e}for(let i=0;i<n.length;i++){const e=n[i];this._onByte(e)}}_collectFrame(e){e!==s&&e!==r&&(e!==o?(this._onByte=this._collectCommand,this._reinjectByte(e)):this.onIncomingPing())}_collectCommand(e){if(e!==r)return e===o?(this._results.command=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaders)):void this._consumeByte(e)}_collectHeaders(e){e!==r&&(e!==o?(this._onByte=this._collectHeaderKey,this._reinjectByte(e)):this._setupCollectBody())}_reinjectByte(e){this._onByte(e)}_collectHeaderKey(e){if(e===c)return this._headerKey=this._consumeTokenAsUTF8(),void(this._onByte=this._collectHeaderValue);this._consumeByte(e)}_collectHeaderValue(e){if(e!==r)return e===o?(this._results.headers.push([this._headerKey,this._consumeTokenAsUTF8()]),this._headerKey=void 0,void(this._onByte=this._collectHeaders)):void this._consumeByte(e)}_setupCollectBody(){const e=this._results.headers.filter((e=>"content-length"===e[0]))[0];e?(this._bodyBytesRemaining=parseInt(e[1],10),this._onByte=this._collectBodyFixedSize):this._onByte=this._collectBodyNullTerminated}_collectBodyNullTerminated(e){e!==s?this._consumeByte(e):this._retrievedBody()}_collectBodyFixedSize(e){0!==this._bodyBytesRemaining--?this._consumeByte(e):this._retrievedBody()}_retrievedBody(){this._results.binaryBody=this._consumeTokenAsRaw();try{this.onFrame(this._results)}catch(e){console.log("Ignoring an exception thrown by a frame handler. Original exception: ",e)}this._initState()}_consumeByte(e){this._token.push(e)}_consumeTokenAsUTF8(){return this._decoder.decode(this._consumeTokenAsRaw())}_consumeTokenAsRaw(){const e=new Uint8Array(this._token);return this._token=[],e}_initState(){this._results={command:void 0,headers:[],binaryBody:void 0},this._token=[],this._headerKey=void 0,this._onByte=this._collectFrame}}e.StompSocketState=void 0,function(e){e[e["CONNECTING"]=0]="CONNECTING",e[e["OPEN"]=1]="OPEN",e[e["CLOSING"]=2]="CLOSING",e[e["CLOSED"]=3]="CLOSED"}(e.StompSocketState||(e.StompSocketState={})),e.ActivationState=void 0,function(e){e[e["ACTIVE"]=0]="ACTIVE",e[e["DEACTIVATING"]=1]="DEACTIVATING",e[e["INACTIVE"]=2]="INACTIVE"}(e.ActivationState||(e.ActivationState={})),e.ReconnectionTimeMode=void 0,function(e){e[e["LINEAR"]=0]="LINEAR",e[e["EXPONENTIAL"]=1]="EXPONENTIAL"}(e.ReconnectionTimeMode||(e.ReconnectionTimeMode={})),e.TickerStrategy=void 0,function(e){e["Interval"]="interval",e["Worker"]="worker"}(e.TickerStrategy||(e.TickerStrategy={}));class h{constructor(t,n=e.TickerStrategy.Interval,i){this._interval=t,this._strategy=n,this._debug=i,this._workerScript=`\n var startTime = Date.now();\n setInterval(function() {\n self.postMessage(Date.now() - startTime);\n }, ${this._interval});\n `}start(e){this.stop(),this.shouldUseWorker()?this.runWorker(e):this.runInterval(e)}stop(){this.disposeWorker(),this.disposeInterval()}shouldUseWorker(){return"undefined"!==typeof Worker&&this._strategy===e.TickerStrategy.Worker}runWorker(e){this._debug("Using runWorker for outgoing pings"),this._worker||(this._worker=new Worker(URL.createObjectURL(new Blob([this._workerScript],{type:"text/javascript"}))),this._worker.onmessage=t=>e(t.data))}runInterval(e){if(this._debug("Using runInterval for outgoing pings"),!this._timer){const t=Date.now();this._timer=setInterval((()=>{e(Date.now()-t)}),this._interval)}}disposeWorker(){this._worker&&(this._worker.terminate(),delete this._worker,this._debug("Outgoing ping disposeWorker"))}disposeInterval(){this._timer&&(clearInterval(this._timer),delete this._timer,this._debug("Outgoing ping disposeInterval"))}}class d{constructor(e){this.versions=e}supportedVersions(){return this.versions.join(",")}protocolVersions(){return this.versions.map((e=>`v${e.replace(".","")}.stomp`))}}d.V1_0="1.0",d.V1_1="1.1",d.V1_2="1.2",d.default=new d([d.V1_2,d.V1_1,d.V1_0]);class u{get connectedVersion(){return this._connectedVersion}get connected(){return this._connected}constructor(e,t,n){this._client=e,this._webSocket=t,this._connected=!1,this._serverFrameHandlers={CONNECTED:e=>{this.debug(`connected to server ${e.headers.server}`),this._connected=!0,this._connectedVersion=e.headers.version,this._connectedVersion===d.V1_2&&(this._escapeHeaderValues=!0),this._setupHeartbeat(e.headers),this.onConnect(e)},MESSAGE:e=>{const t=e.headers.subscription,n=this._subscriptions[t]||this.onUnhandledMessage,i=e,s=this,o=this._connectedVersion===d.V1_2?i.headers.ack:i.headers["message-id"];i.ack=(e={})=>s.ack(o,t,e),i.nack=(e={})=>s.nack(o,t,e),n(i)},RECEIPT:e=>{const t=this._receiptWatchers[e.headers["receipt-id"]];t?(t(e),delete this._receiptWatchers[e.headers["receipt-id"]]):this.onUnhandledReceipt(e)},ERROR:e=>{this.onStompError(e)}},this._counter=0,this._subscriptions={},this._receiptWatchers={},this._partialData="",this._escapeHeaderValues=!1,this._lastServerActivityTS=Date.now(),this.debug=n.debug,this.stompVersions=n.stompVersions,this.connectHeaders=n.connectHeaders,this.disconnectHeaders=n.disconnectHeaders,this.heartbeatIncoming=n.heartbeatIncoming,this.heartbeatOutgoing=n.heartbeatOutgoing,this.splitLargeFrames=n.splitLargeFrames,this.maxWebSocketChunkSize=n.maxWebSocketChunkSize,this.forceBinaryWSFrames=n.forceBinaryWSFrames,this.logRawCommunication=n.logRawCommunication,this.appendMissingNULLonIncoming=n.appendMissingNULLonIncoming,this.discardWebsocketOnCommFailure=n.discardWebsocketOnCommFailure,this.onConnect=n.onConnect,this.onDisconnect=n.onDisconnect,this.onStompError=n.onStompError,this.onWebSocketClose=n.onWebSocketClose,this.onWebSocketError=n.onWebSocketError,this.onUnhandledMessage=n.onUnhandledMessage,this.onUnhandledReceipt=n.onUnhandledReceipt,this.onUnhandledFrame=n.onUnhandledFrame}start(){const e=new a((e=>{const t=i.fromRawFrame(e,this._escapeHeaderValues);this.logRawCommunication||this.debug(`<<< ${t}`);const n=this._serverFrameHandlers[t.command]||this.onUnhandledFrame;n(t)}),(()=>{this.debug("<<< PONG")}));this._webSocket.onmessage=t=>{if(this.debug("Received data"),this._lastServerActivityTS=Date.now(),this.logRawCommunication){const e=t.data instanceof ArrayBuffer?(new TextDecoder).decode(t.data):t.data;this.debug(`<<< ${e}`)}e.parseChunk(t.data,this.appendMissingNULLonIncoming)},this._webSocket.onclose=e=>{this.debug(`Connection closed to ${this._webSocket.url}`),this._cleanUp(),this.onWebSocketClose(e)},this._webSocket.onerror=e=>{this.onWebSocketError(e)},this._webSocket.onopen=()=>{const e=Object.assign({},this.connectHeaders);this.debug("Web Socket Opened..."),e["accept-version"]=this.stompVersions.supportedVersions(),e["heart-beat"]=[this.heartbeatOutgoing,this.heartbeatIncoming].join(","),this._transmit({command:"CONNECT",headers:e})}}_setupHeartbeat(t){if(t.version!==d.V1_1&&t.version!==d.V1_2)return;if(!t["heart-beat"])return;const[i,s]=t["heart-beat"].split(",").map((e=>parseInt(e,10)));if(0!==this.heartbeatOutgoing&&0!==s){const t=Math.max(this.heartbeatOutgoing,s);this.debug(`send PING every ${t}ms`),this._pinger=new h(t,this._client.heartbeatStrategy,this.debug),this._pinger.start((()=>{this._webSocket.readyState===e.StompSocketState.OPEN&&(this._webSocket.send(n.LF),this.debug(">>> PING"))}))}if(0!==this.heartbeatIncoming&&0!==i){const e=Math.max(this.heartbeatIncoming,i);this.debug(`check PONG every ${e}ms`),this._ponger=setInterval((()=>{const t=Date.now()-this._lastServerActivityTS;t>2*e&&(this.debug(`did not receive server activity for the last ${t}ms`),this._closeOrDiscardWebsocket())}),e)}}_closeOrDiscardWebsocket(){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())}forceDisconnect(){this._webSocket&&(this._webSocket.readyState!==e.StompSocketState.CONNECTING&&this._webSocket.readyState!==e.StompSocketState.OPEN||this._closeOrDiscardWebsocket())}_closeWebsocket(){this._webSocket.onmessage=()=>{},this._webSocket.close()}discardWebsocket(){"function"!==typeof this._webSocket.terminate&&t(this._webSocket,(e=>this.debug(e))),this._webSocket.terminate()}_transmit(e){const{command:t,headers:n,body:s,binaryBody:o,skipContentLengthHeader:r}=e,c=new i({command:t,headers:n,body:s,binaryBody:o,escapeHeaderValues:this._escapeHeaderValues,skipContentLengthHeader:r});let a=c.serialize();if(this.logRawCommunication?this.debug(`>>> ${a}`):this.debug(`>>> ${c}`),this.forceBinaryWSFrames&&"string"===typeof a&&(a=(new TextEncoder).encode(a)),"string"===typeof a&&this.splitLargeFrames){let e=a;while(e.length>0){const t=e.substring(0,this.maxWebSocketChunkSize);e=e.substring(this.maxWebSocketChunkSize),this._webSocket.send(t),this.debug(`chunk sent = ${t.length}, remaining = ${e.length}`)}}else this._webSocket.send(a)}dispose(){if(this.connected)try{const e=Object.assign({},this.disconnectHeaders);e.receipt||(e.receipt="close-"+this._counter++),this.watchForReceipt(e.receipt,(e=>{this._closeWebsocket(),this._cleanUp(),this.onDisconnect(e)})),this._transmit({command:"DISCONNECT",headers:e})}catch(t){this.debug(`Ignoring error during disconnect ${t}`)}else this._webSocket.readyState!==e.StompSocketState.CONNECTING&&this._webSocket.readyState!==e.StompSocketState.OPEN||this._closeWebsocket()}_cleanUp(){this._connected=!1,this._pinger&&(this._pinger.stop(),this._pinger=void 0),this._ponger&&(clearInterval(this._ponger),this._ponger=void 0)}publish(e){const{destination:t,headers:n,body:i,binaryBody:s,skipContentLengthHeader:o}=e,r=Object.assign({destination:t},n);this._transmit({command:"SEND",headers:r,body:i,binaryBody:s,skipContentLengthHeader:o})}watchForReceipt(e,t){this._receiptWatchers[e]=t}subscribe(e,t,n={}){n=Object.assign({},n),n.id||(n.id="sub-"+this._counter++),n.destination=e,this._subscriptions[n.id]=t,this._transmit({command:"SUBSCRIBE",headers:n});const i=this;return{id:n.id,unsubscribe(e){return i.unsubscribe(n.id,e)}}}unsubscribe(e,t={}){t=Object.assign({},t),delete this._subscriptions[e],t.id=e,this._transmit({command:"UNSUBSCRIBE",headers:t})}begin(e){const t=e||"tx-"+this._counter++;this._transmit({command:"BEGIN",headers:{transaction:t}});const n=this;return{id:t,commit(){n.commit(t)},abort(){n.abort(t)}}}commit(e){this._transmit({command:"COMMIT",headers:{transaction:e}})}abort(e){this._transmit({command:"ABORT",headers:{transaction:e}})}ack(e,t,n={}){n=Object.assign({},n),this._connectedVersion===d.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"ACK",headers:n})}nack(e,t,n={}){return n=Object.assign({},n),this._connectedVersion===d.V1_2?n.id=e:n["message-id"]=e,n.subscription=t,this._transmit({command:"NACK",headers:n})}}class l{get webSocket(){return this._stompHandler?._webSocket}get disconnectHeaders(){return this._disconnectHeaders}set disconnectHeaders(e){this._disconnectHeaders=e,this._stompHandler&&(this._stompHandler.disconnectHeaders=this._disconnectHeaders)}get connected(){return!!this._stompHandler&&this._stompHandler.connected}get connectedVersion(){return this._stompHandler?this._stompHandler.connectedVersion:void 0}get active(){return this.state===e.ActivationState.ACTIVE}_changeState(e){this.state=e,this.onChangeState(e)}constructor(t={}){this.stompVersions=d.default,this.connectionTimeout=0,this.reconnectDelay=5e3,this._nextReconnectDelay=0,this.maxReconnectDelay=9e5,this.reconnectTimeMode=e.ReconnectionTimeMode.LINEAR,this.heartbeatIncoming=1e4,this.heartbeatOutgoing=1e4,this.heartbeatStrategy=e.TickerStrategy.Interval,this.splitLargeFrames=!1,this.maxWebSocketChunkSize=8192,this.forceBinaryWSFrames=!1,this.appendMissingNULLonIncoming=!1,this.discardWebsocketOnCommFailure=!1,this.state=e.ActivationState.INACTIVE;const n=()=>{};this.debug=n,this.beforeConnect=n,this.onConnect=n,this.onDisconnect=n,this.onUnhandledMessage=n,this.onUnhandledReceipt=n,this.onUnhandledFrame=n,this.onStompError=n,this.onWebSocketClose=n,this.onWebSocketError=n,this.logRawCommunication=!1,this.onChangeState=n,this.connectHeaders={},this._disconnectHeaders={},this.configure(t)}configure(e){Object.assign(this,e),this.maxReconnectDelay>0&&this.maxReconnectDelay<this.reconnectDelay&&(this.debug(`Warning: maxReconnectDelay (${this.maxReconnectDelay}ms) is less than reconnectDelay (${this.reconnectDelay}ms). Using reconnectDelay as the maxReconnectDelay delay.`),this.maxReconnectDelay=this.reconnectDelay)}activate(){const t=()=>{this.active?this.debug("Already ACTIVE, ignoring request to activate"):(this._changeState(e.ActivationState.ACTIVE),this._nextReconnectDelay=this.reconnectDelay,this._connect())};this.state===e.ActivationState.DEACTIVATING?(this.debug("Waiting for deactivation to finish before activating"),this.deactivate().then((()=>{t()}))):t()}async _connect(){if(await this.beforeConnect(this),this._stompHandler)return void this.debug("There is already a stompHandler, skipping the call to connect");if(!this.active)return void this.debug("Client has been marked inactive, will not attempt to connect");this.connectionTimeout>0&&(this._connectionWatcher&&clearTimeout(this._connectionWatcher),this._connectionWatcher=setTimeout((()=>{this.connected||(this.debug(`Connection not established in ${this.connectionTimeout}ms, closing socket`),this.forceDisconnect())}),this.connectionTimeout)),this.debug("Opening Web Socket...");const 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,heartbeatStrategy:this.heartbeatStrategy,splitLargeFrames:this.splitLargeFrames,maxWebSocketChunkSize:this.maxWebSocketChunkSize,forceBinaryWSFrames:this.forceBinaryWSFrames,logRawCommunication:this.logRawCommunication,appendMissingNULLonIncoming:this.appendMissingNULLonIncoming,discardWebsocketOnCommFailure:this.discardWebsocketOnCommFailure,onConnect:e=>{if(this._connectionWatcher&&(clearTimeout(this._connectionWatcher),this._connectionWatcher=void 0),!this.active)return this.debug("STOMP got connected while deactivate was issued, will disconnect now"),void this._disposeStompHandler();this.onConnect(e)},onDisconnect:e=>{this.onDisconnect(e)},onStompError:e=>{this.onStompError(e)},onWebSocketClose:t=>{this._stompHandler=void 0,this.state===e.ActivationState.DEACTIVATING&&this._changeState(e.ActivationState.INACTIVE),this.onWebSocketClose(t),this.active&&this._schedule_reconnect()},onWebSocketError:e=>{this.onWebSocketError(e)},onUnhandledMessage:e=>{this.onUnhandledMessage(e)},onUnhandledReceipt:e=>{this.onUnhandledReceipt(e)},onUnhandledFrame:e=>{this.onUnhandledFrame(e)}}),this._stompHandler.start()}_createWebSocket(){let e;if(this.webSocketFactory)e=this.webSocketFactory();else{if(!this.brokerURL)throw new Error("Either brokerURL or webSocketFactory must be provided");e=new WebSocket(this.brokerURL,this.stompVersions.protocolVersions())}return e.binaryType="arraybuffer",e}_schedule_reconnect(){this._nextReconnectDelay>0&&(this.debug(`STOMP: scheduling reconnection in ${this._nextReconnectDelay}ms`),this._reconnector=setTimeout((()=>{this.reconnectTimeMode===e.ReconnectionTimeMode.EXPONENTIAL&&(this._nextReconnectDelay=2*this._nextReconnectDelay,0!==this.maxReconnectDelay&&(this._nextReconnectDelay=Math.min(this._nextReconnectDelay,this.maxReconnectDelay))),this._connect()}),this._nextReconnectDelay))}async deactivate(t={}){const n=t.force||!1,i=this.active;let s;if(this.state===e.ActivationState.INACTIVE)return this.debug("Already INACTIVE, nothing more to do"),Promise.resolve();if(this._changeState(e.ActivationState.DEACTIVATING),this._nextReconnectDelay=0,this._reconnector&&(clearTimeout(this._reconnector),this._reconnector=void 0),!this._stompHandler||this.webSocket.readyState===e.StompSocketState.CLOSED)return this._changeState(e.ActivationState.INACTIVE),Promise.resolve();{const e=this._stompHandler.onWebSocketClose;s=new Promise(((t,n)=>{this._stompHandler.onWebSocketClose=n=>{e(n),t()}}))}return n?this._stompHandler?.discardWebsocket():i&&this._disposeStompHandler(),s}forceDisconnect(){this._stompHandler&&this._stompHandler.forceDisconnect()}_disposeStompHandler(){this._stompHandler&&this._stompHandler.dispose()}publish(e){this._checkConnection(),this._stompHandler.publish(e)}_checkConnection(){if(!this.connected)throw new TypeError("There is no underlying STOMP connection")}watchForReceipt(e,t){this._checkConnection(),this._stompHandler.watchForReceipt(e,t)}subscribe(e,t,n={}){return this._checkConnection(),this._stompHandler.subscribe(e,t,n)}unsubscribe(e,t={}){this._checkConnection(),this._stompHandler.unsubscribe(e,t)}begin(e){return this._checkConnection(),this._stompHandler.begin(e)}commit(e){this._checkConnection(),this._stompHandler.commit(e)}abort(e){this._checkConnection(),this._stompHandler.abort(e)}ack(e,t,n={}){this._checkConnection(),this._stompHandler.ack(e,t,n)}nack(e,t,n={}){this._checkConnection(),this._stompHandler.nack(e,t,n)}}class m{}class _{}class p{constructor(e){this.client=e}get outgoing(){return this.client.heartbeatOutgoing}set outgoing(e){this.client.heartbeatOutgoing=e}get incoming(){return this.client.heartbeatIncoming}set incoming(e){this.client.heartbeatIncoming=e}}class b extends l{constructor(e){super(),this.maxWebSocketFrameSize=16384,this._heartbeatInfo=new p(this),this.reconnect_delay=0,this.webSocketFactory=e,this.debug=(...e)=>{console.log(...e)}}_parseConnect(...e){let t,n,i,s={};if(e.length<2)throw new Error("Connect requires at least 2 arguments");if("function"===typeof e[1])[s,n,i,t]=e;else switch(e.length){case 6:[s.login,s.passcode,n,i,t,s.host]=e;break;default:[s.login,s.passcode,n,i,t]=e}return[s,n,i,t]}connect(...e){const t=this._parseConnect(...e);t[0]&&(this.connectHeaders=t[0]),t[1]&&(this.onConnect=t[1]),t[2]&&(this.onStompError=t[2]),t[3]&&(this.onWebSocketClose=t[3]),super.activate()}disconnect(e,t={}){e&&(this.onDisconnect=e),this.disconnectHeaders=t,super.deactivate()}send(e,t={},n=""){t=Object.assign({},t);const i=!1===t["content-length"];i&&delete t["content-length"],this.publish({destination:e,headers:t,body:n,skipContentLengthHeader:i})}set reconnect_delay(e){this.reconnectDelay=e}get ws(){return this.webSocket}get version(){return this.connectedVersion}get onreceive(){return this.onUnhandledMessage}set onreceive(e){this.onUnhandledMessage=e}get onreceipt(){return this.onUnhandledReceipt}set onreceipt(e){this.onUnhandledReceipt=e}get heartbeat(){return this._heartbeatInfo}set heartbeat(e){this.heartbeatIncoming=e.incoming,this.heartbeatOutgoing=e.outgoing}}class g{static client(e,t){null==t&&(t=d.default.protocolVersions());const n=()=>{const n=g.WebSocketClass||WebSocket;return new n(e,t)};return new b(n)}static over(e){let t;return"function"===typeof e?t=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/classes/Stomp.html#over"),t=()=>e),new b(t)}}g.WebSocketClass=null,e.Client=l,e.CompatClient=b,e.FrameImpl=i,e.Parser=a,e.Stomp=g,e.StompConfig=m,e.StompHeaders=_,e.Versions=d}))},96083:function(e){"use strict";var t=!("undefined"===typeof window||!window.document||!window.document.createElement),n={canUseDOM:t,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:t&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:t&&!!window.screen,isInWorker:!t};e.exports=n},99438:function(e,t,n){"use strict";var i=n(32456),s=n(50586),o=10,r=40,c=800;function a(e){var t=0,n=0,i=0,s=0;return"detail"in e&&(n=e.detail),"wheelDelta"in e&&(n=-e.wheelDelta/120),"wheelDeltaY"in e&&(n=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n,n=0),i=t*o,s=n*o,"deltaY"in e&&(s=e.deltaY),"deltaX"in e&&(i=e.deltaX),(i||s)&&e.deltaMode&&(1==e.deltaMode?(i*=r,s*=r):(i*=c,s*=c)),i&&!t&&(t=i<1?-1:1),s&&!n&&(n=s<1?-1:1),{spinX:t,spinY:n,pixelX:i,pixelY:s}}a.getEventType=function(){return i.firefox()?"DOMMouseScroll":s("wheel")?"wheel":"mousewheel"},e.exports=a}}]);