diff --git a/.claude/settings.json b/.claude/settings.json deleted file mode 100644 index ded4fb7..0000000 --- a/.claude/settings.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(pnpm:*)", - "Bash(node:*)", - "Bash(npx:*)", - "Bash(git:*)", - "Bash(grep:*)", - "Bash(find:*)", - "Bash(ls:*)", - "Bash(cat:*)", - "Bash(mkdir:*)", - "Bash(rm:*)", - "Bash(cp:*)", - "Bash(mv:*)", - "Edit", - "Write", - "Read" - ] - }, - "enabledPlugins": { - "marketing-skills@marketingskills": true, - "ui-ux-pro-max@ui-ux-pro-max-skill": true, - "superpowers@claude-plugins-official": true, - "chrome-devtools-mcp@claude-plugins-official": true - } -} diff --git a/originGUI/dist/bundle.js b/originGUI/dist/bundle.js index 5e4cfff..dd30832 100644 --- a/originGUI/dist/bundle.js +++ b/originGUI/dist/bundle.js @@ -1,4 +1,4 @@ -(()=>{var gs=Object.create;var Xt=Object.defineProperty;var ys=Object.getOwnPropertyDescriptor;var bs=Object.getOwnPropertyNames;var vs=Object.getPrototypeOf,ks=Object.prototype.hasOwnProperty;var b=(t,e)=>()=>(t&&(e=t(t=0)),e);var pt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Cs=(t,e)=>{for(var n in e)Xt(t,n,{get:e[n],enumerable:!0})},Es=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of bs(e))!ks.call(t,r)&&r!==n&&Xt(t,r,{get:()=>e[r],enumerable:!(o=ys(e,r))||o.enumerable});return t};var ht=(t,e,n)=>(n=t!=null?gs(vs(t)):{},Es(e||!t||!t.__esModule?Xt(n,"default",{value:t,enumerable:!0}):n,t));var J,je,Ye,ft=b(()=>{J=Object.create(null);J.open="0";J.close="1";J.ping="2";J.pong="3";J.message="4";J.upgrade="5";J.noop="6";je=Object.create(null);Object.keys(J).forEach(t=>{je[J[t]]=t});Ye={type:"error",data:"parser error"}});function eo(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function ro(t,e){if(to&&t.data instanceof Blob)return t.data.arrayBuffer().then(eo).then(e);if(no&&(t.data instanceof ArrayBuffer||oo(t.data)))return e(eo(t.data));Ke(t,!1,n=>{Jt||(Jt=new TextEncoder),e(Jt.encode(n))})}var to,no,oo,Ke,Qn,Jt,so=b(()=>{ft();to=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",no=typeof ArrayBuffer=="function",oo=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ke=({type:t,data:e},n,o)=>to&&e instanceof Blob?n?o(e):Qn(e,o):no&&(e instanceof ArrayBuffer||oo(e))?n?o(e):Qn(new Blob([e]),o):o(J[t]+(e||"")),Qn=(t,e)=>{let n=new FileReader;return n.onload=function(){let o=n.result.split(",")[1];e("b"+(o||""))},n.readAsDataURL(t)}});var io,Ge,ao,lo=b(()=>{io="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ge=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,o,r=0,s,l,d,p;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let k=new ArrayBuffer(e),I=new Uint8Array(k);for(o=0;o>4,I[r++]=(l&15)<<4|d>>2,I[r++]=(d&3)<<6|p&63;return k}});var xs,Xe,Ss,co,uo=b(()=>{ft();lo();xs=typeof ArrayBuffer=="function",Xe=(t,e)=>{if(typeof t!="string")return{type:"message",data:co(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:Ss(t.substring(1),e)}:je[n]?t.length>1?{type:je[n],data:t.substring(1)}:{type:je[n]}:Ye},Ss=(t,e)=>{if(xs){let n=ao(t);return co(n,e)}else return{base64:!0,data:t}},co=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function mo(){return new TransformStream({transform(t,e){ro(t,n=>{let o=n.length,r;if(o<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,o);else if(o<65536){r=new Uint8Array(3);let s=new DataView(r.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{r=new Uint8Array(9);let s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(n)})}})}function mt(t){return t.reduce((e,n)=>e+n.length,0)}function wt(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),o=0;for(let r=0;rMath.pow(2,21)-1){d.enqueue(Ye);break}r=I*Math.pow(2,32)+k.getUint32(4),o=3}else{if(mt(n)t){d.enqueue(Ye);break}}}})}var po,ho,fo,Zt,Qt,Pe=b(()=>{so();uo();ft();po="",ho=(t,e)=>{let n=t.length,o=new Array(n),r=0;t.forEach((s,l)=>{Ke(s,!1,d=>{o[l]=d,++r===n&&e(o.join(po))})})},fo=(t,e)=>{let n=t.split(po),o=[];for(let r=0;r{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 n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};S.prototype.off=S.prototype.removeListener=S.prototype.removeAllListeners=S.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,r=0;r{re=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),$=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),go="arraybuffer"});function gt(t,...e){return e.reduce((n,o)=>(t.hasOwnProperty(o)&&(n[o]=t[o]),n),{})}function se(t,e){e.useNativeTimers?(t.setTimeoutFn=Ts.bind($),t.clearTimeoutFn=_s.bind($)):(t.setTimeoutFn=$.setTimeout.bind($),t.clearTimeoutFn=$.clearTimeout.bind($))}function yo(t){return typeof t=="string"?Is(t):Math.ceil((t.byteLength||t.size)*Ps)}function Is(t){let e=0,n=0;for(let o=0,r=t.length;o=57344?n+=3:(o++,n+=4);return n}function yt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var Ts,_s,Ps,be=b(()=>{ye();Ts=$.setTimeout,_s=$.clearTimeout;Ps=1.33});function bo(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function vo(t){let e={},n=t.split("&");for(let o=0,r=n.length;o{});var bt,ie,Je=b(()=>{Pe();ge();be();en();bt=class extends Error{constructor(e,n,o){super(e),this.description=n,this.context=o,this.type="TransportError"}},ie=class extends S{constructor(e){super(),this.writable=!1,se(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,o){return super.emitReserved("error",new bt(e,n,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=Xe(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=bo(e);return n.length?"?"+n:""}}});var Ze,tn=b(()=>{Je();be();Pe();Ze=class extends ie{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||n()})),this.writable||(o++,this.once("drain",function(){--o||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};fo(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,ho(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=yt()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var ko,Co,Eo=b(()=>{ko=!1;try{ko=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}Co=ko});function Ds(){}function xo(){for(let t in de.requests)de.requests.hasOwnProperty(t)&&de.requests[t].abort()}function So(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||Co))return new XMLHttpRequest}catch{}if(!e)try{return new $[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var nn,de,Bs,pe,vt=b(()=>{tn();ge();be();ye();Eo();nn=class extends Ze{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,n){let o=this.request({method:"POST",data:e});o.on("success",n),o.on("error",(r,s)=>{this.onError("xhr post error",r,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,o)=>{this.onError("xhr poll error",n,o)}),this.pollXhr=e}},de=class t extends S{constructor(e,n,o){super(),this.createRequest=e,se(this,o),this._opts=o,this._method=o.method||"GET",this._uri=n,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let n=gt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(n);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&o.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var r;o.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Ds,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};de.requestsCount=0;de.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",xo);else if(typeof addEventListener=="function"){let t="onpagehide"in $?"pagehide":"unload";addEventListener(t,xo,!1)}}Bs=(function(){let t=So({xdomain:!1});return t&&t.responseType!==null})(),pe=class extends nn{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=Bs&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new de(So,this.uri(),e)}}});var Ao,rn,on,he,kt=b(()=>{Je();be();Pe();ye();Ao=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",rn=class extends ie{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,o=Ao?{}:gt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,o)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(o,s)}catch{}r&&re(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=yt()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},on=$.WebSocket||$.MozWebSocket,he=class extends rn{createSocket(e,n,o){return Ao?new on(e,n,o):n?new on(e,n):new on(e)}doWrite(e,n){this.ws.send(n)}}});var Ie,sn=b(()=>{Je();ye();Pe();Ie=class extends ie{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=wo(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(n).getReader(),r=mo();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let s=()=>{o.read().then(({done:d,value:p})=>{d||(this.onPacket(p),s())}).catch(d=>{})};s();let l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{r&&re(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var an,ln=b(()=>{vt();kt();sn();an={websocket:he,webtransport:Ie,polling:pe}});function De(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),o=t.indexOf("]");n!=-1&&o!=-1&&(t=t.substring(0,n)+t.substring(n,o).replace(/:/g,";")+t.substring(o,t.length));let r=Os.exec(t||""),s={},l=14;for(;l--;)s[Ls[l]]=r[l]||"";return n!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Rs(s,s.path),s.queryKey=Ms(s,s.query),s}function Rs(t,e){let n=/\/{2,9}/g,o=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function Ms(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,r,s){r&&(n[r]=s)}),n}var Os,Ls,cn=b(()=>{Os=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ls=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var un,Ct,ve,Et,Be,dn=b(()=>{ln();be();en();cn();ge();Pe();ye();un=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ct=[];un&&addEventListener("offline",()=>{Ct.forEach(t=>t())},!1);ve=class t extends S{constructor(e,n){if(super(),this.binaryType=go,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let o=De(e);n.hostname=o.host,n.secure=o.protocol==="https"||o.protocol==="wss",n.port=o.port,o.query&&(n.query=o.query)}else n.host&&(n.hostname=De(n.host).host);se(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(o=>{let r=o.prototype.name;this.transports.push(r),this._transportsByName[r]=o}),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},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=vo(this.opts.query)),un&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ct.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=Qt,n.transport=e,this.id&&(n.sid=this.id);let o=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let o=0;o0&&n>this._maxPayload)return this.writeBuffer.slice(0,o);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,re(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,o){return this._sendPacket("message",e,n,o),this}send(e,n,o){return this._sendPacket("message",e,n,o),this}_sendPacket(e,n,o,r){if(typeof n=="function"&&(r=n,n=void 0),typeof o=="function"&&(r=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:n,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},o=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),un&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=Ct.indexOf(this._offlineEventListener);o!==-1&&Ct.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};ve.protocol=Qt;Et=class extends ve{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{o||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!o)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ve.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(I(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let ue=new Error("probe error");ue.transport=n.name,this.emitReserved("upgradeError",ue)}}))};function s(){o||(o=!0,I(),n.close(),n=null)}let l=g=>{let ue=new Error("probe error: "+g);ue.transport=n.name,s(),this.emitReserved("upgradeError",ue)};function d(){l("transport closed")}function p(){l("socket closed")}function k(g){n&&g.name!==n.name&&s()}let I=()=>{n.removeListener("open",r),n.removeListener("error",l),n.removeListener("close",d),this.off("close",p),this.off("upgrading",k)};n.once("open",r),n.once("error",l),n.once("close",d),this.once("close",p),this.once("upgrading",k),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let o=0;oan[r]).filter(r=>!!r)),super(e,o)}}});var To=b(()=>{tn()});var Fc,xt=b(()=>{dn();dn();Je();ln();be();cn();ye();To();vt();vt();kt();kt();sn();Fc=Be.protocol});function _o(t,e="",n){let o=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),o=De(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(n&&n.port===o.port?"":":"+o.port),o}var Po=b(()=>{xt()});function et(t){return $s&&(t instanceof ArrayBuffer||qs(t))||Hs&&t instanceof Blob||Fs&&t instanceof File}function Qe(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,o=t.length;n{$s=typeof ArrayBuffer=="function",qs=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Io=Object.prototype.toString,Hs=typeof Blob=="function"||typeof Blob<"u"&&Io.call(Blob)==="[object BlobConstructor]",Fs=typeof File=="function"||typeof File<"u"&&Io.call(File)==="[object FileConstructor]"});function Do(t){let e=[],n=t.data,o=t;return o.data=hn(n,e),o.attachments=e.length,{packet:o,buffers:e}}function hn(t,e){if(!t)return t;if(et(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let o=0;o=0&&t.num{pn()});var yn={};Cs(yn,{Decoder:()=>wn,Encoder:()=>mn,PacketType:()=>y,isPacketValid:()=>Ws,protocol:()=>Ro});function Vs(t){return typeof t=="string"}function zs(t){return t===void 0||Mo(t)}function St(t){return Object.prototype.toString.call(t)==="[object Object]"}function Us(t,e){switch(t){case y.CONNECT:return e===void 0||St(e);case y.DISCONNECT:return e===void 0;case y.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Lo.indexOf(e[0])===-1);case y.ACK:return Array.isArray(e);case y.CONNECT_ERROR:return typeof e=="string"||St(e);default:return!1}}function Ws(t){return Vs(t.nsp)&&zs(t.id)&&Us(t.type,t.data)}var Lo,Ro,y,mn,wn,gn,Mo,At=b(()=>{ge();Oo();pn();Lo=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Ro=5;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(y||(y={}));mn=class{constructor(e){this.replacer=e}encode(e){return(e.type===y.EVENT||e.type===y.ACK)&&Qe(e)?this.encodeAsBinary({type:e.type===y.EVENT?y.BINARY_EVENT:y.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===y.BINARY_EVENT||e.type===y.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){let n=Do(e),o=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(o),r}},wn=class t extends S{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let o=n.type===y.BINARY_EVENT;o||n.type===y.BINARY_ACK?(n.type=o?y.EVENT:y.ACK,this.reconstructor=new gn(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(et(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,o={type:Number(e.charAt(0))};if(y[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===y.BINARY_EVENT||o.type===y.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let l=e.substring(s,n);if(l!=Number(l)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let d=Number(l);if(!Mo(d)||d<0)throw new Error("Illegal attachments");if(d>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=d}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););o.nsp=e.substring(s,n)}else o.nsp="/";let r=e.charAt(n+1);if(r!==""&&Number(r)==r){let s=n+1;for(;++n;){let l=e.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===e.length)break}o.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case y.CONNECT:return St(n);case y.DISCONNECT:return n===void 0;case y.CONNECT_ERROR:return typeof n=="string"||St(n);case y.EVENT:case y.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Lo.indexOf(n[0])===-1);case y.ACK:case y.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},gn=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=Bo(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};Mo=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function z(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var bn=b(()=>{});var js,Oe,vn=b(()=>{At();bn();ge();js=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Oe=class extends S{constructor(e,n,o){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=e,this.nsp=n,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[z(e,"open",this.onopen.bind(this)),z(e,"packet",this.onpacket.bind(this)),z(e,"error",this.onerror.bind(this)),z(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var o,r,s;if(js.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let l={type:y.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let I=this.ids++,g=n.pop();this._registerAckCallback(I,g),l.id=I}let d=(r=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||r===void 0?void 0:r.writable,p=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!d||(p?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(e,n){var o;let r=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(r===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(s),n.apply(this,d)};l.withError=!0,this.acks[e]=l}emitWithAck(e,...n){return new Promise((o,r)=>{let s=(l,d)=>l?r(l):o(d);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...s)=>(this._queue[0],r!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:y.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case y.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new 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 y.EVENT:case y.BINARY_EVENT:this.onevent(e);break;case y.ACK:case y.BINARY_ACK:this.onack(e);break;case y.DISCONNECT:this.ondisconnect();break;case y.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let o of n)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,o=!1;return function(...r){o||(o=!0,n.packet({type:y.ACK,id:e,data:r}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:y.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}var No=b(()=>{ke.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};ke.prototype.reset=function(){this.attempts=0};ke.prototype.setMin=function(t){this.ms=t};ke.prototype.setMax=function(t){this.max=t};ke.prototype.setJitter=function(t){this.jitter=t}});var Le,$o=b(()=>{xt();vn();At();bn();No();ge();Le=class extends S{constructor(e,n){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,se(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((o=n.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new ke({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let r=n.parser||yn;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Be(this.uri,this.opts);let n=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let r=z(n,"open",function(){o.onopen(),e&&e()}),s=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},l=z(n,"error",s);if(this._timeout!==!1){let d=this._timeout,p=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),n.close()},d);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(r),this.subs.push(l),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(z(e,"ping",this.onping.bind(this)),z(e,"data",this.ondata.bind(this)),z(e,"error",this.onerror.bind(this)),z(e,"close",this.onclose.bind(this)),z(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){re(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new Oe(this,e,n),this.nsps[e]=o),o}_destroy(e){let n=Object.keys(this.nsps);for(let o of n)if(this.nsps[o].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let o=0;oe()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},n);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});function kn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=_o(t,e.path||"/socket.io"),o=n.source,r=n.id,s=n.path,l=tt[r]&&s in tt[r].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||l,p;return d?p=new Le(o,e):(tt[r]||(tt[r]=new Le(o,e)),p=tt[r]),n.query&&!e.query&&(e.query=n.queryKey),p.socket(n.path,e)}var tt,qo=b(()=>{Po();$o();vn();At();xt();tt={};Object.assign(kn,{Manager:Le,Socket:Oe,io:kn,connect:kn})});var Ho=b(()=>{"use strict";(()=>{let t=`@import url("https://fonts.googleapis.com/css?family=Arvo:400,700|Sen:400,700,800&display=swap&subset=latin-ext"); +(()=>{var ws=Object.create;var Gt=Object.defineProperty;var gs=Object.getOwnPropertyDescriptor;var ys=Object.getOwnPropertyNames;var bs=Object.getPrototypeOf,vs=Object.prototype.hasOwnProperty;var b=(t,e)=>()=>(t&&(e=t(t=0)),e);var dt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ks=(t,e)=>{for(var n in e)Gt(t,n,{get:e[n],enumerable:!0})},Cs=(t,e,n,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of ys(e))!vs.call(t,r)&&r!==n&&Gt(t,r,{get:()=>e[r],enumerable:!(o=gs(e,r))||o.enumerable});return t};var pt=(t,e,n)=>(n=t!=null?ws(bs(t)):{},Cs(e||!t||!t.__esModule?Gt(n,"default",{value:t,enumerable:!0}):n,t));var X,We,je,ht=b(()=>{X=Object.create(null);X.open="0";X.close="1";X.ping="2";X.pong="3";X.message="4";X.upgrade="5";X.noop="6";We=Object.create(null);Object.keys(X).forEach(t=>{We[X[t]]=t});je={type:"error",data:"parser error"}});function Qn(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}function oo(t,e){if(eo&&t.data instanceof Blob)return t.data.arrayBuffer().then(Qn).then(e);if(to&&(t.data instanceof ArrayBuffer||no(t.data)))return e(Qn(t.data));Ye(t,!1,n=>{Xt||(Xt=new TextEncoder),e(Xt.encode(n))})}var eo,to,no,Ye,Zn,Xt,ro=b(()=>{ht();eo=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",to=typeof ArrayBuffer=="function",no=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Ye=({type:t,data:e},n,o)=>eo&&e instanceof Blob?n?o(e):Zn(e,o):to&&(e instanceof ArrayBuffer||no(e))?n?o(e):Zn(new Blob([e]),o):o(X[t]+(e||"")),Zn=(t,e)=>{let n=new FileReader;return n.onload=function(){let o=n.result.split(",")[1];e("b"+(o||""))},n.readAsDataURL(t)}});var so,Ke,io,ao=b(()=>{so="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ke=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,o,r=0,s,l,d,p;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);let k=new ArrayBuffer(e),P=new Uint8Array(k);for(o=0;o>4,P[r++]=(l&15)<<4|d>>2,P[r++]=(d&3)<<6|p&63;return k}});var Es,Ge,xs,lo,co=b(()=>{ht();ao();Es=typeof ArrayBuffer=="function",Ge=(t,e)=>{if(typeof t!="string")return{type:"message",data:lo(t,e)};let n=t.charAt(0);return n==="b"?{type:"message",data:xs(t.substring(1),e)}:We[n]?t.length>1?{type:We[n],data:t.substring(1)}:{type:We[n]}:je},xs=(t,e)=>{if(Es){let n=io(t);return lo(n,e)}else return{base64:!0,data:t}},lo=(t,e)=>e==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer});function fo(){return new TransformStream({transform(t,e){oo(t,n=>{let o=n.length,r;if(o<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,o);else if(o<65536){r=new Uint8Array(3);let s=new DataView(r.buffer);s.setUint8(0,126),s.setUint16(1,o)}else{r=new Uint8Array(9);let s=new DataView(r.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(r[0]|=128),e.enqueue(r),e.enqueue(n)})}})}function ft(t){return t.reduce((e,n)=>e+n.length,0)}function mt(t,e){if(t[0].length===e)return t.shift();let n=new Uint8Array(e),o=0;for(let r=0;rMath.pow(2,21)-1){d.enqueue(je);break}r=P*Math.pow(2,32)+k.getUint32(4),o=3}else{if(ft(n)t){d.enqueue(je);break}}}})}var uo,po,ho,Jt,Zt,_e=b(()=>{ro();co();ht();uo="",po=(t,e)=>{let n=t.length,o=new Array(n),r=0;t.forEach((s,l)=>{Ye(s,!1,d=>{o[l]=d,++r===n&&e(o.join(uo))})})},ho=(t,e)=>{let n=t.split(uo),o=[];for(let r=0;r{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 n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this};S.prototype.off=S.prototype.removeListener=S.prototype.removeAllListeners=S.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+t];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,r=0;r{oe=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0),N=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),wo="arraybuffer"});function wt(t,...e){return e.reduce((n,o)=>(t.hasOwnProperty(o)&&(n[o]=t[o]),n),{})}function re(t,e){e.useNativeTimers?(t.setTimeoutFn=As.bind(N),t.clearTimeoutFn=Ts.bind(N)):(t.setTimeoutFn=N.setTimeout.bind(N),t.clearTimeoutFn=N.clearTimeout.bind(N))}function go(t){return typeof t=="string"?Ps(t):Math.ceil((t.byteLength||t.size)*_s)}function Ps(t){let e=0,n=0;for(let o=0,r=t.length;o=57344?n+=3:(o++,n+=4);return n}function gt(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var As,Ts,_s,ye=b(()=>{ge();As=N.setTimeout,Ts=N.clearTimeout;_s=1.33});function yo(t){let e="";for(let n in t)t.hasOwnProperty(n)&&(e.length&&(e+="&"),e+=encodeURIComponent(n)+"="+encodeURIComponent(t[n]));return e}function bo(t){let e={},n=t.split("&");for(let o=0,r=n.length;o{});var yt,se,Xe=b(()=>{_e();we();ye();Qt();yt=class extends Error{constructor(e,n,o){super(e),this.description=n,this.context=o,this.type="TransportError"}},se=class extends S{constructor(e){super(),this.writable=!1,re(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,n,o){return super.emitReserved("error",new yt(e,n,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){let n=Ge(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,n={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){let n=yo(e);return n.length?"?"+n:""}}});var Je,en=b(()=>{Xe();ye();_e();Je=class extends se{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";let n=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||n()})),this.writable||(o++,this.once("drain",function(){--o||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){let n=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};ho(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,po(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=gt()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(e,n)}}});var vo,ko,Co=b(()=>{vo=!1;try{vo=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}ko=vo});function Is(){}function Eo(){for(let t in ue.requests)ue.requests.hasOwnProperty(t)&&ue.requests[t].abort()}function xo(t){let e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||ko))return new XMLHttpRequest}catch{}if(!e)try{return new N[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var tn,ue,Ds,de,bt=b(()=>{en();we();ye();ge();Co();tn=class extends Je{constructor(e){if(super(e),typeof location<"u"){let n=location.protocol==="https:",o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,n){let o=this.request({method:"POST",data:e});o.on("success",n),o.on("error",(r,s)=>{this.onError("xhr post error",r,s)})}doPoll(){let e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,o)=>{this.onError("xhr poll error",n,o)}),this.pollXhr=e}},ue=class t extends S{constructor(e,n,o){super(),this.createRequest=e,re(this,o),this._opts=o,this._method=o.method||"GET",this._uri=n,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;let n=wt(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(n);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&o.setRequestHeader(r,this._opts.extraHeaders[r])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var r;o.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document<"u"&&(this._index=t.requestsCount++,t.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Is,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete t.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ue.requestsCount=0;ue.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Eo);else if(typeof addEventListener=="function"){let t="onpagehide"in N?"pagehide":"unload";addEventListener(t,Eo,!1)}}Ds=(function(){let t=xo({xdomain:!1});return t&&t.responseType!==null})(),de=class extends tn{constructor(e){super(e);let n=e&&e.forceBase64;this.supportsBinary=Ds&&!n}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new ue(xo,this.uri(),e)}}});var So,on,nn,pe,vt=b(()=>{Xe();ye();_e();ge();So=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",on=class extends se{get name(){return"websocket"}doOpen(){let e=this.uri(),n=this.opts.protocols,o=So?{}:wt(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,n,o)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{try{this.doWrite(o,s)}catch{}r&&oe(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=gt()),this.supportsBinary||(n.b64=1),this.createUri(e,n)}},nn=N.WebSocket||N.MozWebSocket,pe=class extends on{createSocket(e,n,o){return So?new nn(e,n,o):n?new nn(e,n):new nn(e)}doWrite(e,n){this.ws.send(n)}}});var Pe,rn=b(()=>{Xe();ge();_e();Pe=class extends se{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let n=mo(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(n).getReader(),r=fo();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let s=()=>{o.read().then(({done:d,value:p})=>{d||(this.onPacket(p),s())}).catch(d=>{})};s();let l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let n=0;n{r&&oe(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}});var sn,an=b(()=>{bt();vt();rn();sn={websocket:pe,webtransport:Pe,polling:de}});function Ie(t){if(t.length>8e3)throw"URI too long";let e=t,n=t.indexOf("["),o=t.indexOf("]");n!=-1&&o!=-1&&(t=t.substring(0,n)+t.substring(n,o).replace(/:/g,";")+t.substring(o,t.length));let r=Bs.exec(t||""),s={},l=14;for(;l--;)s[Os[l]]=r[l]||"";return n!=-1&&o!=-1&&(s.source=e,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=Ls(s,s.path),s.queryKey=Rs(s,s.query),s}function Ls(t,e){let n=/\/{2,9}/g,o=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function Rs(t,e){let n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,r,s){r&&(n[r]=s)}),n}var Bs,Os,ln=b(()=>{Bs=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Os=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var cn,kt,be,Ct,De,un=b(()=>{an();ye();Qt();ln();we();_e();ge();cn=typeof addEventListener=="function"&&typeof removeEventListener=="function",kt=[];cn&&addEventListener("offline",()=>{kt.forEach(t=>t())},!1);be=class t extends S{constructor(e,n){if(super(),this.binaryType=wo,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(n=e,e=null),e){let o=Ie(e);n.hostname=o.host,n.secure=o.protocol==="https"||o.protocol==="wss",n.port=o.port,o.query&&(n.query=o.query)}else n.host&&(n.hostname=Ie(n.host).host);re(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(o=>{let r=o.prototype.name;this.transports.push(r),this._transportsByName[r]=o}),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},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bo(this.opts.query)),cn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},kt.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let n=Object.assign({},this.opts.query);n.EIO=Zt,n.transport=e,this.id&&(n.sid=this.id);let o=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let e=this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(e);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",t.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=e.data,this._onError(n);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let o=0;o0&&n>this._maxPayload)return this.writeBuffer.slice(0,o);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,oe(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,n,o){return this._sendPacket("message",e,n,o),this}send(e,n,o){return this._sendPacket("message",e,n,o),this}_sendPacket(e,n,o,r){if(typeof n=="function"&&(r=n,n=void 0),typeof o=="function"&&(r=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let s={type:e,data:n,options:o};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),r&&this.once("flush",r),this.flush()}close(){let e=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},o=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(t.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),cn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=kt.indexOf(this._offlineEventListener);o!==-1&&kt.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,n),this.writeBuffer=[],this._prevBufferLen=0}}};be.protocol=Zt;Ct=class extends be{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e{o||(n.send([{type:"ping",data:"probe"}]),n.once("packet",g=>{if(!o)if(g.type==="pong"&&g.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;be.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(P(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let ce=new Error("probe error");ce.transport=n.name,this.emitReserved("upgradeError",ce)}}))};function s(){o||(o=!0,P(),n.close(),n=null)}let l=g=>{let ce=new Error("probe error: "+g);ce.transport=n.name,s(),this.emitReserved("upgradeError",ce)};function d(){l("transport closed")}function p(){l("socket closed")}function k(g){n&&g.name!==n.name&&s()}let P=()=>{n.removeListener("open",r),n.removeListener("error",l),n.removeListener("close",d),this.off("close",p),this.off("upgrading",k)};n.once("open",r),n.once("error",l),n.once("close",d),this.once("close",p),this.once("upgrading",k),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||n.open()},200):n.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let n=[];for(let o=0;osn[r]).filter(r=>!!r)),super(e,o)}}});var Ao=b(()=>{en()});var Hc,Et=b(()=>{un();un();Xe();an();ye();ln();ge();Ao();bt();bt();vt();vt();rn();Hc=De.protocol});function To(t,e="",n){let o=t;n=n||typeof location<"u"&&location,t==null&&(t=n.protocol+"//"+n.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=n.protocol+t:t=n.host+t),/^(https?|wss?):\/\//.test(t)||(typeof n<"u"?t=n.protocol+"//"+t:t="https://"+t),o=Ie(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let s=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+s+":"+o.port+e,o.href=o.protocol+"://"+s+(n&&n.port===o.port?"":":"+o.port),o}var _o=b(()=>{Et()});function Qe(t){return Ns&&(t instanceof ArrayBuffer||$s(t))||qs&&t instanceof Blob||Hs&&t instanceof File}function Ze(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,o=t.length;n{Ns=typeof ArrayBuffer=="function",$s=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Po=Object.prototype.toString,qs=typeof Blob=="function"||typeof Blob<"u"&&Po.call(Blob)==="[object BlobConstructor]",Hs=typeof File=="function"||typeof File<"u"&&Po.call(File)==="[object FileConstructor]"});function Io(t){let e=[],n=t.data,o=t;return o.data=pn(n,e),o.attachments=e.length,{packet:o,buffers:e}}function pn(t,e){if(!t)return t;if(Qe(t)){let n={_placeholder:!0,num:e.length};return e.push(t),n}else if(Array.isArray(t)){let n=new Array(t.length);for(let o=0;o=0&&t.num{dn()});var gn={};ks(gn,{Decoder:()=>mn,Encoder:()=>fn,PacketType:()=>y,isPacketValid:()=>Us,protocol:()=>Lo});function Fs(t){return typeof t=="string"}function Vs(t){return t===void 0||Ro(t)}function xt(t){return Object.prototype.toString.call(t)==="[object Object]"}function zs(t,e){switch(t){case y.CONNECT:return e===void 0||xt(e);case y.DISCONNECT:return e===void 0;case y.EVENT:return Array.isArray(e)&&(typeof e[0]=="number"||typeof e[0]=="string"&&Oo.indexOf(e[0])===-1);case y.ACK:return Array.isArray(e);case y.CONNECT_ERROR:return typeof e=="string"||xt(e);default:return!1}}function Us(t){return Fs(t.nsp)&&Vs(t.id)&&zs(t.type,t.data)}var Oo,Lo,y,fn,mn,wn,Ro,St=b(()=>{we();Bo();dn();Oo=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Lo=5;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(y||(y={}));fn=class{constructor(e){this.replacer=e}encode(e){return(e.type===y.EVENT||e.type===y.ACK)&&Ze(e)?this.encodeAsBinary({type:e.type===y.EVENT?y.BINARY_EVENT:y.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let n=""+e.type;return(e.type===y.BINARY_EVENT||e.type===y.BINARY_ACK)&&(n+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(n+=e.nsp+","),e.id!=null&&(n+=e.id),e.data!=null&&(n+=JSON.stringify(e.data,this.replacer)),n}encodeAsBinary(e){let n=Io(e),o=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(o),r}},mn=class t extends S{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let n;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(e);let o=n.type===y.BINARY_EVENT;o||n.type===y.BINARY_ACK?(n.type=o?y.EVENT:y.ACK,this.reconstructor=new wn(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Qe(e)||e.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(e),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let n=0,o={type:Number(e.charAt(0))};if(y[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===y.BINARY_EVENT||o.type===y.BINARY_ACK){let s=n+1;for(;e.charAt(++n)!=="-"&&n!=e.length;);let l=e.substring(s,n);if(l!=Number(l)||e.charAt(n)!=="-")throw new Error("Illegal attachments");let d=Number(l);if(!Ro(d)||d<0)throw new Error("Illegal attachments");if(d>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=d}if(e.charAt(n+1)==="/"){let s=n+1;for(;++n&&!(e.charAt(n)===","||n===e.length););o.nsp=e.substring(s,n)}else o.nsp="/";let r=e.charAt(n+1);if(r!==""&&Number(r)==r){let s=n+1;for(;++n;){let l=e.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===e.length)break}o.id=Number(e.substring(s,n+1))}if(e.charAt(++n)){let s=this.tryParse(e.substr(n));if(t.isPayloadValid(o.type,s))o.data=s;else throw new Error("invalid payload")}return o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,n){switch(e){case y.CONNECT:return xt(n);case y.DISCONNECT:return n===void 0;case y.CONNECT_ERROR:return typeof n=="string"||xt(n);case y.EVENT:case y.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Oo.indexOf(n[0])===-1);case y.ACK:case y.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},wn=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let n=Do(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};Ro=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t}});function V(t,e,n){return t.on(e,n),function(){t.off(e,n)}}var yn=b(()=>{});var Ws,Be,bn=b(()=>{St();yn();we();Ws=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Be=class extends S{constructor(e,n,o){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=e,this.nsp=n,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[V(e,"open",this.onopen.bind(this)),V(e,"packet",this.onpacket.bind(this)),V(e,"error",this.onerror.bind(this)),V(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...n){var o,r,s;if(Ws.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(n.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let l={type:y.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let P=this.ids++,g=n.pop();this._registerAckCallback(P,g),l.id=P}let d=(r=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||r===void 0?void 0:r.writable,p=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._hasPingExpired());return this.flags.volatile&&!d||(p?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(e,n){var o;let r=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(r===void 0){this.acks[e]=n;return}let s=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let d=0;d{this.io.clearTimeoutFn(s),n.apply(this,d)};l.withError=!0,this.acks[e]=l}emitWithAck(e,...n){return new Promise((o,r)=>{let s=(l,d)=>l?r(l):o(d);s.withError=!0,n.push(s),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((r,...s)=>(this._queue[0],r!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...s)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:y.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){let o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case y.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new 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 y.EVENT:case y.BINARY_EVENT:this.onevent(e);break;case y.ACK:case y.BINARY_ACK:this.onack(e);break;case y.DISCONNECT:this.ondisconnect();break;case y.CONNECT_ERROR:this.destroy();let o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){let n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let o of n)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){let n=this,o=!1;return function(...r){o||(o=!0,n.packet({type:y.ACK,id:e,data:r}))}}onack(e){let n=this.acks[e.id];typeof n=="function"&&(delete this.acks[e.id],n.withError&&e.data.unshift(null),n.apply(this,e.data))}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:y.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let n=this._anyListeners;for(let o=0;o0&&t.jitter<=1?t.jitter:0,this.attempts=0}var Mo=b(()=>{ve.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-n:t+n}return Math.min(t,this.max)|0};ve.prototype.reset=function(){this.attempts=0};ve.prototype.setMin=function(t){this.ms=t};ve.prototype.setMax=function(t){this.max=t};ve.prototype.setJitter=function(t){this.jitter=t}});var Oe,No=b(()=>{Et();bn();St();yn();Mo();we();Oe=class extends S{constructor(e,n){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,re(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((o=n.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new ve({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;let r=n.parser||gn;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new De(this.uri,this.opts);let n=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let r=V(n,"open",function(){o.onopen(),e&&e()}),s=d=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",d),e?e(d):this.maybeReconnectOnOpen()},l=V(n,"error",s);if(this._timeout!==!1){let d=this._timeout,p=this.setTimeoutFn(()=>{r(),s(new Error("timeout")),n.close()},d);this.opts.autoUnref&&p.unref(),this.subs.push(()=>{this.clearTimeoutFn(p)})}return this.subs.push(r),this.subs.push(l),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let e=this.engine;this.subs.push(V(e,"ping",this.onping.bind(this)),V(e,"data",this.ondata.bind(this)),V(e,"error",this.onerror.bind(this)),V(e,"close",this.onclose.bind(this)),V(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){oe(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new Be(this,e,n),this.nsps[e]=o),o}_destroy(e){let n=Object.keys(this.nsps);for(let o of n)if(this.nsps[o].active)return;this._close()}_packet(e){let n=this.encoder.encode(e);for(let o=0;oe()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,n){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(r=>{r?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",r)):e.onreconnect()}))},n);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}});function vn(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};let n=To(t,e.path||"/socket.io"),o=n.source,r=n.id,s=n.path,l=et[r]&&s in et[r].nsps,d=e.forceNew||e["force new connection"]||e.multiplex===!1||l,p;return d?p=new Oe(o,e):(et[r]||(et[r]=new Oe(o,e)),p=et[r]),n.query&&!e.query&&(e.query=n.queryKey),p.socket(n.path,e)}var et,$o=b(()=>{_o();No();bn();St();Et();et={};Object.assign(vn,{Manager:Oe,Socket:Be,io:vn,connect:vn})});var qo=b(()=>{"use strict";(()=>{let t=`@import url("https://fonts.googleapis.com/css?family=Arvo:400,700|Sen:400,700,800&display=swap&subset=latin-ext"); #game-wrapper { font-family: "Sen", sans-serif; } @@ -175,10 +175,10 @@ z-index: 2; background-color: rgba(0, 0, 0, 0.5); backdrop-filter: blur(5px); -}`,e="origingui-styles",n=document.getElementById(e)||document.createElement("style");n.id=e,n.textContent=t,n.parentNode||document.head.appendChild(n)})()});var u,i,Fo,nt,Vo,Tt,fe,Tu,_t,B,_u,U,Ys,M,zo,L=b(()=>{"use strict";u=window._,i=u.player,Fo=()=>{try{return window._.instance?.game?.state?.getCurrentState()??null}catch{return null}},nt=new Proxy({},{get(t,e){let n=Fo();return n?n[e]:void 0},set(t,e,n){let o=Fo();return o&&(o[e]=n),!0}}),Vo=u.instance,Tt=Vo.game,fe=Vo.prodigy,Tu=u.instance.game.state.states.get("Boot").gameData,_t=(t,e)=>u.gameData[t].find(n=>n.ID===e)??null,B=9e9,_u=Object.fromEntries(u.instance.game.state.states),U=()=>{u.network.processPlayer=!0,u.player.forceSaveCharacter()},Ys="https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/src/assets/",M=t=>`${Ys}${t}`,zo={academy:M("academy.png"),bonfire_spire:M("bonfire_spire.png"),forest:M("forest.png"),shipwreck_shore:M("shipwreck_shore.png"),shiverchill:M("shiverchill.png"),skywatch:M("skywatch.png"),dyno:M("dyno.png"),elemental_guardian:M("elemental_guardian.png"),darktower:M("darktower.png"),earthtower:M("earthtower.png"),crystal_caverns:M("crystal_caverns.png"),archives:M("archives.png"),house:M("house.png"),toyzone:M("toyzone.png"),tower_town:M("tower_town.png"),lamplight:M("lamplight.png")}});function nr(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function Ks(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uo(t,e){return t.get(nr(t,e))}function Gs(t,e,n){Ks(t,e),e.set(t,n)}function Xs(t,e,n){return t.set(nr(t,e),n),n}function ki(t,e,n){let o=ee(),r=Te(),s=He();!o||!r||!s||(Cn(o,"confirm",n),Cn(r,"deny",n),Cn(s,"cancel",n),Ci(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e))))}function Ci(t,e,n,o){if(!o.buttonsStyling){X([t,e,n],a.styled);return}v([t,e,n],a.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,v(t,a["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,v(e,a["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,v(n,a["default-outline"]))}function Cn(t,e,n){let o=_n(e);it(t,n[`show${o}Button`],"inline-block"),Y(t,n[`${e}ButtonText`]||""),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]||""),t.className=a[e],W(t,n,`${e}Button`)}function Si(t,e){typeof e=="string"?t.style.background=e:e||v([document.documentElement,document.body],a["no-backdrop"])}function Ai(t,e){e&&(e in a?v(t,a[e]):(q('The "position" parameter is not valid, defaulting to "center"'),v(t,a.center)))}function Ti(t,e){e&&v(t,a[`grow-${e}`])}function Sr(t,e,n,o){Vt()?Jo(t,o):(Qs(n).then(()=>Jo(t,o)),kr(w)),xr?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Rn()&&(fa(),da(),Er()),ma()}function ma(){X([document.documentElement,document.body],[a.shown,a["height-auto"],a["no-backdrop"],a["toast-shown"]])}function we(t){t=ga(t);let e=Ne.swalPromiseResolve.get(this),n=wa(this);this.isAwaitingPromise?t.isDismissed||(lt(this),e(t)):n&&e(t)}function Ar(t){let e=Ne.swalPromiseReject.get(this);lt(this),e&&e(t)}function _a(t,e,n){let o=me(t,a.select);if(!o)return;let r=(s,l,d)=>{let p=document.createElement("option");p.value=d,Y(p,l),p.selected=Tr(d,n.inputValue),s.appendChild(p)};e.forEach(s=>{let l=s[0],d=s[1];if(Array.isArray(d)){let p=document.createElement("optgroup");p.label=l,p.disabled=!1,o.appendChild(p),d.forEach(k=>r(p,k[1],k[0]))}else r(o,d,l)}),o.focus()}function Pa(t,e,n){let o=me(t,a.radio);if(!o)return;e.forEach(s=>{let l=s[0],d=s[1],p=document.createElement("input"),k=document.createElement("label");p.type="radio",p.name=a.radio,p.value=l,Tr(l,n.inputValue)&&(p.checked=!0);let I=document.createElement("span");Y(I,d),I.className=a.label,k.appendChild(p),k.appendChild(I),o.appendChild(k)});let r=o.querySelectorAll("input");r.length&&r[0].focus()}function Mt(){let t=A.innerParams.get(this);if(!t)return;let e=A.domCache.get(this);N(e.loader),Vt()?t.icon&&R(qe()):La(e),X([e.popup,e.actions],a.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}function Ir(){let t=A.innerParams.get(this),e=A.domCache.get(this);return e?zt(e.popup,t.input):null}function Dr(t,e,n){let o=A.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Br(t,e){let n=C();if(!(!n||!t))if(t.type==="radio"){let o=n.querySelectorAll(`[name="${a.radio}"]`);for(let r=0;r0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";Sn[t]=this,er||(document.body.addEventListener("click",sl),er=!0)}function El(t){t.inputValidator||(t.input==="email"&&(t.inputValidator=tr.email),t.input==="url"&&(t.inputValidator=tr.url))}function xl(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&(q('Target parameter is not valid, defaulting to "body"'),t.target="body")}function Sl(t){El(t),t.showLoaderOnConfirm&&!t.preConfirm&&q(`showLoaderOnConfirm is set to true, but preConfirm is not defined. +}`,e="origingui-styles",n=document.getElementById(e)||document.createElement("style");n.id=e,n.textContent=t,n.parentNode||document.head.appendChild(n)})()});var u,i,Ho,tt,Fo,At,he,Au,Tt,D,Tu,z,js,R,Vo,O=b(()=>{"use strict";u=window._,i=u.player,Ho=()=>{try{return window._.instance?.game?.state?.getCurrentState()??null}catch{return null}},tt=new Proxy({},{get(t,e){let n=Ho();return n?n[e]:void 0},set(t,e,n){let o=Ho();return o&&(o[e]=n),!0}}),Fo=u.instance,At=Fo.game,he=Fo.prodigy,Au=u.instance.game.state.states.get("Boot").gameData,Tt=(t,e)=>u.gameData[t].find(n=>n.ID===e)??null,D=9e9,Tu=Object.fromEntries(u.instance.game.state.states),z=()=>{u.network.processPlayer=!0,u.player.forceSaveCharacter()},js="https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/src/assets/",R=t=>`${js}${t}`,Vo={academy:R("academy.png"),bonfire_spire:R("bonfire_spire.png"),forest:R("forest.png"),shipwreck_shore:R("shipwreck_shore.png"),shiverchill:R("shiverchill.png"),skywatch:R("skywatch.png"),dyno:R("dyno.png"),elemental_guardian:R("elemental_guardian.png"),darktower:R("darktower.png"),earthtower:R("earthtower.png"),crystal_caverns:R("crystal_caverns.png"),archives:R("archives.png"),house:R("house.png"),toyzone:R("toyzone.png"),tower_town:R("tower_town.png"),lamplight:R("lamplight.png")}});function tr(t,e,n){if(typeof t=="function"?t===e:t.has(e))return arguments.length<3?e:n;throw new TypeError("Private element is not present on this object")}function Ys(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function zo(t,e){return t.get(tr(t,e))}function Ks(t,e,n){Ys(t,e),e.set(t,n)}function Gs(t,e,n){return t.set(tr(t,e),n),n}function vi(t,e,n){let o=Q(),r=Ae(),s=qe();!o||!r||!s||(kn(o,"confirm",n),kn(r,"deny",n),kn(s,"cancel",n),ki(o,r,s,n),n.reverseButtons&&(n.toast?(t.insertBefore(s,o),t.insertBefore(r,o)):(t.insertBefore(s,e),t.insertBefore(r,e),t.insertBefore(o,e))))}function ki(t,e,n,o){if(!o.buttonsStyling){G([t,e,n],a.styled);return}v([t,e,n],a.styled),o.confirmButtonColor&&(t.style.backgroundColor=o.confirmButtonColor,v(t,a["default-outline"])),o.denyButtonColor&&(e.style.backgroundColor=o.denyButtonColor,v(e,a["default-outline"])),o.cancelButtonColor&&(n.style.backgroundColor=o.cancelButtonColor,v(n,a["default-outline"]))}function kn(t,e,n){let o=Tn(e);st(t,n[`show${o}Button`],"inline-block"),j(t,n[`${e}ButtonText`]||""),t.setAttribute("aria-label",n[`${e}ButtonAriaLabel`]||""),t.className=a[e],U(t,n,`${e}Button`)}function xi(t,e){typeof e=="string"?t.style.background=e:e||v([document.documentElement,document.body],a["no-backdrop"])}function Si(t,e){e&&(e in a?v(t,a[e]):($('The "position" parameter is not valid, defaulting to "center"'),v(t,a.center)))}function Ai(t,e){e&&v(t,a[`grow-${e}`])}function xr(t,e,n,o){Ft()?Xo(t,o):(Zs(n).then(()=>Xo(t,o)),vr(w)),Er?(e.setAttribute("style","display:none !important"),e.removeAttribute("class"),e.innerHTML=""):e.remove(),Ln()&&(ha(),ua(),Cr()),fa()}function fa(){G([document.documentElement,document.body],[a.shown,a["height-auto"],a["no-backdrop"],a["toast-shown"]])}function me(t){t=wa(t);let e=Me.swalPromiseResolve.get(this),n=ma(this);this.isAwaitingPromise?t.isDismissed||(at(this),e(t)):n&&e(t)}function Sr(t){let e=Me.swalPromiseReject.get(this);at(this),e&&e(t)}function Ta(t,e,n){let o=fe(t,a.select);if(!o)return;let r=(s,l,d)=>{let p=document.createElement("option");p.value=d,j(p,l),p.selected=Ar(d,n.inputValue),s.appendChild(p)};e.forEach(s=>{let l=s[0],d=s[1];if(Array.isArray(d)){let p=document.createElement("optgroup");p.label=l,p.disabled=!1,o.appendChild(p),d.forEach(k=>r(p,k[1],k[0]))}else r(o,d,l)}),o.focus()}function _a(t,e,n){let o=fe(t,a.radio);if(!o)return;e.forEach(s=>{let l=s[0],d=s[1],p=document.createElement("input"),k=document.createElement("label");p.type="radio",p.name=a.radio,p.value=l,Ar(l,n.inputValue)&&(p.checked=!0);let P=document.createElement("span");j(P,d),P.className=a.label,k.appendChild(p),k.appendChild(P),o.appendChild(k)});let r=o.querySelectorAll("input");r.length&&r[0].focus()}function Rt(){let t=A.innerParams.get(this);if(!t)return;let e=A.domCache.get(this);M(e.loader),Ft()?t.icon&&L($e()):Oa(e),G([e.popup,e.actions],a.loading),e.popup.removeAttribute("aria-busy"),e.popup.removeAttribute("data-loading"),e.confirmButton.disabled=!1,e.denyButton.disabled=!1,e.cancelButton.disabled=!1}function Pr(){let t=A.innerParams.get(this),e=A.domCache.get(this);return e?Vt(e.popup,t.input):null}function Ir(t,e,n){let o=A.domCache.get(t);e.forEach(r=>{o[r].disabled=n})}function Dr(t,e){let n=C();if(!(!n||!t))if(t.type==="radio"){let o=n.querySelectorAll(`[name="${a.radio}"]`);for(let r=0;r0&&arguments[0]!==void 0?arguments[0]:"data-swal-template";xn[t]=this,Qo||(document.body.addEventListener("click",rl),Qo=!0)}function Cl(t){t.inputValidator||(t.input==="email"&&(t.inputValidator=er.email),t.input==="url"&&(t.inputValidator=er.url))}function El(t){(!t.target||typeof t.target=="string"&&!document.querySelector(t.target)||typeof t.target!="string"&&!t.target.appendChild)&&($('Target parameter is not valid, defaulting to "body"'),t.target="body")}function xl(t){Cl(t),t.showLoaderOnConfirm&&!t.preConfirm&&$(`showLoaderOnConfirm is set to true, but preConfirm is not defined. showLoaderOnConfirm should be used together with preConfirm, see usage example: -https://sweetalert2.github.io/#ajax-request`),xl(t),typeof t.title=="string"&&(t.title=t.title.split(` -`).join("
")),gi(t)}var Js,w,Zs,Qs,or,ei,a,ti,It,rr,_n,q,Ae,Wo,ni,sr,qt,Pn,ot,In,H,rt,j,C,qe,oi,ir,Dn,ar,Bn,Ht,ee,He,Te,ri,Fe,st,lr,Ft,On,si,Ln,Rn,Vt,ii,Y,ae,ai,W,zt,cr,ur,v,X,me,Ee,R,N,Mn,jo,it,V,li,Yo,dr,Nn,ci,ui,di,pi,Ce,hi,fi,mi,wi,gi,$n,yi,bi,vi,Ei,xi,A,_i,Pi,Ii,Di,Bi,Oi,qn,at,pr,Dt,O,Li,Ri,Mi,Ko,hr,Ni,$i,Go,qi,Xo,Hi,Hn,fr,mr,wr,gr,Fi,Vi,Bt,Ot,Lt,yr,zi,Ui,Wi,ji,Yi,Ki,br,Gi,vr,Xi,Ji,Ve,kr,Zi,xn,Cr,Qi,ea,ta,na,oa,ra,Ne,sa,Er,xr,ia,aa,la,ca,ua,da,pa,Re,ha,fa,wa,lt,ga,ya,ba,Jo,$e,va,ka,Ca,Ea,xa,Sa,Aa,Ta,Rt,Tr,Ia,Da,Ba,_r,Oa,Fn,Zo,Pr,Vn,La,Me,Ra,Ma,Na,qr,Hr,Fr,$a,qa,Ha,Vr,Fa,Va,Wr,En,za,Ua,Wa,ja,Nt,Ya,Ka,Ga,Xa,Qo,Ja,el,jr,Yr,tl,nl,ol,er,Sn,sl,An,il,al,ll,cl,Tn,Kr,ul,dl,pl,hl,fl,ml,wl,gl,yl,xe,Gr,bl,$t,vl,kl,Cl,tr,Q,Pt,D,Al,Tl,_l,Pl,Il,Dl,Bl,Ol,Se,zn=b(()=>{Js=100,w={},Zs=()=>{w.previousActiveElement instanceof HTMLElement?(w.previousActiveElement.focus(),w.previousActiveElement=null):document.body&&document.body.focus()},Qs=t=>new Promise(e=>{if(!t)return e();let n=window.scrollX,o=window.scrollY;w.restoreFocusTimeout=setTimeout(()=>{Zs(),e()},Js),window.scrollTo(n,o)}),or="swal2-",ei=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"],a=ei.reduce((t,e)=>(t[e]=or+e,t),{}),ti=["success","warning","info","question","error"],It=ti.reduce((t,e)=>(t[e]=or+e,t),{}),rr="SweetAlert2:",_n=t=>t.charAt(0).toUpperCase()+t.slice(1),q=t=>{console.warn(`${rr} ${typeof t=="object"?t.join(" "):t}`)},Ae=t=>{console.error(`${rr} ${t}`)},Wo=[],ni=t=>{Wo.includes(t)||(Wo.push(t),q(t))},sr=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;ni(`"${t}" is deprecated and will be removed in the next major release.${e?` Use "${e}" instead.`:""}`)},qt=t=>typeof t=="function"?t():t,Pn=t=>t&&typeof t.toPromise=="function",ot=t=>Pn(t)?t.toPromise():Promise.resolve(t),In=t=>t&&Promise.resolve(t)===t,H=()=>document.body.querySelector(`.${a.container}`),rt=t=>{let e=H();return e?e.querySelector(t):null},j=t=>rt(`.${t}`),C=()=>j(a.popup),qe=()=>j(a.icon),oi=()=>j(a["icon-content"]),ir=()=>j(a.title),Dn=()=>j(a["html-container"]),ar=()=>j(a.image),Bn=()=>j(a["progress-steps"]),Ht=()=>j(a["validation-message"]),ee=()=>rt(`.${a.actions} .${a.confirm}`),He=()=>rt(`.${a.actions} .${a.cancel}`),Te=()=>rt(`.${a.actions} .${a.deny}`),ri=()=>j(a["input-label"]),Fe=()=>rt(`.${a.loader}`),st=()=>j(a.actions),lr=()=>j(a.footer),Ft=()=>j(a["timer-progress-bar"]),On=()=>j(a.close),si=` +https://sweetalert2.github.io/#ajax-request`),El(t),typeof t.title=="string"&&(t.title=t.title.split(` +`).join("
")),wi(t)}var Xs,w,Js,Zs,nr,Qs,a,ei,Pt,or,Tn,$,Se,Uo,ti,rr,$t,_n,nt,Pn,q,ot,W,C,$e,ni,sr,In,ir,Dn,qt,Q,qe,Ae,oi,He,rt,ar,Ht,Bn,ri,On,Ln,Ft,si,j,ie,ii,U,Vt,lr,cr,v,G,fe,Ce,L,M,Rn,Wo,st,F,ai,jo,ur,Mn,li,ci,ui,di,ke,pi,hi,fi,mi,wi,Nn,gi,yi,bi,Ci,Ei,A,Ti,_i,Pi,Ii,Di,Bi,$n,it,dr,It,B,Oi,Li,Ri,Yo,pr,Mi,Ni,Ko,$i,Go,qi,qn,hr,fr,mr,wr,Hi,Fi,Dt,Bt,Ot,gr,Vi,zi,Ui,Wi,ji,Yi,yr,Ki,br,Gi,Xi,Fe,vr,Ji,En,kr,Zi,Qi,ea,ta,na,oa,Me,ra,Cr,Er,sa,ia,aa,la,ca,ua,da,Le,pa,ha,ma,at,wa,ga,ya,Xo,Ne,ba,va,ka,Ca,Ea,xa,Sa,Aa,Lt,Ar,Pa,Ia,Da,Tr,Ba,Hn,Jo,_r,Fn,Oa,Re,La,Ra,Ma,$r,qr,Hr,Na,$a,qa,Fr,Ha,Fa,Ur,Cn,Va,za,Ua,Wa,Mt,ja,Ya,Ka,Ga,Zo,Xa,Qa,Wr,jr,el,tl,nl,Qo,xn,rl,Sn,sl,il,al,ll,An,Yr,cl,ul,dl,pl,hl,fl,ml,wl,gl,Ee,Kr,yl,Nt,bl,vl,kl,er,Z,_t,I,Sl,Al,Tl,_l,Pl,Il,Dl,Bl,xe,Vn=b(()=>{Xs=100,w={},Js=()=>{w.previousActiveElement instanceof HTMLElement?(w.previousActiveElement.focus(),w.previousActiveElement=null):document.body&&document.body.focus()},Zs=t=>new Promise(e=>{if(!t)return e();let n=window.scrollX,o=window.scrollY;w.restoreFocusTimeout=setTimeout(()=>{Js(),e()},Xs),window.scrollTo(n,o)}),nr="swal2-",Qs=["container","shown","height-auto","iosfix","popup","modal","no-backdrop","no-transition","toast","toast-shown","show","hide","close","title","html-container","actions","confirm","deny","cancel","default-outline","footer","icon","icon-content","image","input","file","range","select","radio","checkbox","label","textarea","inputerror","input-label","validation-message","progress-steps","active-progress-step","progress-step","progress-step-line","loader","loading","styled","top","top-start","top-end","top-left","top-right","center","center-start","center-end","center-left","center-right","bottom","bottom-start","bottom-end","bottom-left","bottom-right","grow-row","grow-column","grow-fullscreen","rtl","timer-progress-bar","timer-progress-bar-container","scrollbar-measure","icon-success","icon-warning","icon-info","icon-question","icon-error","draggable","dragging"],a=Qs.reduce((t,e)=>(t[e]=nr+e,t),{}),ei=["success","warning","info","question","error"],Pt=ei.reduce((t,e)=>(t[e]=nr+e,t),{}),or="SweetAlert2:",Tn=t=>t.charAt(0).toUpperCase()+t.slice(1),$=t=>{console.warn(`${or} ${typeof t=="object"?t.join(" "):t}`)},Se=t=>{console.error(`${or} ${t}`)},Uo=[],ti=t=>{Uo.includes(t)||(Uo.push(t),$(t))},rr=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;ti(`"${t}" is deprecated and will be removed in the next major release.${e?` Use "${e}" instead.`:""}`)},$t=t=>typeof t=="function"?t():t,_n=t=>t&&typeof t.toPromise=="function",nt=t=>_n(t)?t.toPromise():Promise.resolve(t),Pn=t=>t&&Promise.resolve(t)===t,q=()=>document.body.querySelector(`.${a.container}`),ot=t=>{let e=q();return e?e.querySelector(t):null},W=t=>ot(`.${t}`),C=()=>W(a.popup),$e=()=>W(a.icon),ni=()=>W(a["icon-content"]),sr=()=>W(a.title),In=()=>W(a["html-container"]),ir=()=>W(a.image),Dn=()=>W(a["progress-steps"]),qt=()=>W(a["validation-message"]),Q=()=>ot(`.${a.actions} .${a.confirm}`),qe=()=>ot(`.${a.actions} .${a.cancel}`),Ae=()=>ot(`.${a.actions} .${a.deny}`),oi=()=>W(a["input-label"]),He=()=>ot(`.${a.loader}`),rt=()=>W(a.actions),ar=()=>W(a.footer),Ht=()=>W(a["timer-progress-bar"]),Bn=()=>W(a.close),ri=` a[href], area[href], input:not([disabled]), @@ -193,7 +193,7 @@ https://sweetalert2.github.io/#ajax-request`),xl(t),typeof t.title=="string"&&(t audio[controls], video[controls], summary -`,Ln=()=>{let t=C();if(!t)return[];let e=t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(e).sort((s,l)=>{let d=parseInt(s.getAttribute("tabindex")||"0"),p=parseInt(l.getAttribute("tabindex")||"0");return d>p?1:ds.getAttribute("tabindex")!=="-1");return[...new Set(n.concat(r))].filter(s=>V(s))},Rn=()=>ae(document.body,a.shown)&&!ae(document.body,a["toast-shown"])&&!ae(document.body,a["no-backdrop"]),Vt=()=>{let t=C();return t?ae(t,a.toast):!1},ii=()=>{let t=C();return t?t.hasAttribute("data-loading"):!1},Y=(t,e)=>{if(t.textContent="",e){let o=new DOMParser().parseFromString(e,"text/html"),r=o.querySelector("head");r&&Array.from(r.childNodes).forEach(l=>{t.appendChild(l)});let s=o.querySelector("body");s&&Array.from(s.childNodes).forEach(l=>{l instanceof HTMLVideoElement||l instanceof HTMLAudioElement?t.appendChild(l.cloneNode(!0)):t.appendChild(l)})}},ae=(t,e)=>{if(!e)return!1;let n=e.split(/\s+/);for(let o=0;o{Array.from(t.classList).forEach(n=>{!Object.values(a).includes(n)&&!Object.values(It).includes(n)&&!Object.values(e.showClass||{}).includes(n)&&t.classList.remove(n)})},W=(t,e,n)=>{if(ai(t,e),!e.customClass)return;let o=e.customClass[n];if(o){if(typeof o!="string"&&!o.forEach){q(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`);return}v(t,o)}},zt=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${a.popup} > .${a[e]}`);case"checkbox":return t.querySelector(`.${a.popup} > .${a.checkbox} input`);case"radio":return t.querySelector(`.${a.popup} > .${a.radio} input:checked`)||t.querySelector(`.${a.popup} > .${a.radio} input:first-child`);case"range":return t.querySelector(`.${a.popup} > .${a.range} input`);default:return t.querySelector(`.${a.popup} > .${a.input}`)}},cr=t=>{if(t.focus(),t.type!=="file"){let e=t.value;t.value="",t.value=e}},ur=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},v=(t,e)=>{ur(t,e,!0)},X=(t,e)=>{ur(t,e,!1)},me=(t,e)=>{let n=Array.from(t.children);for(let o=0;o{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style.setProperty(e,typeof n=="number"?`${n}px`:n):t.style.removeProperty(e)},R=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";t&&(t.style.display=e)},N=t=>{t&&(t.style.display="none")},Mn=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";t&&new MutationObserver(()=>{it(t,t.innerHTML,e)}).observe(t,{childList:!0,subtree:!0})},jo=(t,e,n,o)=>{let r=t.querySelector(e);r&&r.style.setProperty(n,o)},it=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";e?R(t,n):N(t)},V=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),li=()=>!V(ee())&&!V(Te())&&!V(He()),Yo=t=>t.scrollHeight>t.clientHeight,dr=t=>{let e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Nn=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ft();n&&V(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},ci=()=>{let t=Ft();if(!t)return;let e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";let n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.width=`${o}%`},ui=()=>typeof window>"u"||typeof document>"u",di=` +`,On=()=>{let t=C();if(!t)return[];let e=t.querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])'),n=Array.from(e).sort((s,l)=>{let d=parseInt(s.getAttribute("tabindex")||"0"),p=parseInt(l.getAttribute("tabindex")||"0");return d>p?1:ds.getAttribute("tabindex")!=="-1");return[...new Set(n.concat(r))].filter(s=>F(s))},Ln=()=>ie(document.body,a.shown)&&!ie(document.body,a["toast-shown"])&&!ie(document.body,a["no-backdrop"]),Ft=()=>{let t=C();return t?ie(t,a.toast):!1},si=()=>{let t=C();return t?t.hasAttribute("data-loading"):!1},j=(t,e)=>{if(t.textContent="",e){let o=new DOMParser().parseFromString(e,"text/html"),r=o.querySelector("head");r&&Array.from(r.childNodes).forEach(l=>{t.appendChild(l)});let s=o.querySelector("body");s&&Array.from(s.childNodes).forEach(l=>{l instanceof HTMLVideoElement||l instanceof HTMLAudioElement?t.appendChild(l.cloneNode(!0)):t.appendChild(l)})}},ie=(t,e)=>{if(!e)return!1;let n=e.split(/\s+/);for(let o=0;o{Array.from(t.classList).forEach(n=>{!Object.values(a).includes(n)&&!Object.values(Pt).includes(n)&&!Object.values(e.showClass||{}).includes(n)&&t.classList.remove(n)})},U=(t,e,n)=>{if(ii(t,e),!e.customClass)return;let o=e.customClass[n];if(o){if(typeof o!="string"&&!o.forEach){$(`Invalid type of customClass.${n}! Expected string or iterable object, got "${typeof o}"`);return}v(t,o)}},Vt=(t,e)=>{if(!e)return null;switch(e){case"select":case"textarea":case"file":return t.querySelector(`.${a.popup} > .${a[e]}`);case"checkbox":return t.querySelector(`.${a.popup} > .${a.checkbox} input`);case"radio":return t.querySelector(`.${a.popup} > .${a.radio} input:checked`)||t.querySelector(`.${a.popup} > .${a.radio} input:first-child`);case"range":return t.querySelector(`.${a.popup} > .${a.range} input`);default:return t.querySelector(`.${a.popup} > .${a.input}`)}},lr=t=>{if(t.focus(),t.type!=="file"){let e=t.value;t.value="",t.value=e}},cr=(t,e,n)=>{!t||!e||(typeof e=="string"&&(e=e.split(/\s+/).filter(Boolean)),e.forEach(o=>{Array.isArray(t)?t.forEach(r=>{n?r.classList.add(o):r.classList.remove(o)}):n?t.classList.add(o):t.classList.remove(o)}))},v=(t,e)=>{cr(t,e,!0)},G=(t,e)=>{cr(t,e,!1)},fe=(t,e)=>{let n=Array.from(t.children);for(let o=0;o{n===`${parseInt(n)}`&&(n=parseInt(n)),n||parseInt(n)===0?t.style.setProperty(e,typeof n=="number"?`${n}px`:n):t.style.removeProperty(e)},L=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"flex";t&&(t.style.display=e)},M=t=>{t&&(t.style.display="none")},Rn=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"block";t&&new MutationObserver(()=>{st(t,t.innerHTML,e)}).observe(t,{childList:!0,subtree:!0})},Wo=(t,e,n,o)=>{let r=t.querySelector(e);r&&r.style.setProperty(n,o)},st=function(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"flex";e?L(t,n):M(t)},F=t=>!!(t&&(t.offsetWidth||t.offsetHeight||t.getClientRects().length)),ai=()=>!F(Q())&&!F(Ae())&&!F(qe()),jo=t=>t.scrollHeight>t.clientHeight,ur=t=>{let e=window.getComputedStyle(t),n=parseFloat(e.getPropertyValue("animation-duration")||"0"),o=parseFloat(e.getPropertyValue("transition-duration")||"0");return n>0||o>0},Mn=function(t){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=Ht();n&&F(n)&&(e&&(n.style.transition="none",n.style.width="100%"),setTimeout(()=>{n.style.transition=`width ${t/1e3}s linear`,n.style.width="0%"},10))},li=()=>{let t=Ht();if(!t)return;let e=parseInt(window.getComputedStyle(t).width);t.style.removeProperty("transition"),t.style.width="100%";let n=parseInt(window.getComputedStyle(t).width),o=e/n*100;t.style.width=`${o}%`},ci=()=>typeof window>"u"||typeof document>"u",ui=`
    @@ -226,17 +226,17 @@ https://sweetalert2.github.io/#ajax-request`),xl(t),typeof t.title=="string"&&(t
    -`.replace(/(^|\n)\s*/g,""),pi=()=>{let t=H();return t?(t.remove(),X([document.documentElement,document.body],[a["no-backdrop"],a["toast-shown"],a["has-column"]]),!0):!1},Ce=()=>{w.currentInstance.resetValidationMessage()},hi=()=>{let t=C(),e=me(t,a.input),n=me(t,a.file),o=t.querySelector(`.${a.range} input`),r=t.querySelector(`.${a.range} output`),s=me(t,a.select),l=t.querySelector(`.${a.checkbox} input`),d=me(t,a.textarea);e.oninput=Ce,n.onchange=Ce,s.onchange=Ce,l.onchange=Ce,d.oninput=Ce,o.oninput=()=>{Ce(),r.value=o.value},o.onchange=()=>{Ce(),r.value=o.value}},fi=t=>typeof t=="string"?document.querySelector(t):t,mi=t=>{let e=C();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},wi=t=>{window.getComputedStyle(t).direction==="rtl"&&v(H(),a.rtl)},gi=t=>{let e=pi();if(ui()){Ae("SweetAlert2 requires document to initialize");return}let n=document.createElement("div");n.className=a.container,e&&v(n,a["no-transition"]),Y(n,di),n.dataset.swal2Theme=t.theme;let o=fi(t.target);o.appendChild(n),mi(t),wi(o),hi()},$n=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?yi(t,e):t&&Y(e,t)},yi=(t,e)=>{t.jquery?bi(e,t):Y(e,t.toString())},bi=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},vi=(t,e)=>{let n=st(),o=Fe();!n||!o||(!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?N(n):R(n),W(n,e,"actions"),ki(n,o,e),Y(o,e.loaderHtml||""),W(o,e,"loader"))};Ei=(t,e)=>{let n=On();n&&(Y(n,e.closeButtonHtml||""),W(n,e,"closeButton"),it(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))},xi=(t,e)=>{let n=H();n&&(Si(n,e.backdrop),Ai(n,e.position),Ti(n,e.grow),W(n,e,"container"))};A={innerParams:new WeakMap,domCache:new WeakMap},_i=["input","file","range","select","radio","checkbox","textarea"],Pi=(t,e)=>{let n=C();if(!n)return;let o=A.innerParams.get(t),r=!o||e.input!==o.input;_i.forEach(s=>{let l=me(n,a[s]);l&&(Bi(s,e.inputAttributes),l.className=a[s],r&&N(l))}),e.input&&(r&&Ii(e),Oi(e))},Ii=t=>{if(!t.input)return;if(!O[t.input]){Ae(`Unexpected type of input! Expected ${Object.keys(O).join(" | ")}, got "${t.input}"`);return}let e=pr(t.input);if(!e)return;let n=O[t.input](e,t);R(e),t.inputAutoFocus&&setTimeout(()=>{cr(n)})},Di=t=>{for(let e=0;e{let n=C();if(!n)return;let o=zt(n,t);if(o){Di(o);for(let r in e)o.setAttribute(r,e[r])}},Oi=t=>{if(!t.input)return;let e=pr(t.input);e&&W(e,t,"input")},qn=(t,e)=>{!t.placeholder&&e.inputPlaceholder&&(t.placeholder=e.inputPlaceholder)},at=(t,e,n)=>{if(n.inputLabel){let o=document.createElement("label"),r=a["input-label"];o.setAttribute("for",t.id),o.className=r,typeof n.customClass=="object"&&v(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},pr=t=>{let e=C();if(e)return me(e,a[t]||a.input)},Dt=(t,e)=>{["string","number"].includes(typeof e)?t.value=`${e}`:In(e)||q(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e}"`)},O={};O.text=O.email=O.password=O.number=O.tel=O.url=O.search=O.date=O["datetime-local"]=O.time=O.week=O.month=(t,e)=>(Dt(t,e.inputValue),at(t,t,e),qn(t,e),t.type=e.input,t);O.file=(t,e)=>(at(t,t,e),qn(t,e),t);O.range=(t,e)=>{let n=t.querySelector("input"),o=t.querySelector("output");return Dt(n,e.inputValue),n.type=e.input,Dt(o,e.inputValue),at(n,t,e),t};O.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){let n=document.createElement("option");Y(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return at(t,t,e),t};O.radio=t=>(t.textContent="",t);O.checkbox=(t,e)=>{let n=zt(C(),"checkbox");n.value="1",n.checked=!!e.inputValue;let o=t.querySelector("span");return Y(o,e.inputPlaceholder||e.inputLabel),n};O.textarea=(t,e)=>{Dt(t,e.inputValue),qn(t,e),at(t,t,e);let n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){let o=parseInt(window.getComputedStyle(C()).width),r=()=>{if(!document.body.contains(t))return;let s=t.offsetWidth+n(t);s>o?C().style.width=`${s}px`:Ee(C(),"width",e.width)};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};Li=(t,e)=>{let n=Dn();n&&(Mn(n),W(n,e,"htmlContainer"),e.html?($n(e.html,n),R(n,"block")):e.text?(n.textContent=e.text,R(n,"block")):N(n),Pi(t,e))},Ri=(t,e)=>{let n=lr();n&&(Mn(n),it(n,e.footer,"block"),e.footer&&$n(e.footer,n),W(n,e,"footer"))},Mi=(t,e)=>{let n=A.innerParams.get(t),o=qe();if(!o)return;if(n&&e.icon===n.icon){Go(o,e),Ko(o,e);return}if(!e.icon&&!e.iconHtml){N(o);return}if(e.icon&&Object.keys(It).indexOf(e.icon)===-1){Ae(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),N(o);return}R(o),Go(o,e),Ko(o,e),v(o,e.showClass&&e.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",hr)},Ko=(t,e)=>{for(let[n,o]of Object.entries(It))e.icon!==n&&X(t,o);v(t,e.icon&&It[e.icon]),qi(t,e),hr(),W(t,e,"icon")},hr=()=>{let t=C();if(!t)return;let e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o{let t=q();return t?(t.remove(),G([document.documentElement,document.body],[a["no-backdrop"],a["toast-shown"],a["has-column"]]),!0):!1},ke=()=>{w.currentInstance.resetValidationMessage()},pi=()=>{let t=C(),e=fe(t,a.input),n=fe(t,a.file),o=t.querySelector(`.${a.range} input`),r=t.querySelector(`.${a.range} output`),s=fe(t,a.select),l=t.querySelector(`.${a.checkbox} input`),d=fe(t,a.textarea);e.oninput=ke,n.onchange=ke,s.onchange=ke,l.onchange=ke,d.oninput=ke,o.oninput=()=>{ke(),r.value=o.value},o.onchange=()=>{ke(),r.value=o.value}},hi=t=>typeof t=="string"?document.querySelector(t):t,fi=t=>{let e=C();e.setAttribute("role",t.toast?"alert":"dialog"),e.setAttribute("aria-live",t.toast?"polite":"assertive"),t.toast||e.setAttribute("aria-modal","true")},mi=t=>{window.getComputedStyle(t).direction==="rtl"&&v(q(),a.rtl)},wi=t=>{let e=di();if(ci()){Se("SweetAlert2 requires document to initialize");return}let n=document.createElement("div");n.className=a.container,e&&v(n,a["no-transition"]),j(n,ui),n.dataset.swal2Theme=t.theme;let o=hi(t.target);o.appendChild(n),fi(t),mi(o),pi()},Nn=(t,e)=>{t instanceof HTMLElement?e.appendChild(t):typeof t=="object"?gi(t,e):t&&j(e,t)},gi=(t,e)=>{t.jquery?yi(e,t):j(e,t.toString())},yi=(t,e)=>{if(t.textContent="",0 in e)for(let n=0;n in e;n++)t.appendChild(e[n].cloneNode(!0));else t.appendChild(e.cloneNode(!0))},bi=(t,e)=>{let n=rt(),o=He();!n||!o||(!e.showConfirmButton&&!e.showDenyButton&&!e.showCancelButton?M(n):L(n),U(n,e,"actions"),vi(n,o,e),j(o,e.loaderHtml||""),U(o,e,"loader"))};Ci=(t,e)=>{let n=Bn();n&&(j(n,e.closeButtonHtml||""),U(n,e,"closeButton"),st(n,e.showCloseButton),n.setAttribute("aria-label",e.closeButtonAriaLabel||""))},Ei=(t,e)=>{let n=q();n&&(xi(n,e.backdrop),Si(n,e.position),Ai(n,e.grow),U(n,e,"container"))};A={innerParams:new WeakMap,domCache:new WeakMap},Ti=["input","file","range","select","radio","checkbox","textarea"],_i=(t,e)=>{let n=C();if(!n)return;let o=A.innerParams.get(t),r=!o||e.input!==o.input;Ti.forEach(s=>{let l=fe(n,a[s]);l&&(Di(s,e.inputAttributes),l.className=a[s],r&&M(l))}),e.input&&(r&&Pi(e),Bi(e))},Pi=t=>{if(!t.input)return;if(!B[t.input]){Se(`Unexpected type of input! Expected ${Object.keys(B).join(" | ")}, got "${t.input}"`);return}let e=dr(t.input);if(!e)return;let n=B[t.input](e,t);L(e),t.inputAutoFocus&&setTimeout(()=>{lr(n)})},Ii=t=>{for(let e=0;e{let n=C();if(!n)return;let o=Vt(n,t);if(o){Ii(o);for(let r in e)o.setAttribute(r,e[r])}},Bi=t=>{if(!t.input)return;let e=dr(t.input);e&&U(e,t,"input")},$n=(t,e)=>{!t.placeholder&&e.inputPlaceholder&&(t.placeholder=e.inputPlaceholder)},it=(t,e,n)=>{if(n.inputLabel){let o=document.createElement("label"),r=a["input-label"];o.setAttribute("for",t.id),o.className=r,typeof n.customClass=="object"&&v(o,n.customClass.inputLabel),o.innerText=n.inputLabel,e.insertAdjacentElement("beforebegin",o)}},dr=t=>{let e=C();if(e)return fe(e,a[t]||a.input)},It=(t,e)=>{["string","number"].includes(typeof e)?t.value=`${e}`:Pn(e)||$(`Unexpected type of inputValue! Expected "string", "number" or "Promise", got "${typeof e}"`)},B={};B.text=B.email=B.password=B.number=B.tel=B.url=B.search=B.date=B["datetime-local"]=B.time=B.week=B.month=(t,e)=>(It(t,e.inputValue),it(t,t,e),$n(t,e),t.type=e.input,t);B.file=(t,e)=>(it(t,t,e),$n(t,e),t);B.range=(t,e)=>{let n=t.querySelector("input"),o=t.querySelector("output");return It(n,e.inputValue),n.type=e.input,It(o,e.inputValue),it(n,t,e),t};B.select=(t,e)=>{if(t.textContent="",e.inputPlaceholder){let n=document.createElement("option");j(n,e.inputPlaceholder),n.value="",n.disabled=!0,n.selected=!0,t.appendChild(n)}return it(t,t,e),t};B.radio=t=>(t.textContent="",t);B.checkbox=(t,e)=>{let n=Vt(C(),"checkbox");n.value="1",n.checked=!!e.inputValue;let o=t.querySelector("span");return j(o,e.inputPlaceholder||e.inputLabel),n};B.textarea=(t,e)=>{It(t,e.inputValue),$n(t,e),it(t,t,e);let n=o=>parseInt(window.getComputedStyle(o).marginLeft)+parseInt(window.getComputedStyle(o).marginRight);return setTimeout(()=>{if("MutationObserver"in window){let o=parseInt(window.getComputedStyle(C()).width),r=()=>{if(!document.body.contains(t))return;let s=t.offsetWidth+n(t);s>o?C().style.width=`${s}px`:Ce(C(),"width",e.width)};new MutationObserver(r).observe(t,{attributes:!0,attributeFilter:["style"]})}}),t};Oi=(t,e)=>{let n=In();n&&(Rn(n),U(n,e,"htmlContainer"),e.html?(Nn(e.html,n),L(n,"block")):e.text?(n.textContent=e.text,L(n,"block")):M(n),_i(t,e))},Li=(t,e)=>{let n=ar();n&&(Rn(n),st(n,e.footer,"block"),e.footer&&Nn(e.footer,n),U(n,e,"footer"))},Ri=(t,e)=>{let n=A.innerParams.get(t),o=$e();if(!o)return;if(n&&e.icon===n.icon){Ko(o,e),Yo(o,e);return}if(!e.icon&&!e.iconHtml){M(o);return}if(e.icon&&Object.keys(Pt).indexOf(e.icon)===-1){Se(`Unknown icon! Expected "success", "error", "warning", "info" or "question", got "${e.icon}"`),M(o);return}L(o),Ko(o,e),Yo(o,e),v(o,e.showClass&&e.showClass.icon),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",pr)},Yo=(t,e)=>{for(let[n,o]of Object.entries(Pt))e.icon!==n&&G(t,o);v(t,e.icon&&Pt[e.icon]),$i(t,e),pr(),U(t,e,"icon")},pr=()=>{let t=C();if(!t)return;let e=window.getComputedStyle(t).getPropertyValue("background-color"),n=t.querySelectorAll("[class^=swal2-success-circular-line], .swal2-success-fix");for(let o=0;o
    -`,$i=` +`,Ni=` -`,Go=(t,e)=>{if(!e.icon&&!e.iconHtml)return;let n=t.innerHTML,o="";e.iconHtml?o=Xo(e.iconHtml):e.icon==="success"?(o=Ni,n=n.replace(/ style=".*?"/g,"")):e.icon==="error"?o=$i:e.icon&&(o=Xo({question:"?",warning:"!",info:"i"}[e.icon])),n.trim()!==o.trim()&&Y(t,o)},qi=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(let n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])jo(t,n,"background-color",e.iconColor);jo(t,".swal2-success-ring","border-color",e.iconColor)}},Xo=t=>`
    ${t}
    `,Hi=(t,e)=>{let n=ar();if(n){if(!e.imageUrl){N(n);return}R(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),Ee(n,"width",e.imageWidth),Ee(n,"height",e.imageHeight),n.className=a.image,W(n,e,"image")}},Hn=!1,fr=0,mr=0,wr=0,gr=0,Fi=t=>{t.addEventListener("mousedown",Bt),document.body.addEventListener("mousemove",Ot),t.addEventListener("mouseup",Lt),t.addEventListener("touchstart",Bt),document.body.addEventListener("touchmove",Ot),t.addEventListener("touchend",Lt)},Vi=t=>{t.removeEventListener("mousedown",Bt),document.body.removeEventListener("mousemove",Ot),t.removeEventListener("mouseup",Lt),t.removeEventListener("touchstart",Bt),document.body.removeEventListener("touchmove",Ot),t.removeEventListener("touchend",Lt)},Bt=t=>{let e=C();if(t.target===e||qe().contains(t.target)){Hn=!0;let n=yr(t);fr=n.clientX,mr=n.clientY,wr=parseInt(e.style.insetInlineStart)||0,gr=parseInt(e.style.insetBlockStart)||0,v(e,"swal2-dragging")}},Ot=t=>{let e=C();if(Hn){let{clientX:n,clientY:o}=yr(t);e.style.insetInlineStart=`${wr+(n-fr)}px`,e.style.insetBlockStart=`${gr+(o-mr)}px`}},Lt=()=>{let t=C();Hn=!1,X(t,"swal2-dragging")},yr=t=>{let e=0,n=0;return t.type.startsWith("mouse")?(e=t.clientX,n=t.clientY):t.type.startsWith("touch")&&(e=t.touches[0].clientX,n=t.touches[0].clientY),{clientX:e,clientY:n}},zi=(t,e)=>{let n=H(),o=C();if(!(!n||!o)){if(e.toast){Ee(n,"width",e.width),o.style.width="100%";let r=Fe();r&&o.insertBefore(r,qe())}else Ee(o,"width",e.width);Ee(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),N(Ht()),Ui(o,e),e.draggable&&!e.toast?(v(o,a.draggable),Fi(o)):(X(o,a.draggable),Vi(o))}},Ui=(t,e)=>{let n=e.showClass||{};t.className=`${a.popup} ${V(t)?n.popup:""}`,e.toast?(v([document.documentElement,document.body],a["toast-shown"]),v(t,a.toast)):v(t,a.modal),W(t,e,"popup"),typeof e.customClass=="string"&&v(t,e.customClass),e.icon&&v(t,a[`icon-${e.icon}`])},Wi=(t,e)=>{let n=Bn();if(!n)return;let{progressSteps:o,currentProgressStep:r}=e;if(!o||o.length===0||r===void 0){N(n);return}R(n),n.textContent="",r>=o.length&&q("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((s,l)=>{let d=ji(s);if(n.appendChild(d),l===r&&v(d,a["active-progress-step"]),l!==o.length-1){let p=Yi(e);n.appendChild(p)}})},ji=t=>{let e=document.createElement("li");return v(e,a["progress-step"]),Y(e,t),e},Yi=t=>{let e=document.createElement("li");return v(e,a["progress-step-line"]),t.progressStepsDistance&&Ee(e,"width",t.progressStepsDistance),e},Ki=(t,e)=>{let n=ir();n&&(Mn(n),it(n,e.title||e.titleText,"block"),e.title&&$n(e.title,n),e.titleText&&(n.innerText=e.titleText),W(n,e,"title"))},br=(t,e)=>{zi(t,e),xi(t,e),Wi(t,e),Mi(t,e),Hi(t,e),Ki(t,e),Ei(t,e),Li(t,e),vi(t,e),Ri(t,e);let n=C();typeof e.didRender=="function"&&n&&e.didRender(n),w.eventEmitter.emit("didRender",n)},Gi=()=>V(C()),vr=()=>{var t;return(t=ee())===null||t===void 0?void 0:t.click()},Xi=()=>{var t;return(t=Te())===null||t===void 0?void 0:t.click()},Ji=()=>{var t;return(t=He())===null||t===void 0?void 0:t.click()},Ve=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),kr=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Zi=(t,e,n)=>{kr(t),e.toast||(t.keydownHandler=o=>ea(e,o,n),t.keydownTarget=e.keydownListenerCapture?window:C(),t.keydownListenerCapture=e.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},xn=(t,e)=>{var n;let o=Ln();if(o.length){t=t+e,t===o.length?t=0:t===-1&&(t=o.length-1),o[t].focus();return}(n=C())===null||n===void 0||n.focus()},Cr=["ArrowRight","ArrowDown"],Qi=["ArrowLeft","ArrowUp"],ea=(t,e,n)=>{t&&(e.isComposing||e.keyCode===229||(t.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?ta(e,t):e.key==="Tab"?na(e):[...Cr,...Qi].includes(e.key)?oa(e.key):e.key==="Escape"&&ra(e,t,n)))},ta=(t,e)=>{if(!qt(e.allowEnterKey))return;let n=zt(C(),e.input);if(t.target&&n&&t.target instanceof HTMLElement&&t.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(e.input))return;vr(),t.preventDefault()}},na=t=>{let e=t.target,n=Ln(),o=-1;for(let r=0;r{let e=st(),n=ee(),o=Te(),r=He();if(!e||!n||!o||!r)return;let s=[n,o,r];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;let l=Cr.includes(t)?"nextElementSibling":"previousElementSibling",d=document.activeElement;if(d){for(let p=0;p{qt(e.allowEscapeKey)&&(t.preventDefault(),n(Ve.esc))},Ne={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},sa=()=>{let t=H();Array.from(document.body.children).forEach(n=>{n.contains(t)||(n.hasAttribute("aria-hidden")&&n.setAttribute("data-previous-aria-hidden",n.getAttribute("aria-hidden")||""),n.setAttribute("aria-hidden","true"))})},Er=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},xr=typeof window<"u"&&!!window.GestureEvent,ia=()=>{if(xr&&!ae(document.body,a.iosfix)){let t=document.body.scrollTop;document.body.style.top=`${t*-1}px`,v(document.body,a.iosfix),aa()}},aa=()=>{let t=H();if(!t)return;let e;t.ontouchstart=n=>{e=la(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},la=t=>{let e=t.target,n=H(),o=Dn();return!n||!o||ca(t)||ua(t)?!1:e===n||!Yo(n)&&e instanceof HTMLElement&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(Yo(o)&&o.contains(e))},ca=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",ua=t=>t.touches&&t.touches.length>1,da=()=>{if(ae(document.body,a.iosfix)){let t=parseInt(document.body.style.top,10);X(document.body,a.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},pa=()=>{let t=document.createElement("div");t.className=a["scrollbar-measure"],document.body.appendChild(t);let e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},Re=null,ha=t=>{Re===null&&(document.body.scrollHeight>window.innerHeight||t==="scroll")&&(Re=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Re+pa()}px`)},fa=()=>{Re!==null&&(document.body.style.paddingRight=`${Re}px`,Re=null)};wa=t=>{let e=C();if(!e)return!1;let n=A.innerParams.get(t);if(!n||ae(e,n.hideClass.popup))return!1;X(e,n.showClass.popup),v(e,n.hideClass.popup);let o=H();return X(o,n.showClass.backdrop),v(o,n.hideClass.backdrop),ya(t,e,n),!0};lt=t=>{t.isAwaitingPromise&&(delete t.isAwaitingPromise,A.innerParams.get(t)||t._destroy())},ga=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),ya=(t,e,n)=>{var o;let r=H(),s=dr(e);typeof n.willClose=="function"&&n.willClose(e),(o=w.eventEmitter)===null||o===void 0||o.emit("willClose",e),s?ba(t,e,r,n.returnFocus,n.didClose):Sr(t,r,n.returnFocus,n.didClose)},ba=(t,e,n,o,r)=>{w.swalCloseEventFinishedCallback=Sr.bind(null,t,n,o,r);let s=function(l){if(l.target===e){var d;(d=w.swalCloseEventFinishedCallback)===null||d===void 0||d.call(w),delete w.swalCloseEventFinishedCallback,e.removeEventListener("animationend",s),e.removeEventListener("transitionend",s)}};e.addEventListener("animationend",s),e.addEventListener("transitionend",s)},Jo=(t,e)=>{setTimeout(()=>{var n;typeof e=="function"&&e.bind(t.params)(),(n=w.eventEmitter)===null||n===void 0||n.emit("didClose"),t._destroy&&t._destroy()})},$e=t=>{let e=C();if(e||new Se,e=C(),!e)return;let n=Fe();Vt()?N(qe()):va(e,t),R(n),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()},va=(t,e)=>{let n=st(),o=Fe();!n||!o||(!e&&V(ee())&&(e=ee()),R(n),e&&(N(e),o.setAttribute("data-button-to-replace",e.className),n.insertBefore(o,e)),v([t,n],a.loading))},ka=(t,e)=>{e.input==="select"||e.input==="radio"?Aa(t,e):["text","email","number","tel","textarea"].some(n=>n===e.input)&&(Pn(e.inputValue)||In(e.inputValue))&&($e(ee()),Ta(t,e))},Ca=(t,e)=>{let n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ea(n);case"radio":return xa(n);case"file":return Sa(n);default:return e.inputAutoTrim?n.value.trim():n.value}},Ea=t=>t.checked?1:0,xa=t=>t.checked?t.value:null,Sa=t=>t.files&&t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,Aa=(t,e)=>{let n=C();if(!n)return;let o=r=>{e.input==="select"?_a(n,Rt(r),e):e.input==="radio"&&Pa(n,Rt(r),e)};Pn(e.inputOptions)||In(e.inputOptions)?($e(ee()),ot(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Ae(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Ta=(t,e)=>{let n=t.getInput();n&&(N(n),ot(e.inputValue).then(o=>{n.value=e.input==="number"?`${parseFloat(o)||0}`:`${o}`,R(n),n.focus(),t.hideLoading()}).catch(o=>{Ae(`Error in inputValue promise: ${o}`),n.value="",R(n),n.focus(),t.hideLoading()}))};Rt=t=>{let e=[];return t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=Rt(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=Rt(o)),e.push([n,o])}),e},Tr=(t,e)=>!!e&&e.toString()===t.toString(),Ia=t=>{let e=A.innerParams.get(t);t.disableButtons(),e.input?_r(t,"confirm"):Vn(t,!0)},Da=t=>{let e=A.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?_r(t,"deny"):Fn(t,!1)},Ba=(t,e)=>{t.disableButtons(),e(Ve.cancel)},_r=(t,e)=>{let n=A.innerParams.get(t);if(!n.input){Ae(`The "input" parameter is needed to be set when using returnInputValueOn${_n(e)}`);return}let o=t.getInput(),r=Ca(t,n);n.inputValidator?Oa(t,r,e):o&&!o.checkValidity()?(t.enableButtons(),t.showValidationMessage(n.validationMessage||o.validationMessage)):e==="deny"?Fn(t,r):Vn(t,r)},Oa=(t,e,n)=>{let o=A.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>ot(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Fn(t,e):Vn(t,e)})},Fn=(t,e)=>{let n=A.innerParams.get(t||void 0);n.showLoaderOnDeny&&$e(Te()),n.preDeny?(t.isAwaitingPromise=!0,Promise.resolve().then(()=>ot(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),lt(t)):t.close({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>Pr(t||void 0,r))):t.close({isDenied:!0,value:e})},Zo=(t,e)=>{t.close({isConfirmed:!0,value:e})},Pr=(t,e)=>{t.rejectPromise(e)},Vn=(t,e)=>{let n=A.innerParams.get(t||void 0);n.showLoaderOnConfirm&&$e(),n.preConfirm?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then(()=>ot(n.preConfirm(e,n.validationMessage))).then(r=>{V(Ht())||r===!1?(t.hideLoading(),lt(t)):Zo(t,typeof r>"u"?e:r)}).catch(r=>Pr(t||void 0,r))):Zo(t,e)};La=t=>{let e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?R(e[0],"inline-block"):li()&&N(t.actions)};Me={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},Ra=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],Ma={allowEnterKey:void 0},Na=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],qr=t=>Object.prototype.hasOwnProperty.call(Me,t),Hr=t=>Ra.indexOf(t)!==-1,Fr=t=>Ma[t],$a=t=>{qr(t)||q(`Unknown parameter "${t}"`)},qa=t=>{Na.includes(t)&&q(`The parameter "${t}" is incompatible with toasts`)},Ha=t=>{let e=Fr(t);e&&sr(t,e)},Vr=t=>{t.backdrop===!1&&t.allowOutsideClick&&q('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.theme&&!["light","dark","auto","borderless","embed-iframe"].includes(t.theme)&&q(`Invalid theme "${t.theme}". Expected "light", "dark", "auto", "borderless", or "embed-iframe"`);for(let e in t)$a(e),t.toast&&qa(e),Ha(e)};Fa=t=>{let e={};return Object.keys(t).forEach(n=>{Hr(n)?e[n]=t[n]:q(`Invalid parameter to update: ${n}`)}),e};Va=t=>{Wr(t),delete t.params,delete w.keydownHandler,delete w.keydownTarget,delete w.currentInstance},Wr=t=>{t.isAwaitingPromise?(En(A,t),t.isAwaitingPromise=!0):(En(Ne,t),En(A,t),delete t.isAwaitingPromise,delete t.disableButtons,delete t.enableButtons,delete t.getInput,delete t.disableInput,delete t.enableInput,delete t.hideLoading,delete t.disableLoading,delete t.showValidationMessage,delete t.resetValidationMessage,delete t.close,delete t.closePopup,delete t.closeModal,delete t.closeToast,delete t.rejectPromise,delete t.update,delete t._destroy)},En=(t,e)=>{for(let n in t)t[n].delete(e)},za=Object.freeze({__proto__:null,_destroy:Ur,close:we,closeModal:we,closePopup:we,closeToast:we,disableButtons:Lr,disableInput:Mr,disableLoading:Mt,enableButtons:Or,enableInput:Rr,getInput:Ir,handleAwaitingPromise:lt,hideLoading:Mt,rejectPromise:Ar,resetValidationMessage:$r,showValidationMessage:Nr,update:zr}),Ua=(t,e,n)=>{t.toast?Wa(t,e,n):(Ya(e),Ka(e),Ga(t,e,n))},Wa=(t,e,n)=>{e.popup.onclick=()=>{t&&(ja(t)||t.timer||t.input)||n(Ve.close)}},ja=t=>!!(t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton),Nt=!1,Ya=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=()=>{},e.target===t.container&&(Nt=!0)}}},Ka=t=>{t.container.onmousedown=e=>{e.target===t.container&&e.preventDefault(),t.popup.onmouseup=function(n){t.popup.onmouseup=()=>{},(n.target===t.popup||n.target instanceof HTMLElement&&t.popup.contains(n.target))&&(Nt=!0)}}},Ga=(t,e,n)=>{e.container.onclick=o=>{if(Nt){Nt=!1;return}o.target===e.container&&qt(t.allowOutsideClick)&&n(Ve.backdrop)}},Xa=t=>typeof t=="object"&&t.jquery,Qo=t=>t instanceof Element||Xa(t),Ja=t=>{let e={};return typeof t[0]=="object"&&!Qo(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{let r=t[o];typeof r=="string"||Qo(r)?e[n]=r:r!==void 0&&Ae(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};el=()=>w.timeout&&w.timeout.getTimerLeft(),jr=()=>{if(w.timeout)return ci(),w.timeout.stop()},Yr=()=>{if(w.timeout){let t=w.timeout.start();return Nn(t),t}},tl=()=>{let t=w.timeout;return t&&(t.running?jr():Yr())},nl=t=>{if(w.timeout){let e=w.timeout.increase(t);return Nn(e,!0),e}},ol=()=>!!(w.timeout&&w.timeout.isRunning()),er=!1,Sn={};sl=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(let n in Sn){let o=e.getAttribute(n);if(o){Sn[n].fire({template:o});return}}},An=class{constructor(){this.events={}}_getHandlersByEventName(e){return typeof this.events[e]>"u"&&(this.events[e]=[]),this.events[e]}on(e,n){let o=this._getHandlersByEventName(e);o.includes(n)||o.push(n)}once(e,n){var o=this;let r=function(){o.removeListener(e,r);for(var s=arguments.length,l=new Array(s),d=0;d1?n-1:0),r=1;r{try{s.apply(this,o)}catch(l){console.error(l)}})}removeListener(e,n){let o=this._getHandlersByEventName(e),r=o.indexOf(n);r>-1&&o.splice(r,1)}removeAllListeners(e){this.events[e]!==void 0&&(this.events[e].length=0)}reset(){this.events={}}};w.eventEmitter=new An;il=(t,e)=>{w.eventEmitter.on(t,e)},al=(t,e)=>{w.eventEmitter.once(t,e)},ll=(t,e)=>{if(!t){w.eventEmitter.reset();return}e?w.eventEmitter.removeListener(t,e):w.eventEmitter.removeAllListeners(t)},cl=Object.freeze({__proto__:null,argsToParams:Ja,bindClickHandler:rl,clickCancel:Ji,clickConfirm:vr,clickDeny:Xi,enableLoading:$e,fire:Za,getActions:st,getCancelButton:He,getCloseButton:On,getConfirmButton:ee,getContainer:H,getDenyButton:Te,getFocusableElements:Ln,getFooter:lr,getHtmlContainer:Dn,getIcon:qe,getIconContent:oi,getImage:ar,getInputLabel:ri,getLoader:Fe,getPopup:C,getProgressSteps:Bn,getTimerLeft:el,getTimerProgressBar:Ft,getTitle:ir,getValidationMessage:Ht,increaseTimer:nl,isDeprecatedParameter:Fr,isLoading:ii,isTimerRunning:ol,isUpdatableParameter:Hr,isValidParameter:qr,isVisible:Gi,mixin:Qa,off:ll,on:il,once:al,resumeTimer:Yr,showLoading:$e,stopTimer:jr,toggleTimer:tl}),Tn=class{constructor(e,n){this.callback=e,this.remaining=n,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){let n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}},Kr=["swal-title","swal-html","swal-footer"],ul=t=>{let e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};let n=e.content;return yl(n),Object.assign(dl(n),pl(n),hl(n),fl(n),ml(n),wl(n),gl(n,Kr))},dl=t=>{let e={};return Array.from(t.querySelectorAll("swal-param")).forEach(o=>{xe(o,["name","value"]);let r=o.getAttribute("name"),s=o.getAttribute("value");!r||!s||(typeof Me[r]=="boolean"?e[r]=s!=="false":typeof Me[r]=="object"?e[r]=JSON.parse(s):e[r]=s)}),e},pl=t=>{let e={};return Array.from(t.querySelectorAll("swal-function-param")).forEach(o=>{let r=o.getAttribute("name"),s=o.getAttribute("value");!r||!s||(e[r]=new Function(`return ${s}`)())}),e},hl=t=>{let e={};return Array.from(t.querySelectorAll("swal-button")).forEach(o=>{xe(o,["type","color","aria-label"]);let r=o.getAttribute("type");!r||!["confirm","cancel","deny"].includes(r)||(e[`${r}ButtonText`]=o.innerHTML,e[`show${_n(r)}Button`]=!0,o.hasAttribute("color")&&(e[`${r}ButtonColor`]=o.getAttribute("color")),o.hasAttribute("aria-label")&&(e[`${r}ButtonAriaLabel`]=o.getAttribute("aria-label")))}),e},fl=t=>{let e={},n=t.querySelector("swal-image");return n&&(xe(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt")||void 0)),e},ml=t=>{let e={},n=t.querySelector("swal-icon");return n&&(xe(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},wl=t=>{let e={},n=t.querySelector("swal-input");n&&(xe(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));let o=Array.from(t.querySelectorAll("swal-input-option"));return o.length&&(e.inputOptions={},o.forEach(r=>{xe(r,["value"]);let s=r.getAttribute("value");if(!s)return;let l=r.innerHTML;e.inputOptions[s]=l})),e},gl=(t,e)=>{let n={};for(let o in e){let r=e[o],s=t.querySelector(r);s&&(xe(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},yl=t=>{let e=Kr.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(t.children).forEach(n=>{let o=n.tagName.toLowerCase();e.includes(o)||q(`Unrecognized element <${o}>`)})},xe=(t,e)=>{Array.from(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&q([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Gr=10,bl=t=>{let e=H(),n=C();typeof t.willOpen=="function"&&t.willOpen(n),w.eventEmitter.emit("willOpen",n);let r=window.getComputedStyle(document.body).overflowY;Cl(e,n,t),setTimeout(()=>{vl(e,n)},Gr),Rn()&&(kl(e,t.scrollbarPadding,r),sa()),!Vt()&&!w.previousActiveElement&&(w.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),w.eventEmitter.emit("didOpen",n),X(e,a["no-transition"])},$t=t=>{let e=C();if(t.target!==e)return;let n=H();e.removeEventListener("animationend",$t),e.removeEventListener("transitionend",$t),n.style.overflowY="auto"},vl=(t,e)=>{dr(e)?(t.style.overflowY="hidden",e.addEventListener("animationend",$t),e.addEventListener("transitionend",$t)):t.style.overflowY="auto"},kl=(t,e,n)=>{ia(),e&&n!=="hidden"&&ha(n),setTimeout(()=>{t.scrollTop=0})},Cl=(t,e,n)=>{v(t,n.showClass.backdrop),n.animation?(e.style.setProperty("opacity","0","important"),R(e,"grid"),setTimeout(()=>{v(e,n.showClass.popup),e.style.removeProperty("opacity")},Gr)):R(e,"grid"),v([document.documentElement,document.body],a.shown),n.heightAuto&&n.backdrop&&!n.toast&&v([document.documentElement,document.body],a["height-auto"])},tr={email:(t,e)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};Pt=new WeakMap,D=class{constructor(){if(Gs(this,Pt,void 0),typeof window>"u")return;Q=this;for(var e=arguments.length,n=new Array(e),o=0;o1&&arguments[1]!==void 0?arguments[1]:{};if(Vr(Object.assign({},n,e)),w.currentInstance){let s=Ne.swalPromiseResolve.get(w.currentInstance),{isAwaitingPromise:l}=w.currentInstance;w.currentInstance._destroy(),l||s({isDismissed:!0}),Rn()&&Er()}w.currentInstance=Q;let o=Tl(e,n);Sl(o),Object.freeze(o),w.timeout&&(w.timeout.stop(),delete w.timeout),clearTimeout(w.restoreFocusTimeout);let r=_l(Q);return br(Q,o),A.innerParams.set(Q,o),Al(Q,r,o)}then(e){return Uo(Pt,this).then(e)}finally(e){return Uo(Pt,this).finally(e)}},Al=(t,e,n)=>new Promise((o,r)=>{let s=l=>{t.close({isDismissed:!0,dismiss:l})};Ne.swalPromiseResolve.set(t,o),Ne.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>{Ia(t)},e.denyButton.onclick=()=>{Da(t)},e.cancelButton.onclick=()=>{Ba(t,s)},e.closeButton.onclick=()=>{s(Ve.close)},Ua(n,e,s),Zi(w,n,s),ka(t,n),bl(n),Pl(w,n,s),Il(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Tl=(t,e)=>{let n=ul(t),o=Object.assign({},Me,e,n,t);return o.showClass=Object.assign({},Me.showClass,o.showClass),o.hideClass=Object.assign({},Me.hideClass,o.hideClass),o.animation===!1&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},_l=t=>{let e={popup:C(),container:H(),actions:st(),confirmButton:ee(),denyButton:Te(),cancelButton:He(),loader:Fe(),closeButton:On(),validationMessage:Ht(),progressSteps:Bn()};return A.domCache.set(t,e),e},Pl=(t,e,n)=>{let o=Ft();N(o),e.timer&&(t.timeout=new Tn(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(R(o),W(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Nn(e.timer)})))},Il=(t,e)=>{if(!e.toast){if(!qt(e.allowEnterKey)){sr("allowEnterKey"),Ol();return}Dl(t)||Bl(t,e)||xn(-1,1)}},Dl=t=>{let e=Array.from(t.popup.querySelectorAll("[autofocus]"));for(let n of e)if(n instanceof HTMLElement&&V(n))return n.focus(),!0;return!1},Bl=(t,e)=>e.focusDeny&&V(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&V(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&V(t.confirmButton)?(t.confirmButton.focus(),!0):!1,Ol=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};D.prototype.disableButtons=Lr;D.prototype.enableButtons=Or;D.prototype.getInput=Ir;D.prototype.disableInput=Mr;D.prototype.enableInput=Rr;D.prototype.hideLoading=Mt;D.prototype.disableLoading=Mt;D.prototype.showValidationMessage=Nr;D.prototype.resetValidationMessage=$r;D.prototype.close=we;D.prototype.closePopup=we;D.prototype.closeModal=we;D.prototype.closeToast=we;D.prototype.rejectPromise=Ar;D.prototype.update=zr;D.prototype._destroy=Ur;Object.assign(D,cl);Object.keys(za).forEach(t=>{D[t]=function(){return Q&&Q[t]?Q[t](...arguments):null}});D.DismissReason=Ve;D.version="11.18.0";Se=D;Se.default=Se;typeof document<"u"&&(function(t,e){var n=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=e);else try{n.innerHTML=e}catch{n.innerText=e}})(document,':root{--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-footer-border-color: #eee;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-background: transparent;--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.1s, box-shadow 0.1s;--swal2-close-button-outline: initial;--swal2-close-button-hover-transform: none}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:var(--swal2-input-background);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:var(--swal2-background);box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')});var m,te,E,c,T,Bu,F=b(()=>{"use strict";zn();m=Se,te=m.mixin({input:"text",showCancelButton:!0,showConfirmButton:!0,toast:!1}),E=te.mixin({toast:!1,input:"number"}),c=m.mixin({toast:!0,position:"bottom"}),T=m.mixin({icon:"warning",showCancelButton:!0,toast:!1,confirmButtonText:"Confirm",cancelButtonText:"Cancel"}),Bu=m.mixin({icon:"info",showCancelButton:!1,toast:!1});window.Swal=m});function Xr(){fetch(`https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/statusmessage.json?updated=${Date.now()}`).then(t=>t.json()).then(async t=>{if(t.enabled===!1)return console.log("Status message is disabled.");await m.fire({title:t.title,html:t.html,icon:t.icon})})}var Un=b(()=>{"use strict";F()});function ne(t){let e=document.createElement("div");Jr==!1?(e.append(document.createElement("br")),e.append(document.createElement("br"))):Jr=!1,e.classList.add("menu-area"),e.style.textAlign="center",We.append(e);let n=document.createElement("h1");return n.innerText=t,n.style.textAlign="center",n.style.color="white",e.append(n),e}var Ue,Ut,ze,Wn,We,Jr,Wt,jt,Yt,h,Zr,jn,K=b(()=>{"use strict";qo();Ho();L();Un();zn();Ue=document.createElement("div"),Ut=document.getElementById("game-wrapper");document.getElementById("origin-menu")?.remove();document.getElementById("origin-toggler")?.remove();Ue.id="origin-menu";Ue.style="position: fixed;top: -10%;left: 10%;right: 10%;width: 80%;height: 80%;z-index: 2;background-color: rgba(0, 0, 0, 0.5);backdrop-filter: blur(5px);";Ut?.prepend(Ue);ze=document.createElement("button");ze.id="origin-toggler";Wn=!1;Ut?.prepend(ze);ze.onclick=()=>{Wn=!Wn,Wn?(ze.innerText="▼",Ue.style.top="-100vh"):(ze.innerText="▲",Ue.style.top="10%")};ze.onclick({});We=document.createElement("DIV");We.classList.add("menu-left");Ue.append(We);Jr=!0;Wt=document.createElement("h1");Wt.classList.add("menu-title");Wt.innerText="Prodigy Origin";Wt.style.textAlign="center";We.append(Wt);jt=document.createElement("h2");jt.style.fontSize="25px";jt.style.color="white";jt.innerHTML="
    Press SHIFT to show/hide the menu. Scroll down in the menu for more mods.";We.append(jt);Yt=document.createElement("h3");Yt.style.fontSize="20px";Yt.innerHTML=` +`,Ko=(t,e)=>{if(!e.icon&&!e.iconHtml)return;let n=t.innerHTML,o="";e.iconHtml?o=Go(e.iconHtml):e.icon==="success"?(o=Mi,n=n.replace(/ style=".*?"/g,"")):e.icon==="error"?o=Ni:e.icon&&(o=Go({question:"?",warning:"!",info:"i"}[e.icon])),n.trim()!==o.trim()&&j(t,o)},$i=(t,e)=>{if(e.iconColor){t.style.color=e.iconColor,t.style.borderColor=e.iconColor;for(let n of[".swal2-success-line-tip",".swal2-success-line-long",".swal2-x-mark-line-left",".swal2-x-mark-line-right"])Wo(t,n,"background-color",e.iconColor);Wo(t,".swal2-success-ring","border-color",e.iconColor)}},Go=t=>`
    ${t}
    `,qi=(t,e)=>{let n=ir();if(n){if(!e.imageUrl){M(n);return}L(n,""),n.setAttribute("src",e.imageUrl),n.setAttribute("alt",e.imageAlt||""),Ce(n,"width",e.imageWidth),Ce(n,"height",e.imageHeight),n.className=a.image,U(n,e,"image")}},qn=!1,hr=0,fr=0,mr=0,wr=0,Hi=t=>{t.addEventListener("mousedown",Dt),document.body.addEventListener("mousemove",Bt),t.addEventListener("mouseup",Ot),t.addEventListener("touchstart",Dt),document.body.addEventListener("touchmove",Bt),t.addEventListener("touchend",Ot)},Fi=t=>{t.removeEventListener("mousedown",Dt),document.body.removeEventListener("mousemove",Bt),t.removeEventListener("mouseup",Ot),t.removeEventListener("touchstart",Dt),document.body.removeEventListener("touchmove",Bt),t.removeEventListener("touchend",Ot)},Dt=t=>{let e=C();if(t.target===e||$e().contains(t.target)){qn=!0;let n=gr(t);hr=n.clientX,fr=n.clientY,mr=parseInt(e.style.insetInlineStart)||0,wr=parseInt(e.style.insetBlockStart)||0,v(e,"swal2-dragging")}},Bt=t=>{let e=C();if(qn){let{clientX:n,clientY:o}=gr(t);e.style.insetInlineStart=`${mr+(n-hr)}px`,e.style.insetBlockStart=`${wr+(o-fr)}px`}},Ot=()=>{let t=C();qn=!1,G(t,"swal2-dragging")},gr=t=>{let e=0,n=0;return t.type.startsWith("mouse")?(e=t.clientX,n=t.clientY):t.type.startsWith("touch")&&(e=t.touches[0].clientX,n=t.touches[0].clientY),{clientX:e,clientY:n}},Vi=(t,e)=>{let n=q(),o=C();if(!(!n||!o)){if(e.toast){Ce(n,"width",e.width),o.style.width="100%";let r=He();r&&o.insertBefore(r,$e())}else Ce(o,"width",e.width);Ce(o,"padding",e.padding),e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background),M(qt()),zi(o,e),e.draggable&&!e.toast?(v(o,a.draggable),Hi(o)):(G(o,a.draggable),Fi(o))}},zi=(t,e)=>{let n=e.showClass||{};t.className=`${a.popup} ${F(t)?n.popup:""}`,e.toast?(v([document.documentElement,document.body],a["toast-shown"]),v(t,a.toast)):v(t,a.modal),U(t,e,"popup"),typeof e.customClass=="string"&&v(t,e.customClass),e.icon&&v(t,a[`icon-${e.icon}`])},Ui=(t,e)=>{let n=Dn();if(!n)return;let{progressSteps:o,currentProgressStep:r}=e;if(!o||o.length===0||r===void 0){M(n);return}L(n),n.textContent="",r>=o.length&&$("Invalid currentProgressStep parameter, it should be less than progressSteps.length (currentProgressStep like JS arrays starts from 0)"),o.forEach((s,l)=>{let d=Wi(s);if(n.appendChild(d),l===r&&v(d,a["active-progress-step"]),l!==o.length-1){let p=ji(e);n.appendChild(p)}})},Wi=t=>{let e=document.createElement("li");return v(e,a["progress-step"]),j(e,t),e},ji=t=>{let e=document.createElement("li");return v(e,a["progress-step-line"]),t.progressStepsDistance&&Ce(e,"width",t.progressStepsDistance),e},Yi=(t,e)=>{let n=sr();n&&(Rn(n),st(n,e.title||e.titleText,"block"),e.title&&Nn(e.title,n),e.titleText&&(n.innerText=e.titleText),U(n,e,"title"))},yr=(t,e)=>{Vi(t,e),Ei(t,e),Ui(t,e),Ri(t,e),qi(t,e),Yi(t,e),Ci(t,e),Oi(t,e),bi(t,e),Li(t,e);let n=C();typeof e.didRender=="function"&&n&&e.didRender(n),w.eventEmitter.emit("didRender",n)},Ki=()=>F(C()),br=()=>{var t;return(t=Q())===null||t===void 0?void 0:t.click()},Gi=()=>{var t;return(t=Ae())===null||t===void 0?void 0:t.click()},Xi=()=>{var t;return(t=qe())===null||t===void 0?void 0:t.click()},Fe=Object.freeze({cancel:"cancel",backdrop:"backdrop",close:"close",esc:"esc",timer:"timer"}),vr=t=>{t.keydownTarget&&t.keydownHandlerAdded&&(t.keydownTarget.removeEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!1)},Ji=(t,e,n)=>{vr(t),e.toast||(t.keydownHandler=o=>Qi(e,o,n),t.keydownTarget=e.keydownListenerCapture?window:C(),t.keydownListenerCapture=e.keydownListenerCapture,t.keydownTarget.addEventListener("keydown",t.keydownHandler,{capture:t.keydownListenerCapture}),t.keydownHandlerAdded=!0)},En=(t,e)=>{var n;let o=On();if(o.length){t=t+e,t===o.length?t=0:t===-1&&(t=o.length-1),o[t].focus();return}(n=C())===null||n===void 0||n.focus()},kr=["ArrowRight","ArrowDown"],Zi=["ArrowLeft","ArrowUp"],Qi=(t,e,n)=>{t&&(e.isComposing||e.keyCode===229||(t.stopKeydownPropagation&&e.stopPropagation(),e.key==="Enter"?ea(e,t):e.key==="Tab"?ta(e):[...kr,...Zi].includes(e.key)?na(e.key):e.key==="Escape"&&oa(e,t,n)))},ea=(t,e)=>{if(!$t(e.allowEnterKey))return;let n=Vt(C(),e.input);if(t.target&&n&&t.target instanceof HTMLElement&&t.target.outerHTML===n.outerHTML){if(["textarea","file"].includes(e.input))return;br(),t.preventDefault()}},ta=t=>{let e=t.target,n=On(),o=-1;for(let r=0;r{let e=rt(),n=Q(),o=Ae(),r=qe();if(!e||!n||!o||!r)return;let s=[n,o,r];if(document.activeElement instanceof HTMLElement&&!s.includes(document.activeElement))return;let l=kr.includes(t)?"nextElementSibling":"previousElementSibling",d=document.activeElement;if(d){for(let p=0;p{$t(e.allowEscapeKey)&&(t.preventDefault(),n(Fe.esc))},Me={swalPromiseResolve:new WeakMap,swalPromiseReject:new WeakMap},ra=()=>{let t=q();Array.from(document.body.children).forEach(n=>{n.contains(t)||(n.hasAttribute("aria-hidden")&&n.setAttribute("data-previous-aria-hidden",n.getAttribute("aria-hidden")||""),n.setAttribute("aria-hidden","true"))})},Cr=()=>{Array.from(document.body.children).forEach(e=>{e.hasAttribute("data-previous-aria-hidden")?(e.setAttribute("aria-hidden",e.getAttribute("data-previous-aria-hidden")||""),e.removeAttribute("data-previous-aria-hidden")):e.removeAttribute("aria-hidden")})},Er=typeof window<"u"&&!!window.GestureEvent,sa=()=>{if(Er&&!ie(document.body,a.iosfix)){let t=document.body.scrollTop;document.body.style.top=`${t*-1}px`,v(document.body,a.iosfix),ia()}},ia=()=>{let t=q();if(!t)return;let e;t.ontouchstart=n=>{e=aa(n)},t.ontouchmove=n=>{e&&(n.preventDefault(),n.stopPropagation())}},aa=t=>{let e=t.target,n=q(),o=In();return!n||!o||la(t)||ca(t)?!1:e===n||!jo(n)&&e instanceof HTMLElement&&e.tagName!=="INPUT"&&e.tagName!=="TEXTAREA"&&!(jo(o)&&o.contains(e))},la=t=>t.touches&&t.touches.length&&t.touches[0].touchType==="stylus",ca=t=>t.touches&&t.touches.length>1,ua=()=>{if(ie(document.body,a.iosfix)){let t=parseInt(document.body.style.top,10);G(document.body,a.iosfix),document.body.style.top="",document.body.scrollTop=t*-1}},da=()=>{let t=document.createElement("div");t.className=a["scrollbar-measure"],document.body.appendChild(t);let e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},Le=null,pa=t=>{Le===null&&(document.body.scrollHeight>window.innerHeight||t==="scroll")&&(Le=parseInt(window.getComputedStyle(document.body).getPropertyValue("padding-right")),document.body.style.paddingRight=`${Le+da()}px`)},ha=()=>{Le!==null&&(document.body.style.paddingRight=`${Le}px`,Le=null)};ma=t=>{let e=C();if(!e)return!1;let n=A.innerParams.get(t);if(!n||ie(e,n.hideClass.popup))return!1;G(e,n.showClass.popup),v(e,n.hideClass.popup);let o=q();return G(o,n.showClass.backdrop),v(o,n.hideClass.backdrop),ga(t,e,n),!0};at=t=>{t.isAwaitingPromise&&(delete t.isAwaitingPromise,A.innerParams.get(t)||t._destroy())},wa=t=>typeof t>"u"?{isConfirmed:!1,isDenied:!1,isDismissed:!0}:Object.assign({isConfirmed:!1,isDenied:!1,isDismissed:!1},t),ga=(t,e,n)=>{var o;let r=q(),s=ur(e);typeof n.willClose=="function"&&n.willClose(e),(o=w.eventEmitter)===null||o===void 0||o.emit("willClose",e),s?ya(t,e,r,n.returnFocus,n.didClose):xr(t,r,n.returnFocus,n.didClose)},ya=(t,e,n,o,r)=>{w.swalCloseEventFinishedCallback=xr.bind(null,t,n,o,r);let s=function(l){if(l.target===e){var d;(d=w.swalCloseEventFinishedCallback)===null||d===void 0||d.call(w),delete w.swalCloseEventFinishedCallback,e.removeEventListener("animationend",s),e.removeEventListener("transitionend",s)}};e.addEventListener("animationend",s),e.addEventListener("transitionend",s)},Xo=(t,e)=>{setTimeout(()=>{var n;typeof e=="function"&&e.bind(t.params)(),(n=w.eventEmitter)===null||n===void 0||n.emit("didClose"),t._destroy&&t._destroy()})},Ne=t=>{let e=C();if(e||new xe,e=C(),!e)return;let n=He();Ft()?M($e()):ba(e,t),L(n),e.setAttribute("data-loading","true"),e.setAttribute("aria-busy","true"),e.focus()},ba=(t,e)=>{let n=rt(),o=He();!n||!o||(!e&&F(Q())&&(e=Q()),L(n),e&&(M(e),o.setAttribute("data-button-to-replace",e.className),n.insertBefore(o,e)),v([t,n],a.loading))},va=(t,e)=>{e.input==="select"||e.input==="radio"?Sa(t,e):["text","email","number","tel","textarea"].some(n=>n===e.input)&&(_n(e.inputValue)||Pn(e.inputValue))&&(Ne(Q()),Aa(t,e))},ka=(t,e)=>{let n=t.getInput();if(!n)return null;switch(e.input){case"checkbox":return Ca(n);case"radio":return Ea(n);case"file":return xa(n);default:return e.inputAutoTrim?n.value.trim():n.value}},Ca=t=>t.checked?1:0,Ea=t=>t.checked?t.value:null,xa=t=>t.files&&t.files.length?t.getAttribute("multiple")!==null?t.files:t.files[0]:null,Sa=(t,e)=>{let n=C();if(!n)return;let o=r=>{e.input==="select"?Ta(n,Lt(r),e):e.input==="radio"&&_a(n,Lt(r),e)};_n(e.inputOptions)||Pn(e.inputOptions)?(Ne(Q()),nt(e.inputOptions).then(r=>{t.hideLoading(),o(r)})):typeof e.inputOptions=="object"?o(e.inputOptions):Se(`Unexpected type of inputOptions! Expected object, Map or Promise, got ${typeof e.inputOptions}`)},Aa=(t,e)=>{let n=t.getInput();n&&(M(n),nt(e.inputValue).then(o=>{n.value=e.input==="number"?`${parseFloat(o)||0}`:`${o}`,L(n),n.focus(),t.hideLoading()}).catch(o=>{Se(`Error in inputValue promise: ${o}`),n.value="",L(n),n.focus(),t.hideLoading()}))};Lt=t=>{let e=[];return t instanceof Map?t.forEach((n,o)=>{let r=n;typeof r=="object"&&(r=Lt(r)),e.push([o,r])}):Object.keys(t).forEach(n=>{let o=t[n];typeof o=="object"&&(o=Lt(o)),e.push([n,o])}),e},Ar=(t,e)=>!!e&&e.toString()===t.toString(),Pa=t=>{let e=A.innerParams.get(t);t.disableButtons(),e.input?Tr(t,"confirm"):Fn(t,!0)},Ia=t=>{let e=A.innerParams.get(t);t.disableButtons(),e.returnInputValueOnDeny?Tr(t,"deny"):Hn(t,!1)},Da=(t,e)=>{t.disableButtons(),e(Fe.cancel)},Tr=(t,e)=>{let n=A.innerParams.get(t);if(!n.input){Se(`The "input" parameter is needed to be set when using returnInputValueOn${Tn(e)}`);return}let o=t.getInput(),r=ka(t,n);n.inputValidator?Ba(t,r,e):o&&!o.checkValidity()?(t.enableButtons(),t.showValidationMessage(n.validationMessage||o.validationMessage)):e==="deny"?Hn(t,r):Fn(t,r)},Ba=(t,e,n)=>{let o=A.innerParams.get(t);t.disableInput(),Promise.resolve().then(()=>nt(o.inputValidator(e,o.validationMessage))).then(s=>{t.enableButtons(),t.enableInput(),s?t.showValidationMessage(s):n==="deny"?Hn(t,e):Fn(t,e)})},Hn=(t,e)=>{let n=A.innerParams.get(t||void 0);n.showLoaderOnDeny&&Ne(Ae()),n.preDeny?(t.isAwaitingPromise=!0,Promise.resolve().then(()=>nt(n.preDeny(e,n.validationMessage))).then(r=>{r===!1?(t.hideLoading(),at(t)):t.close({isDenied:!0,value:typeof r>"u"?e:r})}).catch(r=>_r(t||void 0,r))):t.close({isDenied:!0,value:e})},Jo=(t,e)=>{t.close({isConfirmed:!0,value:e})},_r=(t,e)=>{t.rejectPromise(e)},Fn=(t,e)=>{let n=A.innerParams.get(t||void 0);n.showLoaderOnConfirm&&Ne(),n.preConfirm?(t.resetValidationMessage(),t.isAwaitingPromise=!0,Promise.resolve().then(()=>nt(n.preConfirm(e,n.validationMessage))).then(r=>{F(qt())||r===!1?(t.hideLoading(),at(t)):Jo(t,typeof r>"u"?e:r)}).catch(r=>_r(t||void 0,r))):Jo(t,e)};Oa=t=>{let e=t.popup.getElementsByClassName(t.loader.getAttribute("data-button-to-replace"));e.length?L(e[0],"inline-block"):ai()&&M(t.actions)};Re={title:"",titleText:"",text:"",html:"",footer:"",icon:void 0,iconColor:void 0,iconHtml:void 0,template:void 0,toast:!1,draggable:!1,animation:!0,theme:"light",showClass:{popup:"swal2-show",backdrop:"swal2-backdrop-show",icon:"swal2-icon-show"},hideClass:{popup:"swal2-hide",backdrop:"swal2-backdrop-hide",icon:"swal2-icon-hide"},customClass:{},target:"body",color:void 0,backdrop:!0,heightAuto:!0,allowOutsideClick:!0,allowEscapeKey:!0,allowEnterKey:!0,stopKeydownPropagation:!0,keydownListenerCapture:!1,showConfirmButton:!0,showDenyButton:!1,showCancelButton:!1,preConfirm:void 0,preDeny:void 0,confirmButtonText:"OK",confirmButtonAriaLabel:"",confirmButtonColor:void 0,denyButtonText:"No",denyButtonAriaLabel:"",denyButtonColor:void 0,cancelButtonText:"Cancel",cancelButtonAriaLabel:"",cancelButtonColor:void 0,buttonsStyling:!0,reverseButtons:!1,focusConfirm:!0,focusDeny:!1,focusCancel:!1,returnFocus:!0,showCloseButton:!1,closeButtonHtml:"×",closeButtonAriaLabel:"Close this dialog",loaderHtml:"",showLoaderOnConfirm:!1,showLoaderOnDeny:!1,imageUrl:void 0,imageWidth:void 0,imageHeight:void 0,imageAlt:"",timer:void 0,timerProgressBar:!1,width:void 0,padding:void 0,background:void 0,input:void 0,inputPlaceholder:"",inputLabel:"",inputValue:"",inputOptions:{},inputAutoFocus:!0,inputAutoTrim:!0,inputAttributes:{},inputValidator:void 0,returnInputValueOnDeny:!1,validationMessage:void 0,grow:!1,position:"center",progressSteps:[],currentProgressStep:void 0,progressStepsDistance:void 0,willOpen:void 0,didOpen:void 0,didRender:void 0,willClose:void 0,didClose:void 0,didDestroy:void 0,scrollbarPadding:!0},La=["allowEscapeKey","allowOutsideClick","background","buttonsStyling","cancelButtonAriaLabel","cancelButtonColor","cancelButtonText","closeButtonAriaLabel","closeButtonHtml","color","confirmButtonAriaLabel","confirmButtonColor","confirmButtonText","currentProgressStep","customClass","denyButtonAriaLabel","denyButtonColor","denyButtonText","didClose","didDestroy","draggable","footer","hideClass","html","icon","iconColor","iconHtml","imageAlt","imageHeight","imageUrl","imageWidth","preConfirm","preDeny","progressSteps","returnFocus","reverseButtons","showCancelButton","showCloseButton","showConfirmButton","showDenyButton","text","title","titleText","theme","willClose"],Ra={allowEnterKey:void 0},Ma=["allowOutsideClick","allowEnterKey","backdrop","draggable","focusConfirm","focusDeny","focusCancel","returnFocus","heightAuto","keydownListenerCapture"],$r=t=>Object.prototype.hasOwnProperty.call(Re,t),qr=t=>La.indexOf(t)!==-1,Hr=t=>Ra[t],Na=t=>{$r(t)||$(`Unknown parameter "${t}"`)},$a=t=>{Ma.includes(t)&&$(`The parameter "${t}" is incompatible with toasts`)},qa=t=>{let e=Hr(t);e&&rr(t,e)},Fr=t=>{t.backdrop===!1&&t.allowOutsideClick&&$('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`'),t.theme&&!["light","dark","auto","borderless","embed-iframe"].includes(t.theme)&&$(`Invalid theme "${t.theme}". Expected "light", "dark", "auto", "borderless", or "embed-iframe"`);for(let e in t)Na(e),t.toast&&$a(e),qa(e)};Ha=t=>{let e={};return Object.keys(t).forEach(n=>{qr(n)?e[n]=t[n]:$(`Invalid parameter to update: ${n}`)}),e};Fa=t=>{Ur(t),delete t.params,delete w.keydownHandler,delete w.keydownTarget,delete w.currentInstance},Ur=t=>{t.isAwaitingPromise?(Cn(A,t),t.isAwaitingPromise=!0):(Cn(Me,t),Cn(A,t),delete t.isAwaitingPromise,delete t.disableButtons,delete t.enableButtons,delete t.getInput,delete t.disableInput,delete t.enableInput,delete t.hideLoading,delete t.disableLoading,delete t.showValidationMessage,delete t.resetValidationMessage,delete t.close,delete t.closePopup,delete t.closeModal,delete t.closeToast,delete t.rejectPromise,delete t.update,delete t._destroy)},Cn=(t,e)=>{for(let n in t)t[n].delete(e)},Va=Object.freeze({__proto__:null,_destroy:zr,close:me,closeModal:me,closePopup:me,closeToast:me,disableButtons:Or,disableInput:Rr,disableLoading:Rt,enableButtons:Br,enableInput:Lr,getInput:Pr,handleAwaitingPromise:at,hideLoading:Rt,rejectPromise:Sr,resetValidationMessage:Nr,showValidationMessage:Mr,update:Vr}),za=(t,e,n)=>{t.toast?Ua(t,e,n):(ja(e),Ya(e),Ka(t,e,n))},Ua=(t,e,n)=>{e.popup.onclick=()=>{t&&(Wa(t)||t.timer||t.input)||n(Fe.close)}},Wa=t=>!!(t.showConfirmButton||t.showDenyButton||t.showCancelButton||t.showCloseButton),Mt=!1,ja=t=>{t.popup.onmousedown=()=>{t.container.onmouseup=function(e){t.container.onmouseup=()=>{},e.target===t.container&&(Mt=!0)}}},Ya=t=>{t.container.onmousedown=e=>{e.target===t.container&&e.preventDefault(),t.popup.onmouseup=function(n){t.popup.onmouseup=()=>{},(n.target===t.popup||n.target instanceof HTMLElement&&t.popup.contains(n.target))&&(Mt=!0)}}},Ka=(t,e,n)=>{e.container.onclick=o=>{if(Mt){Mt=!1;return}o.target===e.container&&$t(t.allowOutsideClick)&&n(Fe.backdrop)}},Ga=t=>typeof t=="object"&&t.jquery,Zo=t=>t instanceof Element||Ga(t),Xa=t=>{let e={};return typeof t[0]=="object"&&!Zo(t[0])?Object.assign(e,t[0]):["title","html","icon"].forEach((n,o)=>{let r=t[o];typeof r=="string"||Zo(r)?e[n]=r:r!==void 0&&Se(`Unexpected type of ${n}! Expected "string" or "Element", got ${typeof r}`)}),e};Qa=()=>w.timeout&&w.timeout.getTimerLeft(),Wr=()=>{if(w.timeout)return li(),w.timeout.stop()},jr=()=>{if(w.timeout){let t=w.timeout.start();return Mn(t),t}},el=()=>{let t=w.timeout;return t&&(t.running?Wr():jr())},tl=t=>{if(w.timeout){let e=w.timeout.increase(t);return Mn(e,!0),e}},nl=()=>!!(w.timeout&&w.timeout.isRunning()),Qo=!1,xn={};rl=t=>{for(let e=t.target;e&&e!==document;e=e.parentNode)for(let n in xn){let o=e.getAttribute(n);if(o){xn[n].fire({template:o});return}}},Sn=class{constructor(){this.events={}}_getHandlersByEventName(e){return typeof this.events[e]>"u"&&(this.events[e]=[]),this.events[e]}on(e,n){let o=this._getHandlersByEventName(e);o.includes(n)||o.push(n)}once(e,n){var o=this;let r=function(){o.removeListener(e,r);for(var s=arguments.length,l=new Array(s),d=0;d1?n-1:0),r=1;r{try{s.apply(this,o)}catch(l){console.error(l)}})}removeListener(e,n){let o=this._getHandlersByEventName(e),r=o.indexOf(n);r>-1&&o.splice(r,1)}removeAllListeners(e){this.events[e]!==void 0&&(this.events[e].length=0)}reset(){this.events={}}};w.eventEmitter=new Sn;sl=(t,e)=>{w.eventEmitter.on(t,e)},il=(t,e)=>{w.eventEmitter.once(t,e)},al=(t,e)=>{if(!t){w.eventEmitter.reset();return}e?w.eventEmitter.removeListener(t,e):w.eventEmitter.removeAllListeners(t)},ll=Object.freeze({__proto__:null,argsToParams:Xa,bindClickHandler:ol,clickCancel:Xi,clickConfirm:br,clickDeny:Gi,enableLoading:Ne,fire:Ja,getActions:rt,getCancelButton:qe,getCloseButton:Bn,getConfirmButton:Q,getContainer:q,getDenyButton:Ae,getFocusableElements:On,getFooter:ar,getHtmlContainer:In,getIcon:$e,getIconContent:ni,getImage:ir,getInputLabel:oi,getLoader:He,getPopup:C,getProgressSteps:Dn,getTimerLeft:Qa,getTimerProgressBar:Ht,getTitle:sr,getValidationMessage:qt,increaseTimer:tl,isDeprecatedParameter:Hr,isLoading:si,isTimerRunning:nl,isUpdatableParameter:qr,isValidParameter:$r,isVisible:Ki,mixin:Za,off:al,on:sl,once:il,resumeTimer:jr,showLoading:Ne,stopTimer:Wr,toggleTimer:el}),An=class{constructor(e,n){this.callback=e,this.remaining=n,this.running=!1,this.start()}start(){return this.running||(this.running=!0,this.started=new Date,this.id=setTimeout(this.callback,this.remaining)),this.remaining}stop(){return this.started&&this.running&&(this.running=!1,clearTimeout(this.id),this.remaining-=new Date().getTime()-this.started.getTime()),this.remaining}increase(e){let n=this.running;return n&&this.stop(),this.remaining+=e,n&&this.start(),this.remaining}getTimerLeft(){return this.running&&(this.stop(),this.start()),this.remaining}isRunning(){return this.running}},Yr=["swal-title","swal-html","swal-footer"],cl=t=>{let e=typeof t.template=="string"?document.querySelector(t.template):t.template;if(!e)return{};let n=e.content;return gl(n),Object.assign(ul(n),dl(n),pl(n),hl(n),fl(n),ml(n),wl(n,Yr))},ul=t=>{let e={};return Array.from(t.querySelectorAll("swal-param")).forEach(o=>{Ee(o,["name","value"]);let r=o.getAttribute("name"),s=o.getAttribute("value");!r||!s||(typeof Re[r]=="boolean"?e[r]=s!=="false":typeof Re[r]=="object"?e[r]=JSON.parse(s):e[r]=s)}),e},dl=t=>{let e={};return Array.from(t.querySelectorAll("swal-function-param")).forEach(o=>{let r=o.getAttribute("name"),s=o.getAttribute("value");!r||!s||(e[r]=new Function(`return ${s}`)())}),e},pl=t=>{let e={};return Array.from(t.querySelectorAll("swal-button")).forEach(o=>{Ee(o,["type","color","aria-label"]);let r=o.getAttribute("type");!r||!["confirm","cancel","deny"].includes(r)||(e[`${r}ButtonText`]=o.innerHTML,e[`show${Tn(r)}Button`]=!0,o.hasAttribute("color")&&(e[`${r}ButtonColor`]=o.getAttribute("color")),o.hasAttribute("aria-label")&&(e[`${r}ButtonAriaLabel`]=o.getAttribute("aria-label")))}),e},hl=t=>{let e={},n=t.querySelector("swal-image");return n&&(Ee(n,["src","width","height","alt"]),n.hasAttribute("src")&&(e.imageUrl=n.getAttribute("src")||void 0),n.hasAttribute("width")&&(e.imageWidth=n.getAttribute("width")||void 0),n.hasAttribute("height")&&(e.imageHeight=n.getAttribute("height")||void 0),n.hasAttribute("alt")&&(e.imageAlt=n.getAttribute("alt")||void 0)),e},fl=t=>{let e={},n=t.querySelector("swal-icon");return n&&(Ee(n,["type","color"]),n.hasAttribute("type")&&(e.icon=n.getAttribute("type")),n.hasAttribute("color")&&(e.iconColor=n.getAttribute("color")),e.iconHtml=n.innerHTML),e},ml=t=>{let e={},n=t.querySelector("swal-input");n&&(Ee(n,["type","label","placeholder","value"]),e.input=n.getAttribute("type")||"text",n.hasAttribute("label")&&(e.inputLabel=n.getAttribute("label")),n.hasAttribute("placeholder")&&(e.inputPlaceholder=n.getAttribute("placeholder")),n.hasAttribute("value")&&(e.inputValue=n.getAttribute("value")));let o=Array.from(t.querySelectorAll("swal-input-option"));return o.length&&(e.inputOptions={},o.forEach(r=>{Ee(r,["value"]);let s=r.getAttribute("value");if(!s)return;let l=r.innerHTML;e.inputOptions[s]=l})),e},wl=(t,e)=>{let n={};for(let o in e){let r=e[o],s=t.querySelector(r);s&&(Ee(s,[]),n[r.replace(/^swal-/,"")]=s.innerHTML.trim())}return n},gl=t=>{let e=Yr.concat(["swal-param","swal-function-param","swal-button","swal-image","swal-icon","swal-input","swal-input-option"]);Array.from(t.children).forEach(n=>{let o=n.tagName.toLowerCase();e.includes(o)||$(`Unrecognized element <${o}>`)})},Ee=(t,e)=>{Array.from(t.attributes).forEach(n=>{e.indexOf(n.name)===-1&&$([`Unrecognized attribute "${n.name}" on <${t.tagName.toLowerCase()}>.`,`${e.length?`Allowed attributes are: ${e.join(", ")}`:"To set the value, use HTML within the element."}`])})},Kr=10,yl=t=>{let e=q(),n=C();typeof t.willOpen=="function"&&t.willOpen(n),w.eventEmitter.emit("willOpen",n);let r=window.getComputedStyle(document.body).overflowY;kl(e,n,t),setTimeout(()=>{bl(e,n)},Kr),Ln()&&(vl(e,t.scrollbarPadding,r),ra()),!Ft()&&!w.previousActiveElement&&(w.previousActiveElement=document.activeElement),typeof t.didOpen=="function"&&setTimeout(()=>t.didOpen(n)),w.eventEmitter.emit("didOpen",n),G(e,a["no-transition"])},Nt=t=>{let e=C();if(t.target!==e)return;let n=q();e.removeEventListener("animationend",Nt),e.removeEventListener("transitionend",Nt),n.style.overflowY="auto"},bl=(t,e)=>{ur(e)?(t.style.overflowY="hidden",e.addEventListener("animationend",Nt),e.addEventListener("transitionend",Nt)):t.style.overflowY="auto"},vl=(t,e,n)=>{sa(),e&&n!=="hidden"&&pa(n),setTimeout(()=>{t.scrollTop=0})},kl=(t,e,n)=>{v(t,n.showClass.backdrop),n.animation?(e.style.setProperty("opacity","0","important"),L(e,"grid"),setTimeout(()=>{v(e,n.showClass.popup),e.style.removeProperty("opacity")},Kr)):L(e,"grid"),v([document.documentElement,document.body],a.shown),n.heightAuto&&n.backdrop&&!n.toast&&v([document.documentElement,document.body],a["height-auto"])},er={email:(t,e)=>/^[a-zA-Z0-9.+_'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]+$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid email address"),url:(t,e)=>/^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(t)?Promise.resolve():Promise.resolve(e||"Invalid URL")};_t=new WeakMap,I=class{constructor(){if(Ks(this,_t,void 0),typeof window>"u")return;Z=this;for(var e=arguments.length,n=new Array(e),o=0;o1&&arguments[1]!==void 0?arguments[1]:{};if(Fr(Object.assign({},n,e)),w.currentInstance){let s=Me.swalPromiseResolve.get(w.currentInstance),{isAwaitingPromise:l}=w.currentInstance;w.currentInstance._destroy(),l||s({isDismissed:!0}),Ln()&&Cr()}w.currentInstance=Z;let o=Al(e,n);xl(o),Object.freeze(o),w.timeout&&(w.timeout.stop(),delete w.timeout),clearTimeout(w.restoreFocusTimeout);let r=Tl(Z);return yr(Z,o),A.innerParams.set(Z,o),Sl(Z,r,o)}then(e){return zo(_t,this).then(e)}finally(e){return zo(_t,this).finally(e)}},Sl=(t,e,n)=>new Promise((o,r)=>{let s=l=>{t.close({isDismissed:!0,dismiss:l})};Me.swalPromiseResolve.set(t,o),Me.swalPromiseReject.set(t,r),e.confirmButton.onclick=()=>{Pa(t)},e.denyButton.onclick=()=>{Ia(t)},e.cancelButton.onclick=()=>{Da(t,s)},e.closeButton.onclick=()=>{s(Fe.close)},za(n,e,s),Ji(w,n,s),va(t,n),yl(n),_l(w,n,s),Pl(e,n),setTimeout(()=>{e.container.scrollTop=0})}),Al=(t,e)=>{let n=cl(t),o=Object.assign({},Re,e,n,t);return o.showClass=Object.assign({},Re.showClass,o.showClass),o.hideClass=Object.assign({},Re.hideClass,o.hideClass),o.animation===!1&&(o.showClass={backdrop:"swal2-noanimation"},o.hideClass={}),o},Tl=t=>{let e={popup:C(),container:q(),actions:rt(),confirmButton:Q(),denyButton:Ae(),cancelButton:qe(),loader:He(),closeButton:Bn(),validationMessage:qt(),progressSteps:Dn()};return A.domCache.set(t,e),e},_l=(t,e,n)=>{let o=Ht();M(o),e.timer&&(t.timeout=new An(()=>{n("timer"),delete t.timeout},e.timer),e.timerProgressBar&&(L(o),U(o,e,"timerProgressBar"),setTimeout(()=>{t.timeout&&t.timeout.running&&Mn(e.timer)})))},Pl=(t,e)=>{if(!e.toast){if(!$t(e.allowEnterKey)){rr("allowEnterKey"),Bl();return}Il(t)||Dl(t,e)||En(-1,1)}},Il=t=>{let e=Array.from(t.popup.querySelectorAll("[autofocus]"));for(let n of e)if(n instanceof HTMLElement&&F(n))return n.focus(),!0;return!1},Dl=(t,e)=>e.focusDeny&&F(t.denyButton)?(t.denyButton.focus(),!0):e.focusCancel&&F(t.cancelButton)?(t.cancelButton.focus(),!0):e.focusConfirm&&F(t.confirmButton)?(t.confirmButton.focus(),!0):!1,Bl=()=>{document.activeElement instanceof HTMLElement&&typeof document.activeElement.blur=="function"&&document.activeElement.blur()};I.prototype.disableButtons=Or;I.prototype.enableButtons=Br;I.prototype.getInput=Pr;I.prototype.disableInput=Rr;I.prototype.enableInput=Lr;I.prototype.hideLoading=Rt;I.prototype.disableLoading=Rt;I.prototype.showValidationMessage=Mr;I.prototype.resetValidationMessage=Nr;I.prototype.close=me;I.prototype.closePopup=me;I.prototype.closeModal=me;I.prototype.closeToast=me;I.prototype.rejectPromise=Sr;I.prototype.update=Vr;I.prototype._destroy=zr;Object.assign(I,ll);Object.keys(Va).forEach(t=>{I[t]=function(){return Z&&Z[t]?Z[t](...arguments):null}});I.DismissReason=Fe;I.version="11.18.0";xe=I;xe.default=xe;typeof document<"u"&&(function(t,e){var n=t.createElement("style");if(t.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=e);else try{n.innerHTML=e}catch{n.innerText=e}})(document,':root{--swal2-container-padding: 0.625em;--swal2-backdrop: rgba(0, 0, 0, 0.4);--swal2-width: 32em;--swal2-padding: 0 0 1.25em;--swal2-border: none;--swal2-border-radius: 0.3125rem;--swal2-background: white;--swal2-color: #545454;--swal2-footer-border-color: #eee;--swal2-show-animation: swal2-show 0.3s;--swal2-hide-animation: swal2-hide 0.15s forwards;--swal2-title-padding: 0.8em 1em 0;--swal2-html-container-padding: 1em 1.6em 0.3em;--swal2-input-background: transparent;--swal2-progress-step-background: #add8e6;--swal2-validation-message-background: #f0f0f0;--swal2-validation-message-color: #666;--swal2-close-button-position: initial;--swal2-close-button-inset: auto;--swal2-close-button-font-size: 2.5em;--swal2-close-button-color: #ccc;--swal2-close-button-transition: color 0.1s, box-shadow 0.1s;--swal2-close-button-outline: initial;--swal2-close-button-hover-transform: none}[data-swal2-theme=dark]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}@media(prefers-color-scheme: dark){[data-swal2-theme=auto]{--swal2-dark-theme-black: #19191a;--swal2-dark-theme-white: #e1e1e1;--swal2-background: var(--swal2-dark-theme-black);--swal2-color: var(--swal2-dark-theme-white);--swal2-footer-border-color: #555;--swal2-input-background: color-mix(in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10%);--swal2-validation-message-background: color-mix( in srgb, var(--swal2-dark-theme-black), var(--swal2-dark-theme-white) 10% );--swal2-validation-message-color: var(--swal2-dark-theme-white)}}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow:hidden}body.swal2-height-auto{height:auto !important}body.swal2-no-backdrop .swal2-container{background-color:rgba(0,0,0,0) !important;pointer-events:none}body.swal2-no-backdrop .swal2-container .swal2-popup{pointer-events:all}body.swal2-no-backdrop .swal2-container .swal2-modal{box-shadow:0 0 10px var(--swal2-backdrop)}body.swal2-toast-shown .swal2-container{box-sizing:border-box;width:360px;max-width:100%;background-color:rgba(0,0,0,0);pointer-events:none}body.swal2-toast-shown .swal2-container.swal2-top{inset:0 auto auto 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-top-end,body.swal2-toast-shown .swal2-container.swal2-top-right{inset:0 0 auto auto}body.swal2-toast-shown .swal2-container.swal2-top-start,body.swal2-toast-shown .swal2-container.swal2-top-left{inset:0 auto auto 0}body.swal2-toast-shown .swal2-container.swal2-center-start,body.swal2-toast-shown .swal2-container.swal2-center-left{inset:50% auto auto 0;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-center{inset:50% auto auto 50%;transform:translate(-50%, -50%)}body.swal2-toast-shown .swal2-container.swal2-center-end,body.swal2-toast-shown .swal2-container.swal2-center-right{inset:50% 0 auto auto;transform:translateY(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-start,body.swal2-toast-shown .swal2-container.swal2-bottom-left{inset:auto auto 0 0}body.swal2-toast-shown .swal2-container.swal2-bottom{inset:auto auto 0 50%;transform:translateX(-50%)}body.swal2-toast-shown .swal2-container.swal2-bottom-end,body.swal2-toast-shown .swal2-container.swal2-bottom-right{inset:auto 0 0 auto}@media print{body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown){overflow-y:scroll !important}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown)>[aria-hidden=true]{display:none}body.swal2-shown:not(.swal2-no-backdrop,.swal2-toast-shown) .swal2-container{position:static !important}}div:where(.swal2-container){display:grid;position:fixed;z-index:1060;inset:0;box-sizing:border-box;grid-template-areas:"top-start top top-end" "center-start center center-end" "bottom-start bottom-center bottom-end";grid-template-rows:minmax(min-content, auto) minmax(min-content, auto) minmax(min-content, auto);height:100%;padding:var(--swal2-container-padding);overflow-x:hidden;transition:background-color .1s;-webkit-overflow-scrolling:touch}div:where(.swal2-container).swal2-backdrop-show,div:where(.swal2-container).swal2-noanimation{background:var(--swal2-backdrop)}div:where(.swal2-container).swal2-backdrop-hide{background:rgba(0,0,0,0) !important}div:where(.swal2-container).swal2-top-start,div:where(.swal2-container).swal2-center-start,div:where(.swal2-container).swal2-bottom-start{grid-template-columns:minmax(0, 1fr) auto auto}div:where(.swal2-container).swal2-top,div:where(.swal2-container).swal2-center,div:where(.swal2-container).swal2-bottom{grid-template-columns:auto minmax(0, 1fr) auto}div:where(.swal2-container).swal2-top-end,div:where(.swal2-container).swal2-center-end,div:where(.swal2-container).swal2-bottom-end{grid-template-columns:auto auto minmax(0, 1fr)}div:where(.swal2-container).swal2-top-start>.swal2-popup{align-self:start}div:where(.swal2-container).swal2-top>.swal2-popup{grid-column:2;place-self:start center}div:where(.swal2-container).swal2-top-end>.swal2-popup,div:where(.swal2-container).swal2-top-right>.swal2-popup{grid-column:3;place-self:start end}div:where(.swal2-container).swal2-center-start>.swal2-popup,div:where(.swal2-container).swal2-center-left>.swal2-popup{grid-row:2;align-self:center}div:where(.swal2-container).swal2-center>.swal2-popup{grid-column:2;grid-row:2;place-self:center center}div:where(.swal2-container).swal2-center-end>.swal2-popup,div:where(.swal2-container).swal2-center-right>.swal2-popup{grid-column:3;grid-row:2;place-self:center end}div:where(.swal2-container).swal2-bottom-start>.swal2-popup,div:where(.swal2-container).swal2-bottom-left>.swal2-popup{grid-column:1;grid-row:3;align-self:end}div:where(.swal2-container).swal2-bottom>.swal2-popup{grid-column:2;grid-row:3;place-self:end center}div:where(.swal2-container).swal2-bottom-end>.swal2-popup,div:where(.swal2-container).swal2-bottom-right>.swal2-popup{grid-column:3;grid-row:3;place-self:end end}div:where(.swal2-container).swal2-grow-row>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-column:1/4;width:100%}div:where(.swal2-container).swal2-grow-column>.swal2-popup,div:where(.swal2-container).swal2-grow-fullscreen>.swal2-popup{grid-row:1/4;align-self:stretch}div:where(.swal2-container).swal2-no-transition{transition:none !important}div:where(.swal2-container) div:where(.swal2-popup){display:none;position:relative;box-sizing:border-box;grid-template-columns:minmax(0, 100%);width:var(--swal2-width);max-width:100%;padding:var(--swal2-padding);border:var(--swal2-border);border-radius:var(--swal2-border-radius);background:var(--swal2-background);color:var(--swal2-color);font-family:inherit;font-size:1rem}div:where(.swal2-container) div:where(.swal2-popup):focus{outline:none}div:where(.swal2-container) div:where(.swal2-popup).swal2-loading{overflow-y:hidden}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable{cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-draggable div:where(.swal2-icon){cursor:grab}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging{cursor:grabbing}div:where(.swal2-container) div:where(.swal2-popup).swal2-dragging div:where(.swal2-icon){cursor:grabbing}div:where(.swal2-container) h2:where(.swal2-title){position:relative;max-width:100%;margin:0;padding:var(--swal2-title-padding);color:inherit;font-size:1.875em;font-weight:600;text-align:center;text-transform:none;word-wrap:break-word;cursor:initial}div:where(.swal2-container) div:where(.swal2-actions){display:flex;z-index:1;box-sizing:border-box;flex-wrap:wrap;align-items:center;justify-content:center;width:auto;margin:1.25em auto 0;padding:0}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled[disabled]{opacity:.4}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:hover{background-image:linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1))}div:where(.swal2-container) div:where(.swal2-actions):not(.swal2-loading) .swal2-styled:active{background-image:linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2))}div:where(.swal2-container) div:where(.swal2-loader){display:none;align-items:center;justify-content:center;width:2.2em;height:2.2em;margin:0 1.875em;animation:swal2-rotate-loading 1.5s linear 0s infinite normal;border-width:.25em;border-style:solid;border-radius:100%;border-color:#2778c4 rgba(0,0,0,0) #2778c4 rgba(0,0,0,0)}div:where(.swal2-container) button:where(.swal2-styled){margin:.3125em;padding:.625em 1.1em;transition:box-shadow .1s;box-shadow:0 0 0 3px rgba(0,0,0,0);font-weight:500}div:where(.swal2-container) button:where(.swal2-styled):not([disabled]){cursor:pointer}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm){border:0;border-radius:.25em;background:initial;background-color:#7066e0;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-confirm):focus-visible{box-shadow:0 0 0 3px rgba(112,102,224,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny){border:0;border-radius:.25em;background:initial;background-color:#dc3741;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-deny):focus-visible{box-shadow:0 0 0 3px rgba(220,55,65,.5)}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel){border:0;border-radius:.25em;background:initial;background-color:#6e7881;color:#fff;font-size:1em}div:where(.swal2-container) button:where(.swal2-styled):where(.swal2-cancel):focus-visible{box-shadow:0 0 0 3px rgba(110,120,129,.5)}div:where(.swal2-container) button:where(.swal2-styled).swal2-default-outline:focus-visible{box-shadow:0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-styled):focus-visible{outline:none}div:where(.swal2-container) button:where(.swal2-styled)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-footer){margin:1em 0 0;padding:1em 1em 0;border-top:1px solid var(--swal2-footer-border-color);color:inherit;font-size:1em;text-align:center;cursor:initial}div:where(.swal2-container) .swal2-timer-progress-bar-container{position:absolute;right:0;bottom:0;left:0;grid-column:auto !important;overflow:hidden;border-bottom-right-radius:var(--swal2-border-radius);border-bottom-left-radius:var(--swal2-border-radius)}div:where(.swal2-container) div:where(.swal2-timer-progress-bar){width:100%;height:.25em;background:rgba(0,0,0,.2)}div:where(.swal2-container) img:where(.swal2-image){max-width:100%;margin:2em auto 1em;cursor:initial}div:where(.swal2-container) button:where(.swal2-close){position:var(--swal2-close-button-position);inset:var(--swal2-close-button-inset);z-index:2;align-items:center;justify-content:center;width:1.2em;height:1.2em;margin-top:0;margin-right:0;margin-bottom:-1.2em;padding:0;overflow:hidden;transition:var(--swal2-close-button-transition);border:none;border-radius:var(--swal2-border-radius);outline:var(--swal2-close-button-outline);background:rgba(0,0,0,0);color:var(--swal2-close-button-color);font-family:monospace;font-size:var(--swal2-close-button-font-size);cursor:pointer;justify-self:end}div:where(.swal2-container) button:where(.swal2-close):hover{transform:var(--swal2-close-button-hover-transform);background:rgba(0,0,0,0);color:#f27474}div:where(.swal2-container) button:where(.swal2-close):focus-visible{outline:none;box-shadow:inset 0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) button:where(.swal2-close)::-moz-focus-inner{border:0}div:where(.swal2-container) div:where(.swal2-html-container){z-index:1;justify-content:center;margin:0;padding:var(--swal2-html-container-padding);overflow:auto;color:inherit;font-size:1.125em;font-weight:normal;line-height:normal;text-align:center;word-wrap:break-word;word-break:break-word;cursor:initial}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea),div:where(.swal2-container) select:where(.swal2-select),div:where(.swal2-container) div:where(.swal2-radio),div:where(.swal2-container) label:where(.swal2-checkbox){margin:1em 2em 3px}div:where(.swal2-container) input:where(.swal2-input),div:where(.swal2-container) input:where(.swal2-file),div:where(.swal2-container) textarea:where(.swal2-textarea){box-sizing:border-box;width:auto;transition:border-color .1s,box-shadow .1s;border:1px solid #d9d9d9;border-radius:.1875em;background:var(--swal2-input-background);box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(0,0,0,0);color:inherit;font-size:1.125em}div:where(.swal2-container) input:where(.swal2-input).swal2-inputerror,div:where(.swal2-container) input:where(.swal2-file).swal2-inputerror,div:where(.swal2-container) textarea:where(.swal2-textarea).swal2-inputerror{border-color:#f27474 !important;box-shadow:0 0 2px #f27474 !important}div:where(.swal2-container) input:where(.swal2-input):focus,div:where(.swal2-container) input:where(.swal2-file):focus,div:where(.swal2-container) textarea:where(.swal2-textarea):focus{border:1px solid #b4dbed;outline:none;box-shadow:inset 0 1px 1px rgba(0,0,0,.06),0 0 0 3px rgba(100,150,200,.5)}div:where(.swal2-container) input:where(.swal2-input)::placeholder,div:where(.swal2-container) input:where(.swal2-file)::placeholder,div:where(.swal2-container) textarea:where(.swal2-textarea)::placeholder{color:#ccc}div:where(.swal2-container) .swal2-range{margin:1em 2em 3px;background:var(--swal2-background)}div:where(.swal2-container) .swal2-range input{width:80%}div:where(.swal2-container) .swal2-range output{width:20%;color:inherit;font-weight:600;text-align:center}div:where(.swal2-container) .swal2-range input,div:where(.swal2-container) .swal2-range output{height:2.625em;padding:0;font-size:1.125em;line-height:2.625em}div:where(.swal2-container) .swal2-input{height:2.625em;padding:0 .75em}div:where(.swal2-container) .swal2-file{width:75%;margin-right:auto;margin-left:auto;background:var(--swal2-input-background);font-size:1.125em}div:where(.swal2-container) .swal2-textarea{height:6.75em;padding:.75em}div:where(.swal2-container) .swal2-select{min-width:50%;max-width:100%;padding:.375em .625em;background:var(--swal2-input-background);color:inherit;font-size:1.125em}div:where(.swal2-container) .swal2-radio,div:where(.swal2-container) .swal2-checkbox{align-items:center;justify-content:center;background:var(--swal2-background);color:inherit}div:where(.swal2-container) .swal2-radio label,div:where(.swal2-container) .swal2-checkbox label{margin:0 .6em;font-size:1.125em}div:where(.swal2-container) .swal2-radio input,div:where(.swal2-container) .swal2-checkbox input{flex-shrink:0;margin:0 .4em}div:where(.swal2-container) label:where(.swal2-input-label){display:flex;justify-content:center;margin:1em auto 0}div:where(.swal2-container) div:where(.swal2-validation-message){align-items:center;justify-content:center;margin:1em 0 0;padding:.625em;overflow:hidden;background:var(--swal2-validation-message-background);color:var(--swal2-validation-message-color);font-size:1em;font-weight:300}div:where(.swal2-container) div:where(.swal2-validation-message)::before{content:"!";display:inline-block;width:1.5em;min-width:1.5em;height:1.5em;margin:0 .625em;border-radius:50%;background-color:#f27474;color:#fff;font-weight:600;line-height:1.5em;text-align:center}div:where(.swal2-container) .swal2-progress-steps{flex-wrap:wrap;align-items:center;max-width:100%;margin:1.25em auto;padding:0;background:rgba(0,0,0,0);font-weight:600}div:where(.swal2-container) .swal2-progress-steps li{display:inline-block;position:relative}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step{z-index:20;flex-shrink:0;width:2em;height:2em;border-radius:2em;background:#2778c4;color:#fff;line-height:2em;text-align:center}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step{background:#2778c4}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step{background:var(--swal2-progress-step-background);color:#fff}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step.swal2-active-progress-step~.swal2-progress-step-line{background:var(--swal2-progress-step-background)}div:where(.swal2-container) .swal2-progress-steps .swal2-progress-step-line{z-index:10;flex-shrink:0;width:2.5em;height:.4em;margin:0 -1px;background:#2778c4}div:where(.swal2-icon){position:relative;box-sizing:content-box;justify-content:center;width:5em;height:5em;margin:2.5em auto .6em;border:.25em solid rgba(0,0,0,0);border-radius:50%;border-color:#000;font-family:inherit;line-height:5em;cursor:default;user-select:none}div:where(.swal2-icon) .swal2-icon-content{display:flex;align-items:center;font-size:3.75em}div:where(.swal2-icon).swal2-error{border-color:#f27474;color:#f27474}div:where(.swal2-icon).swal2-error .swal2-x-mark{position:relative;flex-grow:1}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line]{display:block;position:absolute;top:2.3125em;width:2.9375em;height:.3125em;border-radius:.125em;background-color:#f27474}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=left]{left:1.0625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-error [class^=swal2-x-mark-line][class$=right]{right:1em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-error.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-error.swal2-icon-show .swal2-x-mark{animation:swal2-animate-error-x-mark .5s}div:where(.swal2-icon).swal2-warning{border-color:#f8bb86;color:#f8bb86}div:where(.swal2-icon).swal2-warning.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-warning.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .5s}div:where(.swal2-icon).swal2-info{border-color:#3fc3ee;color:#3fc3ee}div:where(.swal2-icon).swal2-info.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-info.swal2-icon-show .swal2-icon-content{animation:swal2-animate-i-mark .8s}div:where(.swal2-icon).swal2-question{border-color:#87adbd;color:#87adbd}div:where(.swal2-icon).swal2-question.swal2-icon-show{animation:swal2-animate-error-icon .5s}div:where(.swal2-icon).swal2-question.swal2-icon-show .swal2-icon-content{animation:swal2-animate-question-mark .8s}div:where(.swal2-icon).swal2-success{border-color:#a5dc86;color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line]{position:absolute;width:3.75em;height:7.5em;border-radius:50%}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.4375em;left:-2.0635em;transform:rotate(-45deg);transform-origin:3.75em 3.75em;border-radius:7.5em 0 0 7.5em}div:where(.swal2-icon).swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.6875em;left:1.875em;transform:rotate(-45deg);transform-origin:0 3.75em;border-radius:0 7.5em 7.5em 0}div:where(.swal2-icon).swal2-success .swal2-success-ring{position:absolute;z-index:2;top:-0.25em;left:-0.25em;box-sizing:content-box;width:100%;height:100%;border:.25em solid rgba(165,220,134,.3);border-radius:50%}div:where(.swal2-icon).swal2-success .swal2-success-fix{position:absolute;z-index:1;top:.5em;left:1.625em;width:.4375em;height:5.625em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line]{display:block;position:absolute;z-index:2;height:.3125em;border-radius:.125em;background-color:#a5dc86}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=tip]{top:2.875em;left:.8125em;width:1.5625em;transform:rotate(45deg)}div:where(.swal2-icon).swal2-success [class^=swal2-success-line][class$=long]{top:2.375em;right:.5em;width:2.9375em;transform:rotate(-45deg)}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-animate-success-line-tip .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-animate-success-line-long .75s}div:where(.swal2-icon).swal2-success.swal2-icon-show .swal2-success-circular-line-right{animation:swal2-rotate-success-circular-line 4.25s ease-in}[class^=swal2]{-webkit-tap-highlight-color:rgba(0,0,0,0)}.swal2-show{animation:var(--swal2-show-animation)}.swal2-hide{animation:var(--swal2-hide-animation)}.swal2-noanimation{transition:none}.swal2-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}.swal2-rtl .swal2-close{margin-right:initial;margin-left:0}.swal2-rtl .swal2-timer-progress-bar{right:0;left:auto}.swal2-toast{box-sizing:border-box;grid-column:1/4 !important;grid-row:1/4 !important;grid-template-columns:min-content auto min-content;padding:1em;overflow-y:hidden;background:var(--swal2-background);box-shadow:0 0 1px rgba(0,0,0,.075),0 1px 2px rgba(0,0,0,.075),1px 2px 4px rgba(0,0,0,.075),1px 3px 8px rgba(0,0,0,.075),2px 4px 16px rgba(0,0,0,.075);pointer-events:all}.swal2-toast>*{grid-column:2}.swal2-toast h2:where(.swal2-title){margin:.5em 1em;padding:0;font-size:1em;text-align:initial}.swal2-toast .swal2-loading{justify-content:center}.swal2-toast input:where(.swal2-input){height:2em;margin:.5em;font-size:1em}.swal2-toast .swal2-validation-message{font-size:1em}.swal2-toast div:where(.swal2-footer){margin:.5em 0 0;padding:.5em 0 0;font-size:.8em}.swal2-toast button:where(.swal2-close){grid-column:3/3;grid-row:1/99;align-self:center;width:.8em;height:.8em;margin:0;font-size:2em}.swal2-toast div:where(.swal2-html-container){margin:.5em 1em;padding:0;overflow:initial;font-size:1em;text-align:initial}.swal2-toast div:where(.swal2-html-container):empty{padding:0}.swal2-toast .swal2-loader{grid-column:1;grid-row:1/99;align-self:center;width:2em;height:2em;margin:.25em}.swal2-toast .swal2-icon{grid-column:1;grid-row:1/99;align-self:center;width:2em;min-width:2em;height:2em;margin:0 .5em 0 0}.swal2-toast .swal2-icon .swal2-icon-content{display:flex;align-items:center;font-size:1.8em;font-weight:bold}.swal2-toast .swal2-icon.swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line]{top:.875em;width:1.375em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=left]{left:.3125em}.swal2-toast .swal2-icon.swal2-error [class^=swal2-x-mark-line][class$=right]{right:.3125em}.swal2-toast div:where(.swal2-actions){justify-content:flex-start;height:auto;margin:0;margin-top:.5em;padding:0 .5em}.swal2-toast button:where(.swal2-styled){margin:.25em .5em;padding:.4em .6em;font-size:1em}.swal2-toast .swal2-success{border-color:#a5dc86}.swal2-toast .swal2-success [class^=swal2-success-circular-line]{position:absolute;width:1.6em;height:3em;border-radius:50%}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=left]{top:-0.8em;left:-0.5em;transform:rotate(-45deg);transform-origin:2em 2em;border-radius:4em 0 0 4em}.swal2-toast .swal2-success [class^=swal2-success-circular-line][class$=right]{top:-0.25em;left:.9375em;transform-origin:0 1.5em;border-radius:0 4em 4em 0}.swal2-toast .swal2-success .swal2-success-ring{width:2em;height:2em}.swal2-toast .swal2-success .swal2-success-fix{top:0;left:.4375em;width:.4375em;height:2.6875em}.swal2-toast .swal2-success [class^=swal2-success-line]{height:.3125em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=tip]{top:1.125em;left:.1875em;width:.75em}.swal2-toast .swal2-success [class^=swal2-success-line][class$=long]{top:.9375em;right:.1875em;width:1.375em}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-tip{animation:swal2-toast-animate-success-line-tip .75s}.swal2-toast .swal2-success.swal2-icon-show .swal2-success-line-long{animation:swal2-toast-animate-success-line-long .75s}.swal2-toast.swal2-show{animation:swal2-toast-show .5s}.swal2-toast.swal2-hide{animation:swal2-toast-hide .1s forwards}@keyframes swal2-show{0%{transform:scale(0.7)}45%{transform:scale(1.05)}80%{transform:scale(0.95)}100%{transform:scale(1)}}@keyframes swal2-hide{0%{transform:scale(1);opacity:1}100%{transform:scale(0.5);opacity:0}}@keyframes swal2-animate-success-line-tip{0%{top:1.1875em;left:.0625em;width:0}54%{top:1.0625em;left:.125em;width:0}70%{top:2.1875em;left:-0.375em;width:3.125em}84%{top:3em;left:1.3125em;width:1.0625em}100%{top:2.8125em;left:.8125em;width:1.5625em}}@keyframes swal2-animate-success-line-long{0%{top:3.375em;right:2.875em;width:0}65%{top:3.375em;right:2.875em;width:0}84%{top:2.1875em;right:0;width:3.4375em}100%{top:2.375em;right:.5em;width:2.9375em}}@keyframes swal2-rotate-success-circular-line{0%{transform:rotate(-45deg)}5%{transform:rotate(-45deg)}12%{transform:rotate(-405deg)}100%{transform:rotate(-405deg)}}@keyframes swal2-animate-error-x-mark{0%{margin-top:1.625em;transform:scale(0.4);opacity:0}50%{margin-top:1.625em;transform:scale(0.4);opacity:0}80%{margin-top:-0.375em;transform:scale(1.15)}100%{margin-top:0;transform:scale(1);opacity:1}}@keyframes swal2-animate-error-icon{0%{transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);opacity:1}}@keyframes swal2-rotate-loading{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@keyframes swal2-animate-question-mark{0%{transform:rotateY(-360deg)}100%{transform:rotateY(0)}}@keyframes swal2-animate-i-mark{0%{transform:rotateZ(45deg);opacity:0}25%{transform:rotateZ(-25deg);opacity:.4}50%{transform:rotateZ(15deg);opacity:.8}75%{transform:rotateZ(-5deg);opacity:1}100%{transform:rotateX(0);opacity:1}}@keyframes swal2-toast-show{0%{transform:translateY(-0.625em) rotateZ(2deg)}33%{transform:translateY(0) rotateZ(-2deg)}66%{transform:translateY(0.3125em) rotateZ(2deg)}100%{transform:translateY(0) rotateZ(0deg)}}@keyframes swal2-toast-hide{100%{transform:rotateZ(1deg);opacity:0}}@keyframes swal2-toast-animate-success-line-tip{0%{top:.5625em;left:.0625em;width:0}54%{top:.125em;left:.125em;width:0}70%{top:.625em;left:-0.25em;width:1.625em}84%{top:1.0625em;left:.75em;width:.5em}100%{top:1.125em;left:.1875em;width:.75em}}@keyframes swal2-toast-animate-success-line-long{0%{top:1.625em;right:1.375em;width:0}65%{top:1.25em;right:.9375em;width:0}84%{top:.9375em;right:0;width:1.125em}100%{top:.9375em;right:.1875em;width:1.375em}}')});var m,ee,E,c,T,Du,H=b(()=>{"use strict";Vn();m=xe,ee=m.mixin({input:"text",showCancelButton:!0,showConfirmButton:!0,toast:!1}),E=ee.mixin({toast:!1,input:"number"}),c=m.mixin({toast:!0,position:"bottom"}),T=m.mixin({icon:"warning",showCancelButton:!0,toast:!1,confirmButtonText:"Confirm",cancelButtonText:"Cancel"}),Du=m.mixin({icon:"info",showCancelButton:!1,toast:!1});window.Swal=m});function Gr(){fetch(`https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/statusmessage.json?updated=${Date.now()}`).then(t=>t.json()).then(async t=>{if(t.enabled===!1)return console.log("Status message is disabled.");await m.fire({title:t.title,html:t.html,icon:t.icon})})}var zn=b(()=>{"use strict";H()});function te(t){let e=document.createElement("div");Xr==!1?(e.append(document.createElement("br")),e.append(document.createElement("br"))):Xr=!1,e.classList.add("menu-area"),e.style.textAlign="center",Ue.append(e);let n=document.createElement("h1");return n.innerText=t,n.style.textAlign="center",n.style.color="white",e.append(n),e}var ze,zt,Ve,Un,Ue,Xr,Ut,Wt,jt,h,Jr,Wn,Y=b(()=>{"use strict";$o();qo();O();zn();Vn();ze=document.createElement("div"),zt=document.getElementById("game-wrapper");document.getElementById("origin-menu")?.remove();document.getElementById("origin-toggler")?.remove();ze.id="origin-menu";ze.style="position: fixed;top: -10%;left: 10%;right: 10%;width: 80%;height: 80%;z-index: 2;background-color: rgba(0, 0, 0, 0.5);backdrop-filter: blur(5px);";zt?.prepend(ze);Ve=document.createElement("button");Ve.id="origin-toggler";Un=!1;zt?.prepend(Ve);Ve.onclick=()=>{Un=!Un,Un?(Ve.innerText="▼",ze.style.top="-100vh"):(Ve.innerText="▲",ze.style.top="10%")};Ve.onclick({});Ue=document.createElement("DIV");Ue.classList.add("menu-left");ze.append(Ue);Xr=!0;Ut=document.createElement("h1");Ut.classList.add("menu-title");Ut.innerText="Prodigy Origin";Ut.style.textAlign="center";Ue.append(Ut);Wt=document.createElement("h2");Wt.style.fontSize="25px";Wt.style.color="white";Wt.innerHTML="
    Press SHIFT to show/hide the menu. Scroll down in the menu for more mods.";Ue.append(Wt);jt=document.createElement("h3");jt.style.fontSize="20px";jt.innerHTML=`

    Join our Discord https://dsc.gg/ProdigyPXP! ⭐ Rate 5 Stars @@ -247,4 +247,4 @@ https://sweetalert2.github.io/#ajax-request`),xl(t),typeof t.title=="string"&&(t This action CANNOT be undone. The source account data has not been reviewed. -Are you absolutely sure?`)).value)try{return await fetch(`https://api.prodigygame.com/game-api/v3/characters/${t}`,{headers:{"Content-Type":"application/json",Authorization:localStorage.JWT_TOKEN},body:JSON.stringify({data:JSON.stringify(n[t]),userID:i.userID}),method:"POST"}),c.fire("Success!","Copied Account Successfully! Please reload.","success")}catch(o){return c.fire("Error",`Network error while copying account: ${o instanceof Error?o.message:"Unknown error"}`,"error")}});new f(h.player,"Set Grade").setClick(async()=>{let t=await E.fire("What number do you want to set your grade to?");if(t.value)return i.grade=parseInt(t.value),c.fire("Success",`Successfully changed grade to ${t}!`,"success")})});var fs=pt((Jn,Zn)=>{"use strict";F();K();le();G();L();ct();new f(h.utility,"Close all popups","Closes all popups in Prodigy.").setClick(async()=>(u.instance.prodigy.open.menuCloseAll(),c.fire("Closed!","All open popups were closed.","success")));new f(h.utility,"Grab UserID of all players on screen","Shows you the UserID and name of every player currently shown on the screen.").setClick(async()=>{let t=nt.playerList;if(Object.keys(t).length===0)return c.fire("No players found.","There are no other players on the screen.","error");let e=document.createElement("ul");for(let[n,o]of Object.entries(t)){let r="Unknown";try{r=o.nameText.textSource.source}catch{}let s=document.createElement("li");s.textContent=`uID: ${n} - ${r}`,e.append(s)}return m.fire({title:"All players on the screen:",html:e,icon:"info"})});new f(h.utility,"Save Character Locally [Local]","Saves your character locally.").setClick(async()=>(localStorage.setItem("playerData",JSON.stringify(i.getUpdatedData(!0))),c.fire("Success!","Note: Load Character will only work on this device.","success")));new f(h.utility,"Load local character [Local]","Loads your character locally.").setClick(async()=>{if(localStorage.getItem("playerData")){let t=localStorage.getItem("playerData"),e=await fetch(`https://api.prodigygame.com/game-api/v3/characters/${i.userID}`,{headers:{accept:"*/*","accept-language":"en-US,en;q=0.9",authorization:localStorage.JWT_TOKEN,"content-type":"application/json"},referrer:"https://play.prodigygame.com/",referrerPolicy:"strict-origin-when-cross-origin",body:JSON.stringify({data:t,userID:i.userID}),method:"POST",mode:"cors"});return e.ok?c.fire("Success!","Character has been successfully loaded. Reload for the changes to take effect.","success"):c.fire("Request failed.",`An error occurred while loading the character. Error code: ${e.status}`,"error")}else return c.fire("Error","No saved character.","error")});new f(h.utility,"Save Character","Helps fix bugs where not all hacks save.").setClick(async()=>(U(),c.fire("Success!","Your character has been saved!","success")));new f(h.utility,"Update menu","Updates menu to the latest version without needing to reload.").setClick(async()=>(document.getElementById("origin-menu")?.remove(),document.getElementById("origin-toggler")?.remove(),(async()=>eval(await(await fetch(`https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js?updated=${Date.now()}`)).text()))(),c.fire("Updated!","Mod menu was updated.","success")));new P(h.utility,"Enable menu resize","Allows you to resize the menu via dragging the bottom right corner.").setEnabled(async()=>(document.getElementById("origin-menu").style.resize="both",c.fire("Success!","Drag the bottom right corner of the menu to resize it.","success"))).setDisabled(()=>(document.getElementById("origin-menu").style.resize="none",c.fire("Success!","The menu position is now locked.","success")));new P(h.utility,"Pause Game").setEnabled(async()=>(u.network.game._paused=!0,c.fire("Success!","Successfully paused Prodigy.","success"))).setDisabled(async()=>(u.network.game._paused=!1,c.fire("Success!","Successfully resumed Prodigy.","success")));new f(h.utility,"Eval Console","Evaluate JavaScript code without opening F12").setClick(async()=>{if(!(await T.fire({title:"Important",html:"This hack is potentially dangerous, as it evaluates plain JavaScript code, with access to Prodigy's typings. Please do not paste code from random people on the internet here, that may be dangerous.

    Proceed?",icon:"warning"})).value)return console.log("Cancelled.");let code=await te.fire("Code:","Enter the code you want to evaluate.");if(code.value){try{eval(code.value)}catch(t){if(t)return m.fire({title:"Error",html:`Oops! There was an error with the code!
     ${t} `,icon:"error"})}return c.fire("Evaluated!","Code was evaluated.","success")}});new f(h.utility,"Disable inactivity kick","Keeps you from being logged out for inactivity.").setClick(async()=>oe("GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS",0)?c.fire("Success!","You now will never be logged out!","success"):c.fire("Error","FlagProvider service not found.","error"));new f(h.utility,"Save Inventory","Forces a server-side save of your inventory/backpack.").setClick(async()=>{try{return i.updated=!0,i.saveEnabled=!0,i.backpack&&(i.backpack.updated=!0),typeof i.save=="function"&&await i.save(),c.fire("Saved!","Inventory saved to server.","success")}catch(t){return m.fire("Error","Failed to save inventory: "+t,"error")}});new f(h.utility,"Save Pet Data","Forces a server-side save of your pet/kennel data.").setClick(async()=>(i.kennel.updated=!0,i.updated=!0,i.saveEnabled=!0,typeof i.forceSaveCharacter=="function"&&i.forceSaveCharacter(),c.fire("Saved!","Pet data saved to server.","success")))});K();G();le();F();K();le();G();L();ct();new P(h.battle,"Instant Kill [PvE]","Makes your spells do insane damage in PvE!").setEnabled(async()=>(i.modifiers.damage=B,c.fire("Enabled!","You will now do insane damage in PvE!","success"))).setDisabled(()=>(i.modifiers.damage=1,c.fire("Disabled!","You will no longer do insane damage in PvE!","success")));new f(h.battle,"PvP Health [PvP]","Increases your HP in PvP by a hell ton.").setClick(async()=>(i.pvpHP=B,i.getMaxHearts=()=>B,c.fire("Success!","You now have lots of health!","success")));new f(h.battle,"Set Battle Hearts [PvP, PvE]","Sets your hearts in battle, automatically raise your max hearts in PvP or PvE.").setClick(async()=>{let t=await E.fire("Health Amount","How much HP do you want?","question");if(t.value!==void 0)return i.getMaxHearts=()=>+t.value,i.pvpHP=+t.value,i.data.hp=+t.value,c.fire("Success!","Your hearts have been set.","success")});new f(h.battle,"Fill Battle Energy [PvP, PvE]","Fills up your battle energy, if you are in PvP or PvE.").setClick(async()=>{let t=Tt.state.getCurrentState();return"teams"in t?(t.teams[0].setEnergy(99),c.fire("Success!","Your battle energy has been filled.","success")):c.fire("Error","You are currently not in a battle.","error")});new P(h.battle,"Disable math [PvP, PvE]","Disable math in PvP, PvE, anywhere! This doesn't work in the Floatling town.").setEnabled(async()=>oe("GameConstants.Debug.EDUCATION_ENABLED",!1)?c.fire("Enabled!","You will no longer do Math!","success"):c.fire("Error","FlagProvider service not found.","error")).setDisabled(async()=>(oe("GameConstants.Debug.EDUCATION_ENABLED",!0),c.fire("Disabled!","You will now do Math!","success")));new P(h.battle,"Skip enemy turn").setEnabled(async()=>oe("GameConstants.Battle.SKIP_ENEMY_TURN",!0)?c.fire("Skipping!","Enemy turns will now be skipped.","success"):c.fire("Error","FlagProvider service not found.","error")).setDisabled(async()=>(oe("GameConstants.Battle.SKIP_ENEMY_TURN",!1),c.fire("Disabled","Enemy turns will no longer be skipped.","success")));new f(h.battle,"Escape Battle [PvP, PvE]","Escape any battle, PvP or PvE!").setClick(async()=>{let t=Tt.state.current;if(t==="PVP")return Object.fromEntries(u.instance.game.state.states).PVP.endPVP(),c.fire("Escaped!","You have successfully escaped from the PvP battle.","success");if(t==="CoOp")return u.instance.prodigy.world.$(i.data.zone),c.fire("Escaped!","You have successfully escaped from the battle.","success");if(t==="SecureBattleRevamp"){let e=u.instance?._game?._state?._current?._battleController;return!e||typeof e.attemptEscape!="function"?c.fire("Error","BattleController not available on current state.","error"):(await e.attemptEscape(),c.fire("Escaped!","You have successfully escaped from the PvE battle.","success"))}return["Battle","SecureBattle"].includes(t)?(Object.fromEntries(u.instance.game.state.states)[t].runAwayCallback(),c.fire("Escaped!","You have successfully escaped from the PvE battle.","success")):c.fire("Invalid State.","You are currently not in a battle.","error")});new f(h.battle,"Win Battle [PvE]","Instantly win the current PvE battle.").setClick(async()=>{if(Tt.state.current!=="SecureBattleRevamp")return c.fire("Invalid State.","You are currently not in a PvE battle.","error");let t=u.instance?.game?._state?._current?._battleController;return!t||typeof t.onVictory!="function"?c.fire("Error","BattleController not available on current state.","error"):(await t.onVictory(),c.fire("Victory!","You won the battle!","success"))});F();K();G();L();function Yn(){let t=u?.prodigy??u?.instance?.prodigy;return t?._currentBattlePass??t?._battlePass??null}new f(h.battlepass,"Treasure Free","Unlocks all free Battle Pass tier rewards.").setClick(async()=>{let t=Yn();if(!t||typeof t!="object")return m.fire("Error","Battle Pass not found.","error");let e=t._tiers;return!e||typeof e!="object"?m.fire("Error","Tiers not found in battle pass.","error"):(Object.values(e).forEach(n=>{n&&(n.isCompleted=!0,n.freeReward&&(n.freeReward.claimed=!1,n.freeReward.claimable=!0))}),c.fire("Success!","Free tier rewards unlocked.","success"))});new f(h.battlepass,"Treasure Core","Unlocks all Core (bottom premium) Battle Pass tier rewards.").setClick(async()=>{let t=Yn();if(!t||typeof t!="object")return m.fire("Error","Battle Pass not found.","error");let e=t._tiers;return!e||typeof e!="object"?m.fire("Error","Tiers not found in battle pass.","error"):(Object.values(e).forEach(n=>{n&&(n.isCompleted=!0,n.bottomPremiumReward&&(n.bottomPremiumReward.claimed=!1,n.bottomPremiumReward.claimable=!0))}),c.fire("Success!","Core tier rewards unlocked.","success"))});new f(h.battlepass,"Treasure Plus","Unlocks all Plus (top premium) Battle Pass tier rewards.").setClick(async()=>{let t=Yn();if(!t||typeof t!="object")return m.fire("Error","Battle Pass not found.","error");let e=t._tiers;return!e||typeof e!="object"?m.fire("Error","Tiers not found in battle pass.","error"):(Object.values(e).forEach(n=>{n&&(n.isCompleted=!0,n.topPremiumReward&&(n.topPremiumReward.claimed=!1,n.topPremiumReward.claimable=!0))}),c.fire("Success!","Plus tier rewards unlocked.","success"))});var gp=ht(rs());K();G();F();L();_e();new f(h.inventory,"Item stacker").setClick(async()=>{let t=await E.fire("Amount","How many of every item would you like?","question");if(!t.value||!(await T.fire("Are you sure you want to get all items in the game?")).value)return;x.forEach(n=>{i.backpack.data[n]=Z(u.gameData[n].filter(o=>n==="follow"?![125,126,127,128,129,134,135,136,137].includes(o.ID):o),t.value)}),u.gameData.dorm.forEach(n=>i.house.data.items[n.ID]={A:[],N:t.value});let e=()=>i.backpack.data.item.findIndex(n=>n.ID===84||n.ID===85||n.ID===86);for(;e()>-1;)i.backpack.data.item.splice(e(),1);return c.fire("Success!","All items added!","success")});new f(h.inventory,"Clear inventory").setClick(async()=>{(await T.fire("Are you sure you want to clear your inventory?")).value&&(Object.keys(i.backpack.data).forEach(t=>i.backpack.data[t]=[]),c.fire("Success!","Inventory cleared.","success"))});new f(h.inventory,"Selector (Basic)").setClick(async()=>{let t=await m.fire({title:"What would you like to obtain?",input:"select",inputOptions:ce,inputPlaceholder:"Select...",inputValidator:e=>e?"":"Please select which you'd like to obtain.",showCancelButton:!0}).then(async e=>{let n=parseInt(e.value),o=ce[n],r=x[n];if(!o)return;let s=await E.fire("Amount","How many each object would you like?","question");s.value&&(await T.fire(`Are you sure you want to get all ${o.toLowerCase()}?`)).value&&(i.backpack.data[r]=Z(u.gameData[r].filter(l=>r==="follow"?![125,126,127,128,129,134,135,136,137].includes(l.ID):l),s.value),c.fire(`${o} Added!`,`All ${o.toLowerCase()} have been added to your inventory!`,"success"),U())})});new f(h.inventory,"Selector (Advanced)","Choose a specific object and quantity to obtain.").setClick(async()=>{let t=await m.fire({title:"What would you like to obtain?",input:"select",inputOptions:ce,inputPlaceholder:"Select...",inputValidator:e=>e?"":"Please select which you'd like to obtain.",showCancelButton:!0}).then(async e=>{if(!u.gameData[x[e.value]])return;let n=[];u.gameData[x[e.value]].forEach(r=>{n.push(r.data.name)});let o=await m.fire({title:`What specific object categorized as ${ce[e.value].toLowerCase()} would you like to get?`,input:"select",inputOptions:n,inputPlaceholder:"Select...",inputValidator:r=>r?"":"Please select which you'd like to get.",showCancelButton:!0}).then(async r=>{let s=parseInt(r.value);if(!u.gameData[x[e.value]][s])return;let l=await E.fire("Amount","How many of the object would you like?","question");if(!l.value)return;let d=i.backpack.data[x[e.value]].findIndex(p=>p.ID===u.gameData[x[e.value]][s].ID);return d===-1?i.backpack.data[x[e.value]].push({ID:u.gameData[x[e.value]][s].ID,N:l.value}):i.backpack.data[x[e.value]][d].N=l.value,console.log(u.gameData[x[e.value]][s].ID),U(),c.fire(`${ce[e.value]} Added!`,`Your selected ${ce[e.value].toLowerCase()} have been added.`,"success")})})});new f(h.inventory,"Obtain All Furniture").setClick(async()=>{let t=await E.fire("Amount","How many of each piece of furniture would you like?","question");if(t.value&&(await T.fire("Are you sure you want to get all furniture?")).value)return u.gameData.dorm.forEach(e=>i.house.data.items[e.ID]={A:[],N:t.value}),c.fire("Furniture Added!","All furniture has been added to your inventory!","success")});new f(h.inventory,"Obtain All Mounts","This gives you all of the mounts in the game.").setClick(async()=>(i.backpack.data.mount=Z(u.gameData.mount,1),c.fire("Mounts Added!","All mounts have been added to your inventory!")));new f(h.inventory,"Remove item").setClick(async()=>{let t=await m.fire({title:"What category would you like to remove an item from?",input:"select",inputOptions:ce,inputPlaceholder:"Select...",inputValidator:s=>s?"":"Please select which you'd like to obtain.",showCancelButton:!0});if(!u.gameData[x[t.value]])return;let e=u.gameData[x[t.value]].map(s=>s.data.name),n=await m.fire({title:`What specific object categorized as ${ce[t.value].toLowerCase()} would you like to remove?`,input:"select",inputOptions:e,inputPlaceholder:"Select...",inputValidator:s=>s?"":"Please select which you'd like to get.",showCancelButton:!0});if(n=parseInt(n.value),!u.gameData[x[t.value]][n])return;let o=await E.fire("Amount","How many of the object would you like to remove?","question");if(!o.value)return;if(i.backpack.data[x[t.value]].findIndex(s=>s.ID===u.gameData[x[t.value]][n].ID)===-1){await m.fire("Item Does Not Exist",`You do not have any ${u.gameData[x[t.value]][n].name}.`,"error");return}let r=i.backpack.data[x[t.value]].findIndex(s=>s.ID===u.gameData[x[t.value]][n].ID);return i.backpack.data[x[t.value]][r].N-=parseInt(o.value),i.backpack.data[x[t.value]][r].N<=0&&i.backpack.data[x[t.value]].splice(r,1),U(),c.fire("Removed!",`Successfully removed ${o.value} ${u.gameData[x[t.value]][n].name}!`,"success")});new f(h.inventory,"Get All Gems","Adds one of each gem type to your backpack and saves.").setClick(async()=>([3,4,10,11,17].forEach(e=>{let n=i.backpack.data.key.find(o=>o.ID===e);n?n.N+=1:i.backpack.data.key.push({ID:e,N:1})}),i.appearance.updated=!0,i.updated=!0,i.saveEnabled=!0,typeof i.forceSaveCharacter=="function"&&i.forceSaveCharacter(),i.appearanceChanged=!0,i.backpack.updated=!0,c.fire("Done!","All gems added to your backpack.","success")));K();le();G();F();L();_e();var Gt=!0;new P(h.location,"WASD Movement","Allows you to walk through walls or on air with WASD movement in Prodigy.").setEnabled(async()=>(Gt=!0,c.fire("Enabled!","WASD Movement is now enabled.","success"))).setDisabled(async()=>(Gt=!1,c.fire("Disabled!","WASD Movement is now disabled.","success"))).status=!0;new f(h.location,"Edit walkspeed","Lets you set your walkspeed.").setClick(async()=>{let t=await te.fire("What do you want to set your walk speed to?");if(t.value){if(i._playerContainer)i._playerContainer.walkSpeed=parseFloat(t.value)||1.5;else{let e=setInterval(()=>{i._playerContainer&&(clearInterval(e),i._playerContainer.walkSpeed=parseFloat(t.value))},100)}return c.fire("Success!",`Successfully made walk speed ${parseFloat(t.value)||1.5}!`,"success")}});var ss=-1;new P(h.location,"Toggle Click Teleporting").setEnabled(async()=>(ss=setInterval(()=>{try{i._playerContainer.walkSpeed=500}catch{}},16),c.fire("Success!","Successfully enabled teleport click.","success"))).setDisabled(async()=>(clearInterval(ss),i._playerContainer.walkSpeed=1.5,c.fire("Success!","Successfully disabled teleport click.","success")));new f(h.location,"Teleport To Map (interactive)").setClick(async()=>{let t=m.mixin({focusConfirm:!1,showCancelButton:!0,preConfirm:()=>document.querySelector(".radioDiv[checked]")?.getAttribute("zone")}),e=document.createElement("div");e.classList.add("radioContainer");for(let d of Object.keys(fe.world.zones)){let p=document.createElement("DIV");p.classList.add("radioDiv"),p.setAttribute("zone",d);let k=zo[d];k?p.style.backgroundImage=`url(${k})`:p.innerText=d,p.onclick=()=>{document.querySelectorAll(".radioDiv[checked]").forEach(I=>I.removeAttribute("checked")),p.setAttribute("checked","")},e.append(p)}let n=await t.fire({title:"Teleport Zone",html:e,customClass:{popup:"radioSwal"}});if(!n.value)return;let o=Object.keys(fe.world.zones[n.value].maps),r=await m.fire({input:"select",inputOptions:new Map(o.map(d=>[d,d])),title:"Map",text:"Which map in the zone do you want to teleport to?"});if(!r.value)return;let s=(await E.fire("Please enter the x to teleport to. (Try 500?)")).value||500,l=(await E.fire("Please enter the y to teleport to. (Try 500?)")).value||500;return fe.world.zones[n.value].teleport(r.value,s,l,{},{}),c.fire("Teleported","You have been teleported!","success")});new f(h.location,"Teleport to house by userID").setClick(async()=>{let t=(await E.fire("Please enter the userID.")).value;if(t)return es(t),c.fire("Teleported!","You have been teleported!","success")});new f(h.location,"Get Map Location").setClick(async()=>{let t=i.data.zone;navigator.clipboard.writeText(t).then(async function(){return console.log("Async: Copying to clipboard was successful!"),m.fire({title:"Map Location",html:`You are at
    ${t} .
    You can save this to get to the same zone.

    Your location is has also been copied to your clipboard.`,icon:"info"})},async function(e){return console.error("Async: Could not copy text: ",e),m.fire({title:"Map Location",html:`You are at
    ${t} .
    You can save this to get to the same zone.`,icon:"info"})})});K();le();L();F();G();new P(h.minigames,"69x Walk Speed [Dyno Dig]","Walk so fast that you're teleporting, in Dyno Dig.").setEnabled(async()=>(u.instance.game.state.states.get("DinoDig").walkSpeed=69,c.fire("Enabled!","You will now walk so fast that you're teleporting in Dyno Dig.","success"))).setDisabled(async()=>(u.instance.game.state.states.get("DinoDig").walkSpeed=1.5,c.fire("Disabled!","You will now walk at normal speed, in Dyno Dig.","success")));new f(h.minigames,"Dino Dig +100 Days","Adds 100 days to the active Dino Dig timer.").setClick(async()=>{let t=u.instance.game.state.states.get("DinoDig");return t?.timer?.addTime?(t.timer.addTime(864e7),c.fire("Done!","Added 100 days to the Dino Dig timer.","success")):m.fire("Error","You are not currently in Dino Dig.","error")});new f(h.minigames,"End Dino Dig","Instantly ends the current Dino Dig session.").setClick(async()=>{let t=u.instance.game.state.states.get("DinoDig");return t?.timer?.addTime?(t.timer.addTime(-9e15),c.fire("Done!","Dino Dig session ended.","success")):m.fire("Error","You are not currently in Dino Dig.","error")});F();K();le();G();L();K();var Xn=document.createElement("button"),ut=null;function is(){ut||Rl()}function as(){ut&&(clearInterval(ut),ut=null),document.getElementById("fps-counter")?.remove()}function Rl(){Xn.id="fps-counter",Ut?.prepend(Xn),ut=setInterval(()=>{Xn.innerText=_.player.game.fps._framerate.toFixed(2)+" FPS"},300)}ct();new f(h.misc,"Skip Tutorial").setClick(async()=>{let t=(e,n,o,r)=>{u.instance.prodigy.world.getZone(e).testQuest(n,o,r);try{Object.fromEntries(u.instance.game.state.states).TileScreen.process()}catch{}};t("house",2),t("academy",2),i.state.set("tutorial-0",4),i.backpack.addKeyItem(13,0),i.tutorial.data.menus[14]=[1],u.instance.prodigy.open.map(!0,[]),i.onTutorialComplete(),i.data.level=Math.max(i.data.level,5)});new P(h.beta,"FPS Counter [BETA]","Shows you a framerate counter").setEnabled(async()=>{is()}).setDisabled(async()=>{as()});try{let t=null;new P(h.misc,"Unlimited Spins","Lets you spin the wheel as many times as you want!").setEnabled(async()=>(t=i.canSpin,i.canSpin=(()=>{}),c.fire("Enabled!","You can now spin the wheel as many times as you want!","success"))).setDisabled(async()=>(i.canSpin=t,c.fire("Disabled!","You can now spin the wheel only when allowed.","success")))}catch(t){console.error("Unlimited Spins ERROR: "+t)}new f(h.misc,"Reset Account","Completely resets your account.").setClick(async()=>{if((await T.fire("Are you sure you want to reset your account?","This action is not reversible.")).value)return i.resetAccount(),m.fire("Reset!","Your account has been reset. Reload Prodigy for the full effect.","success")});new f(h.misc,"[Fix] Fix Battle Crash").setClick(async()=>(i.kennel.petTeam.forEach(t=>{t&&t.assignRandomSpells&&t.assignRandomSpells()}),c.fire("Success!","Fixed kennel attack bug!","success")));new f(h.misc,"[Fix] Stuck in Unfinished Tower Fix","Takes you out of an unfinished tower if you're stuck in one.").setClick(async()=>(u.instance.prodigy.world.zones.house.teleport("exit"),c.fire("Success!","You've been teleported outside of your house.","success")));new P(h.misc,"Disable Monster Encounters").setEnabled(async()=>oe("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE",0)?c.fire("Enabled!","Monsters will no longer battle you.","success"):c.fire("Error","FlagProvider service not found.","error")).setDisabled(()=>(oe("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE",1),c.fire("Disabled!","Monsters will now battle you.","success")));new f(h.misc,"Bobbified","Turns you into Bobby Fancywoman (level 69, specific appearance).").setClick(async()=>{if((await T.fire("Are you sure?","You will be transformed into Bobby Fancywoman.")).value)return i.name.data.firstName=44,i.name.data.middleName=754,i.name.data.lastName=882,i.data.stars=-1e22,i.data.level=69,i.appearance.setEyeColor(1),i.appearance.setFace(4),i.appearance.setHair(19,1),i.appearance.setSkinColor(1),i.equipment.setFollow(19),i.equipment.setHat(19),i.equipment.setBoots(19),i.equipment.setOutfit(19),i.equipment.setWeapon(19),c.fire("Done!","You are now Bobby Fancywoman.","success")});var Cp=ht(us()),Ep=ht(hs()),xp=ht(fs());ct();_e();L();F();window.addEventListener("keydown",t=>{switch(t.key){case"`":u.instance.prodigy.open.menuCloseAll();break;case"\\":(async()=>{if(!(await T.fire("Kit","Would you like to equip Celestial Gear?")).value)return console.log("Cancelled");u.player.equipment.setHat(200),u.player.equipment.setBoots(93),u.player.equipment.setOutfit(161),u.player.equipment.setWeapon(196),u.player.appearanceChanged=!0,c.fire("Success!","You are now wearing Celestial Armor and wielding a Dual Blade.","success")})();break}});Gn();Un();F();L();L();async function ms(t){for(let e=0;e<100;e++)await new Promise(n=>setTimeout(n,2)),i._playerContainer.x-=t/100}async function ws(t){for(let e=0;e<100;e++)await new Promise(n=>setTimeout(n,2)),i._playerContainer.y-=t/100}window.addEventListener("keydown",t=>{if(Gt)switch(t.key){case"w":ws(40);break;case"s":ws(-40);break;case"a":ms(40);break;case"d":ms(-40);break}});})(); +Are you absolutely sure?`)).value)try{let o=await fetch(`https://api.prodigygame.com/game-api/v3/characters/${t}`,{headers:{"Content-Type":"application/json",Authorization:localStorage.JWT_TOKEN},body:JSON.stringify({data:JSON.stringify(n[t]),userID:i.userID}),method:"POST"});return o.ok?c.fire("Success!","Copied Account Successfully! Please reload.","success"):c.fire("Error",`Failed to copy account: ${o.status} ${o.statusText}`,"error")}catch(o){return c.fire("Error",`Network error while copying account: ${o instanceof Error?o.message:"Unknown error"}`,"error")}});new f(h.player,"Set Grade").setClick(async()=>{let t=await E.fire("What number do you want to set your grade to?");if(t.value)return i.grade=parseInt(t.value),c.fire("Success",`Successfully changed grade to ${t}!`,"success")})});var hs=dt((Xn,Jn)=>{"use strict";H();Y();ae();K();O();lt();new f(h.utility,"Close all popups","Closes all popups in Prodigy.").setClick(async()=>(u.instance.prodigy.open.menuCloseAll(),c.fire("Closed!","All open popups were closed.","success")));new f(h.utility,"Grab UserID of all players on screen","Shows you the UserID and name of every player currently shown on the screen.").setClick(async()=>{let t=tt.playerList;if(Object.keys(t).length===0)return c.fire("No players found.","There are no other players on the screen.","error");let e=document.createElement("ul");for(let[n,o]of Object.entries(t)){let r="Unknown";try{r=o.nameText.textSource.source}catch{}let s=document.createElement("li");s.textContent=`uID: ${n} - ${r}`,e.append(s)}return m.fire({title:"All players on the screen:",html:e,icon:"info"})});new f(h.utility,"Save Character Locally [Local]","Saves your character locally.").setClick(async()=>(localStorage.setItem("playerData",JSON.stringify(i.getUpdatedData(!0))),c.fire("Success!","Note: Load Character will only work on this device.","success")));new f(h.utility,"Load local character [Local]","Loads your character locally.").setClick(async()=>{if(localStorage.getItem("playerData")){let t=localStorage.getItem("playerData"),e=await fetch(`https://api.prodigygame.com/game-api/v3/characters/${i.userID}`,{headers:{accept:"*/*","accept-language":"en-US,en;q=0.9",authorization:localStorage.JWT_TOKEN,"content-type":"application/json"},referrer:"https://play.prodigygame.com/",referrerPolicy:"strict-origin-when-cross-origin",body:JSON.stringify({data:t,userID:i.userID}),method:"POST",mode:"cors"});return e.ok?c.fire("Success!","Character has been successfully loaded. Reload for the changes to take effect.","success"):c.fire("Request failed.",`An error occurred while loading the character. Error code: ${e.status}`,"error")}else return c.fire("Error","No saved character.","error")});new f(h.utility,"Save Character","Helps fix bugs where not all hacks save.").setClick(async()=>(z(),c.fire("Success!","Your character has been saved!","success")));new f(h.utility,"Update menu","Updates menu to the latest version without needing to reload.").setClick(async()=>(document.getElementById("origin-menu")?.remove(),document.getElementById("origin-toggler")?.remove(),(async()=>eval(await(await fetch(`https://raw.githubusercontent.com/ProdigyPXP/ProdigyOrigin/master/originGUI/dist/bundle.js?updated=${Date.now()}`)).text()))(),c.fire("Updated!","Mod menu was updated.","success")));new _(h.utility,"Enable menu resize","Allows you to resize the menu via dragging the bottom right corner.").setEnabled(async()=>(document.getElementById("origin-menu").style.resize="both",c.fire("Success!","Drag the bottom right corner of the menu to resize it.","success"))).setDisabled(()=>(document.getElementById("origin-menu").style.resize="none",c.fire("Success!","The menu position is now locked.","success")));new _(h.utility,"Pause Game").setEnabled(async()=>(u.network.game._paused=!0,c.fire("Success!","Successfully paused Prodigy.","success"))).setDisabled(async()=>(u.network.game._paused=!1,c.fire("Success!","Successfully resumed Prodigy.","success")));new f(h.utility,"Eval Console","Evaluate JavaScript code without opening F12").setClick(async()=>{if(!(await T.fire({title:"Important",html:"This hack is potentially dangerous, as it evaluates plain JavaScript code, with access to Prodigy's typings. Please do not paste code from random people on the internet here, that may be dangerous.

    Proceed?",icon:"warning"})).value)return console.log("Cancelled.");let code=await ee.fire("Code:","Enter the code you want to evaluate.");if(code.value){try{eval(code.value)}catch(t){if(t)return m.fire({title:"Error",html:`Oops! There was an error with the code!
     ${t} `,icon:"error"})}return c.fire("Evaluated!","Code was evaluated.","success")}});new f(h.utility,"Disable inactivity kick","Keeps you from being logged out for inactivity.").setClick(async()=>ne("GameConstants.Inactivity.LOG_OUT_TIMER_SECONDS",0)?c.fire("Success!","You now will never be logged out!","success"):c.fire("Error","FlagProvider service not found.","error"));new f(h.utility,"Save Inventory","Forces a server-side save of your inventory/backpack.").setClick(async()=>{try{return i.updated=!0,i.saveEnabled=!0,i.backpack&&(i.backpack.updated=!0),typeof i.save=="function"&&await i.save(),c.fire("Saved!","Inventory saved to server.","success")}catch(t){return m.fire("Error","Failed to save inventory: "+t,"error")}});new f(h.utility,"Save Pet Data","Forces a server-side save of your pet/kennel data.").setClick(async()=>(i.kennel.updated=!0,i.updated=!0,i.saveEnabled=!0,typeof i.forceSaveCharacter=="function"&&i.forceSaveCharacter(),c.fire("Saved!","Pet data saved to server.","success")))});Y();K();ae();H();Y();ae();K();O();lt();new _(h.battle,"Instant Kill [PvE]","Makes your spells do insane damage in PvE!").setEnabled(async()=>(i.modifiers.damage=D,c.fire("Enabled!","You will now do insane damage in PvE!","success"))).setDisabled(()=>(i.modifiers.damage=1,c.fire("Disabled!","You will no longer do insane damage in PvE!","success")));new f(h.battle,"PvP Health [PvP]","Increases your HP in PvP by a hell ton.").setClick(async()=>(i.pvpHP=D,i.getMaxHearts=()=>D,c.fire("Success!","You now have lots of health!","success")));new f(h.battle,"Set Battle Hearts [PvP, PvE]","Sets your hearts in battle, automatically raise your max hearts in PvP or PvE.").setClick(async()=>{let t=await E.fire("Health Amount","How much HP do you want?","question");if(t.value!==void 0)return i.getMaxHearts=()=>+t.value,i.pvpHP=+t.value,i.data.hp=+t.value,c.fire("Success!","Your hearts have been set.","success")});new f(h.battle,"Fill Battle Energy [PvP, PvE]","Fills up your battle energy, if you are in PvP or PvE.").setClick(async()=>{let t=At.state.getCurrentState();return"teams"in t?(t.teams[0].setEnergy(99),c.fire("Success!","Your battle energy has been filled.","success")):c.fire("Error","You are currently not in a battle.","error")});new _(h.battle,"Disable math [PvP, PvE]","Disable math in PvP, PvE, anywhere! This doesn't work in the Floatling town.").setEnabled(async()=>ne("GameConstants.Debug.EDUCATION_ENABLED",!1)?c.fire("Enabled!","You will no longer do Math!","success"):c.fire("Error","FlagProvider service not found.","error")).setDisabled(async()=>(ne("GameConstants.Debug.EDUCATION_ENABLED",!0),c.fire("Disabled!","You will now do Math!","success")));new _(h.battle,"Skip enemy turn").setEnabled(async()=>ne("GameConstants.Battle.SKIP_ENEMY_TURN",!0)?c.fire("Skipping!","Enemy turns will now be skipped.","success"):c.fire("Error","FlagProvider service not found.","error")).setDisabled(async()=>(ne("GameConstants.Battle.SKIP_ENEMY_TURN",!1),c.fire("Disabled","Enemy turns will no longer be skipped.","success")));new f(h.battle,"Escape Battle [PvP, PvE]","Escape any battle, PvP or PvE!").setClick(async()=>{let t=At.state.current;if(t==="PVP")return Object.fromEntries(u.instance.game.state.states).PVP.endPVP(),c.fire("Escaped!","You have successfully escaped from the PvP battle.","success");if(t==="CoOp")return u.instance.prodigy.world.$(i.data.zone),c.fire("Escaped!","You have successfully escaped from the battle.","success");if(t==="SecureBattleRevamp"){let e=u.instance?._game?._state?._current?._battleController;return!e||typeof e.attemptEscape!="function"?c.fire("Error","BattleController not available on current state.","error"):(await e.attemptEscape(),c.fire("Escaped!","You have successfully escaped from the PvE battle.","success"))}return["Battle","SecureBattle"].includes(t)?(Object.fromEntries(u.instance.game.state.states)[t].runAwayCallback(),c.fire("Escaped!","You have successfully escaped from the PvE battle.","success")):c.fire("Invalid State.","You are currently not in a battle.","error")});new f(h.battle,"Win Battle [PvE]","Instantly win the current PvE battle.").setClick(async()=>{if(At.state.current!=="SecureBattleRevamp")return c.fire("Invalid State.","You are currently not in a PvE battle.","error");let t=u.instance?.game?._state?._current?._battleController;return!t||typeof t.onVictory!="function"?c.fire("Error","BattleController not available on current state.","error"):(await t.onVictory(),c.fire("Victory!","You won the battle!","success"))});H();Y();K();O();function jn(){let t=u?.prodigy??u?.instance?.prodigy;return t?._currentBattlePass??t?._battlePass??null}new f(h.battlepass,"Treasure Free","Unlocks all free Battle Pass tier rewards.").setClick(async()=>{let t=jn();if(!t||typeof t!="object")return m.fire("Error","Battle Pass not found.","error");let e=t._tiers;return!e||typeof e!="object"?m.fire("Error","Tiers not found in battle pass.","error"):(Object.values(e).forEach(n=>{n&&(n.isCompleted=!0,n.freeReward&&(n.freeReward.claimed=!1,n.freeReward.claimable=!0))}),c.fire("Success!","Free tier rewards unlocked.","success"))});new f(h.battlepass,"Treasure Core","Unlocks all Core (bottom premium) Battle Pass tier rewards.").setClick(async()=>{let t=jn();if(!t||typeof t!="object")return m.fire("Error","Battle Pass not found.","error");let e=t._tiers;return!e||typeof e!="object"?m.fire("Error","Tiers not found in battle pass.","error"):(Object.values(e).forEach(n=>{n&&(n.isCompleted=!0,n.bottomPremiumReward&&(n.bottomPremiumReward.claimed=!1,n.bottomPremiumReward.claimable=!0))}),c.fire("Success!","Core tier rewards unlocked.","success"))});new f(h.battlepass,"Treasure Plus","Unlocks all Plus (top premium) Battle Pass tier rewards.").setClick(async()=>{let t=jn();if(!t||typeof t!="object")return m.fire("Error","Battle Pass not found.","error");let e=t._tiers;return!e||typeof e!="object"?m.fire("Error","Tiers not found in battle pass.","error"):(Object.values(e).forEach(n=>{n&&(n.isCompleted=!0,n.topPremiumReward&&(n.topPremiumReward.claimed=!1,n.topPremiumReward.claimable=!0))}),c.fire("Success!","Plus tier rewards unlocked.","success"))});var gp=pt(os());Y();K();H();O();Te();new f(h.inventory,"Item stacker").setClick(async()=>{let t=await E.fire("Amount","How many of every item would you like?","question");if(!t.value||!(await T.fire("Are you sure you want to get all items in the game?")).value)return;x.forEach(n=>{i.backpack.data[n]=J(u.gameData[n].filter(o=>n==="follow"?![125,126,127,128,129,134,135,136,137].includes(o.ID):o),t.value)}),u.gameData.dorm.forEach(n=>i.house.data.items[n.ID]={A:[],N:t.value});let e=()=>i.backpack.data.item.findIndex(n=>n.ID===84||n.ID===85||n.ID===86);for(;e()>-1;)i.backpack.data.item.splice(e(),1);return c.fire("Success!","All items added!","success")});new f(h.inventory,"Clear inventory").setClick(async()=>{(await T.fire("Are you sure you want to clear your inventory?")).value&&(Object.keys(i.backpack.data).forEach(t=>i.backpack.data[t]=[]),c.fire("Success!","Inventory cleared.","success"))});new f(h.inventory,"Selector (Basic)").setClick(async()=>{let t=await m.fire({title:"What would you like to obtain?",input:"select",inputOptions:le,inputPlaceholder:"Select...",inputValidator:e=>e?"":"Please select which you'd like to obtain.",showCancelButton:!0}).then(async e=>{let n=parseInt(e.value),o=le[n],r=x[n];if(!o)return;let s=await E.fire("Amount","How many each object would you like?","question");s.value&&(await T.fire(`Are you sure you want to get all ${o.toLowerCase()}?`)).value&&(i.backpack.data[r]=J(u.gameData[r].filter(l=>r==="follow"?![125,126,127,128,129,134,135,136,137].includes(l.ID):l),s.value),c.fire(`${o} Added!`,`All ${o.toLowerCase()} have been added to your inventory!`,"success"),z())})});new f(h.inventory,"Selector (Advanced)","Choose a specific object and quantity to obtain.").setClick(async()=>{let t=await m.fire({title:"What would you like to obtain?",input:"select",inputOptions:le,inputPlaceholder:"Select...",inputValidator:e=>e?"":"Please select which you'd like to obtain.",showCancelButton:!0}).then(async e=>{if(!u.gameData[x[e.value]])return;let n=[];u.gameData[x[e.value]].forEach(r=>{n.push(r.data.name)});let o=await m.fire({title:`What specific object categorized as ${le[e.value].toLowerCase()} would you like to get?`,input:"select",inputOptions:n,inputPlaceholder:"Select...",inputValidator:r=>r?"":"Please select which you'd like to get.",showCancelButton:!0}).then(async r=>{let s=parseInt(r.value);if(!u.gameData[x[e.value]][s])return;let l=await E.fire("Amount","How many of the object would you like?","question");if(!l.value)return;let d=i.backpack.data[x[e.value]].findIndex(p=>p.ID===u.gameData[x[e.value]][s].ID);return d===-1?i.backpack.data[x[e.value]].push({ID:u.gameData[x[e.value]][s].ID,N:l.value}):i.backpack.data[x[e.value]][d].N=l.value,console.log(u.gameData[x[e.value]][s].ID),z(),c.fire(`${le[e.value]} Added!`,`Your selected ${le[e.value].toLowerCase()} have been added.`,"success")})})});new f(h.inventory,"Obtain All Furniture").setClick(async()=>{let t=await E.fire("Amount","How many of each piece of furniture would you like?","question");if(t.value&&(await T.fire("Are you sure you want to get all furniture?")).value)return u.gameData.dorm.forEach(e=>i.house.data.items[e.ID]={A:[],N:t.value}),c.fire("Furniture Added!","All furniture has been added to your inventory!","success")});new f(h.inventory,"Obtain All Mounts","This gives you all of the mounts in the game.").setClick(async()=>(i.backpack.data.mount=J(u.gameData.mount,1),c.fire("Mounts Added!","All mounts have been added to your inventory!")));new f(h.inventory,"Remove item").setClick(async()=>{let t=await m.fire({title:"What category would you like to remove an item from?",input:"select",inputOptions:le,inputPlaceholder:"Select...",inputValidator:s=>s?"":"Please select which you'd like to obtain.",showCancelButton:!0});if(!u.gameData[x[t.value]])return;let e=u.gameData[x[t.value]].map(s=>s.data.name),n=await m.fire({title:`What specific object categorized as ${le[t.value].toLowerCase()} would you like to remove?`,input:"select",inputOptions:e,inputPlaceholder:"Select...",inputValidator:s=>s?"":"Please select which you'd like to get.",showCancelButton:!0});if(n=parseInt(n.value),!u.gameData[x[t.value]][n])return;let o=await E.fire("Amount","How many of the object would you like to remove?","question");if(!o.value)return;if(i.backpack.data[x[t.value]].findIndex(s=>s.ID===u.gameData[x[t.value]][n].ID)===-1){await m.fire("Item Does Not Exist",`You do not have any ${u.gameData[x[t.value]][n].name}.`,"error");return}let r=i.backpack.data[x[t.value]].findIndex(s=>s.ID===u.gameData[x[t.value]][n].ID);return i.backpack.data[x[t.value]][r].N-=parseInt(o.value),i.backpack.data[x[t.value]][r].N<=0&&i.backpack.data[x[t.value]].splice(r,1),z(),c.fire("Removed!",`Successfully removed ${o.value} ${u.gameData[x[t.value]][n].name}!`,"success")});new f(h.inventory,"Get All Gems","Adds one of each gem type to your backpack and saves.").setClick(async()=>([3,4,10,11,17].forEach(e=>{let n=i.backpack.data.key.find(o=>o.ID===e);n?n.N+=1:i.backpack.data.key.push({ID:e,N:1})}),i.appearance.updated=!0,i.updated=!0,i.saveEnabled=!0,typeof i.forceSaveCharacter=="function"&&i.forceSaveCharacter(),i.appearanceChanged=!0,i.backpack.updated=!0,c.fire("Done!","All gems added to your backpack.","success")));Y();ae();K();H();O();Te();var Kt=!0;new _(h.location,"WASD Movement","Allows you to walk through walls or on air with WASD movement in Prodigy.").setEnabled(async()=>(Kt=!0,c.fire("Enabled!","WASD Movement is now enabled.","success"))).setDisabled(async()=>(Kt=!1,c.fire("Disabled!","WASD Movement is now disabled.","success"))).status=!0;new f(h.location,"Edit walkspeed","Lets you set your walkspeed.").setClick(async()=>{let t=await ee.fire("What do you want to set your walk speed to?");if(t.value){if(i._playerContainer)i._playerContainer.walkSpeed=parseFloat(t.value)||1.5;else{let e=setInterval(()=>{i._playerContainer&&(clearInterval(e),i._playerContainer.walkSpeed=parseFloat(t.value))},100)}return c.fire("Success!",`Successfully made walk speed ${parseFloat(t.value)||1.5}!`,"success")}});var rs=-1;new _(h.location,"Toggle Click Teleporting").setEnabled(async()=>(rs=setInterval(()=>{try{i._playerContainer.walkSpeed=500}catch{}},16),c.fire("Success!","Successfully enabled teleport click.","success"))).setDisabled(async()=>(clearInterval(rs),i._playerContainer.walkSpeed=1.5,c.fire("Success!","Successfully disabled teleport click.","success")));new f(h.location,"Teleport To Map (interactive)").setClick(async()=>{let t=m.mixin({focusConfirm:!1,showCancelButton:!0,preConfirm:()=>document.querySelector(".radioDiv[checked]")?.getAttribute("zone")}),e=document.createElement("div");e.classList.add("radioContainer");for(let d of Object.keys(he.world.zones)){let p=document.createElement("DIV");p.classList.add("radioDiv"),p.setAttribute("zone",d);let k=Vo[d];k?p.style.backgroundImage=`url(${k})`:p.innerText=d,p.onclick=()=>{document.querySelectorAll(".radioDiv[checked]").forEach(P=>P.removeAttribute("checked")),p.setAttribute("checked","")},e.append(p)}let n=await t.fire({title:"Teleport Zone",html:e,customClass:{popup:"radioSwal"}});if(!n.value)return;let o=Object.keys(he.world.zones[n.value].maps),r=await m.fire({input:"select",inputOptions:new Map(o.map(d=>[d,d])),title:"Map",text:"Which map in the zone do you want to teleport to?"});if(!r.value)return;let s=(await E.fire("Please enter the x to teleport to. (Try 500?)")).value||500,l=(await E.fire("Please enter the y to teleport to. (Try 500?)")).value||500;return he.world.zones[n.value].teleport(r.value,s,l,{},{}),c.fire("Teleported","You have been teleported!","success")});new f(h.location,"Teleport to house by userID").setClick(async()=>{let t=(await E.fire("Please enter the userID.")).value;if(t)return Qr(t),c.fire("Teleported!","You have been teleported!","success")});new f(h.location,"Get Map Location").setClick(async()=>{let t=i.data.zone;navigator.clipboard.writeText(t).then(async function(){return console.log("Async: Copying to clipboard was successful!"),m.fire({title:"Map Location",html:`You are at
    ${t} .
    You can save this to get to the same zone.

    Your location is has also been copied to your clipboard.`,icon:"info"})},async function(e){return console.error("Async: Could not copy text: ",e),m.fire({title:"Map Location",html:`You are at
    ${t} .
    You can save this to get to the same zone.`,icon:"info"})})});Y();ae();O();H();K();new _(h.minigames,"69x Walk Speed [Dyno Dig]","Walk so fast that you're teleporting, in Dyno Dig.").setEnabled(async()=>(u.instance.game.state.states.get("DinoDig").walkSpeed=69,c.fire("Enabled!","You will now walk so fast that you're teleporting in Dyno Dig.","success"))).setDisabled(async()=>(u.instance.game.state.states.get("DinoDig").walkSpeed=1.5,c.fire("Disabled!","You will now walk at normal speed, in Dyno Dig.","success")));new f(h.minigames,"Dino Dig +100 Days","Adds 100 days to the active Dino Dig timer.").setClick(async()=>{let t=u.instance.game.state.states.get("DinoDig");return t?.timer?.addTime?(t.timer.addTime(864e7),c.fire("Done!","Added 100 days to the Dino Dig timer.","success")):m.fire("Error","You are not currently in Dino Dig.","error")});new f(h.minigames,"End Dino Dig","Instantly ends the current Dino Dig session.").setClick(async()=>{let t=u.instance.game.state.states.get("DinoDig");return t?.timer?.addTime?(t.timer.addTime(-9e15),c.fire("Done!","Dino Dig session ended.","success")):m.fire("Error","You are not currently in Dino Dig.","error")});H();Y();ae();K();O();Y();O();var Gn=document.createElement("button"),ct=null;function ss(){ct||Ll()}function is(){ct&&(clearInterval(ct),ct=null),document.getElementById("fps-counter")?.remove()}function Ll(){Gn.id="fps-counter",zt?.prepend(Gn),ct=setInterval(()=>{Gn.innerText=i.game.fps._framerate.toFixed(2)+" FPS"},300)}lt();new f(h.misc,"Skip Tutorial").setClick(async()=>{let t=(e,n,o,r)=>{u.instance.prodigy.world.getZone(e).testQuest(n,o,r);try{Object.fromEntries(u.instance.game.state.states).TileScreen.process()}catch{}};t("house",2),t("academy",2),i.state.set("tutorial-0",4),i.backpack.addKeyItem(13,0),i.tutorial.data.menus[14]=[1],u.instance.prodigy.open.map(!0,[]),i.onTutorialComplete(),i.data.level=Math.max(i.data.level,5)});new _(h.beta,"FPS Counter [BETA]","Shows you a framerate counter").setEnabled(async()=>{ss()}).setDisabled(async()=>{is()});try{let t=null;new _(h.misc,"Unlimited Spins","Lets you spin the wheel as many times as you want!").setEnabled(async()=>(t=i.canSpin,i.canSpin=(()=>{}),c.fire("Enabled!","You can now spin the wheel as many times as you want!","success"))).setDisabled(async()=>(i.canSpin=t,c.fire("Disabled!","You can now spin the wheel only when allowed.","success")))}catch(t){console.error("Unlimited Spins ERROR: "+t)}new f(h.misc,"Reset Account","Completely resets your account.").setClick(async()=>{if((await T.fire("Are you sure you want to reset your account?","This action is not reversible.")).value)return i.resetAccount(),m.fire("Reset!","Your account has been reset. Reload Prodigy for the full effect.","success")});new f(h.misc,"[Fix] Fix Battle Crash").setClick(async()=>(i.kennel.petTeam.forEach(t=>{t&&t.assignRandomSpells&&t.assignRandomSpells()}),c.fire("Success!","Fixed kennel attack bug!","success")));new f(h.misc,"[Fix] Stuck in Unfinished Tower Fix","Takes you out of an unfinished tower if you're stuck in one.").setClick(async()=>(u.instance.prodigy.world.zones.house.teleport("exit"),c.fire("Success!","You've been teleported outside of your house.","success")));new _(h.misc,"Disable Monster Encounters").setEnabled(async()=>ne("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE",0)?c.fire("Enabled!","Monsters will no longer battle you.","success"):c.fire("Error","FlagProvider service not found.","error")).setDisabled(()=>(ne("GameConstants.Debug.SCALE_ENCOUNTER_DISTANCE",1),c.fire("Disabled!","Monsters will now battle you.","success")));new f(h.misc,"Bobbified","Turns you into Bobby Fancywoman (level 69, specific appearance).").setClick(async()=>{if((await T.fire("Are you sure?","You will be transformed into Bobby Fancywoman.")).value)return i.name.data.firstName=44,i.name.data.middleName=754,i.name.data.lastName=882,i.data.stars=-1e22,i.data.level=69,i.appearance.setEyeColor(1),i.appearance.setFace(4),i.appearance.setHair(19,1),i.appearance.setSkinColor(1),i.equipment.setFollow(19),i.equipment.setHat(19),i.equipment.setBoots(19),i.equipment.setOutfit(19),i.equipment.setWeapon(19),c.fire("Done!","You are now Bobby Fancywoman.","success")});var Cp=pt(cs()),Ep=pt(ps()),xp=pt(hs());lt();Te();O();H();window.addEventListener("keydown",t=>{switch(t.key){case"`":u.instance.prodigy.open.menuCloseAll();break;case"\\":(async()=>{if(!(await T.fire("Kit","Would you like to equip Celestial Gear?")).value)return console.log("Cancelled");u.player.equipment.setHat(200),u.player.equipment.setBoots(93),u.player.equipment.setOutfit(161),u.player.equipment.setWeapon(196),u.player.appearanceChanged=!0,c.fire("Success!","You are now wearing Celestial Armor and wielding a Dual Blade.","success")})();break}});Kn();zn();H();O();O();async function fs(t){for(let e=0;e<100;e++)await new Promise(n=>setTimeout(n,2)),i._playerContainer.x-=t/100}async function ms(t){for(let e=0;e<100;e++)await new Promise(n=>setTimeout(n,2)),i._playerContainer.y-=t/100}window.addEventListener("keydown",t=>{if(Kt)switch(t.key){case"w":ms(40);break;case"s":ms(-40);break;case"a":fs(40);break;case"d":fs(-40);break}});})(); diff --git a/originGUI/src/hacks/player.ts b/originGUI/src/hacks/player.ts index b24e7cc..dcde22d 100644 --- a/originGUI/src/hacks/player.ts +++ b/originGUI/src/hacks/player.ts @@ -674,7 +674,7 @@ new Hack(category.player, "Copy Account", "Copy Account From userID").setClick(a // Only proceed with POST if confirmed try { - await fetch(`https://api.prodigygame.com/game-api/v3/characters/${userID}`, { + const resp = await fetch(`https://api.prodigygame.com/game-api/v3/characters/${userID}`, { headers: { "Content-Type": "application/json", Authorization: localStorage.JWT_TOKEN @@ -685,6 +685,9 @@ new Hack(category.player, "Copy Account", "Copy Account From userID").setClick(a }), method: "POST" }); + if (!resp.ok) { + return Toast.fire("Error", `Failed to copy account: ${resp.status} ${resp.statusText}`, "error"); + } return Toast.fire("Success!", "Copied Account Successfully! Please reload.", "success"); } catch (err) { return Toast.fire("Error", `Network error while copying account: ${err instanceof Error ? err.message : "Unknown error"}`, "error"); diff --git a/originGUI/src/utils/fps.ts b/originGUI/src/utils/fps.ts index e33631e..1e5a28c 100644 --- a/originGUI/src/utils/fps.ts +++ b/originGUI/src/utils/fps.ts @@ -1,4 +1,5 @@ import { wrapper } from "../index"; +import { player } from "./util"; const FPSc = document.createElement("button"); // Create menu toggler let fpsInterval: ReturnType | null = null; @@ -25,6 +26,6 @@ function activate () : void { fpsInterval = setInterval(() => { - FPSc.innerText = _.player.game.fps._framerate.toFixed(2) + " FPS"; + FPSc.innerText = player.game.fps._framerate.toFixed(2) + " FPS"; }, 300); -} \ No newline at end of file +}