(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[9053],{6481:function(t,e,n){"use strict";n.r(e),n.d(e,{AbortError:function(){return a},DefaultHttpClient:function(){return R},HttpClient:function(){return h},HttpError:function(){return s},HttpResponse:function(){return l},HttpTransportType:function(){return _},HubConnection:function(){return W},HubConnectionBuilder:function(){return st},HubConnectionState:function(){return O},JsonHubProtocol:function(){return ot},LogLevel:function(){return r},MessageType:function(){return E},NullLogger:function(){return p},Subject:function(){return j},TimeoutError:function(){return c},TransferFormat:function(){return L},VERSION:function(){return ct}});var o,r,i=(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),s=function(t){function e(e,n){var o=this,r=this.constructor.prototype;return(o=t.call(this,e)||this).statusCode=n,o.__proto__=r,o}return i(e,t),e}(Error),c=function(t){function e(e){void 0===e&&(e="A timeout occurred.");var n=this,o=this.constructor.prototype;return(n=t.call(this,e)||this).__proto__=o,n}return i(e,t),e}(Error),a=function(t){function e(e){void 0===e&&(e="An abort occurred.");var n=this,o=this.constructor.prototype;return(n=t.call(this,e)||this).__proto__=o,n}return i(e,t),e}(Error),u=Object.assign||function(t){for(var e,n=1,o=arguments.length;n0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]-1&&this.subject.observers.splice(t,1),0===this.subject.observers.length&&this.subject.cancelCallback&&this.subject.cancelCallback().catch((function(t){}))},t}(),w=function(){function t(t){this.minimumLogLevel=t,this.outputConsole=console}return t.prototype.log=function(t,e){if(t>=this.minimumLogLevel)switch(t){case r.Critical:case r.Error:this.outputConsole.error("["+(new Date).toISOString()+"] "+r[t]+": "+e);break;case r.Warning:this.outputConsole.warn("["+(new Date).toISOString()+"] "+r[t]+": "+e);break;case r.Information:this.outputConsole.info("["+(new Date).toISOString()+"] "+r[t]+": "+e);break;default:this.outputConsole.log("["+(new Date).toISOString()+"] "+r[t]+": "+e)}},t}(),S=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),C=Object.assign||function(t){for(var e,n=1,o=arguments.length;n=200&&a.statusCode<300?n(new l(a.statusCode,a.statusMessage||"",u)):o(new s(a.statusMessage||"",a.statusCode||0))}));t.abortSignal&&(t.abortSignal.onabort=function(){u.abort(),o(new a)})}))},e.prototype.getCookieString=function(t){return this.cookieJar.getCookieString(t)},e}(h),P=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),I=function(t){function e(e){var n=t.call(this)||this;return n.logger=e,n}return P(e,t),e.prototype.send=function(t){var e=this;return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new a):t.method?t.url?new Promise((function(n,o){var i=new XMLHttpRequest;i.open(t.method,t.url,!0),i.withCredentials=!0,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i.setRequestHeader("Content-Type","text/plain;charset=UTF-8");var u=t.headers;u&&Object.keys(u).forEach((function(t){i.setRequestHeader(t,u[t])})),t.responseType&&(i.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=function(){i.abort(),o(new a)}),t.timeout&&(i.timeout=t.timeout),i.onload=function(){t.abortSignal&&(t.abortSignal.onabort=null),i.status>=200&&i.status<300?n(new l(i.status,i.statusText,i.response||i.responseText)):o(new s(i.statusText,i.status))},i.onerror=function(){e.logger.log(r.Warning,"Error from HTTP request. "+i.status+": "+i.statusText+"."),o(new s(i.statusText,i.status))},i.ontimeout=function(){e.logger.log(r.Warning,"Timeout from HTTP request."),o(new c)},i.send(t.content||"")})):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},e}(h),D=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),R=function(t){function e(e){var n=t.call(this)||this;return"undefined"!=typeof XMLHttpRequest?n.httpClient=new I(e):n.httpClient=new T(e),n}return D(e,t),e.prototype.send=function(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new a):t.method?t.url?this.httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))},e.prototype.getCookieString=function(t){return this.httpClient.getCookieString(t)},e}(h),x=function(){function t(){}return t.write=function(e){return""+e+t.RecordSeparator},t.parse=function(e){if(e[e.length-1]!==t.RecordSeparator)throw new Error("Message is incomplete.");var n=e.split(t.RecordSeparator);return n.pop(),n},t.RecordSeparatorCode=30,t.RecordSeparator=String.fromCharCode(t.RecordSeparatorCode),t}(),H=function(){function t(){}return t.prototype.writeHandshakeRequest=function(t){return x.write(JSON.stringify(t))},t.prototype.parseHandshakeResponse=function(t){var e,n;if(v(t)||"undefined"!=typeof Buffer&&t instanceof Buffer){var o=new Uint8Array(t);if(-1===(i=o.indexOf(x.RecordSeparatorCode)))throw new Error("Message is incomplete.");var r=i+1;e=String.fromCharCode.apply(null,o.slice(0,r)),n=o.byteLength>r?o.slice(r).buffer:null}else{var i,s=t;if(-1===(i=s.indexOf(x.RecordSeparator)))throw new Error("Message is incomplete.");r=i+1,e=s.substring(0,r),n=s.length>r?s.substring(r):null}var c=x.parse(e),a=JSON.parse(c[0]);if(a.type)throw new Error("Expected a handshake response from the server.");return[n,a]},t}();!function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close"}(E||(E={}));var O,j=function(){function t(){this.observers=[]}return t.prototype.next=function(t){for(var e=0,n=this.observers;e0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0&&r[r.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]0?[2,Promise.reject(new Error("Unable to connect to the server with any of the available transports. "+s.join(" ")))]:[2,Promise.reject(new Error("None of the transports supported by the client are supported by the server."))]}}))}))},t.prototype.constructTransport=function(t){switch(t){case _.WebSockets:if(!this.options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new G(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.WebSocket);case _.ServerSentEvents:if(!this.options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new V(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1,this.options.EventSource);case _.LongPolling:return new K(this.httpClient,this.accessTokenFactory,this.logger,this.options.logMessageContent||!1);default:throw new Error("Unknown transport: "+t+".")}},t.prototype.startTransport=function(t,e){var n=this;return this.transport.onreceive=this.onreceive,this.transport.onclose=function(t){return n.stopConnection(t)},this.transport.connect(t,e)},t.prototype.resolveTransportOrError=function(t,e,n){var o=_[t.transport];if(null==o)return this.logger.log(r.Debug,"Skipping transport '"+t.transport+"' because it is not supported by this client."),new Error("Skipping transport '"+t.transport+"' because it is not supported by this client.");if(!function(t,e){return!t||0!=(e&t)}(e,o))return this.logger.log(r.Debug,"Skipping transport '"+_[o]+"' because it was disabled by the client."),new Error("'"+_[o]+"' is disabled by the client.");if(!(t.transferFormats.map((function(t){return L[t]})).indexOf(n)>=0))return this.logger.log(r.Debug,"Skipping transport '"+_[o]+"' because it does not support the requested transfer format '"+L[n]+"'."),new Error("'"+_[o]+"' does not support "+L[n]+".");if(o===_.WebSockets&&!this.options.WebSocket||o===_.ServerSentEvents&&!this.options.EventSource)return this.logger.log(r.Debug,"Skipping transport '"+_[o]+"' because it is not supported in your environment.'"),new Error("'"+_[o]+"' is not supported in your environment.");this.logger.log(r.Debug,"Selecting transport '"+_[o]+"'.");try{return this.constructTransport(o)}catch(t){return t}},t.prototype.isITransport=function(t){return t&&"object"==typeof t&&"connect"in t},t.prototype.stopConnection=function(t){var e=this;if(this.logger.log(r.Debug,"HttpConnection.stopConnection("+t+") called while in state "+this.connectionState+"."),this.transport=void 0,t=this.stopError||t,this.stopError=void 0,"Disconnected"!==this.connectionState)if("Connecting "!==this.connectionState){if("Disconnecting"===this.connectionState&&this.stopPromiseResolver(),t?this.logger.log(r.Error,"Connection disconnected with error '"+t+"'."):this.logger.log(r.Information,"Connection disconnected."),this.sendQueue&&(this.sendQueue.stop().catch((function(t){e.logger.log(r.Error,"TransportSendQueue.stop() threw error '"+t+"'.")})),this.sendQueue=void 0),this.connectionId=void 0,this.connectionState="Disconnected",this.connectionStarted){this.connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(e){this.logger.log(r.Error,"HttpConnection.onclose("+t+") threw error '"+e+"'.")}}}else this.logger.log(r.Warning,"Call to HttpConnection.stopConnection("+t+") was ignored because the connection hasn't yet left the in the connecting state.");else this.logger.log(r.Debug,"Call to HttpConnection.stopConnection("+t+") was ignored because the connection is already in the disconnected state.")},t.prototype.resolveUrl=function(t){if(0===t.lastIndexOf("https://",0)||0===t.lastIndexOf("http://",0))return t;if(!g.isBrowser||!window.document)throw new Error("Cannot resolve '"+t+"'.");var e=window.document.createElement("a");return e.href=t,this.logger.log(r.Information,"Normalizing '"+t+"' to '"+e.href+"'."),e.href},t.prototype.resolveNegotiateUrl=function(t){var e=t.indexOf("?"),n=t.substring(0,-1===e?t.length:e);return"/"!==n[n.length-1]&&(n+="/"),n+="negotiate",-1===(n+=-1===e?"":t.substring(e)).indexOf("negotiateVersion")&&(n+=-1===e?"?":"&",n+="negotiateVersion="+this.negotiateVersion),n},t}(),et=function(){function t(t){this.transport=t,this.buffer=[],this.executing=!0,this.sendBufferedData=new nt,this.transportResult=new nt,this.sendLoopPromise=this.sendLoop()}return t.prototype.send=function(t){return this.bufferData(t),this.transportResult||(this.transportResult=new nt),this.transportResult.promise},t.prototype.stop=function(){return this.executing=!1,this.sendBufferedData.resolve(),this.sendLoopPromise},t.prototype.bufferData=function(t){if(this.buffer.length&&typeof this.buffer[0]!=typeof t)throw new Error("Expected data to be of type "+typeof this.buffer+" but was of type "+typeof t);this.buffer.push(t),this.sendBufferedData.resolve()},t.prototype.sendLoop=function(){return Q(this,void 0,void 0,(function(){var e,n,o;return z(this,(function(r){switch(r.label){case 0:return[4,this.sendBufferedData.promise];case 1:if(r.sent(),!this.executing)return this.transportResult&&this.transportResult.reject("Connection stopped."),[3,6];this.sendBufferedData=new nt,e=this.transportResult,this.transportResult=void 0,n="string"==typeof this.buffer[0]?this.buffer.join(""):t.concatBuffers(this.buffer),this.buffer.length=0,r.label=2;case 2:return r.trys.push([2,4,,5]),[4,this.transport.send(n)];case 3:return r.sent(),e.resolve(),[3,5];case 4:return o=r.sent(),e.reject(o),[3,5];case 5:return[3,0];case 6:return[2]}}))}))},t.concatBuffers=function(t){for(var e=t.map((function(t){return t.byteLength})).reduce((function(t,e){return t+e})),n=new Uint8Array(e),o=0,r=0,i=t;re){var u=t;t=e,e=u}if(n||t%1||e%1){var l=a();return c(t+l*(e-t+s("1e-"+((l+"").length-1))),e)}return o(t,e)}}}]);