1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="e7369607-7724-4d39-281f-a2071efdb2bb")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,80194,825310,946466,502260,204831,614121,t=>{"use strict";let e,s,i,r,n,a,o,l,h=Object.create(null);h.open="0",h.close="1",h.ping="2",h.pong="3",h.message="4",h.upgrade="5",h.noop="6";let u=Object.create(null);Object.keys(h).forEach(t=>{u[h[t]]=t});let c={type:"error",data:"parser error"},d="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),p="function"==typeof ArrayBuffer,f=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,_=(t,e,s)=>{let{type:i,data:r}=t;if(d&&r instanceof Blob)if(e)return s(r);else return g(r,s);if(p&&(r instanceof ArrayBuffer||f(r)))if(e)return s(r);else return g(new Blob([r]),s);return s(h[i]+(r||""))},g=(t,e)=>{let s=new FileReader;return s.onload=function(){e("b"+(s.result.split(",")[1]||""))},s.readAsDataURL(t)};function m(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b="u"<typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<y.length;t++)b[y.charCodeAt(t)]=t;let v="function"==typeof ArrayBuffer,w=(t,e)=>{if("string"!=typeof t)return{type:"message",data:x(t,e)};let s=t.charAt(0);return"b"===s?{type:"message",data:k(t.substring(1),e)}:u[s]?t.length>1?{type:u[s],data:t.substring(1)}:{type:u[s]}:c},k=(t,e)=>v?x((t=>{let e=.75*t.length,s=t.length,i,r=0,n,a,o,l;"="===t[t.length-1]&&(e--,"="===t[t.length-2]&&e--);let h=new ArrayBuffer(e),u=new Uint8Array(h);for(i=0;i<s;i+=4)n=b[t.charCodeAt(i)],a=b[t.charCodeAt(i+1)],o=b[t.charCodeAt(i+2)],l=b[t.charCodeAt(i+3)],u[r++]=n<<2|a>>4,u[r++]=(15&a)<<4|o>>2,u[r++]=(3&o)<<6|63&l;return h})(t),e):{base64:!0,data:t},x=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer;function E(t){return t.reduce((t,e)=>t+e.length,0)}function A(t,e){if(t[0].length===e)return t.shift();let s=new Uint8Array(e),i=0;for(let r=0;r<e;r++)s[r]=t[0][i++],i===t[0].length&&(t.shift(),i=0);return t.length&&i<t[0].length&&(t[0]=t[0].slice(i)),s}function S(t){if(t){var e=t;for(var s in S.prototype)e[s]=S.prototype[s];return e}}S.prototype.on=S.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},S.prototype.once=function(t,e){function s(){this.off(t,s),e.apply(this,arguments)}return s.fn=e,this.on(t,s),this},S.prototype.off=S.prototype.removeListener=S.prototype.removeAllListeners=S.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var s,i=this._callbacks["$"+t];if(!i)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var r=0;r<i.length;r++)if((s=i[r])===e||s.fn===e){i.splice(r,1);break}return 0===i.length&&delete this._callbacks["$"+t],this},S.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=Array(arguments.length-1),s=this._callbacks["$"+t],i=1;i<arguments.length;i++)e[i-1]=arguments[i];if(s){s=s.slice(0);for(var i=0,r=s.length;i<r;++i)s[i].apply(this,e)}return this},S.prototype.emitReserved=S.prototype.emit,S.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},S.prototype.hasListeners=function(t){return!!this.listeners(t).length};let T="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),O="u">typeof self?self:"u">typeof window?window:Function("return this")();function R(t){for(var e=arguments.length,s=Array(e>1?e-1:0),i=1;i<e;i++)s[i-1]=arguments[i];return s.reduce((e,s)=>(t.hasOwnProperty(s)&&(e[s]=t[s]),e),{})}let C=O.setTimeout,U=O.clearTimeout;function B(t,e){e.useNativeTimers?(t.setTimeoutFn=C.bind(O),t.clearTimeoutFn=U.bind(O)):(t.setTimeoutFn=O.setTimeout.bind(O),t.clearTimeoutFn=O.clearTimeout.bind(O))}function z(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}
2class N extends Error{constructor(t,e,s){super(t),this.description=e,this.context=s,this.type="TransportError"}}class L extends S{onError(t,e,s){return super.emitReserved("error",new N(t,e,s)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return("opening"===this.readyState||"open"===this.readyState)&&(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let e=w(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){let t=this.opts.hostname;return -1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&443!==Number(this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){let e=function(t){let e="";for(let s in t)t.hasOwnProperty(s)&&(e.length&&(e+="&"),e+=encodeURIComponent(s)+"="+encodeURIComponent(t[s]));return e}(t);return e.length?"?"+e:""}constructor(t){super(),this.writable=!1,B(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}}class P extends L{get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let e=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let t=0;this._polling&&(t++,this.once("pollComplete",function(){--t||e()})),this.writable||(t++,this.once("drain",function(){--t||e()}))}else e()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let e=t=>{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)};((t,e)=>{let s=t.split("\x1e"),i=[];for(let t=0;t<s.length;t++){let r=w(s[t],e);if(i.push(r),"error"===r.type)break}return i})(t,this.socket.binaryType).forEach(e),"closed"!==this.readyState&&(this._polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){var e;let s,i,r;this.writable=!1,e=t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})},i=Array(s=t.length),r=0,t.forEach((t,n)=>{_(t,!1,t=>{i[n]=t,++r===s&&e(i.join("\x1e"))})})}uri(){let t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=z()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}constructor(){super(...arguments),this._polling=!1}}let F=!1;try{F="u">typeof XMLHttpRequest&&"withCredentials"in new XMLHttpRequest}catch(t){}let M=F;function D(){}class I extends P{doWrite(t,e){let s=this.request({method:"POST",data:t});s.on("success",e),s.on("error",(t,e)=>{this.onError("xhr post error",t,e)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(t,e)=>{this.onError("xhr poll error",t,e)}),this.pollXhr=t}constructor(t){if(super(t),"u">typeof location){const e="https:"===location.protocol;let s=location.port;s||(s=e?"443":"80"),this.xd="u">typeof location&&t.hostname!==location.hostname||s!==t.port}}}class q extends S{_create(){var t;let e=R(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this._opts.xd;let s=this._xhr=this.createRequest(e);try{s.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders)for(let t in s.setDisableHeaderCheck&&s.setDisableHeaderCheck(!0),this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(t)&&s.setRequestHeader(t,this._opts.extraHeaders[t])}catch(t){}if("POST"===this._method)try{s.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(t){}try{s.setRequestHeader("Accept","*/*")}catch(t){}null==(t=this._opts.cookieJar)||t.addCookies(s),"withCredentials"in s&&(s.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(s.timeout=this._opts.requestTimeout),s.onreadystatechange=()=>{var t;3===s.readyState&&(null==(t=this._opts.cookieJar)||t.parseCookies(s.getResponseHeader("set-cookie"))),4===s.readyState&&(200===s.status||1223===s.status?this._onLoad():this.setTimeoutFn(()=>{this._onError("number"==typeof s.status?s.status:0)},0))},s.send(this._data)}catch(t){this.setTimeoutFn(()=>{this._onError(t)},0);return}"u">typeof document&&(this._index=q.requestsCount++,q.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(void 0!==this._xhr&&null!==this._xhr){if(this._xhr.onreadystatechange=D,t)try{this._xhr.abort()}catch(t){}"u">typeof document&&delete q.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}constructor(t,e,s){super(),this.createRequest=t,B(this,s),this._opts=s,this._method=s.method||"GET",this._uri=e,this._data=void 0!==s.data?s.data:null,this._create()}}function j(){for(let t in q.requests)q.requests.hasOwnProperty(t)&&q.requests[t].abort()}q.requestsCount=0,q.requests={},"u">typeof document&&("function"==typeof attachEvent?attachEvent("onunload",j):"function"==typeof addEventListener&&addEventListener("onpagehide"in O?"pagehide":"unload",j,!1));let W=(l=Q({xdomain:!1}))&&null!==l.responseType;function Q(t){let e=t.xdomain;try{if("u">typeof XMLHttpRequest&&(!e||M))return new XMLHttpRequest}catch(t){}if(!e)try{return new O[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(t){}}let Z="u">typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();class K extends L{get name(){return"websocket"}doOpen(){let t=this.uri(),e=this.opts.protocols,s=Z?{}:R(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(s.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,e,s)}catch(t){return this.emitReserved("error",t)}
2this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let s=t[e],i=e===t.length-1;_(s,this.supportsBinary,t=>{try{this.doWrite(s,t)}catch(t){}i&&T(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){void 0!==this.ws&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=z()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}}let H=O.WebSocket||O.MozWebSocket,V={websocket:class extends K{createSocket(t,e,s){return Z?new H(t,e,s):e?new H(t,e):new H(t)}doWrite(t,e){this.ws.send(e)}},webtransport:class extends L{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{var i,r;let n,a,o,l,h=(i=Number.MAX_SAFE_INTEGER,r=this.socket.binaryType,s||(s=new TextDecoder),n=[],a=0,o=-1,l=!1,new TransformStream({transform(t,e){for(n.push(t);;){if(0===a){if(1>E(n))break;let t=A(n,1);l=(128&t[0])==128,a=(o=127&t[0])<126?3:126===o?1:2}else if(1===a){if(2>E(n))break;let t=A(n,2);o=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),a=3}else if(2===a){if(8>E(n))break;let t=A(n,8),s=new DataView(t.buffer,t.byteOffset,t.length),i=s.getUint32(0);if(i>2097151){e.enqueue(c);break}o=0x100000000*i+s.getUint32(4),a=3}else{if(E(n)<o)break;let t=A(n,o);e.enqueue(w(l?t:s.decode(t),r)),a=0}if(0===o||o>i){e.enqueue(c);break}}}})),u=t.readable.pipeThrough(h).getReader(),g=new TransformStream({transform(t,s){var i;i=e=>{let i,r=e.length;if(r<126)new DataView((i=new Uint8Array(1)).buffer).setUint8(0,r);else if(r<65536){let t=new DataView((i=new Uint8Array(3)).buffer);t.setUint8(0,126),t.setUint16(1,r)}else{let t=new DataView((i=new Uint8Array(9)).buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(r))}t.data&&"string"!=typeof t.data&&(i[0]|=128),s.enqueue(i),s.enqueue(e)},d&&t.data instanceof Blob?t.data.arrayBuffer().then(m).then(i):p&&(t.data instanceof ArrayBuffer||f(t.data))?i(m(t.data)):_(t,!1,t=>{e||(e=new TextEncoder),i(e.encode(t))})}});g.readable.pipeTo(t.writable),this._writer=g.writable.getWriter();let y=()=>{u.read().then(t=>{let{done:e,value:s}=t;e||(this.onPacket(s),y())}).catch(t=>{})};y();let b={type:"open"};this.query.sid&&(b.data=`{"sid":"${this.query.sid}"}`),this._writer.write(b).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let e=0;e<t.length;e++){let s=t[e],i=e===t.length-1;this._writer.write(s).then(()=>{i&&T(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;null==(t=this._transport)||t.close()}},polling:class extends I{request(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.assign(t,{xd:this.xd},this.opts),new q(Q,this.uri(),t)}constructor(t){super(t);const e=t&&t.forceBase64;this.supportsBinary=W&&!e}}},Y=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function J(t){var e,s;let i,r;if(t.length>8e3)throw"URI too long";let n=t,a=t.indexOf("["),o=t.indexOf("]");-1!=a&&-1!=o&&(t=t.substring(0,a)+t.substring(a,o).replace(/:/g,";")+t.substring(o,t.length));let l=Y.exec(t||""),h={},u=14;for(;u--;)h[$[u]]=l[u]||"";return -1!=a&&-1!=o&&(h.source=n,h.host=h.host.substring(1,h.host.length-1).replace(/;/g,":"),h.authority=h.authority.replace("[","").replace("]","").replace(/;/g,":"),h.ipv6uri=!0),i=(e=h.path).replace(/\/{2,9}/g,"/").split("/"),("/"==e.slice(0,1)||0===e.length)&&i.splice(0,1),"/"==e.slice(-1)&&i.splice(i.length-1,1),h.pathNames=i,s=h.query,r={},s.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(t,e,s){e&&(r[e]=s)}),h.queryKey=r,h}let G="function"==typeof addEventListener&&"function"==typeof removeEventListener,X=[];G&&addEventListener("offline",()=>
2{X.forEach(t=>t())},!1);class tt extends S{createTransport(t){let e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);let s=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](s)}_open(){if(0===this.transports.length)return void this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);let t=this.opts.rememberUpgrade&&tt.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket")?"websocket":this.transports[0];this.readyState="opening";let e=this.createTransport(t);e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",tt.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush()}_onPacket(t){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState)switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let e=Error("server error");e.code=t.data,this._onError(e);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data)}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),"closed"!==this.readyState&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let e=0;e<this.writeBuffer.length;e++){let s=this.writeBuffer[e].data;if(s&&(t+="string"==typeof s?function(t){let e=0,s=0;for(let i=0,r=t.length;i<r;i++)(e=t.charCodeAt(i))<128?s+=1:e<2048?s+=2:e<55296||e>=57344?s+=3:(i++,s+=4);return s}(s):Math.ceil(1.33*(s.byteLength||s.size))),e>0&&t>this._maxPayload)return this.writeBuffer.slice(0,e);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,T(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,e,s){return this._sendPacket("message",t,e,s),this}send(t,e,s){return this._sendPacket("message",t,e,s),this}_sendPacket(t,e,s,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof s&&(i=s,s=null),"closing"===this.readyState||"closed"===this.readyState)return;(s=s||{}).compress=!1!==s.compress;let r={type:t,data:e,options:s};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},s=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return("opening"===this.readyState||"open"===this.readyState)&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?s():t()}):this.upgrading?s():t()),this}_onError(t){if(tt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&"opening"===this.readyState)return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,e){if("opening"===this.readyState||"open"===this.readyState||"closing"===this.readyState){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),G&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let t=X.indexOf(this._offlineEventListener);-1!==t&&X.splice(t,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this._prevBufferLen=0}}constructor(t,e){if(super(),this.binaryType="arraybuffer",this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&"object"==typeof t&&(e=t,t=null),t){const s=J(t);e.hostname=s.host,e.secure="https"===s.protocol||"wss"===s.protocol,e.port=s.port,s.query&&(e.query=s.query)}else e.host&&(e.hostname=J(e.host).host);B(this,e),this.secure=null!=e.secure?e.secure:"u">typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("u">typeof location?location.hostname:"localhost"),this.port=e.port||("u">typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={}
2,e.transports.forEach(t=>{let e=t.prototype.name;this.transports.push(e),this._transportsByName[e]=t}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},s=t.split("&");for(let t=0,i=s.length;t<i;t++){let i=s[t].split("=");e[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return e}(this.opts.query)),G&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},X.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}}tt.protocol=4;class te extends tt{onOpen(){if(super.onOpen(),"open"===this.readyState&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let e=this.createTransport(t),s=!1;tt.priorWebsocketSuccess=!1;let i=()=>{s||(e.send([{type:"ping",data:"probe"}]),e.once("packet",t=>{if(!s)if("pong"===t.type&&"probe"===t.data){if(this.upgrading=!0,this.emitReserved("upgrading",e),!e)return;tt.priorWebsocketSuccess="websocket"===e.name,this.transport.pause(()=>{s||"closed"!==this.readyState&&(h(),this.setTransport(e),e.send([{type:"upgrade"}]),this.emitReserved("upgrade",e),e=null,this.upgrading=!1,this.flush())})}else{let t=Error("probe error");t.transport=e.name,this.emitReserved("upgradeError",t)}}))};function r(){s||(s=!0,h(),e.close(),e=null)}let n=t=>{let s=Error("probe error: "+t);s.transport=e.name,r(),this.emitReserved("upgradeError",s)};function a(){n("transport closed")}function o(){n("socket closed")}function l(t){e&&t.name!==e.name&&r()}let h=()=>{e.removeListener("open",i),e.removeListener("error",n),e.removeListener("close",a),this.off("close",o),this.off("upgrading",l)};e.once("open",i),e.once("error",n),e.once("close",a),this.once("close",o),this.once("upgrading",l),-1!==this._upgrades.indexOf("webtransport")&&"webtransport"!==t?this.setTimeoutFn(()=>{s||e.open()},200):e.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let e=[];for(let s=0;s<t.length;s++)~this.transports.indexOf(t[s])&&e.push(t[s]);return e}constructor(){super(...arguments),this._upgrades=[]}}class ts extends te{constructor(t,e={}){const s="object"==typeof t,i=s?{...t}:{...e};(!i.transports||i.transports&&"string"==typeof i.transports[0])&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(t=>V[t]).filter(t=>!!t)),super(s?i:t,i)}}ts.protocol;let ti="function"==typeof ArrayBuffer,tr=Object.prototype.toString,tn="function"==typeof Blob||"u">typeof Blob&&"[object BlobConstructor]"===tr.call(Blob),ta="function"==typeof File||"u">typeof File&&"[object FileConstructor]"===tr.call(File);function to(t){return ti&&(t instanceof ArrayBuffer||("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer))||tn&&t instanceof Blob||ta&&t instanceof File}let tl=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];(tg=tm||(tm={}))[tg.CONNECT=0]="CONNECT",tg[tg.DISCONNECT=1]="DISCONNECT",tg[tg.EVENT=2]="EVENT",tg[tg.ACK=3]="ACK",tg[tg.CONNECT_ERROR=4]="CONNECT_ERROR",tg[tg.BINARY_EVENT=5]="BINARY_EVENT",tg[tg.BINARY_ACK=6]="BINARY_ACK";class th extends S{add(t){let e;if("string"==typeof t){if(this.reconstructor)throw Error("got plaintext data when reconstructing a packet");let s=(e=this.decodeString(t)).type===tm.BINARY_EVENT;s||e.type===tm.BINARY_ACK?(e.type=s?tm.EVENT:tm.ACK,this.reconstructor=new tu(e)):super.emitReserved("decoded",e)}else if(to(t)||t.base64)if(this.reconstructor)(e=this.reconstructor.takeBinaryData(t))&&(this.reconstructor=null,super.emitReserved("decoded",e));else throw Error("got binary data when not reconstructing a packet");else throw Error("Unknown type: "+t)}decodeString(t){let e=0,s={type:Number(t.charAt(0))};if(void 0===tm[s.type])throw Error("unknown packet type "+s.type);if(s.type===tm.BINARY_EVENT||s.type===tm.BINARY_ACK){let i=e+1;for(;"-"!==t.charAt(++e)&&e!=t.length;);let r=t.substring(i,e);
2if(r!=Number(r)||"-"!==t.charAt(e))throw Error("Illegal attachments");let n=Number(r);if(!tc(n)||n<1)throw Error("Illegal attachments");if(n>this.opts.maxAttachments)throw Error("too many attachments");s.attachments=n}if("/"===t.charAt(e+1)){let i=e+1;for(;++e&&","!==t.charAt(e)&&e!==t.length;);s.nsp=t.substring(i,e)}else s.nsp="/";let i=t.charAt(e+1);if(""!==i&&Number(i)==i){let i=e+1;for(;++e;){let s=t.charAt(e);if(null==s||Number(s)!=s){--e;break}if(e===t.length)break}s.id=Number(t.substring(i,e+1))}if(t.charAt(++e)){let i=this.tryParse(t.substr(e));if(th.isPayloadValid(s.type,i))s.data=i;else throw Error("invalid payload")}return s}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(t){return!1}}static isPayloadValid(t,e){switch(t){case tm.CONNECT:return td(e);case tm.DISCONNECT:return void 0===e;case tm.CONNECT_ERROR:return"string"==typeof e||td(e);case tm.EVENT:case tm.BINARY_EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tl.indexOf(e[0]));case tm.ACK:case tm.BINARY_ACK:return Array.isArray(e)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},"function"==typeof t?{reviver:t}:t)}}class tu{takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){var e,s;let t=(e=this.reconPack,s=this.buffers,e.data=function t(e,s){if(!e)return e;if(e&&!0===e._placeholder){if("number"==typeof e.num&&e.num>=0&&e.num<s.length)return s[e.num];throw Error("illegal attachments")}if(Array.isArray(e))for(let i=0;i<e.length;i++)e[i]=t(e[i],s);else if("object"==typeof e)for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(e[i]=t(e[i],s));return e}(e.data,s),delete e.attachments,e);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}}let tc=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t};function td(t){return"[object Object]"===Object.prototype.toString.call(t)}function tp(t,e,s){return t.on(e,s),function(){t.off(e,s)}}t.s(["Decoder",0,th,"Encoder",0,class{encode(t){return(t.type===tm.EVENT||t.type===tm.ACK)&&function t(e,s){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let s=0,i=e.length;s<i;s++)if(t(e[s]))return!0;return!1}if(to(e))return!0;if(e.toJSON&&"function"==typeof e.toJSON&&1==arguments.length)return t(e.toJSON(),!0);for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t(e[s]))return!0;return!1}(t)?this.encodeAsBinary({type:t.type===tm.EVENT?tm.BINARY_EVENT:tm.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let e=""+t.type;return(t.type===tm.BINARY_EVENT||t.type===tm.BINARY_ACK)&&(e+=t.attachments+"-"),t.nsp&&"/"!==t.nsp&&(e+=t.nsp+","),null!=t.id&&(e+=t.id),null!=t.data&&(e+=JSON.stringify(t.data,this.replacer)),e}encodeAsBinary(t){let e,s,i=(e=[],s=t.data,t.data=function t(e,s,i){if(!e)return e;if(to(e)){let t={_placeholder:!0,num:s.length};return s.push(e),t}if(Array.isArray(e)){let i=Array(e.length);for(let r=0;r<e.length;r++)i[r]=t(e[r],s);return i}if("object"==typeof e&&!(e instanceof Date)){if(e.toJSON&&"function"==typeof e.toJSON&&!i)return t(e.toJSON(),s,!0);let r={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=t(e[i],s));return r}return e}(s,e),t.attachments=e.length,{packet:t,buffers:e}),r=this.encodeAsString(i.packet),n=i.buffers;return n.unshift(r),n}constructor(t){this.replacer=t}},"PacketType",0,tm,"isPacketValid",0,function(t){var e;return"string"==typeof t.nsp&&(void 0===(e=t.id)||tc(e))&&function(t,e){switch(t){case tm.CONNECT:return void 0===e||td(e);case tm.DISCONNECT:return void 0===e;case tm.EVENT:return Array.isArray(e)&&("number"==typeof e[0]||"string"==typeof e[0]&&-1===tl.indexOf(e[0]));case tm.ACK:return Array.isArray(e);case tm.CONNECT_ERROR:return"string"==typeof e||td(e);default:return!1}}(t.type,t.data)},"protocol",0,5],351890);let tf=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class t_ extends S{get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[tp(t,"open",this.onopen.bind(this)),tp(t,"packet",this.onpacket.b
2ind(this)),tp(t,"error",this.onerror.bind(this)),tp(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected||(this.subEvents(),this.io._reconnecting||this.io.open(),"open"===this.io._readyState&&this.onopen()),this}open(){return this.connect()}send(){for(var t=arguments.length,e=Array(t),s=0;s<t;s++)e[s]=arguments[s];return e.unshift("message"),this.emit.apply(this,e),this}emit(t){for(var e,s,i,r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];if(tf.hasOwnProperty(t))throw Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let o={type:tm.EVENT,data:n};if(o.options={},o.options.compress=!1!==this.flags.compress,"function"==typeof n[n.length-1]){let t=this.ids++,e=n.pop();this._registerAckCallback(t,e),o.id=t}let l=null==(s=null==(e=this.io.engine)?void 0:e.transport)?void 0:s.writable,h=this.connected&&!(null==(i=this.io.engine)?void 0:i._hasPingExpired());return this.flags.volatile&&!l||(h?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,e){var s,i=this;let r=null!=(s=this.flags.timeout)?s:this._opts.ackTimeout;if(void 0===r){this.acks[t]=e;return}let n=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let e=0;e<this.sendBuffer.length;e++)this.sendBuffer[e].id===t&&this.sendBuffer.splice(e,1);e.call(this,Error("operation has timed out"))},r),a=function(){for(var t=arguments.length,s=Array(t),r=0;r<t;r++)s[r]=arguments[r];i.io.clearTimeoutFn(n),e.apply(i,s)};a.withError=!0,this.acks[t]=a}emitWithAck(t){for(var e=arguments.length,s=Array(e>1?e-1:0),i=1;i<e;i++)s[i-1]=arguments[i];return new Promise((e,i)=>{let r=(t,s)=>t?i(t):e(s);r.withError=!0,s.push(r),this.emit(t,...s)})}_addToQueue(t){let e;var s=this;"function"==typeof t[t.length-1]&&(e=t.pop());let i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(function(t){for(var r=arguments.length,n=Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];return s._queue[0],null!==t?i.tryCount>s._opts.retries&&(s._queue.shift(),e&&e(t)):(s._queue.shift(),e&&e(null,...n)),i.pending=!1,s._drainQueue()}),this._queue.push(i),this._drainQueue()}_drainQueue(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.connected||0===this._queue.length)return;let e=this._queue[0];(!e.pending||t)&&(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:tm.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e),this._clearAcks()}
2_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(e=>String(e.id)===t)){let e=this.acks[t];delete this.acks[t],e.withError&&e.call(this,Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case tm.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case tm.EVENT:case tm.BINARY_EVENT:this.onevent(t);break;case tm.ACK:case tm.BINARY_ACK:this.onack(t);break;case tm.DISCONNECT:this.ondisconnect();break;case tm.CONNECT_ERROR:this.destroy();let e=Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){let e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length)for(let e of this._anyListeners.slice())e.apply(this,t);super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){let e=this,s=!1;return function(){for(var i=arguments.length,r=Array(i),n=0;n<i;n++)r[n]=arguments[n];s||(s=!0,e.packet({type:tm.ACK,id:t,data:r}))}}onack(t){let e=this.acks[t.id];"function"==typeof e&&(delete this.acks[t.id],e.withError&&t.data.unshift(null),e.apply(this,t.data))}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:tm.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let e=this._anyListeners;for(let s=0;s<e.length;s++)if(t===e[s]){e.splice(s,1);break}}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let e=this._anyOutgoingListeners;for(let s=0;s<e.length;s++)if(t===e[s]){e.splice(s,1);break}}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length)for(let e of this._anyOutgoingListeners.slice())e.apply(this,t.data)}constructor(t,e,s){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=e,s&&s.auth&&(this.auth=s.auth),this._opts=Object.assign({},s),this.io._autoConnect&&this.open()}}var tg,tm,ty=t.i(351890);function tb(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}tb.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),s=Math.floor(e*this.jitter*t);t=(1&Math.floor(10*e))==0?t-s:t+s}return 0|Math.min(t,this.max)},tb.prototype.reset=function(){this.attempts=0},tb.prototype.setMin=function(t){this.ms=t},tb.prototype.setMax=function(t){this.max=t},tb.prototype.setJitter=function(t){this.jitter=t};class tv extends S{reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null==(e=this.backoff)||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null==(e=this.backoff)||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null==(e=this.backoff)||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ts(this.uri,this.opts);let e=this.engine,s=this;this._readyState="opening",this.skipReconnect=!1;let i=tp(e,"open",function(){s.onopen(),t&&t()}),r=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},n=tp(e,"error",r);if(!1!==this._timeout){let t=this._timeout,s=this.setTimeoutFn(()=>{i(),r(Error("timeout")),e.close()},t);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}return this.subs.push(i),this.subs.push(n),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(tp(t,"ping",this.onping.bind(this)),tp(t,"data",this.ondata.bind(this)),tp(t,"error",this.onerror.bind(this)),tp(t,"close",this.onclose.bind(this)),tp(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){T(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let s=this.nsps[t];return s?this._autoConnect&&!s.active&&s.connect():(s=new t_(this,t,e),this.nsps[t]=s),s}_destroy(t){for(let t of Object.keys(this.nsps))if(this.nsps[t].active)return;this._close()}_packet(t){let e=this.encoder.encode(t);for(let s=0;s<e.length;s++)this.engine.write(e[s],t.options)}
2cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,e){var s;this.cleanup(),null==(s=this.engine)||s.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let e=this.backoff.duration();this._reconnecting=!0;let s=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open(e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()}))},e);this.opts.autoUnref&&s.unref(),this.subs.push(()=>{this.clearTimeoutFn(s)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}constructor(t,e){var s;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,B(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!=(s=e.randomizationFactor)?s:.5),this.backoff=new tb({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const i=e.parser||ty;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}}let tw={};function tk(t,e){let s;"object"==typeof t&&(e=t,t=void 0);let i=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",s=arguments.length>2?arguments[2]:void 0,i=t;s=s||"u">typeof location&&location,null==t&&(t=s.protocol+"//"+s.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?s.protocol+t:s.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==s?s.protocol+"//"+t:"https://"+t),i=J(t)),!i.port&&(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";let r=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+r+":"+i.port+e,i.href=i.protocol+"://"+r+(s&&s.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),r=i.source,n=i.id,a=i.path,o=tw[n]&&a in tw[n].nsps;return e.forceNew||e["force new connection"]||!1===e.multiplex||o?s=new tv(r,e):(tw[n]||(tw[n]=new tv(r,e)),s=tw[n]),i.query&&!e.query&&(e.query=i.queryKey),s.socket(i.path,e)}Object.assign(tk,{Manager:tv,Socket:t_,io:tk,connect:tk});var tx=t.i(706364);let tE={},tA=t=>t&&t.trim()?t:void 0;function tS(){return tE.apiUrl}function tT(){return tE.socketUrl}t.s(["clearPremiumApi",0,function(){tE={}},"getPremiumApiUrl",0,tS,"getPremiumCdnUrl",0,function(){return tE.cdnUrl},"getPremiumSocketUrl",0,tT,"setPremiumApi",0,function(t){tE={apiUrl:tA(t.apiUrl),cdnUrl:tA(t.cdnUrl),socketUrl:tA(t.socketUrl)}}],825310);let tO={content:"/content/v21.0",advertiser:"/advertiser/v21.0",live:"/live-channel/v21.0",display:"/display/v21.0",payment:"/payment/v21.0",paymentVoucher:"/payment-voucher/v21.0",user:"/user-core-api/v21.0"},tR=null;function tC(){if(!tR)throw Error("core-api not configured â call configureCoreApi() at app bootstrap");return tR}t.s(["configureCoreApi",0,function(t){tR=t},"getAuthClientId",0,function(){var t;let e=null==(t=tC().api)?void 0:t.authClientId;if(!e)throw Error("getAuthClientId: thiếu apiV2.authClientId. Äặt NEXT_PUBLIC_AUTH_V2_CLIENT_ID (web) / VITE_AUTH_V2_CLIENT_ID (TV) và truyá»n và o configureCoreApi().");return e},"getCoreApiConfig",0,tC,"getPlatformName",0,function(){var t;let e=null==(t=tC().api)?void 0:t.platformName;return"function"==typeof e?e()||"unknown":null!=e?e:"unknown"},"getServiceBaseUrl",0,function(t){let e=tC().api;if(!(null==e?void 0:e.baseUrl))throw Error("core-api: chưa cấu hình api.baseUrl â má»i endpoint Äá»u cần nó");return`${e.baseUrl}${tO[t]}`},"isCoreApiConfigured",0,function(){return null!==tR},"resolveAssetUrl",0,function(t){var e,s;if(!t||/^https?:\/\//.test(t))return t;let i=null!=(e=null==(s=tC().api)?void 0:s.assetBaseUrl)?e:"";return i?`${i.replace(/\/$/,"")}/${t.replace(/^\//,"")}`:t},"setSessionRefresher",0,function(t){tR&&(tR.refreshSession=t)}],946466);let tU=t=>{var e,s;return tT()||t||(null==(e=(s=tC()).getSocketBaseUrl)?void 0:e.call(s))||tS()||tC().getApiBaseUrl()||""},tB={namespace:"/notification-connector/listen",path:"/notification-connector/socket.io",get appKeyWss(){var tz;return null!=(tz=tC().appKeyWss)?tz:""}};function tN(t){let e=t.length;for(;--e>=0;)t[e]=0}t.s(["appInfo",0,{deviceType:3,spId:"1",dtId:1},"getPlatform",0,function(){return tC().platform},"getSocketBaseUrl",0,tU,"getVersionCode",0,function(){return tC().versionCode},"socketConfig",0,tB],502260);let tL=573,tP=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),tF=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),tM=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),tD=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),tI=Array(576);tN(tI);let tq=Array(60);tN(tq);let tj=Array(512);tN(tj);let tW=Array(256);tN(tW);let tQ=Array(29);tN(tQ);let tZ=Array(30);function tK(t,e,s,i,r){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=r,this.has_stree=t&&t.length}function tH(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}tN(tZ);let tV=t=>t<256?tj[t]:tj[256+(t>>>7)],tY=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},t$=(t,e,s)=>{t.bi_valid>16-s?(t.bi_buf|=e<<t.bi_valid&65535,tY(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=s)},tJ=(t,e,s)=>{t$(t,s[2*e],s[2*e+1])},tG=(t,e)=>{let s=0;do s|=1&t,t>>>=1,s<<=1;while(--e>0)return s>>>1},tX=(t,e,s)=>{let i,r,n=Array(16),a=0;for(i=1;i<=15;i++)a=a+s[i-1]<<1,n[i]=a;for(r=0;r<=e;r++){let e=t[2*r+1];0!==e&&(t[2*r]=tG(n[e]++,e))}},t0=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},t1=t=>{t.bi_valid>8?tY(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},t2=(t,e,s,i)=>{let r=2*e,n=2*s;return t[r]<t[n]||t[r]===t[n]&&i[e]<=i[s]},t5=(t,e,s)=>{let i=t.heap[s],r=s<<1;for(;r<=t.heap_len&&(r<t.heap_len&&t2(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!t2(e,i,t.heap[r],t.depth));)t.heap[s]=t.heap[r],s=r,r<<=1;t.heap[s]=i},t6=(t,e,s)=>{let i,r,n,a,o=0;if(0!==t.sym_next)do i=(255&t.pending_buf[t.sym_buf+o++])+((255&t.pending_buf[t.sym_buf+o++])<<8),r=t.pending_buf[t.sym_buf+o++],0===i?tJ(t,r,e):(tJ(t,(n=tW[r])+256+1,e),0!==(a=tP[n])&&t$(t,r-=tQ[n],a),tJ(t,n=tV(--i),s),0!==(a=tF[n])&&t$(t,i-=tZ[n],a));while(o<t.sym_next)tJ(t,256,e)},t3=(t,e)=>{let s,i,r,n=e.dyn_tree,a=e.stat_desc.static_tree,o=e.stat_desc.has_stree,l=e.stat_desc.elems,h=-1;for(t.heap_len=0,t.heap_max=tL,s=0;s<l;
2s++)0!==n[2*s]?(t.heap[++t.heap_len]=h=s,t.depth[s]=0):n[2*s+1]=0;for(;t.heap_len<2;)n[2*(r=t.heap[++t.heap_len]=h<2?++h:0)]=1,t.depth[r]=0,t.opt_len--,o&&(t.static_len-=a[2*r+1]);for(e.max_code=h,s=t.heap_len>>1;s>=1;s--)t5(t,n,s);r=l;do s=t.heap[1],t.heap[1]=t.heap[t.heap_len--],t5(t,n,1),i=t.heap[1],t.heap[--t.heap_max]=s,t.heap[--t.heap_max]=i,n[2*r]=n[2*s]+n[2*i],t.depth[r]=(t.depth[s]>=t.depth[i]?t.depth[s]:t.depth[i])+1,n[2*s+1]=n[2*i+1]=r,t.heap[1]=r++,t5(t,n,1);while(t.heap_len>=2)t.heap[--t.heap_max]=t.heap[1],((t,e)=>{let s,i,r,n,a,o,l=e.dyn_tree,h=e.max_code,u=e.stat_desc.static_tree,c=e.stat_desc.has_stree,d=e.stat_desc.extra_bits,p=e.stat_desc.extra_base,f=e.stat_desc.max_length,_=0;for(n=0;n<=15;n++)t.bl_count[n]=0;for(l[2*t.heap[t.heap_max]+1]=0,s=t.heap_max+1;s<tL;s++)(n=l[2*l[2*(i=t.heap[s])+1]+1]+1)>f&&(n=f,_++),l[2*i+1]=n,!(i>h)&&(t.bl_count[n]++,a=0,i>=p&&(a=d[i-p]),o=l[2*i],t.opt_len+=o*(n+a),c&&(t.static_len+=o*(u[2*i+1]+a)));if(0!==_){do{for(n=f-1;0===t.bl_count[n];)n--;t.bl_count[n]--,t.bl_count[n+1]+=2,t.bl_count[f]--,_-=2}while(_>0)for(n=f;0!==n;n--)for(i=t.bl_count[n];0!==i;)!((r=t.heap[--s])>h)&&(l[2*r+1]!==n&&(t.opt_len+=(n-l[2*r+1])*l[2*r],l[2*r+1]=n),i--)}})(t,e),tX(n,h,t.bl_count)},t8=(t,e,s)=>{let i,r,n=-1,a=e[1],o=0,l=7,h=4;for(0===a&&(l=138,h=3),e[(s+1)*2+1]=65535,i=0;i<=s;i++)r=a,a=e[(i+1)*2+1],++o<l&&r===a||(o<h?t.bl_tree[2*r]+=o:0!==r?(r!==n&&t.bl_tree[2*r]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,n=r,0===a?(l=138,h=3):r===a?(l=6,h=3):(l=7,h=4))},t4=(t,e,s)=>{let i,r,n=-1,a=e[1],o=0,l=7,h=4;for(0===a&&(l=138,h=3),i=0;i<=s;i++)if(r=a,a=e[(i+1)*2+1],!(++o<l)||r!==a){if(o<h)do tJ(t,r,t.bl_tree);while(0!=--o)else 0!==r?(r!==n&&(tJ(t,r,t.bl_tree),o--),tJ(t,16,t.bl_tree),t$(t,o-3,2)):o<=10?(tJ(t,17,t.bl_tree),t$(t,o-3,3)):(tJ(t,18,t.bl_tree),t$(t,o-11,7));o=0,n=r,0===a?(l=138,h=3):r===a?(l=6,h=3):(l=7,h=4)}},t9=!1,t7=(t,e,s,i)=>{t$(t,0+ +!!i,3),t1(t),tY(t,s),tY(t,~s),s&&t.pending_buf.set(t.window.subarray(e,e+s),t.pending),t.pending+=s};var et={_tr_init:t=>{t9||((()=>{let t,e,s,a,o,l=Array(16);for(a=0,s=0;a<28;a++)for(tQ[a]=s,t=0;t<1<<tP[a];t++)tW[s++]=a;for(tW[s-1]=a,o=0,a=0;a<16;a++)for(tZ[a]=o,t=0;t<1<<tF[a];t++)tj[o++]=a;for(o>>=7;a<30;a++)for(tZ[a]=o<<7,t=0;t<1<<tF[a]-7;t++)tj[256+o++]=a;for(e=0;e<=15;e++)l[e]=0;for(t=0;t<=143;)tI[2*t+1]=8,t++,l[8]++;for(;t<=255;)tI[2*t+1]=9,t++,l[9]++;for(;t<=279;)tI[2*t+1]=7,t++,l[7]++;for(;t<=287;)tI[2*t+1]=8,t++,l[8]++;for(tX(tI,287,l),t=0;t<30;t++)tq[2*t+1]=5,tq[2*t]=tG(t,5);i=new tK(tI,tP,257,286,15),r=new tK(tq,tF,0,30,15),n=new tK([],tM,0,19,7)})(),t9=!0),t.l_desc=new tH(t.dyn_ltree,i),t.d_desc=new tH(t.dyn_dtree,r),t.bl_desc=new tH(t.bl_tree,n),t.bi_buf=0,t.bi_valid=0,t0(t)},_tr_stored_block:t7,_tr_flush_block:(t,e,s,i)=>{let r,n,a=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,s=0xf3ffc07f;for(e=0;e<=31;e++,s>>>=1)if(1&s&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),t3(t,t.l_desc),t3(t,t.d_desc),a=(t=>{let e;for(t8(t,t.dyn_ltree,t.l_desc.max_code),t8(t,t.dyn_dtree,t.d_desc.max_code),t3(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*tD[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),r=t.opt_len+3+7>>>3,(n=t.static_len+3+7>>>3)<=r&&(r=n)):r=n=s+5,s+4<=r&&-1!==e?t7(t,e,s,i):4===t.strategy||n===r?(t$(t,2+ +!!i,3),t6(t,tI,tq)):(t$(t,4+ +!!i,3),((t,e,s,i)=>{let r;for(t$(t,e-257,5),t$(t,s-1,5),t$(t,i-4,4),r=0;r<i;r++)t$(t,t.bl_tree[2*tD[r]+1],3);t4(t,t.dyn_ltree,e-1),t4(t,t.dyn_dtree,s-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),t6(t,t.dyn_ltree,t.dyn_dtree)),t0(t),i&&t1(t)},_tr_tally:(t,e,s)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=s,0===e?t.dyn_ltree[2*s]++:(t.matches++,e--,t.dyn_ltree[(tW[s]+256+1)*2]++,t.dyn_dtree[2*tV(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{t$(t,2,3),tJ(t,256,tI),16===t.bi_valid?(tY(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}},ee=(t,e,s,i)=>{let r=65535&t,n=t>>>16&65535,a=0;for(;0!==s;){a=s>2e3?2e3:s,s-=a;do n=n+(r=r+e[i++]|0)|0;while(--a)r%=65521,n%=65521}return r|n<<16}
2;let es=new Uint32Array((()=>{let t,e=[];for(var s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?0xedb88320^t>>>1:t>>>1;e[s]=t}return e})());var ei=(t,e,s,i)=>{let r=i+s;t^=-1;for(let s=i;s<r;s++)t=t>>>8^es[(t^e[s])&255];return -1^t},er={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},en={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};let{_tr_init:ea,_tr_stored_block:eo,_tr_flush_block:el,_tr_tally:eh,_tr_align:eu}=et,{Z_NO_FLUSH:ec,Z_PARTIAL_FLUSH:ed,Z_FULL_FLUSH:ep,Z_FINISH:ef,Z_BLOCK:e_,Z_OK:eg,Z_STREAM_END:em,Z_STREAM_ERROR:ey,Z_DATA_ERROR:eb,Z_BUF_ERROR:ev,Z_DEFAULT_COMPRESSION:ew,Z_FILTERED:ek,Z_HUFFMAN_ONLY:ex,Z_RLE:eE,Z_FIXED:eA,Z_DEFAULT_STRATEGY:eS,Z_UNKNOWN:eT,Z_DEFLATED:eO}=en,eR=573,eC=(t,e)=>(t.msg=er[e],e),eU=t=>2*t-9*(t>4),eB=t=>{let e=t.length;for(;--e>=0;)t[e]=0},ez=t=>{let e,s,i,r=t.w_size;i=e=t.hash_size;do s=t.head[--i],t.head[i]=s>=r?s-r:0;while(--e)i=e=r;do s=t.prev[--i],t.prev[i]=s>=r?s-r:0;while(--e)},eN=(t,e,s)=>(e<<t.hash_shift^s)&t.hash_mask,eL=t=>{let e=t.state,s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+s),t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))},eP=(t,e)=>{el(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,eL(t.strm)},eF=(t,e)=>{t.pending_buf[t.pending++]=e},eM=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},eD=(t,e,s,i)=>{let r=t.avail_in;return(r>i&&(r=i),0===r)?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),s),1===t.state.wrap?t.adler=ee(t.adler,e,r,s):2===t.state.wrap&&(t.adler=ei(t.adler,e,r,s)),t.next_in+=r,t.total_in+=r,r)},eI=(t,e)=>{let s,i,r=t.max_chain_length,n=t.strstart,a=t.prev_length,o=t.nice_match,l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,u=t.w_mask,c=t.prev,d=t.strstart+258,p=h[n+a-1],f=h[n+a];t.prev_length>=t.good_match&&(r>>=2),o>t.lookahead&&(o=t.lookahead);do{if(h[(s=e)+a]!==f||h[s+a-1]!==p||h[s]!==h[n]||h[++s]!==h[n+1])continue;n+=2,s++;do;while(h[++n]===h[++s]&&h[++n]===h[++s]&&h[++n]===h[++s]&&h[++n]===h[++s]&&h[++n]===h[++s]&&h[++n]===h[++s]&&h[++n]===h[++s]&&h[++n]===h[++s]&&n<d)if(i=258-(d-n),n=d-258,i>a){if(t.match_start=e,a=i,i>=o)break;p=h[n+a-1],f=h[n+a]}}while((e=c[e&u])>l&&0!=--r)return a<=t.lookahead?a:t.lookahead},eq=t=>{let e,s,i,r=t.w_size;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=r+(r-262)&&(t.window.set(t.window.subarray(r,r+r-s),0),t.match_start-=r,t.strstart-=r,t.block_start-=r,t.insert>t.strstart&&(t.insert=t.strstart),ez(t),s+=r),0===t.strm.avail_in)break;if(e=eD(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=e,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=eN(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=eN(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},ej=(t,e)=>{let s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i,r,n,a=0,o=t.strm.avail_in;do{if(i=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n||(n=t.strm.avail_out-n,i>(r=t.strstart-t.block_start)+t.strm.avail_in&&(i=r+t.strm.avail_in),i>n&&(i=n),i<s&&(0===i&&e!==ef||e===ec||i!==r+t.strm.avail_in)))break;a=+(e===ef&&i===r+t.strm.avail_in),eo(t,0,0,a),t.pending_buf[t.pending-4]=i,t.pending_buf[t.pending-3]=i>>8,t.pending_buf[t.pending-2]=~i,t.pending_buf[t.pending-1]=~i>>8,eL(t.strm),r&&(r>i&&(r=i),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+r),t.strm.next_out),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r,t.block_start+=r,i-=r),i&&(eD(t.strm,t.strm.output,t.strm.next_out,i),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i)}while(0===a)return((o-=t.strm.avail_in)&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a)?4:e!==ec&&e!==ef&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(eD(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,s=(n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n)>t.w_size?t.w_size:n,((r=t.strstart-t.block_start)>=s||(r||e===ef)&&e!==ec&&0===t.strm.avail_in&&r<=n)&&(i=r>n?n:r,a=+(e===ef&&0===t.strm.avail_in&&i===r),eo(t,t.block_start,i,a),t.block_start+=i,eL(t.strm)),a?3:1)},eW=(t,e)=>{let s,i;for(;;){if(t.lookahead<262){if(eq(t),t.lookahead<262&&e===ec)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=eN(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-262&&(t.match_length=eI(t,s)),t.match_length>=3)if(i=eh(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do t.strstart++,t.ins_h=eN(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart;while(0!=--t.match_length)t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=eN(t,t.ins_h,t.window[t.strstart+1]);else i=eh(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(eP(t,!1),0===t.strm.avail_out))return 1}return(t.insert=t.strstart<2?t.strstart:2,e===ef)?(eP(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(eP(t,!1),0===t.strm.avail_out)?1:2},eQ=(t,e)=>{let s,i,r;for(;;){if(t.lookahead<262){if(eq(t),t.lookahead<262&&e===ec)return 1;if(0===t.lookahead)break}if(s=0,t.lookahead>=3&&(t.ins_h=eN(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==s&&t.prev_length<t.max_lazy_match&&t.strstart-s<=t.w_size-262&&(t.match_length=eI(t,s),t.match_length<=5&&(t.strategy===ek||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,i=eh(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=r&&(t.ins_h=eN(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart);while(0!=--t.prev_length)if(t.match_available=0,t.match_length=2,t.strstart++,i&&(eP(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((i=eh(t,0,t.window[t.strstart-1]))&&eP(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return(t.match_available&&(i=eh(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===ef)?(eP(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(eP(t,!1),0===t.strm.avail_out)?1:2};function eZ(t,e,s,i,r){this.good_length=t,this.max_lazy=e,this.nice_length=s,this.max_chain=i,this.func=r}let eK=[new eZ(0,0,0,0,ej),new eZ(4,4,8,4,eW),new eZ(4,5,16,8,eW),new eZ(4,6,32,32,eW),new eZ(4,4,16,16,eQ),new eZ(8,16,32,32,eQ),new eZ(8,16,128,128,eQ),new eZ(8,32,128,256,eQ),new eZ(32,128,258,1024,eQ),new eZ(32,258,258,4096,eQ)];function eH(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=eO,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*eR),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),eB(this.dyn_ltree),eB(this.dyn_dtree),eB(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),eB(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),eB(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}let eV=t=>{if(!t)return 1;let e=t.state;return e&&e.strm===t&&(42===e.status||57===e.status||69===e.status||73===e.status||91===e.status||103===e.status||113===e.status||666===e.status)?0:1};var eY=(t,e)=>{if(eV(t)||e>e_||e<0)return t?eC(t,ey):ey;let s=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===s.status&&e!==ef)return eC(t,0===t.avail_out?ev:ey);let i=s.last_flush;if(s.last_flush=e,0!==s.pending){if(eL(t),0===t.avail_out)return s.last_flush=-1,eg}else if(0===t.avail_in&&eU(e)<=eU(i)&&e!==ef)return eC(t,ev);if(666===s.status&&0!==t.avail_in)return eC(t,ev);if(42===s.status&&0===s.wrap&&(s.status=113),42===s.status){let e=eO+(s.w_bits-8<<4)<<8;if(e|=(s.strategy>=ex||s.level<2?0:s.level<6?1:6===s.level?2:3)<<6,0!==s.strstart&&(e|=32),eM(s,e+=31-e%31),0!==s.strstart&&(eM(s,t.adler>>>16),eM(s,65535&t.adler)),t.adler=1,s.status=113,eL(t),0!==s.pending)return s.last_flush=-1,eg}if(57===s.status){if(t.adler=0,eF(s,31),eF(s,139),eF(s,8),s.gzhead)eF(s,+!!s.gzhead.text+2*!!s.gzhead.hcrc+4*!!s.gzhead.extra+8*!!s.gzhead.name+16*!!s.gzhead.comment),eF(s,255&s.gzhead.time),eF(s,s.gzhead.time>>8&255),eF(s,s.gzhead.time>>16&255),eF(s,s.gzhead.time>>24&255),eF(s,9===s.level?2:4*(s.strategy>=ex||s.level<2)),eF(s,255&s.gzhead.os),s.gzhead.extra&&s.gzhead.extra.length&&(eF(s,255&s.gzhead.extra.length),eF(s,s.gzhead.extra.length>>8&255)),s.gzhead.hcrc&&(t.adler=ei(t.adler,s.pending_buf,s.pending,0)),s.gzindex=0,s.status=69;else if(eF(s,0),eF(s,0),eF(s,0),eF(s,0),eF(s,0),eF(s,9===s.level?2:4*(s.strategy>=ex||s.level<2)),eF(s,3),s.status=113,eL(t),0!==s.pending)return s.last_flush=-1,eg}if(69===s.status){if(s.gzhead.extra){let e=s.pending,i=(65535&s.gzhead.extra.length)-s.gzindex;for(;s.pending+i>s.pending_buf_size;){let r=s.pending_buf_size-s.pending;if(s.pending_buf.set(s.gzhead.extra.subarray(s.gzindex,s.gzindex+r),s.pending),s.pending=s.pending_buf_size,s.gzhead.hcrc&&s.pending>
2e&&(t.adler=ei(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex+=r,eL(t),0!==s.pending)return s.last_flush=-1,eg;e=0,i-=r}let r=new Uint8Array(s.gzhead.extra);s.pending_buf.set(r.subarray(s.gzindex,s.gzindex+i),s.pending),s.pending+=i,s.gzhead.hcrc&&s.pending>e&&(t.adler=ei(t.adler,s.pending_buf,s.pending-e,e)),s.gzindex=0}s.status=73}if(73===s.status){if(s.gzhead.name){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=ei(t.adler,s.pending_buf,s.pending-i,i)),eL(t),0!==s.pending)return s.last_flush=-1,eg;i=0}e=s.gzindex<s.gzhead.name.length?255&s.gzhead.name.charCodeAt(s.gzindex++):0,eF(s,e)}while(0!==e)s.gzhead.hcrc&&s.pending>i&&(t.adler=ei(t.adler,s.pending_buf,s.pending-i,i)),s.gzindex=0}s.status=91}if(91===s.status){if(s.gzhead.comment){let e,i=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>i&&(t.adler=ei(t.adler,s.pending_buf,s.pending-i,i)),eL(t),0!==s.pending)return s.last_flush=-1,eg;i=0}e=s.gzindex<s.gzhead.comment.length?255&s.gzhead.comment.charCodeAt(s.gzindex++):0,eF(s,e)}while(0!==e)s.gzhead.hcrc&&s.pending>i&&(t.adler=ei(t.adler,s.pending_buf,s.pending-i,i))}s.status=103}if(103===s.status){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size&&(eL(t),0!==s.pending))return s.last_flush=-1,eg;eF(s,255&t.adler),eF(s,t.adler>>8&255),t.adler=0}if(s.status=113,eL(t),0!==s.pending)return s.last_flush=-1,eg}if(0!==t.avail_in||0!==s.lookahead||e!==ec&&666!==s.status){let i=0===s.level?ej(s,e):s.strategy===ex?((t,e)=>{let s;for(;;){if(0===t.lookahead&&(eq(t),0===t.lookahead)){if(e===ec)return 1;break}if(t.match_length=0,s=eh(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(eP(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,e===ef)?(eP(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(eP(t,!1),0===t.strm.avail_out)?1:2})(s,e):s.strategy===eE?((t,e)=>{let s,i,r,n,a=t.window;for(;;){if(t.lookahead<=258){if(eq(t),t.lookahead<=258&&e===ec)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(i=a[r=t.strstart-1])===a[++r]&&i===a[++r]&&i===a[++r]){n=t.strstart+258;do;while(i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&i===a[++r]&&r<n)t.match_length=258-(n-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=eh(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=eh(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(eP(t,!1),0===t.strm.avail_out))return 1}return(t.insert=0,e===ef)?(eP(t,!0),0===t.strm.avail_out)?3:4:t.sym_next&&(eP(t,!1),0===t.strm.avail_out)?1:2})(s,e):eK[s.level].func(s,e);if((3===i||4===i)&&(s.status=666),1===i||3===i)return 0===t.avail_out&&(s.last_flush=-1),eg;if(2===i&&(e===ed?eu(s):e!==e_&&(eo(s,0,0,!1),e===ep&&(eB(s.head),0===s.lookahead&&(s.strstart=0,s.block_start=0,s.insert=0))),eL(t),0===t.avail_out))return s.last_flush=-1,eg}return e!==ef?eg:s.wrap<=0?em:(2===s.wrap?(eF(s,255&t.adler),eF(s,t.adler>>8&255),eF(s,t.adler>>16&255),eF(s,t.adler>>24&255),eF(s,255&t.total_in),eF(s,t.total_in>>8&255),eF(s,t.total_in>>16&255),eF(s,t.total_in>>24&255)):(eM(s,t.adler>>>16),eM(s,65535&t.adler)),eL(t),s.wrap>0&&(s.wrap=-s.wrap),0!==s.pending?eg:em)},e$=t=>{if(eV(t))return ey;let e=t.state.status;return t.state=null,113===e?eC(t,eb):eg};let eJ=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var eG=function(t){let e=Array.prototype.slice.call(arguments,1);for(;e.length;){let s=e.shift();if(s){if("object"!=typeof s)throw TypeError(s+"must be non-object");for(let e in s)eJ(s,e)&&(t[e]=s[e])}}return t},eX=t=>{let e=0;for(let s=0,i=t.length;s<i;s++)e+=t[s].length;let s=new Uint8Array(e);for(let e=0,i=0,r=t.length;e<r;e++){let r=t[e];s.set(r,i),i+=r.length}return s};let e0=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){e0=!1}let e1=new Uint8Array(256);for(let t=0;t<256;t++)e1[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;e1[254]=e1[254]=1;var e2=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,s,i,r,n,a=t.length,o=0;for(r=0;r<a;r++)(64512&(s=t.charCodeAt(r)))==55296&&r+1<a&&(64512&(i=t.charCodeAt(r+1)))==56320&&(s=65536+(s-55296<<10)+(i-56320),r++),o+=s<128?1:s<2048?2:s<65536?3:4;for(e=new Uint8Array(o),n=0,r=0;n<o;r++)(64512&(s=t.charCodeAt(r)))==55296&&r+1<a&&(64512&(i=t.charCodeAt(r+1)))==56320&&(s=65536+(s-55296<<10)+(i-56320),r++),s<128?e[n++]=s:(s<2048?e[n++]=192|s>>>6:(s<65536?e[n++]=224|s>>>12:(e[n++]=240|s>>>18,e[n++]=128|s>>>12&63),e[n++]=128|s>>>6&63),e[n++]=128|63&s);return e},e5=(t,e)=>{let s,i,r=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let n=Array(2*r);for(i=0,s=0;s<r;){let e=t[s++];if(e<128){n[i++]=e;continue}let a=e1[e];if(a>4){n[i++]=65533,s+=a-1;continue}for(e&=2===a?31:3===a?15:7;a>1&&s<r;)e=e<<6|63&t[s++],a--;
2if(a>1){n[i++]=65533;continue}e<65536?n[i++]=e:(e-=65536,n[i++]=55296|e>>10&1023,n[i++]=56320|1023&e)}var a=i;if(a<65534&&n.subarray&&e0)return String.fromCharCode.apply(null,n.length===a?n:n.subarray(0,a));let o="";for(let t=0;t<a;t++)o+=String.fromCharCode(n[t]);return o},e6=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let s=e-1;for(;s>=0&&(192&t[s])==128;)s--;return s<0||0===s?e:s+e1[t[s]]>e?s:e},e3=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};let e8=Object.prototype.toString,{Z_NO_FLUSH:e4,Z_SYNC_FLUSH:e9,Z_FULL_FLUSH:e7,Z_FINISH:st,Z_OK:se,Z_STREAM_END:ss,Z_DEFAULT_COMPRESSION:si,Z_DEFAULT_STRATEGY:sr,Z_DEFLATED:sn}=en;function sa(t){let e,s;this.options=eG({level:si,method:sn,chunkSize:16384,windowBits:15,memLevel:8,strategy:sr},t||{});let i=this.options;i.raw&&i.windowBits>0?i.windowBits=-i.windowBits:i.gzip&&i.windowBits>0&&i.windowBits<16&&(i.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new e3,this.strm.avail_out=0;let r=((t,e,s,i,r,n)=>{var a,o;let l;if(!t)return ey;let h=1;if(e===ew&&(e=6),i<0?(h=0,i=-i):i>15&&(h=2,i-=16),r<1||r>9||s!==eO||i<8||i>15||e<0||e>9||n<0||n>eA||8===i&&1!==h)return eC(t,ey);8===i&&(i=9);let u=new eH;return t.state=u,u.strm=t,u.status=42,u.wrap=h,u.gzhead=null,u.w_bits=i,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=r+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new Uint8Array(2*u.w_size),u.head=new Uint16Array(u.hash_size),u.prev=new Uint16Array(u.w_size),u.lit_bufsize=1<<r+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new Uint8Array(u.pending_buf_size),u.sym_buf=u.lit_bufsize,u.sym_end=(u.lit_bufsize-1)*3,u.level=e,u.strategy=n,u.method=s,(l=(t=>{if(eV(t))return eC(t,ey);t.total_in=t.total_out=0,t.data_type=eT;let e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=+(2!==e.wrap),e.last_flush=-2,ea(e),eg})(a=t))===eg&&((o=a.state).window_size=2*o.w_size,eB(o.head),o.max_lazy_match=eK[o.level].max_lazy,o.good_match=eK[o.level].good_length,o.nice_match=eK[o.level].nice_length,o.max_chain_length=eK[o.level].max_chain,o.strstart=0,o.block_start=0,o.lookahead=0,o.insert=0,o.match_length=o.prev_length=2,o.match_available=0,o.ins_h=0),l})(this.strm,i.level,i.method,i.windowBits,i.memLevel,i.strategy);if(r!==se)throw Error(er[r]);if(i.header&&(e=this.strm,s=i.header,eV(e)||2!==e.state.wrap||(e.state.gzhead=s)),i.dictionary){let t;if(t="string"==typeof i.dictionary?e2(i.dictionary):"[object ArrayBuffer]"===e8.call(i.dictionary)?new Uint8Array(i.dictionary):i.dictionary,(r=((t,e)=>{let s=e.length;if(eV(t))return ey;let i=t.state,r=i.wrap;if(2===r||1===r&&42!==i.status||i.lookahead)return ey;if(1===r&&(t.adler=ee(t.adler,e,s,0)),i.wrap=0,s>=i.w_size){0===r&&(eB(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(s-i.w_size,s),0),e=t,s=i.w_size}let n=t.avail_in,a=t.next_in,o=t.input;for(t.avail_in=s,t.next_in=0,t.input=e,eq(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do i.ins_h=eN(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++;while(--e)i.strstart=t,i.lookahead=2,eq(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=a,t.input=o,t.avail_in=n,i.wrap=r,eg})(this.strm,t))!==se)throw Error(er[r]);this._dict_set=!0}}function so(t,e){let s=new sa(e);if(s.push(t,!0),s.err)throw s.msg||er[s.err];return s.result}sa.prototype.push=function(t,e){let s,i,r=this.strm,n=this.options.chunkSize;if(this.ended)return!1;for(i=e===~~e?e:!0===e?st:e4,"string"==typeof t?r.input=e2(t):"[object ArrayBuffer]"===e8.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;){if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===e9||i===e7)&&r.avail_out<=6){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if((s=eY(r,i))===ss)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),s=e$(this.strm),this.onEnd(s),this.ended=!0,s===se;if(0===r.avail_out){this.onData(r.output);continue}if(i>0&&r.next_out>0){this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;continue}if(0===r.avail_in)break}return!0},sa.prototype.onData=function(t){this.chunks.push(t)},sa.prototype.onEnd=function(t){t===se&&(this.result=eX(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var sl=function(t,e){let s,i,r,n,a,o,l,h,u,c,d,p,f,_,g,m,y,b,v,w,k,x,E,A,S=t.state;s=t.next_in,E=t.input,i=s+(t.avail_in-5),r=t.next_out,A=t.output,n=r-(e-t.avail_out),a=r+(t.avail_out-257),o=S.dmax,l=S.wsize,h=S.whave,u=S.wnext,c=S.window,d=S.hold,p=S.bits,f=S.lencode,_=S.distcode,g=(1<<S.lenbits)-1,m=(1<<S.distbits)-1;t:do for(p<15&&(d+=E[s++]<<p,p+=8,d+=E[s++]<<p,p+=8),y=f[d&g];;){if(d>>>=b=y>>>24,p-=b,0==(b=y>>>16&255))A[r++]=65535&y;else if(16&b)for(v=65535&y,(b&=15)&&(p<b&&(d+=E[s++]<<p,p+=8),v+=d&(1<<b)-1,d>>>=b,p-=b),p<15&&(d+=E[s++]<<p,p+=8,d+=E[s++]<<p,p+=8),y=_[d&m];;){if(d>>>=b=y>>>24,p-=b,16&(b=y>>>16&255)){if(w=65535&y,p<(b&=15)&&(d+=E[s++]<<p,(p+=8)<b&&(d+=E[s++]<<p,p+=8)),(w+=d&(1<<b)-1)>o){t.msg="invalid distance too far back",S.mode=16209;break t}if(d>>>=b,p-=b,w>(b=r-n)){if((b=w-b)>h&&S.sane){t.msg="invalid distance too far back",S.mode=16209;break t}if(k=0,x=c,0===u){if(k+=l-b,b<v){v-=b;do A[r++]=c[k++];while(--b)k=r-w,x=A}}else if(u<b){if(k+=l+u-b,(b-=u)<v){v-=b;do A[r++]=c[k++];while(--b)if(k=0,u<v){v-=b=u;do A[r++]=c[k++];while(--b)k=r-w,x=A}}}else if(k+=u-b,b<v){v-=b;do A[r++]=c[k++];while(--b)k=r-w,x=A}for(;v>2;)A[r++]=x[k++],A[r++]=x[k++],A[r++]=x[k++],v-=3;v&&(A[r++]=x[k++],v>1&&(A[r++]=x[k++]))}else{k=r-w;do A[r++]=A[k++],A[r++]=A[k++],A[r++]=A[k++],v-=3;while(v>2)v&&(A[r++]=A[k++],v>1&&(A[r++]=A[k++]))}}
2else if((64&b)==0){y=_[(65535&y)+(d&(1<<b)-1)];continue}else{t.msg="invalid distance code",S.mode=16209;break t}break}else if((64&b)==0){y=f[(65535&y)+(d&(1<<b)-1)];continue}else if(32&b){S.mode=16191;break t}else{t.msg="invalid literal/length code",S.mode=16209;break t}break}while(s<i&&r<a)s-=v=p>>3,p-=v<<3,d&=(1<<p)-1,t.next_in=s,t.next_out=r,t.avail_in=s<i?5+(i-s):5-(s-i),t.avail_out=r<a?257+(a-r):257-(r-a),S.hold=d,S.bits=p};let sh=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),su=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),sc=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),sd=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var sp=(t,e,s,i,r,n,a,o)=>{let l,h,u,c,d,p,f,_,g,m=o.bits,y=0,b=0,v=0,w=0,k=0,x=0,E=0,A=0,S=0,T=0,O=null,R=new Uint16Array(16),C=new Uint16Array(16),U=null;for(y=0;y<=15;y++)R[y]=0;for(b=0;b<i;b++)R[e[s+b]]++;for(k=m,w=15;w>=1&&0===R[w];w--);if(k>w&&(k=w),0===w)return r[n++]=0x1400000,r[n++]=0x1400000,o.bits=1,0;for(v=1;v<w&&0===R[v];v++);for(k<v&&(k=v),A=1,y=1;y<=15;y++)if(A<<=1,(A-=R[y])<0)return -1;if(A>0&&(0===t||1!==w))return -1;for(C[1]=0,y=1;y<15;y++)C[y+1]=C[y]+R[y];for(b=0;b<i;b++)0!==e[s+b]&&(a[C[e[s+b]]++]=b);if(0===t?(O=U=a,p=20):1===t?(O=sh,U=su,p=257):(O=sc,U=sd,p=0),T=0,b=0,y=v,d=n,x=k,E=0,u=-1,c=(S=1<<k)-1,1===t&&S>852||2===t&&S>592)return 1;for(;;){f=y-E,a[b]+1<p?(_=0,g=a[b]):a[b]>=p?(_=U[a[b]-p],g=O[a[b]-p]):(_=96,g=0),l=1<<y-E,v=h=1<<x;do r[d+(T>>E)+(h-=l)]=f<<24|_<<16|g;while(0!==h)for(l=1<<y-1;T&l;)l>>=1;if(0!==l?(T&=l-1,T+=l):T=0,b++,0==--R[y]){if(y===w)break;y=e[s+a[b]]}if(y>k&&(T&c)!==u){for(0===E&&(E=k),d+=v,A=1<<(x=y-E);x+E<w&&!((A-=R[x+E])<=0);)x++,A<<=1;if(S+=1<<x,1===t&&S>852||2===t&&S>592)return 1;r[u=T&c]=k<<24|x<<16|d-n}}return 0!==T&&(r[d+T]=y-E<<24|4194304),o.bits=k,0};let{Z_FINISH:sf,Z_BLOCK:s_,Z_TREES:sg,Z_OK:sm,Z_STREAM_END:sy,Z_NEED_DICT:sb,Z_STREAM_ERROR:sv,Z_DATA_ERROR:sw,Z_MEM_ERROR:sk,Z_BUF_ERROR:sx,Z_DEFLATED:sE}=en,sA=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function sS(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}let sT=t=>{if(!t)return 1;let e=t.state;return+(!e||e.strm!==t||e.mode<16180||e.mode>16211)},sO=t=>{if(sT(t))return sv;let e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,(t=>{if(sT(t))return sv;let e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,sm})(t)},sR=!0,sC=t=>{if(sR){a=new Int32Array(512),o=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(sp(1,t.lens,0,288,a,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;sp(2,t.lens,0,32,o,0,t.work,{bits:5}),sR=!1}t.lencode=a,t.lenbits=9,t.distcode=o,t.distbits=5},sU=(t,e,s,i)=>{let r,n=t.state;return null===n.window&&(n.wsize=1<<n.wbits,n.wnext=0,n.whave=0,n.window=new Uint8Array(n.wsize)),i>=n.wsize?(n.window.set(e.subarray(s-n.wsize,s),0),n.wnext=0,n.whave=n.wsize):((r=n.wsize-n.wnext)>i&&(r=i),n.window.set(e.subarray(s-i,s-i+r),n.wnext),(i-=r)?(n.window.set(e.subarray(s-i,s),0),n.wnext=i,n.whave=n.wsize):(n.wnext+=r,n.wnext===n.wsize&&(n.wnext=0),n.whave<n.wsize&&(n.whave+=r))),0};var sB=(t,e)=>{let s,i,r,n,a,o,l,h,u,c,d,p,f,_,g,m,y,b,v,w,k,x,E,A,S=0,T=new Uint8Array(4),O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(sT(t)||!t.output||!t.input&&0!==t.avail_in)return sv;
216191===(s=t.state).mode&&(s.mode=16192),a=t.next_out,r=t.output,l=t.avail_out,n=t.next_in,i=t.input,o=t.avail_in,h=s.hold,u=s.bits,c=o,d=l,x=sm;e:for(;;)switch(s.mode){case 16180:if(0===s.wrap){s.mode=16192;break}for(;u<16;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(2&s.wrap&&35615===h){0===s.wbits&&(s.wbits=15),s.check=0,T[0]=255&h,T[1]=h>>>8&255,s.check=ei(s.check,T,2,0),h=0,u=0,s.mode=16181;break}if(s.head&&(s.head.done=!1),!(1&s.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",s.mode=16209;break}if((15&h)!==sE){t.msg="unknown compression method",s.mode=16209;break}if(h>>>=4,u-=4,k=(15&h)+8,0===s.wbits&&(s.wbits=k),k>15||k>s.wbits){t.msg="invalid window size",s.mode=16209;break}s.dmax=1<<s.wbits,s.flags=0,t.adler=s.check=1,s.mode=512&h?16189:16191,h=0,u=0;break;case 16181:for(;u<16;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(s.flags=h,(255&s.flags)!==sE){t.msg="unknown compression method",s.mode=16209;break}if(57344&s.flags){t.msg="unknown header flags set",s.mode=16209;break}s.head&&(s.head.text=h>>8&1),512&s.flags&&4&s.wrap&&(T[0]=255&h,T[1]=h>>>8&255,s.check=ei(s.check,T,2,0)),h=0,u=0,s.mode=16182;case 16182:for(;u<32;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}s.head&&(s.head.time=h),512&s.flags&&4&s.wrap&&(T[0]=255&h,T[1]=h>>>8&255,T[2]=h>>>16&255,T[3]=h>>>24&255,s.check=ei(s.check,T,4,0)),h=0,u=0,s.mode=16183;case 16183:for(;u<16;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}s.head&&(s.head.xflags=255&h,s.head.os=h>>8),512&s.flags&&4&s.wrap&&(T[0]=255&h,T[1]=h>>>8&255,s.check=ei(s.check,T,2,0)),h=0,u=0,s.mode=16184;case 16184:if(1024&s.flags){for(;u<16;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}s.length=h,s.head&&(s.head.extra_len=h),512&s.flags&&4&s.wrap&&(T[0]=255&h,T[1]=h>>>8&255,s.check=ei(s.check,T,2,0)),h=0,u=0}else s.head&&(s.head.extra=null);s.mode=16185;case 16185:if(1024&s.flags&&((p=s.length)>o&&(p=o),p&&(s.head&&(k=s.head.extra_len-s.length,s.head.extra||(s.head.extra=new Uint8Array(s.head.extra_len)),s.head.extra.set(i.subarray(n,n+p),k)),512&s.flags&&4&s.wrap&&(s.check=ei(s.check,i,p,n)),o-=p,n+=p,s.length-=p),s.length))break e;s.length=0,s.mode=16186;case 16186:if(2048&s.flags){if(0===o)break e;p=0;do k=i[n+p++],s.head&&k&&s.length<65536&&(s.head.name+=String.fromCharCode(k));while(k&&p<o)if(512&s.flags&&4&s.wrap&&(s.check=ei(s.check,i,p,n)),o-=p,n+=p,k)break e}else s.head&&(s.head.name=null);s.length=0,s.mode=16187;case 16187:if(4096&s.flags){if(0===o)break e;p=0;do k=i[n+p++],s.head&&k&&s.length<65536&&(s.head.comment+=String.fromCharCode(k));while(k&&p<o)if(512&s.flags&&4&s.wrap&&(s.check=ei(s.check,i,p,n)),o-=p,n+=p,k)break e}else s.head&&(s.head.comment=null);s.mode=16188;case 16188:if(512&s.flags){for(;u<16;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(4&s.wrap&&h!==(65535&s.check)){t.msg="header crc mismatch",s.mode=16209;break}h=0,u=0}s.head&&(s.head.hcrc=s.flags>>9&1,s.head.done=!0),t.adler=s.check=0,s.mode=16191;break;case 16189:for(;u<32;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}t.adler=s.check=sA(h),h=0,u=0,s.mode=16190;case 16190:if(0===s.havedict)return t.next_out=a,t.avail_out=l,t.next_in=n,t.avail_in=o,s.hold=h,s.bits=u,sb;t.adler=s.check=1,s.mode=16191;case 16191:if(e===s_||e===sg)break e;case 16192:if(s.last){h>>>=7&u,u-=7&u,s.mode=16206;break}for(;u<3;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}switch(s.last=1&h,u-=1,3&(h>>>=1)){case 0:s.mode=16193;break;case 1:if(sC(s),s.mode=16199,e===sg){h>>>=2,u-=2;break e}break;case 2:s.mode=16196;break;case 3:t.msg="invalid block type",s.mode=16209}h>>>=2,u-=2;break;case 16193:for(h>>>=7&u,u-=7&u;u<32;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",s.mode=16209;break}if(s.length=65535&h,h=0,u=0,s.mode=16194,e===sg)break e;case 16194:s.mode=16195;case 16195:if(p=s.length){if(p>o&&(p=o),p>l&&(p=l),0===p)break e;r.set(i.subarray(n,n+p),a),o-=p,n+=p,l-=p,a+=p,s.length-=p;break}s.mode=16191;break;case 16196:for(;u<14;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(s.nlen=(31&h)+257,u-=5,s.ndist=(31&(h>>>=5))+1,u-=5,s.ncode=(15&(h>>>=5))+4,h>>>=4,u-=4,s.nlen>286||s.ndist>30){t.msg="too many length or distance symbols",s.mode=16209;break}s.have=0,s.mode=16197;case 16197:for(;s.have<s.ncode;){for(;u<3;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}s.lens[O[s.have++]]=7&h,h>>>=3,u-=3}for(;s.have<19;)s.lens[O[s.have++]]=0;if(s.lencode=s.lendyn,s.lenbits=7,E={bits:s.lenbits},x=sp(0,s.lens,0,19,s.lencode,0,s.work,E),s.lenbits=E.bits,x){t.msg="invalid code lengths set",s.mode=16209;break}s.have=0,s.mode=16198;case 16198:for(;s.have<s.nlen+s.ndist;){for(;g=(S=s.lencode[h&(1<<s.lenbits)-1])>>>24,m=S>>>16&255,y=65535&S,!(g<=u);){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(y<16)h>>>=g,u-=g,s.lens[s.have++]=y;else{if(16===y){for(A=g+2;u<A;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(h>>>=g,u-=g,0===s.have){t.msg="invalid bit length repeat",s.mode=16209;break}k=s.lens[s.have-1],p=3+(3&h),h>>>=2,u-=2}else if(17===y){for(A=g+3;u<A;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}h>>>=g,u-=g,k=0,p=3+(7&h),h>>>=3,u-=3}else{for(A=g+7;u<A;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}h>>>=g,u-=g,k=0,p=11+(127&h),h>>>=7,u-=7}if(s.have+p>s.nlen+s.ndist){t.msg="invalid bit length repeat",s.mode=16209;break}for(;p--;)s.lens[s.have++]=k}}if(16209===s.mode)break;if(0===s.lens[256]){t.msg="invalid code -- missing end-of-block",s.mode=16209;break}if(s.lenbits=9,E={bits:s.lenbits},x=sp(1,s.lens,0,s.nlen,s.lencode,0,s.work,E),s.lenbits=E.bits,x){t.msg="invalid literal/lengths set",s.mode=16209;break}if(s.distbits=6,s.distcode=s.distdyn,E={bits:s.distbits},x=sp(2,s.lens,s.nlen,s.ndist,s.distcode,0,s.work,E),s.distbits=E.bits,x){t.msg="invalid distances set",s.mode=16209;break}if(s.mode=16199,e===sg)break e;case 16199:s.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=n,t.avail_in=o,s.hold=h,s.bits=u,sl(t,d),a=t.next_out,r=t.output,l=t.avail_out,n=t.next_in,i=t.input,o=t.avail_in,h=s.hold,u=s.bits,16191===s.mode&&(s.back=-1);break}for(s.back=0;g=(S=s.lencode[h&(1<<s.lenbits)-1])>>>24,m=S>>>16&255,y=65535&S,!(g<=u);){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(m&&(240&m)==0){for(b=g,v=m,w=y;g=(S=s.lencode[w+((h&(1<<b+v)-1)>>b)])>>>24,m=S>>>16&255,y=65535&S,!(b+g<=u);){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}h>>>=b,u-=b,s.back+=b}if(h>>>=g,u-=g,s.back+=g,s.length=y,0===m){s.mode=16205;break}if(32&m){s.back=-1,s.mode=16191;break}if(64&m){t.msg="invalid literal/length code",s.mode=16209;break}s.extra=15&m,s.mode=16201;case 16201:if(s.extra){for(A=s.extra;u<A;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}s.length+=h&(1<<s.extra)-1,h>>>=s.extra,u-=s.extra,s.back+=s.extra}s.was=s.length,s.mode=16202;case 16202:for(;g=(S=s.distcode[h&(1<<s.distbits)-1])>>>24,m=S>>>16&255,y=65535&S,!(g<=u);){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if((240&m)==0){for(b=g,v=m,w=y;g=(S=s.distcode[w+((h&(1<<b+v)-1)>>b)])>>>24,m=S>>>16&255,y=65535&S,!(b+g<=u);){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}h>>>=b,u-=b,s.back+=b}if(h>>>=g,u-=g,s.back+=g,64&m){t.msg="invalid distance code",s.mode=16209;break}s.offset=y,s.extra=15&m,s.mode=16203;case 16203:if(s.extra){for(A=s.extra;u<A;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}s.offset+=h&(1<<s.extra)-1,h>>>=s.extra,u-=s.extra,s.back+=s.extra}if(s.offset>s.dmax){t.msg="invalid distance too far back",s.mode=16209;break}s.mode=16204;case 16204:if(0===l)break e;if(p=d-l,s.offset>p){if((p=s.offset-p)>s.whave&&s.sane){t.msg="invalid distance too far back",s.mode=16209;break}p>s.wnext?(p-=s.wnext,f=s.wsize-p):f=s.wnext-p,p>s.length&&(p=s.length),_=s.window}
2else _=r,f=a-s.offset,p=s.length;p>l&&(p=l),l-=p,s.length-=p;do r[a++]=_[f++];while(--p)0===s.length&&(s.mode=16200);break;case 16205:if(0===l)break e;r[a++]=s.length,l--,s.mode=16200;break;case 16206:if(s.wrap){for(;u<32;){if(0===o)break e;o--,h|=i[n++]<<u,u+=8}if(d-=l,t.total_out+=d,s.total+=d,4&s.wrap&&d&&(t.adler=s.check=s.flags?ei(s.check,r,d,a-d):ee(s.check,r,d,a-d)),d=l,4&s.wrap&&(s.flags?h:sA(h))!==s.check){t.msg="incorrect data check",s.mode=16209;break}h=0,u=0}s.mode=16207;case 16207:if(s.wrap&&s.flags){for(;u<32;){if(0===o)break e;o--,h+=i[n++]<<u,u+=8}if(4&s.wrap&&h!==(0|s.total)){t.msg="incorrect length check",s.mode=16209;break}h=0,u=0}s.mode=16208;case 16208:x=sy;break e;case 16209:x=sw;break e;case 16210:return sk;default:return sv}return t.next_out=a,t.avail_out=l,t.next_in=n,t.avail_in=o,s.hold=h,s.bits=u,(s.wsize||d!==t.avail_out&&s.mode<16209&&(s.mode<16206||e!==sf))&&sU(t,t.output,t.next_out,d-t.avail_out),c-=t.avail_in,d-=t.avail_out,t.total_in+=c,t.total_out+=d,s.total+=d,4&s.wrap&&d&&(t.adler=s.check=s.flags?ei(s.check,r,d,t.next_out-d):ee(s.check,r,d,t.next_out-d)),t.data_type=s.bits+64*!!s.last+128*(16191===s.mode)+256*(16199===s.mode||16194===s.mode),(0===c&&0===d||e===sf)&&x===sm&&(x=sx),x},sz=t=>{if(sT(t))return sv;let e=t.state;return e.window&&(e.window=null),t.state=null,sm},sN=(t,e)=>{let s,i=e.length;return sT(t)||0!==(s=t.state).wrap&&16190!==s.mode?sv:16190===s.mode&&ee(1,e,i,0)!==s.check?sw:sU(t,e,i,i)?(s.mode=16210,sk):(s.havedict=1,sm)},sL=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};let sP=Object.prototype.toString,{Z_NO_FLUSH:sF,Z_FINISH:sM,Z_OK:sD,Z_STREAM_END:sI,Z_NEED_DICT:sq,Z_STREAM_ERROR:sj,Z_DATA_ERROR:sW,Z_MEM_ERROR:sQ}=en;function sZ(t){this.options=eG({chunkSize:65536,windowBits:15,to:""},t||{});let e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(15&e.windowBits)==0&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new e3,this.strm.avail_out=0;let s=((t,e)=>{if(!t)return sv;let s=new sS;t.state=s,s.strm=t,s.window=null,s.mode=16180;let i=((t,e)=>{let s;if(sT(t))return sv;let i=t.state;return(e<0?(s=0,e=-e):(s=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15))?sv:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=s,i.wbits=e,sO(t))})(t,e);return i!==sm&&(t.state=null),i})(this.strm,e.windowBits);if(s!==sD||(this.header=new sL,((t,e)=>{if(sT(t))return;let s=t.state;return(2&s.wrap)==0||(s.head=e,e.done=!1)})(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=e2(e.dictionary):"[object ArrayBuffer]"===sP.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw)&&(s=sN(this.strm,e.dictionary))!==sD))throw Error(er[s])}function sK(t,e){let s=new sZ(e);if(s.push(t),s.err)throw s.msg||er[s.err];return s.result}sZ.prototype.push=function(t,e){let s,i,r,n=this.strm,a=this.options.chunkSize,o=this.options.dictionary;if(this.ended)return!1;for(i=e===~~e?e:!0===e?sM:sF,"[object ArrayBuffer]"===sP.call(t)?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(a),n.next_out=0,n.avail_out=a),(s=sB(n,i))===sq&&o&&((s=sN(n,o))===sD?s=sB(n,i):s===sW&&(s=sq));n.avail_in>0&&s===sI&&n.state.wrap>0&&0!==t[n.next_in];)sO(n),s=sB(n,i);switch(s){case sj:case sW:case sq:case sQ:return this.onEnd(s),this.ended=!0,!1}if(r=n.avail_out,n.next_out&&(0===n.avail_out||s===sI))if("string"===this.options.to){let t=e6(n.output,n.next_out),e=n.next_out-t,s=e5(n.output,t);n.next_out=e,n.avail_out=a-e,e&&n.output.set(n.output.subarray(t,t+e),0),this.onData(s)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(s!==sD||0!==r){if(s===sI)return s=sz(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},sZ.prototype.onData=function(t){this.chunks.push(t)},sZ.prototype.onEnd=function(t){t===sD&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=eX(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};let{Deflate:sH,deflate:sV,deflateRaw:sY,gzip:s$}={Deflate:sa,deflate:so,deflateRaw:function(t,e){return(e=e||{}).raw=!0,so(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,so(t,e)},constants:en},{Inflate:sJ,inflate:sG,inflateRaw:sX,ungzip:s0}={Inflate:sZ,inflate:sK,inflateRaw:function(t,e){return(e=e||{}).raw=!0,sK(t,e)},ungzip:sK,constants:en};function s1(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==t&&"object"==typeof t)return t;try{return JSON.parse(t)}catch(t){return e}}function s2(t){let e=atob(t.replace(/ /g,"+")),s=new Uint8Array(e.length);for(let t=0;t<e.length;t++)s[t]=e.charCodeAt(t);return s}function s5(t,e){return new TextDecoder("utf-8").decode(function(t,e){let s=s2(t),i=e.length,r=new Uint8Array(i);for(let t=0;t<i;t++)r[t]=255&e.charCodeAt(t);let n=new Uint8Array(s.length),a=0;for(let t=0;t<s.length;t++){var o,l;let e=null!=(o=r[(s.length-t)%i])?o:0,h=(a^(null!=(l=s[t])?l:0)^e)&255;n[t]=h,a=(h^a^e)&255}return n}(t,e))}function s6(t,e){tx.logger.error("http","http:session-expired",{message:t,serverMessage:e}),window.dispatchEvent(new CustomEvent("auth:session-expired",{detail:{message:t,serverMessage:e}}))}t.s(["connectNotificationSocket",0,function(t){let e=tk(tU()+tB.namespace,{path:tB.path,transports:["websocket"],reconnectionDelay:5e3,auth:{accessToken:t.accessToken}});return e.on("message",e=>{var s,i,r;try{let r=function(t,e){var s,i,r;let n=s1(t),a="string"==typeof(null==n?void 0:n.d)?n.d:void 0;if(a&&a.replace(/-/g,"").toLowerCase()!==e.deviceId.replace(/-/g,"").toLowerCase())return{};let o=null!=(s=(null==n?void 0:n.data)&&"object"==typeof n.data?n.data:n)?s:{};if("string"==typeof(null==n?void 0:n.data)&&1===n.e&&a){let t,s=function(t,e){let s="",i=e.length,r=Math.max(t.length,i);for(let n=0;n<r;n+=1){let r=t.charAt(n),a=e.charAt(i-n-1);r=r||String.fromCharCode(65+n),a=a||String.fromCharCode(65+n+1),s+=r,s+=a}return s}(a,e.appKeyWss);
2o=null!=(i=s1(1===n.z?(r=n.data,t=s2(s5(r,s)),s0(t,{to:"string"})):s5(n.data,s)))?i:{}}return{cmd:null==n?void 0:n.cmd,...o}}(e,{deviceId:t.deviceId,appKeyWss:tB.appKeyWss});3===r.cmd?null==(s=t.onPayment)||s.call(t,{status:null!=r.status?Number(r.status):void 0,transId:null!=r.transId?String(r.transId):void 0,message:null!=r.message?String(r.message):void 0}):(1===r.cmd||2===r.cmd)&&(null==(i=t.onSessionEnd)||i.call(t,{message:null!=r.message?String(r.message):void 0,kind:2===r.cmd?"kick":"expire"}))}catch(e){tx.logger.warn("http","socket:decode-error",void 0,e),null==(r=t.onError)||r.call(t,e)}}),e.on("connect",()=>tx.logger.debug("http","socket:connect")),e.on("disconnect",t=>tx.logger.debug("http","socket:disconnect",{reason:t})),e.on("connect_error",e=>{var s;tx.logger.debug("http","socket:connect-error",void 0,e),null==(s=t.onError)||s.call(t,e)}),()=>{e.removeAllListeners(),e.disconnect()}}],204831),t.s([],80194);let s3=null;async function s8(){var t;let e=tC(),s=e.storage.getToken();if(!(s?await (null==(t=e.refreshSession)?void 0:t.call(e,s)):null))throw Object.assign(Error("no session to refresh"),{code:"no_refresh_session"})}function s4(t){return!!t&&"object"==typeof t&&"code"in t&&("invalid_grant"===t.code||"no_refresh_session"===t.code)}function s9(){return s3||(tx.logger.debug("http","http:token-refresh:start"),s3=s8().then(()=>{tx.logger.info("http","http:token-refresh:success")}).catch(t=>{throw tx.logger.warn("http","http:token-refresh:fail",void 0,t),s4(t)&&s6("Phiên ÄÄng nháºp Äã hết hạn",function(t){if(!t||"object"!=typeof t||!("serverMessage"in t))return;let e=t.serverMessage;return"string"==typeof e&&e.trim()?e:void 0}(t)),t}).finally(()=>{s3=null}))}async function s7(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=tC(),r=i.headerNames.auth,n=s=>{let i=new Headers(e.headers);return i.set(r,`Bearer ${s}`),fetch(t,{...e,headers:i})},a=i.storage.getToken();if(!a)return fetch(t,e);let o=await n(a);if(401!==o.status)return o;tx.logger.warn("http","http:401-refresh",{url:String(t),signedIn:!0}),await s9();let l=i.storage.getToken();if(!l)throw Error("no access token after refresh");if(!1===s.replayOn401)return tx.logger.info("http","http:refresh-no-replay",{url:String(t)}),o;let h=await n(l);return tx.logger.info("http","http:replay",{url:String(t),status:h.status}),401===h.status&&s6("Phiên ÄÄng nháºp Äã hết hạn"),h}t.s(["dispatchSessionExpired",0,s6,"ensureTokenFresh",0,s9,"fetchWithSessionRefresh",0,s7,"isSessionRefreshRejected",0,s4],614121)},739946,126005,534093,470292,62351,t=>{"use strict";function e(t,e,s){if(!e.has(t))throw TypeError("attempted to "+s+" private field on non-instance");return e.get(t)}function s(t,e){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object")}t.s(["_",0,e],126005),t.s(["_",0,function(t,s){var i=e(t,s,"get");return i.get?i.get.call(t):i.value}],739946),t.s(["_",0,s],534093),t.s(["_",0,function(t,e,i){s(t,e),e.set(t,i)}],470292),t.s(["_",0,function(t,s,i){var r=e(t,s,"set");if(r.set)r.set.call(t,i);else{if(!r.writable)throw TypeError("attempted to set read only private field");r.value=i}return i}],62351)},337696,788245,t=>{"use strict";t.s(["_",0,function(t,e,s){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return s}],337696);var e=t.i(534093);t.s(["_",0,function(t,s){(0,e._)(t,s),s.add(t)}],788245)},273911,619273,t=>{"use strict";let e;var s=t.i(180166),i="u"<typeof window||"Deno"in globalThis;function r(t,e){return((null==e?void 0:e.queryKeyHashFn)||n)(t)}function n(t){return JSON.stringify(t,(t,e)=>u(e)?Object.keys(e).sort().reduce((t,s)=>(t[s]=e[s],t),{}):e)}function a(t,e){return t===e||typeof t==typeof e&&!!t&&!!e&&"object"==typeof t&&"object"==typeof e&&Object.keys(e).every(s=>a(t[s],e[s]))}var o=Object.prototype.hasOwnProperty;function l(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(t===e)return t;if(s>500)return e;let i=h(t)&&h(e);if(!i&&!(u(t)&&u(e)))return e;let r=(i?t:Object.keys(t)).length,n=i?e:Object.keys(e),a=n.length,c=i?Array(a):{},d=0;for(let h=0;h<a;h++){let a=i?h:n[h],u=t[a],p=e[a];if(u===p){c[a]=u,(i?h<r:o.call(t,a))&&d++;continue}if(null===u||null===p||"object"!=typeof u||"object"!=typeof p){c[a]=p;continue}let f=l(u,p,s+1);c[a]=f,f===u&&d++}return r===a&&d===r?t:c}function h(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function u(t){if(!c(t))return!1;let e=t.constructor;if(void 0===e)return!0;let s=e.prototype;return!!c(s)&&!!s.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(t)===Object.prototype}function c(t){return"[object Object]"===Object.prototype.toString.call(t)}var d=Symbol();t.s(["addConsumeAwareSignal",0,function(t,e,s){let i,r=!1;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(null!=i||(i=e()),r||(r=!0,i.aborted?s():i.addEventListener("abort",s,{once:!0})),i)}),t},"addToEnd",0,function(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=[...t,e];return s&&i.length>s?i.slice(1):i},"addToStart",0,function(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=[e,...t];return s&&i.length>s?i.slice(0,-1):i},"ensureQueryFn",0,function(t,e){return!t.queryFn&&(null==e?void 0:e.initialPromise)?()=>e.initialPromise:t.queryFn&&t.queryFn!==d?t.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${t.queryHash}'`))},"functionalUpdate",0,function(t,e){return"function"==typeof t?t(e):t},"hashKey",0,n,"hashQueryKeyByOptions",0,r,"isServer",0,i,"isValidTimeout",0,function(t){return"number"==typeof t&&t>=0&&t!==1/0},"keepPreviousData",0,function(t){return t},"matchMutation",0,function(t,e){let{exact:s,status:i,predicate:r,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if(n(e.options.mutationKey)!==n(o))return!1}else if(!a(e.options.mutationKey,o))return!1}return(!i||e.state.status===i)&&(!r||!!r(e))},"matchQuery",0,function(t,e){let{type:s="all",exact:i,fetchStatus:n,predicate:o,queryKey:l,stale:h}=t;if(l){if(i){if(e.queryHash!==r(l,e.options))return!1}else if(!a(e.queryKey,l))return!1}if("all"!==s){let t=e.isActive();if("active"===s&&!t||"inactive"===s&&t)return!1}return("boolean"!=typeof h||e.isStale()===h)&&(!n||n===e.state.fetchStatus)&&(!o||!!o(e))},"noop",0,function(){},"partialMatchKey",0,a,"replaceData",0,function(t,e,s){return"function"==typeof s.structuralSharing?s.structuralSharing(t,e):!1!==s.structuralSharing?l(t,e):e},"replaceEqualDeep",0,l,"resolveQueryBoolean",0,function(t,e){return"function"==typeof t?t(e):t},"resolveStaleTime",0,function(t,e){return"function"==typeof t?t(e):t},"shallowEqualObjects",0,function(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(let s in t)if(t[s]!==e[s])return!1;return!0},"shouldThrowError",0,function(t,e){return"function"==typeof t?t(...e):!!t},"skipToken",0,d,"sleep",0,function(t){return new Promise(e=>{s.timeoutManager.setTimeout(e,t)})},"timeUntilStale",0,function(t,e){return Math.max(t+(e||0)-Date.now(),0)}],619273);var p=(e=()=>i,{isServer:()=>e(),setIsServer(t){e=t}});t.s(["environmentManager",0,p],273911)},175555,915823,t=>{"use strict";var e,s,i,r=t.i(739946),n=t.i(470292),a=t.i(62351),o=class{subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}};t.s(["Subscribable",0,o],915823);var l=new(e=new WeakMap,s=new WeakMap,i=new WeakMap,class extends o{onSubscribe(){(0,r._)(this,s)||this.setEventListener((0,r._)(this,i))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=(0,r._)(this,s))||t.call(this),(0,a._)(this,s,void 0))}setEventListener(t){var e;(0,a._)(this,i,t),null==(e=(0,r._)(this,s))||e.call(this),(0,a._)(this,s,t(t=>{"boolean"==typeof t?this.setFocused(t):this.onFocus()}))}setFocused(t){(0,r._)(this,e)!==t&&((0,a._)(this,e,t),this.onFocus())}onFocus(){let t=this.isFocused();
2this.listeners.forEach(e=>{e(t)})}isFocused(){var t;return"boolean"==typeof(0,r._)(this,e)?(0,r._)(this,e):(null==(t=globalThis.document)?void 0:t.visibilityState)!=="hidden"}constructor(){super(),(0,n._)(this,e,{writable:!0,value:void 0}),(0,n._)(this,s,{writable:!0,value:void 0}),(0,n._)(this,i,{writable:!0,value:void 0}),(0,a._)(this,i,t=>{if("u">typeof window&&window.addEventListener){let e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}})}});t.s(["focusManager",0,l],175555)},540143,t=>{"use strict";let e,s,i,r,n,a;var o=t.i(180166).systemSetTimeoutZero,l=(e=[],s=0,i=t=>{t()},r=t=>{t()},n=o,{batch:t=>{let a;s++;try{a=t()}finally{let t;--s||(t=e,e=[],t.length&&n(()=>{r(()=>{t.forEach(t=>{i(t)})})}))}return a},batchCalls:t=>function(){for(var e=arguments.length,s=Array(e),i=0;i<e;i++)s[i]=arguments[i];a(()=>{t(...s)})},schedule:a=t=>{s?e.push(t):n(()=>{i(t)})},setNotifyFunction:t=>{i=t},setBatchNotifyFunction:t=>{r=t},setScheduler:t=>{n=t}});t.s(["notifyManager",0,l])},88587,t=>{"use strict";var e,s=t.i(739946),i=t.i(470292),r=t.i(62351),n=t.i(180166),a=t.i(273911),o=t.i(619273),l=(e=new WeakMap,class{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),(0,o.isValidTimeout)(this.gcTime)&&(0,r._)(this,e,n.timeoutManager.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,null!=t?t:a.environmentManager.isServer()?1/0:3e5)}clearGcTimeout(){void 0!==(0,s._)(this,e)&&(n.timeoutManager.clearTimeout((0,s._)(this,e)),(0,r._)(this,e,void 0))}constructor(){(0,i._)(this,e,{writable:!0,value:void 0})}});t.s(["Removable",0,l])},936553,814448,793803,t=>{"use strict";var e,s,i,r=t.i(175555),n=t.i(739946),a=t.i(470292),o=t.i(62351),l=t.i(915823),h=new(e=new WeakMap,s=new WeakMap,i=new WeakMap,class extends l.Subscribable{onSubscribe(){(0,n._)(this,s)||this.setEventListener((0,n._)(this,i))}onUnsubscribe(){var t;this.hasListeners()||(null==(t=(0,n._)(this,s))||t.call(this),(0,o._)(this,s,void 0))}setEventListener(t){var e;(0,o._)(this,i,t),null==(e=(0,n._)(this,s))||e.call(this),(0,o._)(this,s,t(this.setOnline.bind(this)))}setOnline(t){(0,n._)(this,e)!==t&&((0,o._)(this,e,t),this.listeners.forEach(e=>{e(t)}))}isOnline(){return(0,n._)(this,e)}constructor(){super(),(0,a._)(this,e,{writable:!0,value:!0}),(0,a._)(this,s,{writable:!0,value:void 0}),(0,a._)(this,i,{writable:!0,value:void 0}),(0,o._)(this,i,t=>{if("u">typeof window&&window.addEventListener){let e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}})}});t.s(["onlineManager",0,h],814448);var u=t.i(619273);function c(){let t,e,s=new Promise((s,i)=>{t=s,e=i});function i(t){Object.assign(s,t),delete s.resolve,delete s.reject}return s.status="pending",s.catch(()=>{}),s.resolve=e=>{i({status:"fulfilled",value:e}),t(e)},s.reject=t=>{i({status:"rejected",reason:t}),e(t)},s}t.s(["pendingThenable",0,c],793803);var d=t.i(273911);function p(t){return Math.min(1e3*2**t,3e4)}function f(t){return(null!=t?t:"online")!=="online"||h.isOnline()}var _=class extends Error{constructor(t){super("CancelledError"),this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent}};t.s(["CancelledError",0,_,"canFetch",0,f,"createRetryer",0,function(t){let e,s=!1,i=0,n=c(),a=()=>r.focusManager.isFocused()&&("always"===t.networkMode||h.isOnline())&&t.canRun(),o=()=>f(t.networkMode)&&t.canRun(),l=t=>{"pending"===n.status&&(null==e||e(),n.resolve(t))},g=t=>{"pending"===n.status&&(null==e||e(),n.reject(t))},m=()=>new Promise(s=>{var i;e=t=>{("pending"!==n.status||a())&&s(t)},null==(i=t.onPause)||i.call(t)}).then(()=>{if(e=void 0,"pending"===n.status){var s;null==(s=t.onContinue)||s.call(t)}}),y=()=>{let e;if("pending"!==n.status)return;let r=0===i?t.initialPromise:void 0;try{e=null!=r?r:t.fn()}catch(t){e=Promise.reject(t)}Promise.resolve(e).then(l).catch(e=>{var r,o,l;if("pending"!==n.status)return;let h=null!=(r=t.retry)?r:3*!d.environmentManager.isServer(),c=null!=(o=t.retryDelay)?o:p,f="function"==typeof c?c(i,e):c,_=!0===
2h||"number"==typeof h&&i<h||"function"==typeof h&&h(i,e);s||!_?g(e):(i++,null==(l=t.onFail)||l.call(t,i,e),(0,u.sleep)(f).then(()=>a()?void 0:m()).then(()=>{s?g(e):y()}))})};return{promise:n,status:()=>n.status,cancel:e=>{if("pending"===n.status){var s;let i=new _(e);g(i),null==(s=t.onCancel)||s.call(t,i)}},continue:()=>(null==e||e(),n),cancelRetry:()=>{s=!0},continueRetry:()=>{s=!1},canStart:o,start:()=>(o()?y():m().then(y),n)}}],936553)},180166,t=>{"use strict";var e,s,i=t.i(739946),r=t.i(470292),n=t.i(62351),a={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},o=new(e=new WeakMap,s=new WeakMap,class{setTimeoutProvider(t){(0,n._)(this,e,t)}setTimeout(t,s){return(0,i._)(this,e).setTimeout(t,s)}clearTimeout(t){(0,i._)(this,e).clearTimeout(t)}setInterval(t,s){return(0,i._)(this,e).setInterval(t,s)}clearInterval(t){(0,i._)(this,e).clearInterval(t)}constructor(){(0,r._)(this,e,{writable:!0,value:a}),(0,r._)(this,s,{writable:!0,value:!1})}});t.s(["systemSetTimeoutZero",0,function(t){setTimeout(t,0)},"timeoutManager",0,o])},912598,t=>{"use strict";var e=t.i(271645),s=t.i(843476),i=e.createContext(void 0);t.s(["QueryClientProvider",0,t=>{let{client:r,children:n}=t;return e.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]),(0,s.jsx)(i.Provider,{value:r,children:n})},"useQueryClient",0,t=>{let s=e.useContext(i);if(t)return t;if(!s)throw Error("No QueryClient set, use QueryClientProvider to set one");return s}])},266027,992571,286491,869230,673664,427001,381384,254440,469637,t=>{"use strict";let e;var s,i,r,n,a,o,l,h,u,c,d,p,f,_,g,m,y,b,v,w,k,x,E,A,S,T,O,R,C,U,B,z,N,L,P=t.i(739946),F=t.i(470292),M=t.i(62351),D=t.i(337696),I=t.i(
2788245),q=t.i(175555),j=t.i(273911),W=t.i(540143),Q=t.i(619273),Z=t.i(936553),K=t.i(88587);function H(t){return{onFetch:(e,s)=>{var i,r,n,a,o;let l=e.options,h=null==(n=e.fetchOptions)||null==(r=n.meta)||null==(i=r.fetchMore)?void 0:i.direction,u=(null==(a=e.state.data)?void 0:a.pages)||[],c=(null==(o=e.state.data)?void 0:o.pageParams)||[],d={pages:[],pageParams:[]},p=0,f=async()=>{let s=!1,i=(0,Q.ensureQueryFn)(e.options,e.fetchOptions),r=async(t,r,n)=>{let a;if(s)return Promise.reject(e.signal.reason);if(null==r&&t.pages.length)return Promise.resolve(t);let o=(a={client:e.client,queryKey:e.queryKey,pageParam:r,direction:n?"backward":"forward",meta:e.options.meta},(0,Q.addConsumeAwareSignal)(a,()=>e.signal,()=>s=!0),a),l=await i(o),{maxPages:h}=e.options,u=n?Q.addToStart:Q.addToEnd;return{pages:u(t.pages,l,h),pageParams:u(t.pageParams,r,h)}};if(h&&u.length){let t="backward"===h,e={pages:u,pageParams:c},s=(t?Y:V)(l,e);d=await r(e,s,t)}else{let e=null!=t?t:u.length;do{var n;let t=0===p?null!=(n=c[0])?n:l.initialPageParam:V(l,d);if(p>0&&null==t)break;d=await r(d,t),p++}while(p<e)}return d};e.options.persister?e.fetchFn=()=>{var t,i;return null==(t=(i=e.options).persister)?void 0:t.call(i,f,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=f}}}function V(t,e){let{pages:s,pageParams:i}=e,r=s.length-1;return s.length>0?t.getNextPageParam(s[r],s,i[r],i):void 0}function Y(t,e){var s;let{pages:i,pageParams:r}=e;return i.length>0?null==(s=t.getPreviousPageParam)?void 0:s.call(t,i[0],i,r[0],r):void 0}t.s(["hasNextPage",0,function(t,e){return!!e&&null!=V(t,e)},"hasPreviousPage",0,function(t,e){return!!e&&!!t.getPreviousPageParam&&null!=Y(t,e)},"infiniteQueryBehavior",0,H],992571);var $=(s=new WeakMap,i=new WeakMap,r=new WeakMap,n=new WeakMap,a=new WeakMap,o=new WeakMap,l=new WeakMap,h=new WeakMap,u=new WeakSet,c=new WeakSet,class extends K.Removable{get meta(){return this.options.meta}get queryType(){return(0,P._)(this,s)}get promise(){var t;return null==(t=(0,P._)(this,o))?void 0:t.promise}setOptions(t){if(this.options={...(0,P._)(this,l),...t},(null==t?void 0:t._type)&&(0,M._)(this,s,t._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){let t=X(this.options);void 0!==t.data&&(this.setState(G(t.data,t.dataUpdatedAt)),(0,M._)(this,i,t))}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||(0,P._)(this,n).remove(this)}setData(t,e){let s=(0,Q.replaceData)(this.state.data,t,this.options);return(0,D._)(this,c,te).call(this,{data:s,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt,manual:null==e?void 0:e.manual}),s}setState(t){(0,D._)(this,c,te).call(this,{type:"setState",state:t})}cancel(t){var e,s;let i=null==(e=(0,P._)(this,o))?void 0:e.promise;return null==(s=(0,P._)(this,o))||s.cancel(t),i?i.then(Q.noop).catch(Q.noop):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return(0,P._)(this,i)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>!1!==(0,Q.resolveQueryBoolean)(t.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Q.skipToken||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(t=>"static"===(0,Q.resolveStaleTime)(t.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return void 0===this.state.data||"static"!==t&&(!!this.state.isInvalidated||!(0,Q.timeUntilStale)(this.state.dataUpdatedAt,t))}onFocus(){var t;let e=this.observers.find(t=>t.shouldFetchOnWindowFocus());null==e||e.refetch({cancelRefetch:!1}),null==(t=(0,P._)(this,o))||t.continue()}onOnline(){var t;let e=this.observers.find(t=>t.shouldFetchOnReconnect());null==e||e.refetch({cancelRefetch:!1}),null==(t=(0,P._)(this,o))||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),(0,P._)(this,n).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(e=>e!==t),this.observers.length||((0,P._)(this,o)&&((0,P._)(this,h)||(0,D._)(this,u,tt).call(this)?(0,P._)(this,o).cancel({revert:!0}):(0,P._)(this,o).cancelRetry()),this.scheduleGc()),(0,P._)(this,n).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||(0,D._)(this,c,te).call(this,{type:"invalidate"})}async fetch(t,e){var i,l,u,d,p,f,_,g,m,y,b;let v;if("idle"!==this.state.fetchStatus&&(null==(i=(0,P._)(this,o))?void 0:i.status())!=="rejected"){if(void 0!==this.state.data&&(null==e?void 0:e.cancelRefetch))this.cancel({silent:!0});else if((0,P._)(this,o))return(0,P._)(this,o).continueRetry(),(0,P._)(this,o).promise}if(t&&this.setOptions(t),!this.options.queryFn){let t=this.observers.find(t=>t.options.queryFn);t&&this.setOptions(t.options)}let w=new AbortController,k=t=>{Object.defineProperty(t,"signal",{enumerable:!0,get:()=>((0,M._)(this,h,!0),w.signal)}
2)},x=()=>{let t,s=(0,Q.ensureQueryFn)(this.options,e),i=(k(t={client:(0,P._)(this,a),queryKey:this.queryKey,meta:this.meta}),t);return((0,M._)(this,h,!1),this.options.persister)?this.options.persister(s,i,this):s(i)},E=(k(v={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:(0,P._)(this,a),state:this.state,fetchFn:x}),v),A="infinite"===(0,P._)(this,s)?H(this.options.pages):this.options.behavior;null==A||A.onFetch(E,this),(0,M._)(this,r,this.state),("idle"===this.state.fetchStatus||this.state.fetchMeta!==(null==(l=E.fetchOptions)?void 0:l.meta))&&(0,D._)(this,c,te).call(this,{type:"fetch",meta:null==(u=E.fetchOptions)?void 0:u.meta}),(0,M._)(this,o,(0,Z.createRetryer)({initialPromise:null==e?void 0:e.initialPromise,fn:E.fetchFn,onCancel:t=>{t instanceof Z.CancelledError&&t.revert&&this.setState({...(0,P._)(this,r),fetchStatus:"idle"}),w.abort()},onFail:(t,e)=>{(0,D._)(this,c,te).call(this,{type:"failed",failureCount:t,error:e})},onPause:()=>{(0,D._)(this,c,te).call(this,{type:"pause"})},onContinue:()=>{(0,D._)(this,c,te).call(this,{type:"continue"})},retry:E.options.retry,retryDelay:E.options.retryDelay,networkMode:E.options.networkMode,canRun:()=>!0}));try{let t=await (0,P._)(this,o).start();if(void 0===t)throw Error(`${this.queryHash} data is undefined`);return this.setData(t),null==(d=(p=(0,P._)(this,n).config).onSuccess)||d.call(p,t,this),null==(f=(_=(0,P._)(this,n).config).onSettled)||f.call(_,t,this.state.error,this),t}catch(t){if(t instanceof Z.CancelledError){if(t.silent)return(0,P._)(this,o).promise;else if(t.revert){if(void 0===this.state.data)throw t;return this.state.data}}throw(0,D._)(this,c,te).call(this,{type:"error",error:t}),null==(g=(m=(0,P._)(this,n).config).onError)||g.call(m,t,this),null==(y=(b=(0,P._)(this,n).config).onSettled)||y.call(b,this.state.data,t,this),t}finally{this.scheduleGc()}}constructor(t){var e;super(),(0,I._)(this,u),(0,I._)(this,c),(0,F._)(this,s,{writable:!0,value:void 0}),(0,F._)(this,i,{writable:!0,value:void 0}),(0,F._)(this,r,{writable:!0,value:void 0}),(0,F._)(this,n,{writable:!0,value:void 0}),(0,F._)(this,a,{writable:!0,value:void 0}),(0,F._)(this,o,{writable:!0,value:void 0}),(0,F._)(this,l,{writable:!0,value:void 0}),(0,F._)(this,h,{writable:!0,value:void 0}),(0,M._)(this,h,!1),(0,M._)(this,l,t.defaultOptions),this.setOptions(t.options),this.observers=[],(0,M._)(this,a,t.client),(0,M._)(this,n,(0,P._)(this,a).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,(0,M._)(this,i,X(this.options)),this.state=null!=(e=t.state)?e:(0,P._)(this,i),this.scheduleGc()}});function J(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:(0,Z.canFetch)(e.networkMode)?"fetching":"paused",...void 0===t&&{error:null,status:"pending"}}}function G(t,e){return{data:t,dataUpdatedAt:null!=e?e:Date.now(),error:null,isInvalidated:!1,status:"success"}}function X(t){let e="function"==typeof t.initialData?t.initialData():t.initialData,s=void 0!==e,i=s?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?null!=i?i:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}function tt(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}function te(t){let e=e=>{switch(t.type){case"failed":return{...e,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...e,fetchStatus:"paused"};case"continue":return{...e,fetchStatus:"fetching"};case"fetch":var s;return{...e,...J(e.data,this.options),fetchMeta:null!=(s=t.meta)?s:null};case"success":let i={...e,...G(t.data,t.dataUpdatedAt),dataUpdateCount:e.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return(0,M._)(this,r,t.manual?i:void 0),i;case"error":let n=t.error;return{...e,error:n,errorUpdateCount:e.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:e.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error",isInvalidated:!0};
2case"invalidate":return{...e,isInvalidated:!0};case"setState":return{...e,...t.state}}};this.state=e(this.state),W.notifyManager.batch(()=>{this.observers.forEach(t=>{t.onQueryUpdate()}),(0,P._)(this,n).notify({query:this,type:"updated",action:t})})}t.s(["Query",0,$,"fetchState",0,J],286491);var ts=t.i(915823),ti=t.i(793803),tr=t.i(180166),tn=(d=new WeakMap,p=new WeakMap,f=new WeakMap,_=new WeakMap,g=new WeakMap,m=new WeakMap,y=new WeakMap,b=new WeakMap,v=new WeakMap,w=new WeakMap,k=new WeakMap,x=new WeakMap,E=new WeakMap,A=new WeakMap,S=new WeakMap,T=new WeakSet,O=new WeakSet,R=new WeakSet,C=new WeakSet,U=new WeakSet,B=new WeakSet,z=new WeakSet,N=new WeakSet,L=new WeakSet,class extends ts.Subscribable{bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&((0,P._)(this,p).addObserver(this),ta((0,P._)(this,p),this.options)?(0,D._)(this,T,tu).call(this):this.updateResult(),(0,D._)(this,U,tf).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return to((0,P._)(this,p),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return to((0,P._)(this,p),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,(0,D._)(this,B,t_).call(this),(0,D._)(this,z,tg).call(this),(0,P._)(this,p).removeObserver(this)}setOptions(t){let e=this.options,s=(0,P._)(this,p);if(this.options=(0,P._)(this,d).defaultQueryOptions(t),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,Q.resolveQueryBoolean)(this.options.enabled,(0,P._)(this,p)))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");(0,D._)(this,N,tm).call(this),(0,P._)(this,p).setOptions(this.options),e._defaulted&&!(0,Q.shallowEqualObjects)(this.options,e)&&(0,P._)(this,d).getQueryCache().notify({type:"observerOptionsUpdated",query:(0,P._)(this,p),observer:this});let i=this.hasListeners();i&&tl((0,P._)(this,p),s,this.options,e)&&(0,D._)(this,T,tu).call(this),this.updateResult(),i&&((0,P._)(this,p)!==s||(0,Q.resolveQueryBoolean)(this.options.enabled,(0,P._)(this,p))!==(0,Q.resolveQueryBoolean)(e.enabled,(0,P._)(this,p))||(0,Q.resolveStaleTime)(this.options.staleTime,(0,P._)(this,p))!==(0,Q.resolveStaleTime)(e.staleTime,(0,P._)(this,p)))&&(0,D._)(this,O,tc).call(this);let r=(0,D._)(this,R,td).call(this);i&&((0,P._)(this,p)!==s||(0,Q.resolveQueryBoolean)(this.options.enabled,(0,P._)(this,p))!==(0,Q.resolveQueryBoolean)(e.enabled,(0,P._)(this,p))||r!==(0,P._)(this,A))&&(0,D._)(this,C,tp).call(this,r)}getOptimisticResult(t){var e,s;let i=(0,P._)(this,d).getQueryCache().build((0,P._)(this,d),t),r=this.createResult(i,t);return e=this,s=r,(0,Q.shallowEqualObjects)(e.getCurrentResult(),s)||((0,M._)(this,_,r),(0,M._)(this,m,this.options),(0,M._)(this,g,(0,P._)(this,p).state)),r}getCurrentResult(){return(0,P._)(this,_)}trackResult(t,e){return new Proxy(t,{get:(t,s)=>(this.trackProp(s),null==e||e(s),"promise"===s&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==(0,P._)(this,y).status||(0,P._)(this,y).reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(t,s))})}trackProp(t){(0,P._)(this,S).add(t)}getCurrentQuery(){return(0,P._)(this,p)}refetch(){let{...t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.fetch({...t})}fetchOptimistic(t){let e=(0,P._)(this,d).defaultQueryOptions(t),s=(0,P._)(this,d).getQueryCache().build((0,P._)(this,d),e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){var e;return(0,D._)(this,T,tu).call(this,{...t,cancelRefetch:null==(e=t.cancelRefetch)||e}).then(()=>(this.updateResult(),(0,P._)(this,_)))}createResult(t,e){let s,i=(0,P._)(this,p),r=this.options,n=(0,P._)(this,_),a=(0,P._)(this,g),o=(0,P._)(this,m),l=t!==i?t.state:(0,P._)(this,f),{state:h}=t,u={...h},c=!1;if(e._optimisticResults){let s=this.hasListeners(),n=!s&&ta(t,e),a=s&&tl(t,i,e,r);(n||a)&&(u={...u,...J(h.data,t.options)}),"isRestoring"===e._optimisticResults&&(u.fetchStatus="idle")}let{error:d,errorUpdatedAt:x,status:E}=u;s=u.data;let A=!1;if(void 0!==e.placeholderData&&void 0===s&&"pending"===E){let t;if((null==n?void 0:n.isPlaceholderData)&&e.placeholderData===(null==o?void 0:o.placeholderData))t=n.data,A=!0;else{var S;t="function"==typeof e.placeholderData?e.placeholderData(null==(S=(0,P._)(this,k))?void 0:S.state.data,(0,P._)(this,k)):e.placeholderData}void 0!==t&&(E="success",s=(0,Q.replaceData)(null==n?void 0:n.data,t,e),c=!0)}if(e.select&&void 0!==s&&!A)if(n&&s===(null==a?void 0:a.data)&&e.select===(0,P._)(this,v))s=(0,P._)(this,w);else try{(0,M._)(this,v,e.select),s=e.select(s),s=(0,Q.replaceData)(null==n?void 0:n.data,s,e),(0,M._)(this,w,s),(0,M._)(this,b,null)}catch(t){(0,M._)(this,b,t)}(0,P._)(this,b)&&(d=(0,P._)(this,b),s=(0,P._)(this,w),x=Date.now(),E="error");let T="fetching"===u.fetchStatus,O="pending"===E,R="error"===E,C=O&&T,U=void 0!==s,B={status:E,fetchStatus:u.fetchStatus,isPending:O,isSuccess:"success"===E,isError:R,isInitialLoading:C,isLoading:C,data:s,dataUpdatedAt:u.dataUpdatedAt,error:d,errorUpdatedAt:x,failureCount:u.fetchFailureCount,failureReason:u.fetchFailureReason,errorUpdate
2Count:u.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:u.dataUpdateCount>l.dataUpdateCount||u.errorUpdateCount>l.errorUpdateCount,isFetching:T,isRefetching:T&&!O,isLoadingError:R&&!U,isPaused:"paused"===u.fetchStatus,isPlaceholderData:c,isRefetchError:R&&U,isStale:th(t,e),refetch:this.refetch,promise:(0,P._)(this,y),isEnabled:!1!==(0,Q.resolveQueryBoolean)(e.enabled,t)};if(this.options.experimental_prefetchInRender){let e=void 0!==B.data,s="error"===B.status&&!e,r=t=>{s?t.reject(B.error):e&&t.resolve(B.data)},n=()=>{r((0,M._)(this,y,B.promise=(0,ti.pendingThenable)()))},a=(0,P._)(this,y);switch(a.status){case"pending":t.queryHash===i.queryHash&&r(a);break;case"fulfilled":(s||B.data!==a.value)&&n();break;case"rejected":s&&B.error===a.reason||n()}}return B}updateResult(){let t=(0,P._)(this,_),e=this.createResult((0,P._)(this,p),this.options);if((0,M._)(this,g,(0,P._)(this,p).state),(0,M._)(this,m,this.options),void 0!==(0,P._)(this,g).data&&(0,M._)(this,k,(0,P._)(this,p)),(0,Q.shallowEqualObjects)(e,t))return;(0,M._)(this,_,e);let s=()=>{if(!t)return!0;let{notifyOnChangeProps:e}=this.options,s="function"==typeof e?e():e;if("all"===s||!s&&!(0,P._)(this,S).size)return!0;let i=new Set(null!=s?s:(0,P._)(this,S));return this.options.throwOnError&&i.add("error"),Object.keys((0,P._)(this,_)).some(e=>(0,P._)(this,_)[e]!==t[e]&&i.has(e))};(0,D._)(this,L,ty).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&(0,D._)(this,U,tf).call(this)}constructor(t,e){super(),(0,I._)(this,T),(0,I._)(this,O),(0,I._)(this,R),(0,I._)(this,C),(0,I._)(this,U),(0,I._)(this,B),(0,I._)(this,z),(0,I._)(this,N),(0,I._)(this,L),(0,F._)(this,d,{writable:!0,value:void 0}),(0,F._)(this,p,{writable:!0,value:void 0}),(0,F._)(this,f,{writable:!0,value:void 0}),(0,F._)(this,_,{writable:!0,value:void 0}),(0,F._)(this,g,{writable:!0,value:void 0}),(0,F._)(this,m,{writable:!0,value:void 0}),(0,F._)(this,y,{writable:!0,value:void 0}),(0,F._)(this,b,{writable:!0,value:void 0}),(0,F._)(this,v,{writable:!0,value:void 0}),(0,F._)(this,w,{writable:!0,value:void 0}),(0,F._)(this,k,{writable:!0,value:void 0}),(0,F._)(this,x,{writable:!0,value:void 0}),(0,F._)(this,E,{writable:!0,value:void 0}),(0,F._)(this,A,{writable:!0,value:void 0}),(0,F._)(this,S,{writable:!0,value:new Set}),this.options=e,(0,M._)(this,d,t),(0,M._)(this,b,null),(0,M._)(this,y,(0,ti.pendingThenable)()),this.bindMethods(),this.setOptions(e)}});function ta(t,e){return!1!==(0,Q.resolveQueryBoolean)(e.enabled,t)&&void 0===t.state.data&&("error"!==t.state.status||!1!==(0,Q.resolveQueryBoolean)(e.retryOnMount,t))||void 0!==t.state.data&&to(t,e,e.refetchOnMount)}function to(t,e,s){if(!1!==(0,Q.resolveQueryBoolean)(e.enabled,t)&&"static"!==(0,Q.resolveStaleTime)(e.staleTime,t)){let i="function"==typeof s?s(t):s;return"always"===i||!1!==i&&th(t,e)}return!1}function tl(t,e,s,i){return(t!==e||!1===(0,Q.resolveQueryBoolean)(i.enabled,t))&&(!s.suspense||"error"!==t.state.status)&&th(t,s)}function th(t,e){return!1!==(0,Q.resolveQueryBoolean)(e.enabled,t)&&t.isStaleByTime((0,Q.resolveStaleTime)(e.staleTime,t))}function tu(t){(0,D._)(this,N,tm).call(this);let e=(0,P._)(this,p).fetch(this.options,t);return(null==t?void 0:t.throwOnError)||(e=e.catch(Q.noop)),e}function tc(){(0,D._)(this,B,t_).call(this);let t=(0,Q.resolveStaleTime)(this.options.staleTime,(0,P._)(this,p));if(j.environmentManager.isServer()||(0,P._)(this,_).isStale||!(0,Q.isValidTimeout)(t))return;let e=(0,Q.timeUntilStale)((0,P._)(this,_).dataUpdatedAt,t);(0,M._)(this,x,tr.timeoutManager.setTimeout(()=>{(0,P._)(this,_).isStale||this.updateResult()},e+1))}function td(){var t;return null!=(t="function"==typeof this.options.refetchInterval?this.options.refetchInterval((0,P._)(this,p)):this.options.refetchInterval)&&t}function tp(t){(0,D._)(this,z,tg).call(this),(0,M._)(this,A,t),!j.environmentManager.isServer()&&!1!==(0,Q.resolveQueryBoolean)(this.options.enabled,(0,P._)(this,p))&&(0,Q.isValidTimeout)((0,P._)(this,A))&&0!==(0,P._)(this,A)&&(0,M._)(this,E,tr.timeoutManager.setInterval(()=>
2{(this.options.refetchIntervalInBackground||q.focusManager.isFocused())&&(0,D._)(this,T,tu).call(this)},(0,P._)(this,A)))}function tf(){(0,D._)(this,O,tc).call(this),(0,D._)(this,C,tp).call(this,(0,D._)(this,R,td).call(this))}function t_(){void 0!==(0,P._)(this,x)&&(tr.timeoutManager.clearTimeout((0,P._)(this,x)),(0,M._)(this,x,void 0))}function tg(){void 0!==(0,P._)(this,E)&&(tr.timeoutManager.clearInterval((0,P._)(this,E)),(0,M._)(this,E,void 0))}function tm(){let t=(0,P._)(this,d).getQueryCache().build((0,P._)(this,d),this.options);if(t===(0,P._)(this,p))return;let e=(0,P._)(this,p);(0,M._)(this,p,t),(0,M._)(this,f,t.state),this.hasListeners()&&(null==e||e.removeObserver(this),t.addObserver(this))}function ty(t){W.notifyManager.batch(()=>{t.listeners&&this.listeners.forEach(t=>{t((0,P._)(this,_))}),(0,P._)(this,d).getQueryCache().notify({query:(0,P._)(this,p),type:"observerResultsUpdated"})})}t.s(["QueryObserver",0,tn],869230);var tb=t.i(271645),tv=t.i(912598);t.i(843476);var tw=tb.createContext((e=!1,{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e})),tk=()=>tb.useContext(tw);t.s(["useQueryErrorResetBoundary",0,tk],673664);var tx=(t,e,s)=>{let i=(null==s?void 0:s.state.error)&&"function"==typeof t.throwOnError?(0,Q.shouldThrowError)(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&!e.isReset()&&(t.retryOnMount=!1)},tE=t=>{tb.useEffect(()=>{t.clearReset()},[t])},tA=t=>{let{result:e,errorResetBoundary:s,throwOnError:i,query:r,suspense:n}=t;return e.isError&&!s.isReset()&&!e.isFetching&&r&&(n&&void 0===e.data||(0,Q.shouldThrowError)(i,[e.error,r]))};t.s(["ensurePreventErrorBoundaryRetry",0,tx,"getHasError",0,tA,"useClearResetErrorBoundary",0,tE],427001);var tS=tb.createContext(!1),tT=()=>tb.useContext(tS);tS.Provider,t.s(["useIsRestoring",0,tT],381384);var tO=t=>{if(t.suspense){let e=t=>"static"===t?t:Math.max(null!=t?t:1e3,1e3),s=t.staleTime;t.staleTime="function"==typeof s?function(){for(var t=arguments.length,i=Array(t),r=0;r<t;r++)i[r]=arguments[r];return e(s(...i))}:e(s),"number"==typeof t.gcTime&&(t.gcTime=Math.max(t.gcTime,1e3))}},tR=(t,e)=>t.isLoading&&t.isFetching&&!e,tC=(t,e)=>(null==t?void 0:t.suspense)&&e.isPending,tU=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function tB(t,e,s){var i,r,n,a;let o=tT(),l=tk(),h=(0,tv.useQueryClient)(s),u=h.defaultQueryOptions(t);null==(r=h.getDefaultOptions().queries)||null==(i=r._experimental_beforeQuery)||i.call(r,u);let c=h.getQueryCache().get(u.queryHash),d=!1!==t.subscribed;u._optimisticResults=o?"isRestoring":d?"optimistic":void 0,tO(u),tx(u,l,c),tE(l);let p=!h.getQueryCache().get(u.queryHash),[f]=tb.useState(()=>new e(h,u)),_=f.getOptimisticResult(u),g=!o&&d;if(tb.useSyncExternalStore(tb.useCallback(t=>{let e=g?f.subscribe(W.notifyManager.batchCalls(t)):Q.noop;return f.updateResult(),e},[f,g]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),tb.useEffect(()=>{f.setOptions(u)},[u,f]),tC(u,_))throw tU(u,f,l);if(tA({result:_,errorResetBoundary:l,throwOnError:u.throwOnError,query:c,suspense:u.suspense}))throw _.error;if(null==(a=h.getDefaultOptions().queries)||null==(n=a._experimental_afterQuery)||n.call(a,u,_),u.experimental_prefetchInRender&&!j.environmentManager.isServer()&&tR(_,o)){let t=p?tU(u,f,l):null==c?void 0:c.promise;null==t||t.catch(Q.noop).finally(()=>{f.updateResult()})}return u.notifyOnChangeProps?_:f.trackResult(_)}t.s(["ensureSuspenseTimers",0,tO,"fetchOptimistic",0,tU,"shouldSuspend",0,tC,"willFetch",0,tR],254440),t.s(["useBaseQuery",0,tB],469637),t.s(["useQuery",0,function(t,e){return tB(t,tn,e)}],266027)}]); 3 4//# debugId=e7369607-7724-4d39-281f-a2071efdb2bb
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.