From 3530337c0da5f9c6656e04a43196561c50de4cbf Mon Sep 17 00:00:00 2001 From: zakariabijoy Date: Mon, 27 Nov 2023 02:35:32 +0600 Subject: [PATCH] Identity Cookbook: fe latest prod build --- API/Controllers/AccountController.cs | 4 +- API/wwwroot/assets/index-4efe98f6.js | 143 +++++++++++++++++++++++++++ API/wwwroot/assets/index-51875c2d.js | 143 +++++++++++++++++++++++++++ API/wwwroot/assets/index-afd03f0f.js | 143 +++++++++++++++++++++++++++ API/wwwroot/assets/index-e8d2414a.js | 143 +++++++++++++++++++++++++++ API/wwwroot/index.html | 2 +- 6 files changed, 575 insertions(+), 3 deletions(-) create mode 100644 API/wwwroot/assets/index-4efe98f6.js create mode 100644 API/wwwroot/assets/index-51875c2d.js create mode 100644 API/wwwroot/assets/index-afd03f0f.js create mode 100644 API/wwwroot/assets/index-e8d2414a.js diff --git a/API/Controllers/AccountController.cs b/API/Controllers/AccountController.cs index 96582d8..b6fad17 100644 --- a/API/Controllers/AccountController.cs +++ b/API/Controllers/AccountController.cs @@ -67,7 +67,7 @@ public async Task> Login(LoginDto loginDto) [AllowAnonymous] [HttpPost("register")] - public async Task Register(RegisterDto registerDto) + public async Task Register(RegisterDto registerDto) { if(await _userManager.Users.AnyAsync(x => x.UserName == registerDto.Username)) { @@ -90,7 +90,7 @@ public async Task Register(RegisterDto registerDto) var result = await _userManager.CreateAsync(user, registerDto.Password); - if(!result.Succeeded) return BadRequest("Problem registerning user"); + if(!result.Succeeded) return BadRequest("Problem registering user"); var origin = Request.Headers["origin"]; var token = await _userManager.GenerateEmailConfirmationTokenAsync(user); diff --git a/API/wwwroot/assets/index-4efe98f6.js b/API/wwwroot/assets/index-4efe98f6.js new file mode 100644 index 0000000..7a99d7e --- /dev/null +++ b/API/wwwroot/assets/index-4efe98f6.js @@ -0,0 +1,143 @@ +var D2=Object.defineProperty;var P2=(e,t,r)=>t in e?D2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var k2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z=(e,t,r)=>(P2(e,typeof t!="symbol"?t+"":t,r),r);var Ple=k2((Nn,Rn)=>{function A2(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EP={exports:{}},Km={},SP={exports:{}},ze={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rp=Symbol.for("react.element"),N2=Symbol.for("react.portal"),R2=Symbol.for("react.fragment"),M2=Symbol.for("react.strict_mode"),I2=Symbol.for("react.profiler"),$2=Symbol.for("react.provider"),j2=Symbol.for("react.context"),L2=Symbol.for("react.forward_ref"),F2=Symbol.for("react.suspense"),U2=Symbol.for("react.memo"),B2=Symbol.for("react.lazy"),FS=Symbol.iterator;function z2(e){return e===null||typeof e!="object"?null:(e=FS&&e[FS]||e["@@iterator"],typeof e=="function"?e:null)}var xP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CP=Object.assign,OP={};function Ac(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}Ac.prototype.isReactComponent={};Ac.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ac.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function TP(){}TP.prototype=Ac.prototype;function U_(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}var B_=U_.prototype=new TP;B_.constructor=U_;CP(B_,Ac.prototype);B_.isPureReactComponent=!0;var US=Array.isArray,DP=Object.prototype.hasOwnProperty,z_={current:null},PP={key:!0,ref:!0,__self:!0,__source:!0};function kP(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)DP.call(t,n)&&!PP.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1>>1,we=H[_e];if(0>>1;_ea(Le,ce))Hea(lt,Le)?(H[_e]=lt,H[He]=ce,_e=He):(H[_e]=Le,H[ye]=ce,_e=ye);else if(Hea(lt,ce))H[_e]=lt,H[He]=ce,_e=He;else break e}}return ee}function a(H,ee){var ce=H.sortIndex-ee.sortIndex;return ce!==0?ce:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,h=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var ee=r(u);ee!==null;){if(ee.callback===null)n(u);else if(ee.startTime<=H)n(u),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=r(u)}}function w(H){if(v=!1,E(H),!h)if(r(l)!==null)h=!0,te(C);else{var ee=r(u);ee!==null&&ge(w,ee.startTime-H)}}function C(H,ee){h=!1,v&&(v=!1,m(D),D=-1),p=!0;var ce=d;try{for(E(ee),f=r(l);f!==null&&(!(f.expirationTime>ee)||H&&!j());){var _e=f.callback;if(typeof _e=="function"){f.callback=null,d=f.priorityLevel;var we=_e(f.expirationTime<=ee);ee=e.unstable_now(),typeof we=="function"?f.callback=we:f===r(l)&&n(l),E(ee)}else n(l);f=r(l)}if(f!==null)var rt=!0;else{var ye=r(u);ye!==null&&ge(w,ye.startTime-ee),rt=!1}return rt}finally{f=null,d=ce,p=!1}}var S=!1,O=null,D=-1,N=5,R=-1;function j(){return!(e.unstable_now()-RH||125_e?(H.sortIndex=ce,t(u,H),r(l)===null&&H===r(u)&&(v?(m(D),D=-1):v=!0,ge(w,ce-_e))):(H.sortIndex=we,t(l,H),h||p||(h=!0,te(C))),H},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(H){var ee=d;return function(){var ce=d;d=ee;try{return H.apply(this,arguments)}finally{d=ce}}}})(MP);RP.exports=MP;var eL=RP.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IP=x,$n=eL;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uw=Object.prototype.hasOwnProperty,tL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zS={},WS={};function rL(e){return uw.call(WS,e)?!0:uw.call(zS,e)?!1:tL.test(e)?WS[e]=!0:(zS[e]=!0,!1)}function nL(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aL(e,t,r,n){if(t===null||typeof t>"u"||nL(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vr[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vr[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vr[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vr[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vr[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vr[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vr[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vr[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vr[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var H_=/[\-:]([a-z])/g;function V_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Vr.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y_(e,t,r,n){var a=Vr.hasOwnProperty(t)?Vr[t]:null;(a!==null?a.type!==0:n||!(2s||a[o]!==i[s]){var l=` +`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{Wy=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Tf(e):""}function iL(e){switch(e.tag){case 5:return Tf(e.type);case 16:return Tf("Lazy");case 13:return Tf("Suspense");case 19:return Tf("SuspenseList");case 0:case 2:case 15:return e=Hy(e.type,!1),e;case 11:return e=Hy(e.type.render,!1),e;case 1:return e=Hy(e.type,!0),e;default:return""}}function pw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vl:return"Fragment";case Hl:return"Portal";case cw:return"Profiler";case G_:return"StrictMode";case fw:return"Suspense";case dw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case LP:return(e.displayName||"Context")+".Consumer";case jP:return(e._context.displayName||"Context")+".Provider";case K_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q_:return t=e.displayName||null,t!==null?t:pw(e.type)||"Memo";case po:t=e._payload,e=e._init;try{return pw(e(t))}catch{}}return null}function oL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pw(t);case 8:return t===G_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sL(e){var t=UP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _h(e){e._valueTracker||(e._valueTracker=sL(e))}function BP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=UP(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Av(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hw(e,t){var r=t.checked;return Kt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function VS(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=jo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zP(e,t){t=t.checked,t!=null&&Y_(e,"checked",t,!1)}function vw(e,t){zP(e,t);var r=jo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mw(e,t.type,r):t.hasOwnProperty("defaultValue")&&mw(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YS(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mw(e,t,r){(t!=="number"||Av(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Df=Array.isArray;function pu(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Eh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ud(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Lf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lL=["Webkit","ms","Moz","O"];Object.keys(Lf).forEach(function(e){lL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lf[t]=Lf[e]})});function YP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Lf.hasOwnProperty(e)&&Lf[e]?(""+t).trim():t+"px"}function GP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=YP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var uL=Kt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ww(e,t){if(t){if(uL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function bw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _w=null;function Q_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ew=null,hu=null,vu=null;function qS(e){if(e=$p(e)){if(typeof Ew!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Zm(t),Ew(e.stateNode,e.type,t))}}function KP(e){hu?vu?vu.push(e):vu=[e]:hu=e}function qP(){if(hu){var e=hu,t=vu;if(vu=hu=null,qS(e),t)for(e=0;e>>=0,e===0?32:31-(bL(e)/_L|0)|0}var Sh=64,xh=4194304;function Pf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Iv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=Pf(s):(i&=o,i!==0&&(n=Pf(i)))}else o=r&~a,o!==0?n=Pf(o):i!==0&&(n=Pf(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Mp(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ca(t),e[t]=r}function CL(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Uf),ax=String.fromCharCode(32),ix=!1;function vk(e,t){switch(e){case"keyup":return ZL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yl=!1;function tF(e,t){switch(e){case"compositionend":return mk(t);case"keypress":return t.which!==32?null:(ix=!0,ax);case"textInput":return e=t.data,e===ax&&ix?null:e;default:return null}}function rF(e,t){if(Yl)return e==="compositionend"||!a1&&vk(e,t)?(e=pk(),lv=t1=wo=null,Yl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ux(r)}}function bk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _k(){for(var e=window,t=Av();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Av(e.document)}return t}function i1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fF(e){var t=_k(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bk(r.ownerDocument.documentElement,r)){if(n!==null&&i1(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=cx(r,i);var o=cx(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Gl=null,Dw=null,zf=null,Pw=!1;function fx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Pw||Gl==null||Gl!==Av(n)||(n=Gl,"selectionStart"in n&&i1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zf&&vd(zf,n)||(zf=n,n=Lv(Dw,"onSelect"),0Ql||(e.current=Iw[Ql],Iw[Ql]=null,Ql--)}function St(e,t){Ql++,Iw[Ql]=e.current,e.current=t}var Lo={},Qr=is(Lo),gn=is(!1),Ys=Lo;function ku(e,t){var r=e.type.contextTypes;if(!r)return Lo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yn(e){return e=e.childContextTypes,e!=null}function Uv(){At(gn),At(Qr)}function yx(e,t,r){if(Qr.current!==Lo)throw Error(ne(168));St(Qr,t),St(gn,r)}function kk(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(ne(108,oL(e)||"Unknown",a));return Kt({},r,n)}function Bv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,Ys=Qr.current,St(Qr,e),St(gn,gn.current),!0}function wx(e,t,r){var n=e.stateNode;if(!n)throw Error(ne(169));r?(e=kk(e,t,Ys),n.__reactInternalMemoizedMergedChildContext=e,At(gn),At(Qr),St(Qr,e)):At(gn),St(gn,r)}var Si=null,eg=!1,a0=!1;function Ak(e){Si===null?Si=[e]:Si.push(e)}function SF(e){eg=!0,Ak(e)}function os(){if(!a0&&Si!==null){a0=!0;var e=0,t=ht;try{var r=Si;for(ht=1;e>=o,a-=o,Oi=1<<32-Ca(t)+a|r<D?(N=O,O=null):N=O.sibling;var R=d(m,O,E[D],w);if(R===null){O===null&&(O=N);break}e&&O&&R.alternate===null&&t(m,O),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R,O=N}if(D===E.length)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;DD?(N=O,O=null):N=O.sibling;var j=d(m,O,R.value,w);if(j===null){O===null&&(O=N);break}e&&O&&j.alternate===null&&t(m,O),g=i(j,g,D),S===null?C=j:S.sibling=j,S=j,O=N}if(R.done)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;!R.done;D++,R=E.next())R=f(m,R.value,w),R!==null&&(g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return $t&&ws(m,D),C}for(O=n(m,O);!R.done;D++,R=E.next())R=p(O,m,D,R.value,w),R!==null&&(e&&R.alternate!==null&&O.delete(R.key===null?D:R.key),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return e&&O.forEach(function(U){return t(m,U)}),$t&&ws(m,D),C}function y(m,g,E,w){if(typeof E=="object"&&E!==null&&E.type===Vl&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case bh:e:{for(var C=E.key,S=g;S!==null;){if(S.key===C){if(C=E.type,C===Vl){if(S.tag===7){r(m,S.sibling),g=a(S,E.props.children),g.return=m,m=g;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===po&&Ox(C)===S.type){r(m,S.sibling),g=a(S,E.props),g.ref=lf(m,S,E),g.return=m,m=g;break e}r(m,S);break}else t(m,S);S=S.sibling}E.type===Vl?(g=Rs(E.props.children,m.mode,w,E.key),g.return=m,m=g):(w=mv(E.type,E.key,E.props,null,m.mode,w),w.ref=lf(m,g,E),w.return=m,m=w)}return o(m);case Hl:e:{for(S=E.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===E.containerInfo&&g.stateNode.implementation===E.implementation){r(m,g.sibling),g=a(g,E.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=d0(E,m.mode,w),g.return=m,m=g}return o(m);case po:return S=E._init,y(m,g,S(E._payload),w)}if(Df(E))return h(m,g,E,w);if(rf(E))return v(m,g,E,w);Ah(m,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,g!==null&&g.tag===6?(r(m,g.sibling),g=a(g,E),g.return=m,m=g):(r(m,g),g=f0(E,m.mode,w),g.return=m,m=g),o(m)):r(m,g)}return y}var Nu=Fk(!0),Uk=Fk(!1),jp={},Za=is(jp),wd=is(jp),bd=is(jp);function Ds(e){if(e===jp)throw Error(ne(174));return e}function h1(e,t){switch(St(bd,t),St(wd,e),St(Za,jp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yw(t,e)}At(Za),St(Za,t)}function Ru(){At(Za),At(wd),At(bd)}function Bk(e){Ds(bd.current);var t=Ds(Za.current),r=yw(t,e.type);t!==r&&(St(wd,e),St(Za,r))}function v1(e){wd.current===e&&(At(Za),At(wd))}var Ht=is(0);function Gv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var i0=[];function m1(){for(var e=0;er?r:4,e(!0);var n=o0.transition;o0.transition={};try{e(!1),t()}finally{ht=r,o0.transition=n}}function nA(){return sa().memoizedState}function TF(e,t,r){var n=Ro(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},aA(e))iA(t,r);else if(r=Ik(e,t,r,n),r!==null){var a=nn();Oa(r,e,n,a),oA(r,t,n)}}function DF(e,t,r){var n=Ro(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(aA(e))iA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,Aa(s,o)){var l=t.interleaved;l===null?(a.next=a,d1(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=Ik(e,t,a,n),r!==null&&(a=nn(),Oa(r,e,n,a),oA(r,t,n))}}function aA(e){var t=e.alternate;return e===Gt||t!==null&&t===Gt}function iA(e,t){Wf=Kv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function oA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,J_(e,r)}}var qv={readContext:oa,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useInsertionEffect:Yr,useLayoutEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useDeferredValue:Yr,useTransition:Yr,useMutableSource:Yr,useSyncExternalStore:Yr,useId:Yr,unstable_isNewReconciler:!1},PF={readContext:oa,useCallback:function(e,t){return Ba().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:Dx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,dv(4194308,4,Jk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return dv(4194308,4,e,t)},useInsertionEffect:function(e,t){return dv(4,2,e,t)},useMemo:function(e,t){var r=Ba();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ba();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=TF.bind(null,Gt,e),[n.memoizedState,e]},useRef:function(e){var t=Ba();return e={current:e},t.memoizedState=e},useState:Tx,useDebugValue:_1,useDeferredValue:function(e){return Ba().memoizedState=e},useTransition:function(){var e=Tx(!1),t=e[0];return e=OF.bind(null,e[1]),Ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Gt,a=Ba();if($t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=t(),Pr===null)throw Error(ne(349));Ks&30||Hk(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,Dx(Yk.bind(null,n,i,e),[e]),n.flags|=2048,Sd(9,Vk.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ba(),t=Pr.identifierPrefix;if($t){var r=Ti,n=Oi;r=(n&~(1<<32-Ca(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=_d++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Wa]=t,e[yd]=n,vA(e,t,!1,!1),t.stateNode=e;e:{switch(o=bw(r,n),r){case"dialog":Dt("cancel",e),Dt("close",e),a=n;break;case"iframe":case"object":case"embed":Dt("load",e),a=n;break;case"video":case"audio":for(a=0;aIu&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304)}else{if(!n)if(e=Gv(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),uf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$t)return Gr(t),null}else 2*rr()-i.renderingStartTime>Iu&&r!==1073741824&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=rr(),t.sibling=null,r=Ht.current,St(Ht,n?r&1|2:r&1),t):(Gr(t),null);case 22:case 23:return T1(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dn&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function jF(e,t){switch(s1(t),t.tag){case 1:return yn(t.type)&&Uv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ru(),At(gn),At(Qr),m1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return v1(t),null;case 13:if(At(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Au()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(Ht),null;case 4:return Ru(),null;case 10:return f1(t.type._context),null;case 22:case 23:return T1(),null;case 24:return null;default:return null}}var Rh=!1,Kr=!1,LF=typeof WeakSet=="function"?WeakSet:Set,ve=null;function eu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qt(e,t,n)}else r.current=null}function Gw(e,t,r){try{r()}catch(n){Qt(e,t,n)}}var jx=!1;function FF(e,t){if(kw=$v,e=_k(),i1(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===a&&(s=o),d===i&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Aw={focusedElem:e,selectionRange:r},$v=!1,ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){t=ve;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,y=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:ma(t.type,v),y);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){Qt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}return h=jx,jx=!1,h}function Hf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Gw(t,r,i)}a=a.next}while(a!==n)}}function ng(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Kw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function yA(e){var t=e.alternate;t!==null&&(e.alternate=null,yA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wa],delete t[yd],delete t[Mw],delete t[_F],delete t[EF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wA(e){return e.tag===5||e.tag===3||e.tag===4}function Lx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Fv));else if(n!==4&&(e=e.child,e!==null))for(qw(e,t,r),e=e.sibling;e!==null;)qw(e,t,r),e=e.sibling}function Qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Qw(e,t,r),e=e.sibling;e!==null;)Qw(e,t,r),e=e.sibling}var Br=null,ga=!1;function lo(e,t,r){for(r=r.child;r!==null;)bA(e,t,r),r=r.sibling}function bA(e,t,r){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount(qm,r)}catch{}switch(r.tag){case 5:Kr||eu(r,t);case 6:var n=Br,a=ga;Br=null,lo(e,t,r),Br=n,ga=a,Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Br.removeChild(r.stateNode));break;case 18:Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?n0(e.parentNode,r):e.nodeType===1&&n0(e,r),pd(e)):n0(Br,r.stateNode));break;case 4:n=Br,a=ga,Br=r.stateNode.containerInfo,ga=!0,lo(e,t,r),Br=n,ga=a;break;case 0:case 11:case 14:case 15:if(!Kr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Gw(r,t,o),a=a.next}while(a!==n)}lo(e,t,r);break;case 1:if(!Kr&&(eu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Qt(r,t,s)}lo(e,t,r);break;case 21:lo(e,t,r);break;case 22:r.mode&1?(Kr=(n=Kr)||r.memoizedState!==null,lo(e,t,r),Kr=n):lo(e,t,r);break;default:lo(e,t,r)}}function Fx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new LF),t.forEach(function(n){var a=KF.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function pa(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=o),n&=~i}if(n=a,n=rr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BF(n/1960))-n,10e?16:e,bo===null)var n=!1;else{if(e=bo,bo=null,Jv=0,Ke&6)throw Error(ne(331));var a=Ke;for(Ke|=4,ve=e.current;ve!==null;){var i=ve,o=i.child;if(ve.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lrr()-C1?Ns(e,0):x1|=r),wn(e,t)}function DA(e,t){t===0&&(e.mode&1?(t=xh,xh<<=1,!(xh&130023424)&&(xh=4194304)):t=1);var r=nn();e=$i(e,t),e!==null&&(Mp(e,t,r),wn(e,r))}function GF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),DA(e,r)}function KF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(t),DA(e,r)}var PA;PA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)vn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return vn=!1,IF(e,t,r);vn=!!(e.flags&131072)}else vn=!1,$t&&t.flags&1048576&&Nk(t,Wv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;pv(e,t),e=t.pendingProps;var a=ku(t,Qr.current);gu(t,r),a=y1(null,t,n,e,a,r);var i=w1();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(i=!0,Bv(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,p1(t),a.updater=tg,t.stateNode=a,a._reactInternals=t,Uw(t,n,e,r),t=Ww(null,t,n,!0,i,r)):(t.tag=0,$t&&i&&o1(t),en(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(pv(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=QF(n),e=ma(n,e),a){case 0:t=zw(null,t,n,e,r);break e;case 1:t=Mx(null,t,n,e,r);break e;case 11:t=Nx(null,t,n,e,r);break e;case 14:t=Rx(null,t,n,ma(n.type,e),r);break e}throw Error(ne(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),zw(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Mx(e,t,n,a,r);case 3:e:{if(dA(t),e===null)throw Error(ne(387));n=t.pendingProps,i=t.memoizedState,a=i.element,$k(e,t),Yv(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Mu(Error(ne(423)),t),t=Ix(e,t,n,r,a);break e}else if(n!==a){a=Mu(Error(ne(424)),t),t=Ix(e,t,n,r,a);break e}else for(kn=ko(t.stateNode.containerInfo.firstChild),Mn=t,$t=!0,wa=null,r=Uk(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Au(),n===a){t=ji(e,t,r);break e}en(e,t,n,r)}t=t.child}return t;case 5:return Bk(t),e===null&&jw(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Nw(n,a)?o=null:i!==null&&Nw(n,i)&&(t.flags|=32),fA(e,t),en(e,t,o,r),t.child;case 6:return e===null&&jw(t),null;case 13:return pA(e,t,r);case 4:return h1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Nu(t,null,n,r):en(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Nx(e,t,n,a,r);case 7:return en(e,t,t.pendingProps,r),t.child;case 8:return en(e,t,t.pendingProps.children,r),t.child;case 12:return en(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,St(Hv,n._currentValue),n._currentValue=o,i!==null)if(Aa(i.value,o)){if(i.children===a.children&&!gn.current){t=ji(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Di(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Lw(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Lw(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}en(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,gu(t,r),a=oa(a),n=n(a),t.flags|=1,en(e,t,n,r),t.child;case 14:return n=t.type,a=ma(n,t.pendingProps),a=ma(n.type,a),Rx(e,t,n,a,r);case 15:return uA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),pv(e,t),t.tag=1,yn(n)?(e=!0,Bv(t)):e=!1,gu(t,r),Lk(t,n,a),Uw(t,n,a,r),Ww(null,t,n,!0,e,r);case 19:return hA(e,t,r);case 22:return cA(e,t,r)}throw Error(ne(156,t.tag))};function kA(e,t){return rk(e,t)}function qF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(e,t,r,n){return new qF(e,t,r,n)}function P1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QF(e){if(typeof e=="function")return P1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===K_)return 11;if(e===q_)return 14}return 2}function Mo(e,t){var r=e.alternate;return r===null?(r=Jn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function mv(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")P1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Vl:return Rs(r.children,a,i,t);case G_:o=8,a|=8;break;case cw:return e=Jn(12,r,t,a|2),e.elementType=cw,e.lanes=i,e;case fw:return e=Jn(13,r,t,a),e.elementType=fw,e.lanes=i,e;case dw:return e=Jn(19,r,t,a),e.elementType=dw,e.lanes=i,e;case FP:return ig(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jP:o=10;break e;case LP:o=9;break e;case K_:o=11;break e;case q_:o=14;break e;case po:o=16,n=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Jn(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Rs(e,t,r,n){return e=Jn(7,e,n,t),e.lanes=r,e}function ig(e,t,r,n){return e=Jn(22,e,n,t),e.elementType=FP,e.lanes=r,e.stateNode={isHidden:!1},e}function f0(e,t,r){return e=Jn(6,e,null,t),e.lanes=r,e}function d0(e,t,r){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XF(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yy(0),this.expirationTimes=Yy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yy(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function k1(e,t,r,n,a,i,o,s,l){return e=new XF(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},p1(i),e}function JF(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MA)}catch(e){console.error(e)}}MA(),NP.exports=Fn;var Fo=NP.exports;const nU=Xr(Fo);var Gx=Fo;lw.createRoot=Gx.createRoot,lw.hydrateRoot=Gx.hydrateRoot;function at(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cU(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fU(e){var t=cU(e,"string");return typeof t=="symbol"?t:String(t)}var Ga=Symbol("mobx-stored-annotations");function ti(e){function t(r,n){Up(r,n,e)}return Object.assign(t,e)}function Up(e,t,r){Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),bU(r)||(e[Ga][t]=r)}function dU(e){return Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),e[Ga]}var Pe=Symbol("mobx administration"),Bp=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.batchId_=void 0,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=tt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r,this.batchId_=ie.inBatch?ie.batchId:NaN}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return cN(this)},t.reportChanged=function(){(!ie.inBatch||this.batchId_!==ie.batchId)&&(ie.stateVersion=ie.stateVersionn&&(n=s.dependenciesState_)}for(r.length=a,e.newObserving_=null,i=t.length;i--;){var l=t[i];l.diffValue_===0&&lN(l,e),l.diffValue_=0}for(;a--;){var u=r[a];u.diffValue_===1&&(u.diffValue_=0,r3(u,e))}n!==tt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function ab(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)lN(t[r],e);e.dependenciesState_=tt.NOT_TRACKING_}function aN(e){var t=gl();try{return e()}finally{ki(t)}}function gl(){var e=ie.trackingDerivation;return ie.trackingDerivation=null,e}function ki(e){ie.trackingDerivation=e}function F1(e){var t=ie.allowStateReads;return ie.allowStateReads=e,t}function Gf(e){ie.allowStateReads=e}function iN(e){if(e.dependenciesState_!==tt.UP_TO_DATE_){e.dependenciesState_=tt.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=tt.UP_TO_DATE_}}var yv=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.batchId=Number.MIN_SAFE_INTEGER,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0,this.stateVersion=Number.MIN_SAFE_INTEGER},wv=!0,oN=!1,ie=function(){var e=M1();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(wv=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new yv().version&&(wv=!1),wv?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new yv):(setTimeout(function(){oN||at(35)},1),new yv)}();function t3(){if((ie.pendingReactions.length||ie.inBatch||ie.isRunningReactions)&&at(36),oN=!0,wv){var e=M1();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),ie=new yv}}function sN(){return ie}function r3(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lN(e,t){e.observers_.delete(t),e.observers_.size===0&&uN(e)}function uN(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,ie.pendingUnobservations.push(e))}function Zn(){ie.inBatch===0&&(ie.batchId=ie.batchId0&&uN(e),!1)}function fN(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=tt.STALE_}))}function n3(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.POSSIBLY_STALE_?t.dependenciesState_=tt.STALE_:t.dependenciesState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.UP_TO_DATE_)}))}function a3(e){e.lowestObserverState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&(t.dependenciesState_=tt.POSSIBLY_STALE_,t.onBecomeStale_())}))}var Od=function(){function e(r,n,a,i){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=tt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=nm.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ie.pendingReactions.push(this),dN())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){Zn(),this.isScheduled_=!1;var n=ie.trackingContext;if(ie.trackingContext=this,nb(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}ie.trackingContext=n,ea()}},t.track=function(n){if(!this.isDisposed_){Zn(),this.isRunning_=!0;var a=ie.trackingContext;ie.trackingContext=this;var i=nN(this,n,void 0);ie.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&ab(this),gv(i)&&this.reportExceptionInDerivation_(i.cause),ea()}},t.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(ie.disableErrorBoundaries)throw n;var i="[mobx] uncaught error in '"+this+"'";ie.suppressReactionErrors||console.error(i,n),ie.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(Zn(),ab(this),ea()))},t.getDisposer_=function(n){var a=this,i=function o(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[Pe]=this,i},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}(),i3=100,ib=function(t){return t()};function dN(){ie.inBatch>0||ie.isRunningReactions||ib(o3)}function o3(){ie.isRunningReactions=!0;for(var e=ie.pendingReactions,t=0;e.length>0;){++t===i3&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,a=r.length;n0&&(t.dependencies=S3(e.observing_).map(SN)),t}function S3(e){return Array.from(new Set(e))}var x3=0;function xN(){this.message="FLOW_CANCELLED"}xN.prototype=Object.create(Error.prototype);var Zx=VA("flow"),C3=VA("flow.bound",{bound:!0}),Dd=Object.assign(function(t,r){if(Xs(r))return Up(t,r,Zx);var n=t,a=n.name||"",i=function(){var s=this,l=arguments,u=++x3,c=Ps(a+" - runid: "+u+" - init",n).apply(s,l),f,d=void 0,p=new Promise(function(h,v){var y=0;f=v;function m(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.next).call(c,w)}catch(S){return v(S)}E(C)}function g(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.throw).call(c,w)}catch(S){return v(S)}E(C)}function E(w){if(Na(w==null?void 0:w.then)){w.then(E,v);return}return w.done?h(w.value):(d=Promise.resolve(w.value),d.then(m,g))}m(void 0)});return p.cancel=Ps(a+" - runid: "+u+" - cancel",function(){try{d&&eC(d);var h=c.return(void 0),v=Promise.resolve(h.value);v.then(ru,ru),eC(v),f(new xN)}catch(y){f(y)}}),p};return i.isMobXFlow=!0,i},Zx);Dd.bound=ti(C3);function eC(e){Na(e.cancel)&&e.cancel()}function om(e){return(e==null?void 0:e.isMobXFlow)===!0}function O3(e,t){return e?t!==void 0?Pd(e)?e[Pe].values_.has(t):!1:Pd(e)||!!e[Pe]||j1(e)||im(e)||gg(e):!1}function CN(e){return O3(e)}function xi(e,t){t===void 0&&(t=void 0),Zn();try{return e.apply(t)}finally{ea()}}function Ml(e){return e[Pe]}var T3={has:function(t,r){return Ml(t).has_(r)},get:function(t,r){return Ml(t).get_(r)},set:function(t,r,n){var a;return Xs(r)?(a=Ml(t).set_(r,n,!0))!=null?a:!0:!1},deleteProperty:function(t,r){var n;return Xs(r)?(n=Ml(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var a;return(a=Ml(t).defineProperty_(r,n))!=null?a:!0},ownKeys:function(t){return Ml(t).ownKeys_()},preventExtensions:function(t){at(13)}};function D3(e,t){var r,n;return $A(),e=Vp(e,t),(n=(r=e[Pe]).proxy_)!=null?n:r.proxy_=new Proxy(e,T3)}function Qn(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Wp(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Xn(e,t){var r=gl();try{for(var n=[].concat(e.interceptors_||[]),a=0,i=n.length;a0}function Hp(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Da(e,t){var r=gl(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,i=n.length;a0?n.map(this.dehancer):n},t.intercept_=function(n){return Wp(this,n)},t.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Hp(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&at("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var i=new Array(n-a),o=0;o0&&$N(n+a+1)},t.spliceWithArray_=function(n,a,i){var o=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?a=s-n:a==null?a=0:a=Math.max(0,Math.min(a,s-n)),i===void 0&&(i=tb),Qn(this)){var l=Xn(this,{object:this.proxy_,type:tC,index:n,removedCount:a,added:i});if(!l)return tb;a=l.removedCount,i=l.added}if(i=i.length===0?i:i.map(function(f){return o.enhancer_(f,void 0)}),this.legacyMode_){var u=i.length-a;this.updateArrayLength_(s,u)}var c=this.spliceItemsIntoValues_(n,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(n,i,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(n,a,i){if(i.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,a){var i=this.values_;if(this.legacyMode_&&n>i.length&&at(17,n,i.length),n2?n-2:0),i=2;i-1?(this.splice(n,1),!0):!1}};br("concat",Ji);br("flat",Ji);br("includes",Ji);br("indexOf",Ji);br("join",Ji);br("lastIndexOf",Ji);br("slice",Ji);br("toString",Ji);br("toLocaleString",Ji);br("every",ss);br("filter",ss);br("find",ss);br("findIndex",ss);br("flatMap",ss);br("forEach",ss);br("map",ss);br("some",ss);br("reduce",ON);br("reduceRight",ON);function br(e,t){typeof Array.prototype[e]=="function"&&(sm[e]=t(e))}function Ji(e){return function(){var t=this[Pe];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function ss(e){return function(t,r){var n=this,a=this[Pe];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,s){return t.call(r,o,s,n)})}}function ON(e){return function(){var t=this,r=this[Pe];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(i,o,s){return a(i,o,s,t)},n[e].apply(n,arguments)}}var R3=ml("ObservableArrayAdministration",z1);function yg(e){return fg(e)&&R3(e[Pe])}var TN,DN,M3={},_o="add",lm="delete";TN=Symbol.iterator;DN=Symbol.toStringTag;var PN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Pe]=M3,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=a,Na(Map)||at(18),ls(function(){i.keysAtom_=WA("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,r&&i.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var a=this;if(!ie.trackingDerivation)return this.has_(n);var i=this.hasMap_.get(n);if(!i){var o=i=new wu(this.has_(n),dg,"ObservableMap.key?",!1);this.hasMap_.set(n,o),bN(o,function(){return a.hasMap_.delete(n)})}return i.get()},t.set=function(n,a){var i=this.has_(n);if(Qn(this)){var o=Xn(this,{type:i?ri:_o,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return i?this.updateValue_(n,a):this.addValue_(n,a),this},t.delete=function(n){var a=this;if(this.keysAtom_,Qn(this)){var i=Xn(this,{type:lm,object:this,name:n});if(!i)return!1}if(this.has_(n)){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:lm,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return xi(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(n))==null||u.setNewValue_(!1);var c=a.data_.get(n);c.setNewValue_(void 0),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.updateValue_=function(n,a){var i=this.data_.get(n);if(a=i.prepareNewValue_(a),a!==ie.UNCHANGED){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:ri,object:this,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),s&&Da(this,l)}},t.addValue_=function(n,a){var i=this;this.keysAtom_,xi(function(){var u,c=new wu(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(n,c),a=c.value_,(u=i.hasMap_.get(n))==null||u.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:_o,object:this,name:n,newValue:a}:null;s&&Da(this,l)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:n.get(l)}}})},t.entries=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:[l,n.get(l)]}}})},t[TN]=function(){return this.entries()},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value,l=s[0],u=s[1];n.call(a,u,l,this)}},t.merge=function(n){var a=this;return yl(n)&&(n=new Map(n)),xi(function(){Li(n)?sU(n).forEach(function(i){return a.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var o=i[0],s=i[1];return a.set(o,s)}):Mc(n)?(n.constructor!==Map&&at(19,n),n.forEach(function(i,o){return a.set(o,i)})):n!=null&&at(20,n)}),this},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.keys()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.replace=function(n){var a=this;return xi(function(){for(var i=I3(n),o=new Map,s=!1,l=nu(a.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!i.has(c)){var f=a.delete(c);if(f)s=!0;else{var d=a.data_.get(c);o.set(c,d)}}}for(var p=nu(i.entries()),h;!(h=p()).done;){var v=h.value,y=v[0],m=v[1],g=a.data_.has(y);if(a.set(y,m),a.data_.has(y)){var E=a.data_.get(y);o.set(y,E),g||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var w=a.data_.keys(),C=o.keys(),S=w.next(),O=C.next();!S.done;){if(S.value!==O.value){a.keysAtom_.reportChanged();break}S=w.next(),O=C.next()}a.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,a){return Hp(this,n)},t.intercept_=function(n){return Wp(this,n)},$1(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:DN,get:function(){return"Map"}}]),e}(),yl=ml("ObservableMap",PN);function I3(e){if(Mc(e)||yl(e))return e;if(Array.isArray(e))return new Map(e);if(Li(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return at(21,e)}var kN,AN,$3={};kN=Symbol.iterator;AN=Symbol.toStringTag;var NN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[Pe]=$3,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Na(Set)||at(22),this.enhancer_=function(o,s){return n(o,s,a)},ls(function(){i.atom_=WA(i.name_),r&&i.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.data_.values()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value;n.call(a,s,s,this)}},t.add=function(n){var a=this;if(this.atom_,Qn(this)){var i=Xn(this,{type:_o,object:this,newValue:n});if(!i)return this}if(!this.has(n)){xi(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:_o,object:this,newValue:n}:null;s&&Da(this,l)}return this},t.delete=function(n){var a=this;if(Qn(this)){var i=Xn(this,{type:lm,object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:lm,object:this,oldValue:n}:null;return xi(function(){a.atom_.reportChanged(),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,a=Array.from(this.keys()),i=Array.from(this.values());return kd({next:function(){var s=n;return n+=1,sv0){for(var t=v0;t=0&&r++;break}e=sC(e),t=sC(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Na(l)&&l instanceof l&&Na(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],a=a||[];for(var c=n.length;c--;)if(n[c]===e)return a[c]===t;if(n.push(e),a.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!sb(e[c],t[c],r-1,n,a))return!1}else{var f=Object.keys(e),d;if(c=f.length,Object.keys(t).length!==c)return!1;for(;c--;)if(d=f[c],!(Pi(t,d)&&sb(e[d],t[d],r-1,n,a)))return!1}return n.pop(),a.pop(),!0}function sC(e){return yg(e)?e.slice():Mc(e)||yl(e)||Fp(e)||$c(e)?Array.from(e.entries()):e}function kd(e){return e[Symbol.iterator]=W3,e}function W3(){return this}["Symbol","Map","Set"].forEach(function(e){var t=M1();typeof t[e]>"u"&&at("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:l3,extras:{getDebugName:ob},$mobx:Pe});class H3{constructor(t){Z(this,"id");Z(this,"title");Z(this,"date");Z(this,"description");Z(this,"category");Z(this,"city");Z(this,"venue");Z(this,"hostUsername","");Z(this,"isCancelled",!1);Z(this,"isGoing",!1);Z(this,"isHost",!1);Z(this,"host");Z(this,"attendees",[]);this.id=t==null?void 0:t.id,this.title=t==null?void 0:t.title,this.date=t==null?void 0:t.date,this.description=t==null?void 0:t.description,this.category=t==null?void 0:t.category,this.venue=t==null?void 0:t.venue,this.city=t==null?void 0:t.city}}class lC{constructor(t){Z(this,"id");Z(this,"title","");Z(this,"date",null);Z(this,"description","");Z(this,"category","");Z(this,"city","");Z(this,"venue","");t&&(this.id=t.id,this.title=t.title,this.category=t.category,this.description=t.description,this.date=t.date,this.city=t.city,this.venue=t.venue)}}function LN(e,t){return function(){return e.apply(t,arguments)}}const{toString:V3}=Object.prototype,{getPrototypeOf:V1}=Object,wg=(e=>t=>{const r=V3.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>wg(t)===e),bg=e=>t=>typeof t===e,{isArray:jc}=Array,Ad=bg("undefined");function Y3(e){return e!==null&&!Ad(e)&&e.constructor!==null&&!Ad(e.constructor)&&aa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const FN=di("ArrayBuffer");function G3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FN(e.buffer),t}const K3=bg("string"),aa=bg("function"),UN=bg("number"),_g=e=>e!==null&&typeof e=="object",q3=e=>e===!0||e===!1,bv=e=>{if(wg(e)!=="object")return!1;const t=V1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Q3=di("Date"),X3=di("File"),J3=di("Blob"),Z3=di("FileList"),eB=e=>_g(e)&&aa(e.pipe),tB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||aa(e.append)&&((t=wg(e))==="formdata"||t==="object"&&aa(e.toString)&&e.toString()==="[object FormData]"))},rB=di("URLSearchParams"),nB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yp(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),jc(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}const zN=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WN=e=>!Ad(e)&&e!==zN;function lb(){const{caseless:e}=WN(this)&&this||{},t={},r=(n,a)=>{const i=e&&BN(t,a)||a;bv(t[i])&&bv(n)?t[i]=lb(t[i],n):bv(n)?t[i]=lb({},n):jc(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(Yp(t,(a,i)=>{r&&aa(a)?e[i]=LN(a,r):e[i]=a},{allOwnKeys:n}),e),iB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oB=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},sB=(e,t,r,n)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&V1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lB=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},uB=e=>{if(!e)return null;if(jc(e))return e;let t=e.length;if(!UN(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&V1(Uint8Array)),fB=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},dB=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pB=di("HTMLFormElement"),hB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),uC=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),vB=di("RegExp"),HN=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yp(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},mB=e=>{HN(e,(t,r)=>{if(aa(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(aa(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},gB=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return jc(e)?n(e):n(String(e).split(t)),r},yB=()=>{},wB=(e,t)=>(e=+e,Number.isFinite(e)?e:t),m0="abcdefghijklmnopqrstuvwxyz",cC="0123456789",VN={DIGIT:cC,ALPHA:m0,ALPHA_DIGIT:m0+m0.toUpperCase()+cC},bB=(e=16,t=VN.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function _B(e){return!!(e&&aa(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const EB=e=>{const t=new Array(10),r=(n,a)=>{if(_g(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=jc(n)?[]:{};return Yp(n,(o,s)=>{const l=r(o,a+1);!Ad(l)&&(i[s]=l)}),t[a]=void 0,i}}return n};return r(e,0)},SB=di("AsyncFunction"),xB=e=>e&&(_g(e)||aa(e))&&aa(e.then)&&aa(e.catch),W={isArray:jc,isArrayBuffer:FN,isBuffer:Y3,isFormData:tB,isArrayBufferView:G3,isString:K3,isNumber:UN,isBoolean:q3,isObject:_g,isPlainObject:bv,isUndefined:Ad,isDate:Q3,isFile:X3,isBlob:J3,isRegExp:vB,isFunction:aa,isStream:eB,isURLSearchParams:rB,isTypedArray:cB,isFileList:Z3,forEach:Yp,merge:lb,extend:aB,trim:nB,stripBOM:iB,inherits:oB,toFlatObject:sB,kindOf:wg,kindOfTest:di,endsWith:lB,toArray:uB,forEachEntry:fB,matchAll:dB,isHTMLForm:pB,hasOwnProperty:uC,hasOwnProp:uC,reduceDescriptors:HN,freezeMethods:mB,toObjectSet:gB,toCamelCase:hB,noop:yB,toFiniteNumber:wB,findKey:BN,global:zN,isContextDefined:WN,ALPHABET:VN,generateString:bB,isSpecCompliantForm:_B,toJSONObject:EB,isAsyncFn:SB,isThenable:xB};function Ye(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}W.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const YN=Ye.prototype,GN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GN[e]={value:e}});Object.defineProperties(Ye,GN);Object.defineProperty(YN,"isAxiosError",{value:!0});Ye.from=(e,t,r,n,a,i)=>{const o=Object.create(YN);return W.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ye.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const CB=null;function ub(e){return W.isPlainObject(e)||W.isArray(e)}function KN(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function fC(e,t,r){return e?e.concat(t).map(function(a,i){return a=KN(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function OB(e){return W.isArray(e)&&!e.some(ub)}const TB=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Eg(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!W.isUndefined(y[v])});const n=r.metaTokens,a=r.visitor||c,i=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(a))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(W.isDate(h))return h.toISOString();if(!l&&W.isBlob(h))throw new Ye("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(h)||W.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,y){let m=h;if(h&&!y&&typeof h=="object"){if(W.endsWith(v,"{}"))v=n?v:v.slice(0,-2),h=JSON.stringify(h);else if(W.isArray(h)&&OB(h)||(W.isFileList(h)||W.endsWith(v,"[]"))&&(m=W.toArray(h)))return v=KN(v),m.forEach(function(E,w){!(W.isUndefined(E)||E===null)&&t.append(o===!0?fC([v],w,i):o===null?v:v+"[]",u(E))}),!1}return ub(h)?!0:(t.append(fC(y,v,i),u(h)),!1)}const f=[],d=Object.assign(TB,{defaultVisitor:c,convertValue:u,isVisitable:ub});function p(h,v){if(!W.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),W.forEach(h,function(m,g){(!(W.isUndefined(m)||m===null)&&a.call(t,m,W.isString(g)?g.trim():g,v,d))===!0&&p(m,v?v.concat(g):[g])}),f.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return p(e),t}function dC(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Y1(e,t){this._pairs=[],e&&Eg(e,this,t)}const qN=Y1.prototype;qN.append=function(t,r){this._pairs.push([t,r])};qN.toString=function(t){const r=t?function(n){return t.call(this,n,dC)}:dC;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function DB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QN(e,t,r){if(!t)return e;const n=r&&r.encode||DB,a=r&&r.serialize;let i;if(a?i=a(t,r):i=W.isURLSearchParams(t)?t.toString():new Y1(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class PB{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(n){n!==null&&t(n)})}}const pC=PB,XN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kB=typeof URLSearchParams<"u"?URLSearchParams:Y1,AB=typeof FormData<"u"?FormData:null,NB=typeof Blob<"u"?Blob:null,RB={isBrowser:!0,classes:{URLSearchParams:kB,FormData:AB,Blob:NB},protocols:["http","https","file","blob","url","data"]},JN=typeof window<"u"&&typeof document<"u",MB=(e=>JN&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),IB=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$B=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:JN,hasStandardBrowserEnv:MB,hasStandardBrowserWebWorkerEnv:IB},Symbol.toStringTag,{value:"Module"})),Ka={...$B,...RB};function jB(e,t){return Eg(e,new Ka.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Ka.isNode&&W.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function LB(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function FB(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n=r.length;return o=!o&&W.isArray(a)?a.length:o,l?(W.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!W.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&W.isArray(a[o])&&(a[o]=FB(a[o])),!s)}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(n,a)=>{t(LB(n),a,r,0)}),r}return null}function UB(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const G1={transitional:XN,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return a&&a?JSON.stringify(ZN(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jB(t,this.formSerializer).toString();if((s=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Eg(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),UB(t)):t}],transformResponse:[function(t){const r=this.transitional||G1.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&W.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ye.from(s,Ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ka.classes.FormData,Blob:Ka.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{G1.headers[e]={}});const K1=G1,BB=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zB=e=>{const t={};let r,n,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&BB[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},hC=Symbol("internals");function ff(e){return e&&String(e).trim().toLowerCase()}function _v(e){return e===!1||e==null?e:W.isArray(e)?e.map(_v):String(e)}function WB(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const HB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function g0(e,t,r,n,a){if(W.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!W.isString(t)){if(W.isString(n))return t.indexOf(n)!==-1;if(W.isRegExp(n))return n.test(t)}}function VB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function YB(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class Sg{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(s,l,u){const c=ff(l);if(!c)throw new Error("header name must be a non-empty string");const f=W.findKey(a,c);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||l]=_v(s))}const o=(s,l)=>W.forEach(s,(u,c)=>i(u,c,l));return W.isPlainObject(t)||t instanceof this.constructor?o(t,r):W.isString(t)&&(t=t.trim())&&!HB(t)?o(zB(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=ff(t),t){const n=W.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return WB(a);if(W.isFunction(r))return r.call(this,a,n);if(W.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ff(t),t){const n=W.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||g0(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=ff(o),o){const s=W.findKey(n,o);s&&(!r||g0(n,n[s],s,r))&&(delete n[s],a=!0)}}return W.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||g0(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return W.forEach(this,(a,i)=>{const o=W.findKey(n,i);if(o){r[o]=_v(a),delete r[i];return}const s=t?VB(i):String(i).trim();s!==i&&delete r[i],r[s]=_v(a),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return W.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&W.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[hC]=this[hC]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=ff(o);n[s]||(YB(a,o),n[s]=!0)}return W.isArray(t)?t.forEach(i):i(t),this}}Sg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(Sg.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});W.freezeMethods(Sg);const Ai=Sg;function y0(e,t){const r=this||K1,n=t||r,a=Ai.from(n.headers);let i=n.data;return W.forEach(e,function(s){i=s.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function eR(e){return!!(e&&e.__CANCEL__)}function Gp(e,t,r){Ye.call(this,e??"canceled",Ye.ERR_CANCELED,t,r),this.name="CanceledError"}W.inherits(Gp,Ye,{__CANCEL__:!0});function GB(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ye("Request failed with status code "+r.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const KB=Ka.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const o=[e+"="+encodeURIComponent(t)];W.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),W.isString(n)&&o.push("path="+n),W.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QB(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function tR(e,t){return e&&!qB(t)?QB(e,t):t}const XB=Ka.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const s=W.isString(o)?a(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function JB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ZB(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];o||(o=u),r[a]=l,n[a]=u;let f=i,d=0;for(;f!==a;)d+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o{const i=a.loaded,o=a.lengthComputable?a.total:void 0,s=i-r,l=n(s),u=i<=o;r=i;const c={loaded:i,total:o,progress:o?i/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const ez=typeof XMLHttpRequest<"u",tz=ez&&function(e){return new Promise(function(r,n){let a=e.data;const i=Ai.from(e.headers).normalize();let{responseType:o,withXSRFToken:s}=e,l;function u(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let c;if(W.isFormData(a)){if(Ka.hasStandardBrowserEnv||Ka.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[v,...y]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([v||"multipart/form-data",...y].join("; "))}}let f=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(v+":"+y))}const d=tR(e.baseURL,e.url);f.open(e.method.toUpperCase(),QN(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function p(){if(!f)return;const v=Ai.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:e,request:f};GB(function(E){r(E),u()},function(E){n(E),u()},m),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new Ye("Request aborted",Ye.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Ye("Network Error",Ye.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||XN;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(new Ye(y,m.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,e,f)),f=null},Ka.hasStandardBrowserEnv&&(s&&W.isFunction(s)&&(s=s(e)),s||s!==!1&&XB(d))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&KB.read(e.xsrfCookieName);v&&i.set(e.xsrfHeaderName,v)}a===void 0&&i.setContentType(null),"setRequestHeader"in f&&W.forEach(i.toJSON(),function(y,m){f.setRequestHeader(m,y)}),W.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",vC(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",vC(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=v=>{f&&(n(!v||v.type?new Gp(null,e,f):v),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const h=JB(d);if(h&&Ka.protocols.indexOf(h)===-1){n(new Ye("Unsupported protocol "+h+":",Ye.ERR_BAD_REQUEST,e));return}f.send(a||null)})},cb={http:CB,xhr:tz};W.forEach(cb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mC=e=>`- ${e}`,rz=e=>W.isFunction(e)||e===null||e===!1,rR={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(mC).join(` +`):" "+mC(i[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:cb};function w0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gp(null,e)}function gC(e){return w0(e),e.headers=Ai.from(e.headers),e.data=y0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rR.getAdapter(e.adapter||K1.adapter)(e).then(function(n){return w0(e),n.data=y0.call(e,e.transformResponse,n),n.headers=Ai.from(n.headers),n},function(n){return eR(n)||(w0(e),n&&n.response&&(n.response.data=y0.call(e,e.transformResponse,n.response),n.response.headers=Ai.from(n.response.headers))),Promise.reject(n)})}const yC=e=>e instanceof Ai?e.toJSON():e;function zu(e,t){t=t||{};const r={};function n(u,c,f){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:f},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function a(u,c,f){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u,f)}else return n(u,c,f)}function i(u,c){if(!W.isUndefined(c))return n(void 0,c)}function o(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>a(yC(u),yC(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||a,d=f(e[c],t[c],c);W.isUndefined(d)&&f!==s||(r[c]=d)}),r}const nR="1.6.2",q1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{q1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wC={};q1.transitional=function(t,r,n){function a(i,o){return"[Axios v"+nR+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(t===!1)throw new Ye(a(o," has been removed"+(r?" in "+r:"")),Ye.ERR_DEPRECATED);return r&&!wC[o]&&(wC[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,s):!0}};function nz(e,t,r){if(typeof e!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const s=e[i],l=s===void 0||o(s,i,e);if(l!==!0)throw new Ye("option "+i+" must be "+l,Ye.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ye("Unknown option "+i,Ye.ERR_BAD_OPTION)}}const fb={assertOptions:nz,validators:q1},uo=fb.validators;class um{constructor(t){this.defaults=t,this.interceptors={request:new pC,response:new pC}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=zu(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&fb.assertOptions(n,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),a!=null&&(W.isFunction(a)?r.paramsSerializer={serialize:a}:fb.assertOptions(a,{encode:uo.function,serialize:uo.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[r.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Ai.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,d;if(!l){const h=[gC.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,s){n.reason||(n.reason=new Gp(i,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Q1(function(a){t=a}),cancel:t}}}const az=Q1;function iz(e){return function(r){return e.apply(null,r)}}function oz(e){return W.isObject(e)&&e.isAxiosError===!0}const db={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(db).forEach(([e,t])=>{db[t]=e});const sz=db;function aR(e){const t=new Ev(e),r=LN(Ev.prototype.request,t);return W.extend(r,Ev.prototype,t,{allOwnKeys:!0}),W.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return aR(zu(e,a))},r}const hr=aR(K1);hr.Axios=Ev;hr.CanceledError=Gp;hr.CancelToken=az;hr.isCancel=eR;hr.VERSION=nR;hr.toFormData=Eg;hr.AxiosError=Ye;hr.Cancel=hr.CanceledError;hr.all=function(t){return Promise.all(t)};hr.spread=iz;hr.isAxiosError=oz;hr.mergeConfig=zu;hr.AxiosHeaders=Ai;hr.formToJSON=e=>ZN(W.isHTMLForm(e)?new FormData(e):e);hr.getAdapter=rR.getAdapter;hr.HttpStatusCode=sz;hr.default=hr;const tn=hr;function iR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Js=e=>typeof e=="string",mn=e=>typeof e=="function",Sv=e=>Js(e)||mn(e)?e:null,b0=e=>x.isValidElement(e)||Js(e)||mn(e)||qf(e);function lz(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=n+"px",a.transition=`all ${r}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,r)})})}function xg(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:a=!0,collapseDuration:i=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:f,isIn:d}=o;const p=n?`${t}--${l}`:t,h=n?`${r}--${l}`:r,v=x.useRef(0);return x.useLayoutEffect(()=>{const y=f.current,m=p.split(" "),g=E=>{E.target===f.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",g),y.removeEventListener("animationcancel",g),v.current===0&&E.type!=="animationcancel"&&y.classList.remove(...m))};y.classList.add(...m),y.addEventListener("animationend",g),y.addEventListener("animationcancel",g)},[]),x.useEffect(()=>{const y=f.current,m=()=>{y.removeEventListener("animationend",m),a?lz(y,c,i):c()};d||(u?m():(v.current=1,y.className+=` ${h}`,y.addEventListener("animationend",m)))},[d]),b.createElement(b.Fragment,null,s)}}function bC(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Gn={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Fh=e=>{let{theme:t,type:r,...n}=e;return b.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},_0={info:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return b.createElement("div",{className:"Toastify__spinner"})}};function uz(e){const[,t]=x.useReducer(p=>p+1,0),[r,n]=x.useState([]),a=x.useRef(null),i=x.useRef(new Map).current,o=p=>r.indexOf(p)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:p=>i.get(p)}).current;function l(p){let{containerId:h}=p;const{limit:v}=s.props;!v||h&&s.containerId!==h||(s.count-=s.queue.length,s.queue=[])}function u(p){n(h=>p==null?[]:h.filter(v=>v!==p))}function c(){const{toastContent:p,toastProps:h,staleId:v}=s.queue.shift();d(p,h,v)}function f(p,h){let{delay:v,staleId:y,...m}=h;if(!b0(p)||function(U){return!a.current||s.props.enableMultiContainer&&U.containerId!==s.props.containerId||i.has(U.toastId)&&U.updateId==null}(m))return;const{toastId:g,updateId:E,data:w}=m,{props:C}=s,S=()=>u(g),O=E==null;O&&s.count++;const D={...C,style:C.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(m).filter(U=>{let[Q,X]=U;return X!=null})),toastId:g,updateId:E,data:w,closeToast:S,isIn:!1,className:Sv(m.className||C.toastClassName),bodyClassName:Sv(m.bodyClassName||C.bodyClassName),progressClassName:Sv(m.progressClassName||C.progressClassName),autoClose:!m.isLoading&&(N=m.autoClose,R=C.autoClose,N===!1||qf(N)&&N>0?N:R),deleteToast(){const U=bC(i.get(g),"removed");i.delete(g),Gn.emit(4,U);const Q=s.queue.length;if(s.count=g==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),Q>0){const X=g==null?s.props.limit:1;if(Q===1||X===1)s.displayedToast++,c();else{const J=X>Q?Q:X;s.displayedToast=J;for(let te=0;teee in _0)(X)&&(ge=_0[X](H))),ge}(D),mn(m.onOpen)&&(D.onOpen=m.onOpen),mn(m.onClose)&&(D.onClose=m.onClose),D.closeButton=C.closeButton,m.closeButton===!1||b0(m.closeButton)?D.closeButton=m.closeButton:m.closeButton===!0&&(D.closeButton=!b0(C.closeButton)||C.closeButton);let j=p;x.isValidElement(p)&&!Js(p.type)?j=x.cloneElement(p,{closeToast:S,toastProps:D,data:w}):mn(p)&&(j=p({closeToast:S,toastProps:D,data:w})),C.limit&&C.limit>0&&s.count>C.limit&&O?s.queue.push({toastContent:j,toastProps:D,staleId:y}):qf(v)?setTimeout(()=>{d(j,D,y)},v):d(j,D,y)}function d(p,h,v){const{toastId:y}=h;v&&i.delete(v);const m={content:p,props:h};i.set(y,m),n(g=>[...g,y].filter(E=>E!==v)),Gn.emit(4,bC(m,m.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,Gn.cancelEmit(3).on(0,f).on(1,p=>a.current&&u(p)).on(5,l).emit(2,s),()=>{i.clear(),Gn.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=o,s.displayedToast=r.length}),{getToastToRender:function(p){const h=new Map,v=Array.from(i.values());return e.newestOnTop&&v.reverse(),v.forEach(y=>{const{position:m}=y.props;h.has(m)||h.set(m,[]),h.get(m).push(y)}),Array.from(h,y=>p(y[0],y[1]))},containerRef:a,isToastActive:o}}function _C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function EC(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function cz(e){const[t,r]=x.useState(!1),[n,a]=x.useState(!1),i=x.useRef(null),o=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:l,pauseOnHover:u,closeToast:c,onClick:f,closeOnClick:d}=e;function p(w){if(e.draggable){w.nativeEvent.type==="touchstart"&&w.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g),document.addEventListener("touchmove",m),document.addEventListener("touchend",g);const C=i.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=C.getBoundingClientRect(),C.style.transition="",o.x=_C(w.nativeEvent),o.y=EC(w.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(w){if(o.boundingRect){const{top:C,bottom:S,left:O,right:D}=o.boundingRect;w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&o.x>=O&&o.x<=D&&o.y>=C&&o.y<=S?y():v()}}function v(){r(!0)}function y(){r(!1)}function m(w){const C=i.current;o.canDrag&&C&&(o.didMove=!0,t&&y(),o.x=_C(w),o.y=EC(w),o.delta=e.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",g);const w=i.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return a(!0),void e.closeToast();w.style.transition="transform 0.2s, opacity 0.2s",w.style.transform=`translate${e.draggableDirection}(0)`,w.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(i.current&&i.current.addEventListener("d",v,{once:!0}),mn(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const w=s.current;mn(w.onClose)&&w.onClose(x.isValidElement(w.children)&&w.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",v),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const E={onMouseDown:p,onTouchStart:p,onMouseUp:h,onTouchEnd:h};return l&&u&&(E.onMouseEnter=y,E.onMouseLeave=v),d&&(E.onClick=w=>{f&&f(w),o.canCloseOnClick&&c()}),{playToast:v,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:E}}function oR(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return b.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:a=>{a.stopPropagation(),t(a)},"aria-label":n},b.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},b.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function fz(e){let{delay:t,isRunning:r,closeToast:n,type:a="default",hide:i,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:f,theme:d}=e;const p=i||l&&u===0,h={...s,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:p?0:1};l&&(h.transform=`scaleX(${u})`);const v=z("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":c}),y=mn(o)?o({rtl:c,type:a,defaultClassName:v}):z(v,o);return b.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:h,[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{f&&n()}})}const dz=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:a}=cz(e),{closeButton:i,children:o,autoClose:s,onClick:l,type:u,hideProgressBar:c,closeToast:f,transition:d,position:p,className:h,style:v,bodyClassName:y,bodyStyle:m,progressClassName:g,progressStyle:E,updateId:w,role:C,progress:S,rtl:O,toastId:D,deleteToast:N,isIn:R,isLoading:j,iconOut:U,closeOnClick:Q,theme:X}=e,J=z("Toastify__toast",`Toastify__toast-theme--${X}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":Q}),te=mn(h)?h({rtl:O,position:p,type:u,defaultClassName:J}):z(J,h),ge=!!S||!s,H={closeToast:f,type:u,theme:X};let ee=null;return i===!1||(ee=mn(i)?i(H):x.isValidElement(i)?x.cloneElement(i,H):oR(H)),b.createElement(d,{isIn:R,done:N,position:p,preventExitTransition:r,nodeRef:n},b.createElement("div",{id:D,onClick:l,className:te,...a,style:v,ref:n},b.createElement("div",{...R&&{role:C},className:mn(y)?y({type:u}):z("Toastify__toast-body",y),style:m},U!=null&&b.createElement("div",{className:z("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},U),b.createElement("div",null,o)),ee,b.createElement(fz,{...w&&!ge?{key:`pb-${w}`}:{},rtl:O,theme:X,delay:s,isRunning:t,isIn:R,closeToast:f,hide:c,type:u,style:E,className:g,controlledProgress:ge,progress:S||0})))},Cg=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},pz=xg(Cg("bounce",!0));xg(Cg("slide",!0));xg(Cg("zoom"));xg(Cg("flip"));const pb=x.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:a}=uz(e),{className:i,style:o,rtl:s,containerId:l}=e;function u(c){const f=z("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":s});return mn(i)?i({position:c,rtl:s,defaultClassName:f}):z(f,Sv(i))}return x.useEffect(()=>{t&&(t.current=n.current)},[]),b.createElement("div",{ref:n,className:"Toastify",id:l},r((c,f)=>{const d=f.length?{...o}:{...o,pointerEvents:"none"};return b.createElement("div",{className:u(c),style:d,key:`container-${c}`},f.map((p,h)=>{let{content:v,props:y}=p;return b.createElement(dz,{...y,isIn:a(y.toastId),style:{...y.style,"--nth":h+1,"--len":f.length},key:`toast-${y.key}`},v)}))}))});pb.displayName="ToastContainer",pb.defaultProps={position:"top-right",transition:pz,autoClose:5e3,closeButton:oR,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let E0,_s=new Map,Af=[],hz=1;function sR(){return""+hz++}function vz(e){return e&&(Js(e.toastId)||qf(e.toastId))?e.toastId:sR()}function Qf(e,t){return _s.size>0?Gn.emit(0,e,t):Af.push({content:e,options:t}),t.toastId}function cm(e,t){return{...t,type:t&&t.type||e,toastId:vz(t)}}function Uh(e){return(t,r)=>Qf(t,cm(e,r))}function ct(e,t){return Qf(e,cm("default",t))}ct.loading=(e,t)=>Qf(e,cm("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ct.promise=function(e,t,r){let n,{pending:a,error:i,success:o}=t;a&&(n=Js(a)?ct.loading(a,r):ct.loading(a.render,{...r,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,f,d)=>{if(f==null)return void ct.dismiss(n);const p={type:c,...s,...r,data:d},h=Js(f)?{render:f}:f;return n?ct.update(n,{...p,...h}):ct(h.render,{...p,...h}),d},u=mn(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",i,c)),u},ct.success=Uh("success"),ct.info=Uh("info"),ct.error=Uh("error"),ct.warning=Uh("warning"),ct.warn=ct.warning,ct.dark=(e,t)=>Qf(e,cm("default",{theme:"dark",...t})),ct.dismiss=e=>{_s.size>0?Gn.emit(1,e):Af=Af.filter(t=>e!=null&&t.options.toastId!==e)},ct.clearWaitingQueue=function(e){return e===void 0&&(e={}),Gn.emit(5,e)},ct.isActive=e=>{let t=!1;return _s.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},ct.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,a){let{containerId:i}=a;const o=_s.get(i||E0);return o&&o.getToast(n)}(e,t);if(r){const{props:n,content:a}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:sR()};i.toastId!==e&&(i.staleId=e);const o=i.render||a;delete i.render,Qf(o,i)}},0)},ct.done=e=>{ct.update(e,{progress:1})},ct.onChange=e=>(Gn.on(4,e),()=>{Gn.off(4,e)}),ct.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ct.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Gn.on(2,e=>{E0=e.containerId||e,_s.set(E0,e),Af.forEach(t=>{Gn.emit(0,t.content,t.options)}),Af=[]}).on(3,e=>{_s.delete(e.containerId||e),_s.size===0&&Gn.off(0).off(1).off(5)});/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gz(){return Math.random().toString(36).substr(2,8)}function xC(e,t){return{usr:e.state,key:e.key,idx:t}}function Nd(e,t,r,n){return r===void 0&&(r=null),Wt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Zi(t):t,{state:r,key:t&&t.key||n||gz()})}function Zs(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function yz(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s=cr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Wt({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=cr.Pop;let y=c(),m=y==null?null:y-u;u=y,l&&l({action:s,location:v.location,delta:m})}function d(y,m){s=cr.Push;let g=Nd(v.location,y,m);r&&r(g,y),u=c()+1;let E=xC(g,u),w=v.createHref(g);try{o.pushState(E,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(w)}i&&l&&l({action:s,location:v.location,delta:1})}function p(y,m){s=cr.Replace;let g=Nd(v.location,y,m);r&&r(g,y),u=c();let E=xC(g,u),w=v.createHref(g);o.replaceState(E,"",w),i&&l&&l({action:s,location:v.location,delta:0})}function h(y){let m=a.location.origin!=="null"?a.location.origin:a.location.href,g=typeof y=="string"?y:Zs(y);return Ie(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return s},get location(){return e(a,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(SC,f),l=y,()=>{a.removeEventListener(SC,f),l=null}},createHref(y){return t(a,y)},createURL:h,encodeLocation(y){let m=h(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:p,go(y){return o.go(y)}};return v}var tr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tr||(tr={}));const wz=new Set(["lazy","caseSensitive","path","id","index","children"]);function bz(e){return e.index===!0}function hb(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,i)=>{let o=[...r,i],s=typeof a.id=="string"?a.id:o.join("-");if(Ie(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ie(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),bz(a)){let l=Wt({},a,t(a),{id:s});return n[s]=l,l}else{let l=Wt({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=hb(a.children,t,o,n)),l}})}function au(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Zi(t):t,a=wl(n.pathname||"/",r);if(a==null)return null;let i=uR(e);_z(i);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ni([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),uR(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Dz(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of cR(i.path))a(i,o,l)}),t}function cR(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=cR(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function _z(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pz(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ez=/^:\w+$/,Sz=3,xz=2,Cz=1,Oz=10,Tz=-2,CC=e=>e==="*";function Dz(e,t){let r=e.split("/"),n=r.length;return r.some(CC)&&(n+=Tz),t&&(n+=xz),r.filter(a=>!CC(a)).reduce((a,i)=>a+(Ez.test(i)?Sz:i===""?Cz:Oz),n)}function Pz(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function kz(e,t){let{routesMeta:r}=e,n={},a="/",i=[];for(let o=0;o{if(c==="*"){let d=s[f]||"";o=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=Mz(s[f]||"",c),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Nz(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Wu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Rz(e){try{return decodeURI(e)}catch(t){return Wu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mz(e,t){try{return decodeURIComponent(e)}catch(r){return Wu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function wl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Iz(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Zi(e):e;return{pathname:r?r.startsWith("/")?r:$z(r,t):t,search:Lz(n),hash:Fz(a)}}function $z(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function S0(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Kp(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Og(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Zi(e):(a=Wt({},e),Ie(!a.pathname||!a.pathname.includes("?"),S0("?","pathname","search",a)),Ie(!a.pathname||!a.pathname.includes("#"),S0("#","pathname","hash",a)),Ie(!a.search||!a.search.includes("#"),S0("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(n||o==null)s=r;else{let f=t.length-1;if(o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;a.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=Iz(a,s),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ni=e=>e.join("/").replace(/\/\/+/g,"/"),jz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class X1{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function fR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dR=["post","put","patch","delete"],Uz=new Set(dR),Bz=["get",...dR],zz=new Set(Bz),Wz=new Set([301,302,303,307,308]),Hz=new Set([307,308]),x0={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},df={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yz=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Gz(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Ie(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;a=L=>({hasErrorBoundary:M(L)})}else a=Yz;let i={},o=hb(e.routes,a,void 0,i),s,l=e.basename||"/",u=Wt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,f=new Set,d=null,p=null,h=null,v=e.hydrationData!=null,y=au(o,e.history.location,l),m=null;if(y==null){let M=Yn(404,{pathname:e.history.location.pathname}),{matches:L,route:G}=RC(o);y=L,m={[G.id]:M}}let g=!y.some(M=>M.route.lazy)&&(!y.some(M=>M.route.loader)||e.hydrationData!=null),E,w={historyAction:e.history.action,location:e.history.location,matches:y,initialized:g,navigation:x0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},C=cr.Pop,S=!1,O,D=!1,N=!1,R=[],j=[],U=new Map,Q=0,X=-1,J=new Map,te=new Set,ge=new Map,H=new Map,ee=new Map,ce=!1;function _e(){return c=e.history.listen(M=>{let{action:L,location:G,delta:de}=M;if(ce){ce=!1;return}Wu(ee.size===0||de!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ee=be({currentLocation:w.location,nextLocation:G,historyAction:L});if(Ee&&de!=null){ce=!0,e.history.go(de*-1),pe(Ee,{state:"blocked",location:G,proceed(){pe(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(de)},reset(){let Se=new Map(w.blockers);Se.set(Ee,df),ye({blockers:Se})}});return}return Ce(L,G)}),w.initialized||Ce(cr.Pop,w.location),E}function we(){c&&c(),f.clear(),O&&O.abort(),w.fetchers.forEach((M,L)=>Lr(L)),w.blockers.forEach((M,L)=>Y(L))}function rt(M){return f.add(M),()=>f.delete(M)}function ye(M){w=Wt({},w,M),f.forEach(L=>L(w))}function Le(M,L){var G,de;let Ee=w.actionData!=null&&w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&w.navigation.state==="loading"&&((G=M.state)==null?void 0:G._isRedirect)!==!0,Se;L.actionData?Object.keys(L.actionData).length>0?Se=L.actionData:Se=null:Ee?Se=w.actionData:Se=null;let Te=L.loaderData?NC(w.loaderData,L.loaderData,L.matches||[],L.errors):w.loaderData,me=w.blockers;me.size>0&&(me=new Map(me),me.forEach((yt,Re)=>me.set(Re,df)));let he=S===!0||w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&((de=M.state)==null?void 0:de._isRedirect)!==!0;s&&(o=s,s=void 0),D||C===cr.Pop||(C===cr.Push?e.history.push(M,M.state):C===cr.Replace&&e.history.replace(M,M.state)),ye(Wt({},L,{actionData:Se,loaderData:Te,historyAction:C,location:M,initialized:!0,navigation:x0,revalidation:"idle",restoreScrollPosition:da(M,L.matches||w.matches),preventScrollReset:he,blockers:me})),C=cr.Pop,S=!1,D=!1,N=!1,R=[],j=[]}async function He(M,L){if(typeof M=="number"){e.history.go(M);return}let G=vb(w.location,w.matches,l,u.v7_prependBasename,M,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:de,submission:Ee,error:Se}=OC(u.v7_normalizeFormMethod,!1,G,L),Te=w.location,me=Nd(w.location,de,L&&L.state);me=Wt({},me,e.history.encodeLocation(me));let he=L&&L.replace!=null?L.replace:void 0,yt=cr.Push;he===!0?yt=cr.Replace:he===!1||Ee!=null&&ya(Ee.formMethod)&&Ee.formAction===w.location.pathname+w.location.search&&(yt=cr.Replace);let Re=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,Ae=be({currentLocation:Te,nextLocation:me,historyAction:yt});if(Ae){pe(Ae,{state:"blocked",location:me,proceed(){pe(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),He(M,L)},reset(){let ut=new Map(w.blockers);ut.set(Ae,df),ye({blockers:ut})}});return}return await Ce(yt,me,{submission:Ee,pendingError:Se,preventScrollReset:Re,replace:L&&L.replace})}function lt(){if(lr(),ye({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ce(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ce(C||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Ce(M,L,G){O&&O.abort(),O=null,C=M,D=(G&&G.startUninterruptedRevalidation)===!0,un(w.location,w.matches),S=(G&&G.preventScrollReset)===!0;let de=s||o,Ee=G&&G.overrideNavigation,Se=au(de,L,l);if(!Se){let ut=Yn(404,{pathname:L.pathname}),{matches:Tt,route:$a}=RC(de);Ne(),Le(L,{matches:Tt,loaderData:{},errors:{[$a.id]:ut}});return}if(w.initialized&&!N&&Jz(w.location,L)&&!(G&&G.submission&&ya(G.submission.formMethod))){Le(L,{matches:Se});return}O=new AbortController;let Te=hf(e.history,L,O.signal,G&&G.submission),me,he;if(G&&G.pendingError)he={[iu(Se).route.id]:G.pendingError};else if(G&&G.submission&&ya(G.submission.formMethod)){let ut=await xe(Te,L,G.submission,Se,{replace:G.replace});if(ut.shortCircuited)return;me=ut.pendingActionData,he=ut.pendingActionError,Ee=C0(L,G.submission),Te=new Request(Te.url,{signal:Te.signal})}let{shortCircuited:yt,loaderData:Re,errors:Ae}=await gt(Te,L,Se,Ee,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,me,he);yt||(O=null,Le(L,Wt({matches:Se},me?{actionData:me}:{},{loaderData:Re,errors:Ae})))}async function xe(M,L,G,de,Ee){Ee===void 0&&(Ee={}),lr();let Se=r4(L,G);ye({navigation:Se});let Te,me=gb(de,L);if(!me.route.action&&!me.route.lazy)Te={type:tr.error,error:Yn(405,{method:M.method,pathname:L.pathname,routeId:me.route.id})};else if(Te=await pf("action",M,me,de,i,a,l),M.signal.aborted)return{shortCircuited:!0};if(bu(Te)){let he;return Ee&&Ee.replace!=null?he=Ee.replace:he=Te.location===w.location.pathname+w.location.search,await er(w,Te,{submission:G,replace:he}),{shortCircuited:!0}}if(Xf(Te)){let he=iu(de,me.route.id);return(Ee&&Ee.replace)!==!0&&(C=cr.Push),{pendingActionData:{},pendingActionError:{[he.route.id]:Te.error}}}if(ks(Te))throw Yn(400,{type:"defer-action"});return{pendingActionData:{[me.route.id]:Te.data}}}async function gt(M,L,G,de,Ee,Se,Te,me,he){let yt=de||C0(L,Ee),Re=Ee||Se||$C(yt),Ae=s||o,[ut,Tt]=TC(e.history,w,G,Re,L,N,R,j,ge,te,Ae,l,me,he);if(Ne(st=>!(G&&G.some(Tn=>Tn.route.id===st))||ut&&ut.some(Tn=>Tn.route.id===st)),X=++Q,ut.length===0&&Tt.length===0){let st=I();return Le(L,Wt({matches:G,loaderData:{},errors:he||null},me?{actionData:me}:{},st?{fetchers:new Map(w.fetchers)}:{})),{shortCircuited:!0}}if(!D){Tt.forEach(Tn=>{let De=w.fetchers.get(Tn.key),bt=vf(void 0,De?De.data:void 0);w.fetchers.set(Tn.key,bt)});let st=me||w.actionData;ye(Wt({navigation:yt},st?Object.keys(st).length===0?{actionData:null}:{actionData:st}:{},Tt.length>0?{fetchers:new Map(w.fetchers)}:{}))}Tt.forEach(st=>{U.has(st.key)&&Ot(st.key),st.controller&&U.set(st.key,st.controller)});let $a=()=>Tt.forEach(st=>Ot(st.key));O&&O.signal.addEventListener("abort",$a);let{results:ja,loaderResults:bi,fetcherResults:oo}=await Ut(w.matches,G,ut,Tt,M);if(M.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",$a),Tt.forEach(st=>U.delete(st.key));let Cn=MC(ja);if(Cn){if(Cn.idx>=ut.length){let st=Tt[Cn.idx-ut.length].key;te.add(st)}return await er(w,Cn.result,{replace:Te}),{shortCircuited:!0}}let{loaderData:On,errors:so}=AC(w,G,ut,bi,he,Tt,oo,H);H.forEach((st,Tn)=>{st.subscribe(De=>{(De||st.done)&&H.delete(Tn)})});let ef=I(),hs=ue(X),Nl=ef||hs||Tt.length>0;return Wt({loaderData:On,errors:so},Nl?{fetchers:new Map(w.fetchers)}:{})}function Nt(M){return w.fetchers.get(M)||Vz}function sr(M,L,G,de){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");U.has(M)&&Ot(M);let Ee=s||o,Se=vb(w.location,w.matches,l,u.v7_prependBasename,G,L,de==null?void 0:de.relative),Te=au(Ee,Se,l);if(!Te){Jr(M,L,Yn(404,{pathname:Se}));return}let{path:me,submission:he,error:yt}=OC(u.v7_normalizeFormMethod,!0,Se,de);if(yt){Jr(M,L,yt);return}let Re=gb(Te,me);if(S=(de&&de.preventScrollReset)===!0,he&&ya(he.formMethod)){jr(M,L,me,Re,Te,he);return}ge.set(M,{routeId:L,path:me}),Je(M,L,me,Re,Te,he)}async function jr(M,L,G,de,Ee,Se){if(lr(),ge.delete(M),!de.route.action&&!de.route.lazy){let Me=Yn(405,{method:Se.formMethod,pathname:G,routeId:L});Jr(M,L,Me);return}let Te=w.fetchers.get(M),me=n4(Se,Te);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,yt=hf(e.history,G,he.signal,Se);U.set(M,he);let Re=Q,Ae=await pf("action",yt,de,Ee,i,a,l);if(yt.signal.aborted){U.get(M)===he&&U.delete(M);return}if(bu(Ae))if(U.delete(M),X>Re){let Me=Bl(void 0);w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M);let Me=vf(Se);return w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)}),er(w,Ae,{fetcherSubmission:Se})}if(Xf(Ae)){Jr(M,L,Ae.error);return}if(ks(Ae))throw Yn(400,{type:"defer-action"});let ut=w.navigation.location||w.location,Tt=hf(e.history,ut,he.signal),$a=s||o,ja=w.navigation.state!=="idle"?au($a,w.navigation.location,l):w.matches;Ie(ja,"Didn't find any matches after fetcher action");let bi=++Q;J.set(M,bi);let oo=vf(Se,Ae.data);w.fetchers.set(M,oo);let[Cn,On]=TC(e.history,w,ja,Se,ut,N,R,j,ge,te,$a,l,{[de.route.id]:Ae.data},void 0);On.filter(Me=>Me.key!==M).forEach(Me=>{let Fr=Me.key,cn=w.fetchers.get(Fr),tf=vf(void 0,cn?cn.data:void 0);w.fetchers.set(Fr,tf),U.has(Fr)&&Ot(Fr),Me.controller&&U.set(Fr,Me.controller)}),ye({fetchers:new Map(w.fetchers)});let so=()=>On.forEach(Me=>Ot(Me.key));he.signal.addEventListener("abort",so);let{results:ef,loaderResults:hs,fetcherResults:Nl}=await Ut(w.matches,ja,Cn,On,Tt);if(he.signal.aborted)return;he.signal.removeEventListener("abort",so),J.delete(M),U.delete(M),On.forEach(Me=>U.delete(Me.key));let st=MC(ef);if(st){if(st.idx>=Cn.length){let Me=On[st.idx-Cn.length].key;te.add(Me)}return er(w,st.result)}let{loaderData:Tn,errors:De}=AC(w,w.matches,Cn,hs,void 0,On,Nl,H);if(w.fetchers.has(M)){let Me=Bl(Ae.data);w.fetchers.set(M,Me)}let bt=ue(bi);w.navigation.state==="loading"&&bi>X?(Ie(C,"Expected pending action"),O&&O.abort(),Le(w.navigation.location,{matches:ja,loaderData:Tn,errors:De,fetchers:new Map(w.fetchers)})):(ye(Wt({errors:De,loaderData:NC(w.loaderData,Tn,ja,De)},bt||On.length>0?{fetchers:new Map(w.fetchers)}:{})),N=!1)}async function Je(M,L,G,de,Ee,Se){let Te=w.fetchers.get(M),me=vf(Se,Te?Te.data:void 0);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,yt=hf(e.history,G,he.signal);U.set(M,he);let Re=Q,Ae=await pf("loader",yt,de,Ee,i,a,l);if(ks(Ae)&&(Ae=await mR(Ae,yt.signal,!0)||Ae),U.get(M)===he&&U.delete(M),yt.signal.aborted)return;if(bu(Ae))if(X>Re){let Tt=Bl(void 0);w.fetchers.set(M,Tt),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M),await er(w,Ae);return}if(Xf(Ae)){let Tt=iu(w.matches,L);w.fetchers.delete(M),ye({fetchers:new Map(w.fetchers),errors:{[Tt.route.id]:Ae.error}});return}Ie(!ks(Ae),"Unhandled fetcher deferred data");let ut=Bl(Ae.data);w.fetchers.set(M,ut),ye({fetchers:new Map(w.fetchers)})}async function er(M,L,G){let{submission:de,fetcherSubmission:Ee,replace:Se}=G===void 0?{}:G;L.revalidate&&(N=!0);let Te=Nd(M.location,L.location,{_isRedirect:!0});if(Ie(Te,"Expected a location on the redirect navigation"),r){let ut=!1;if(L.reloadDocument)ut=!0;else if(pR.test(L.location)){const Tt=e.history.createURL(L.location);ut=Tt.origin!==t.location.origin||wl(Tt.pathname,l)==null}if(ut){Se?t.location.replace(L.location):t.location.assign(L.location);return}}O=null;let me=Se===!0?cr.Replace:cr.Push,{formMethod:he,formAction:yt,formEncType:Re}=M.navigation;!de&&!Ee&&he&&yt&&Re&&(de=$C(M.navigation));let Ae=de||Ee;if(Hz.has(L.status)&&Ae&&ya(Ae.formMethod))await Ce(me,Te,{submission:Wt({},Ae,{formAction:L.location}),preventScrollReset:S});else{let ut=C0(Te,de);await Ce(me,Te,{overrideNavigation:ut,fetcherSubmission:Ee,preventScrollReset:S})}}async function Ut(M,L,G,de,Ee){let Se=await Promise.all([...G.map(he=>pf("loader",Ee,he,L,i,a,l)),...de.map(he=>he.matches&&he.match&&he.controller?pf("loader",hf(e.history,he.path,he.controller.signal),he.match,he.matches,i,a,l):{type:tr.error,error:Yn(404,{pathname:he.path})})]),Te=Se.slice(0,G.length),me=Se.slice(G.length);return await Promise.all([IC(M,G,Te,Te.map(()=>Ee.signal),!1,w.loaderData),IC(M,de.map(he=>he.match),me,de.map(he=>he.controller?he.controller.signal:null),!0)]),{results:Se,loaderResults:Te,fetcherResults:me}}function lr(){N=!0,R.push(...Ne()),ge.forEach((M,L)=>{U.has(L)&&(j.push(L),Ot(L))})}function Jr(M,L,G){let de=iu(w.matches,L);Lr(M),ye({errors:{[de.route.id]:G},fetchers:new Map(w.fetchers)})}function Lr(M){let L=w.fetchers.get(M);U.has(M)&&!(L&&L.state==="loading"&&J.has(M))&&Ot(M),ge.delete(M),J.delete(M),te.delete(M),w.fetchers.delete(M)}function Ot(M){let L=U.get(M);Ie(L,"Expected fetch controller: "+M),L.abort(),U.delete(M)}function ln(M){for(let L of M){let G=Nt(L),de=Bl(G.data);w.fetchers.set(L,de)}}function I(){let M=[],L=!1;for(let G of te){let de=w.fetchers.get(G);Ie(de,"Expected fetcher: "+G),de.state==="loading"&&(te.delete(G),M.push(G),L=!0)}return ln(M),L}function ue(M){let L=[];for(let[G,de]of J)if(de0}function F(M,L){let G=w.blockers.get(M)||df;return ee.get(M)!==L&&ee.set(M,L),G}function Y(M){w.blockers.delete(M),ee.delete(M)}function pe(M,L){let G=w.blockers.get(M)||df;Ie(G.state==="unblocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="proceeding"||G.state==="blocked"&&L.state==="unblocked"||G.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+L.state);let de=new Map(w.blockers);de.set(M,L),ye({blockers:de})}function be(M){let{currentLocation:L,nextLocation:G,historyAction:de}=M;if(ee.size===0)return;ee.size>1&&Wu(!1,"A router only supports one blocker at a time");let Ee=Array.from(ee.entries()),[Se,Te]=Ee[Ee.length-1],me=w.blockers.get(Se);if(!(me&&me.state==="proceeding")&&Te({currentLocation:L,nextLocation:G,historyAction:de}))return Se}function Ne(M){let L=[];return H.forEach((G,de)=>{(!M||M(de))&&(G.cancel(),L.push(de),H.delete(de))}),L}function ur(M,L,G){if(d=M,h=L,p=G||null,!v&&w.navigation===x0){v=!0;let de=da(w.location,w.matches);de!=null&&ye({restoreScrollPosition:de})}return()=>{d=null,h=null,p=null}}function Zr(M,L){return p&&p(M,L.map(de=>lR(de,w.loaderData)))||M.key}function un(M,L){if(d&&h){let G=Zr(M,L);d[G]=h()}}function da(M,L){if(d){let G=Zr(M,L),de=d[G];if(typeof de=="number")return de}return null}function io(M){i={},s=hb(M,a,void 0,i)}return E={get basename(){return l},get state(){return w},get routes(){return o},initialize:_e,subscribe:rt,enableScrollRestoration:ur,navigate:He,fetch:sr,revalidate:lt,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:Nt,deleteFetcher:Lr,dispose:we,getBlocker:F,deleteBlocker:Y,_internalFetchControllers:U,_internalActiveDeferreds:H,_internalSetRoutes:io},E}function Kz(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vb(e,t,r,n,a,i,o){let s,l;if(i!=null&&o!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){l=c;break}}else s=t,l=t[t.length-1];let u=Og(a||".",Kp(s).map(c=>c.pathnameBase),wl(e.pathname,r)||e.pathname,o==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l&&l.route.index&&!J1(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Ni([r,u.pathname])),Zs(u)}function OC(e,t,r,n){if(!n||!Kz(n))return{path:r};if(n.formMethod&&!t4(n.formMethod))return{path:r,error:Yn(405,{method:n.formMethod})};let a=()=>({path:r,error:Yn(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),s=vR(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ya(o))return a();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,h)=>{let[v,y]=h;return""+p+v+"="+y+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!ya(o))return a();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return a()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=mb(n.formData),u=n.formData;else if(n.body instanceof FormData)l=mb(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=kC(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=kC(l)}catch{return a()}let c={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ya(c.formMethod))return{path:r,submission:c};let f=Zi(r);return t&&f.search&&J1(f.search)&&l.append("index",""),f.search="?"+l,{path:Zs(f),submission:c}}function qz(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function TC(e,t,r,n,a,i,o,s,l,u,c,f,d,p){let h=p?Object.values(p)[0]:d?Object.values(d)[0]:void 0,v=e.createURL(t.location),y=e.createURL(a),m=p?Object.keys(p)[0]:void 0,E=qz(r,m).filter((C,S)=>{if(C.route.lazy)return!0;if(C.route.loader==null)return!1;if(Qz(t.loaderData,t.matches[S],C)||o.some(N=>N===C.route.id))return!0;let O=t.matches[S],D=C;return DC(C,Wt({currentUrl:v,currentParams:O.params,nextUrl:y,nextParams:D.params},n,{actionResult:h,defaultShouldRevalidate:i||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||hR(O,D)}))}),w=[];return l.forEach((C,S)=>{if(!r.some(j=>j.route.id===C.routeId))return;let O=au(c,C.path,f);if(!O){w.push({key:S,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(S),N=gb(O,C.path),R=!1;u.has(S)?R=!1:s.includes(S)?R=!0:D&&D.state!=="idle"&&D.data===void 0?R=i:R=DC(N,Wt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:h,defaultShouldRevalidate:i})),R&&w.push({key:S,routeId:C.routeId,path:C.path,matches:O,match:N,controller:new AbortController})}),[E,w]}function Qz(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function hR(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function DC(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function PC(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];Ie(a,"No route found in manifest");let i={};for(let o in n){let l=a[o]!==void 0&&o!=="hasErrorBoundary";Wu(!l,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!wz.has(o)&&(i[o]=n[o])}Object.assign(a,i),Object.assign(a,Wt({},t(a),{lazy:void 0}))}async function pf(e,t,r,n,a,i,o,s){s===void 0&&(s={});let l,u,c,f=h=>{let v,y=new Promise((m,g)=>v=g);return c=()=>v(),t.signal.addEventListener("abort",c),Promise.race([h({request:t,params:r.params,context:s.requestContext}),y])};try{let h=r.route[e];if(r.route.lazy)if(h){let v,y=await Promise.all([f(h).catch(m=>{v=m}),PC(r.route,i,a)]);if(v)throw v;u=y[0]}else if(await PC(r.route,i,a),h=r.route[e],h)u=await f(h);else if(e==="action"){let v=new URL(t.url),y=v.pathname+v.search;throw Yn(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:tr.data,data:void 0};else if(h)u=await f(h);else{let v=new URL(t.url),y=v.pathname+v.search;throw Yn(404,{pathname:y})}Ie(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){l=tr.error,u=h}finally{c&&t.signal.removeEventListener("abort",c)}if(e4(u)){let h=u.status;if(Wz.has(h)){let m=u.headers.get("Location");if(Ie(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!pR.test(m))m=vb(new URL(t.url),n.slice(0,n.indexOf(r)+1),o,!0,m);else if(!s.isStaticRequest){let g=new URL(t.url),E=m.startsWith("//")?new URL(g.protocol+m):new URL(m),w=wl(E.pathname,o)!=null;E.origin===g.origin&&w&&(m=E.pathname+E.search+E.hash)}if(s.isStaticRequest)throw u.headers.set("Location",m),u;return{type:tr.redirect,status:h,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:l===tr.error?tr.error:tr.data,response:u};let v,y=u.headers.get("Content-Type");return y&&/\bapplication\/json\b/.test(y)?v=await u.json():v=await u.text(),l===tr.error?{type:l,error:new X1(h,u.statusText,v),headers:u.headers}:{type:tr.data,data:v,statusCode:u.status,headers:u.headers}}if(l===tr.error)return{type:l,error:u};if(Zz(u)){var d,p;return{type:tr.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((p=u.init)==null?void 0:p.headers)&&new Headers(u.init.headers)}}return{type:tr.data,data:u}}function hf(e,t,r,n){let a=e.createURL(vR(t)).toString(),i={signal:r};if(n&&ya(n.formMethod)){let{formMethod:o,formEncType:s}=n;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=mb(n.formData):i.body=n.formData}return new Request(a,i)}function mb(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function kC(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Xz(e,t,r,n,a){let i={},o=null,s,l=!1,u={};return r.forEach((c,f)=>{let d=t[f].route.id;if(Ie(!bu(c),"Cannot handle redirect results in processLoaderData"),Xf(c)){let p=iu(e,d),h=c.error;n&&(h=Object.values(n)[0],n=void 0),o=o||{},o[p.route.id]==null&&(o[p.route.id]=h),i[d]=void 0,l||(l=!0,s=fR(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else ks(c)?(a.set(d,c.deferredData),i[d]=c.deferredData.data):i[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!l&&(s=c.statusCode),c.headers&&(u[d]=c.headers)}),n&&(o=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:o,statusCode:s||200,loaderHeaders:u}}function AC(e,t,r,n,a,i,o,s){let{loaderData:l,errors:u}=Xz(t,r,n,a,s);for(let c=0;cn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function RC(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Yn(e,t){let{pathname:r,routeId:n,method:a,type:i}=t===void 0?{}:t,o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",s='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new X1(e||500,o,new Error(s),!0)}function MC(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(bu(r))return{result:r,idx:t}}}function vR(e){let t=typeof e=="string"?Zi(e):e;return Zs(Wt({},t,{hash:""}))}function Jz(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ks(e){return e.type===tr.deferred}function Xf(e){return e.type===tr.error}function bu(e){return(e&&e.type)===tr.redirect}function Zz(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function e4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function t4(e){return zz.has(e.toLowerCase())}function ya(e){return Uz.has(e.toLowerCase())}async function IC(e,t,r,n,a,i){for(let o=0;of.route.id===l.route.id),c=u!=null&&!hR(u,l)&&(i&&i[l.route.id])!==void 0;if(ks(s)&&(a||c)){let f=n[o];Ie(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await mR(s,f,a).then(d=>{d&&(r[o]=d||r[o])})}}}async function mR(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:tr.data,data:e.deferredData.unwrappedData}}catch(a){return{type:tr.error,error:a}}return{type:tr.data,data:e.deferredData.data}}}function J1(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gb(e,t){let r=typeof t=="string"?Zi(t).search:t.search;if(e[e.length-1].route.index&&J1(r||""))return e[e.length-1];let n=Kp(e);return n[n.length-1]}function $C(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function C0(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vf(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function n4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Bl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),o=x.useRef(!1);return yR(()=>{o.current=!0}),x.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){r.go(l);return}let c=Og(l,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ni([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,a,e])}const o4=x.createContext(null);function s4(e){let t=x.useContext(pi).outlet;return t&&x.createElement(o4.Provider,{value:e},t)}function eE(){let{matches:e}=x.useContext(pi),t=e[e.length-1];return t?t.params:{}}function tE(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=x.useContext(pi),{pathname:a}=hi(),i=JSON.stringify(Kp(n).map(o=>o.pathnameBase));return x.useMemo(()=>Og(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function l4(e,t,r){Lc()||Ie(!1);let{navigator:n}=x.useContext(us),{matches:a}=x.useContext(pi),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=hi(),u;if(t){var c;let v=typeof t=="string"?Zi(t):t;s==="/"||(c=v.pathname)!=null&&c.startsWith(s)||Ie(!1),u=v}else u=l;let f=u.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=au(e,{pathname:d}),h=p4(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:Ni([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Ni([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r);return t&&h?x.createElement(Dg.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cr.Pop}},h):h}function u4(){let e=y4(),t=fR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:a},r):null,i)}const c4=x.createElement(u4,null);class f4 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?x.createElement(pi.Provider,{value:this.props.routeContext},x.createElement(gR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function d4(e){let{routeContext:t,match:r,children:n}=e,a=x.useContext(qp);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(pi.Provider,{value:t},n)}function p4(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let i=e,o=(n=r)==null?void 0:n.errors;if(o!=null){let s=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));s>=0||Ie(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,u)=>{let c=l.route.id?o==null?void 0:o[l.route.id]:null,f=null;r&&(f=l.route.errorElement||c4);let d=t.concat(i.slice(0,u+1)),p=()=>{let h;return c?h=f:l.route.Component?h=x.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,x.createElement(d4,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?x.createElement(f4,{location:r.location,revalidation:r.revalidation,component:f,error:c,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var wR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wR||{}),Hu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Hu||{});function h4(e){let t=x.useContext(qp);return t||Ie(!1),t}function rE(e){let t=x.useContext(Tg);return t||Ie(!1),t}function v4(e){let t=x.useContext(pi);return t||Ie(!1),t}function bR(e){let t=v4(),r=t.matches[t.matches.length-1];return r.route.id||Ie(!1),r.route.id}function m4(){return rE(Hu.UseNavigation).navigation}function g4(){let{matches:e,loaderData:t}=rE(Hu.UseMatches);return x.useMemo(()=>e.map(r=>lR(r,t)),[e,t])}function y4(){var e;let t=x.useContext(gR),r=rE(Hu.UseRouteError),n=bR(Hu.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function w4(){let{router:e}=h4(wR.UseNavigateStable),t=bR(Hu.UseNavigateStable),r=x.useRef(!1);return yR(()=>{r.current=!0}),x.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,fm({fromRouteId:t},i)))},[e,t])}const b4="startTransition",jC=G2[b4];function _4(e){let{fallbackElement:t,router:r,future:n}=e,[a,i]=x.useState(r.state),{v7_startTransition:o}=n||{},s=x.useCallback(f=>{o&&jC?jC(()=>i(f)):i(f)},[i,o]);x.useLayoutEffect(()=>r.subscribe(s),[r,s]);let l=x.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:f=>r.navigate(f),push:(f,d,p)=>r.navigate(f,{state:d,preventScrollReset:p==null?void 0:p.preventScrollReset}),replace:(f,d,p)=>r.navigate(f,{replace:!0,state:d,preventScrollReset:p==null?void 0:p.preventScrollReset})}),[r]),u=r.basename||"/",c=x.useMemo(()=>({router:r,navigator:l,static:!1,basename:u}),[r,l,u]);return x.createElement(x.Fragment,null,x.createElement(qp.Provider,{value:c},x.createElement(Tg.Provider,{value:a},x.createElement(S4,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l},a.initialized?x.createElement(E4,{routes:r.routes,state:a}):t))),null)}function E4(e){let{routes:t,state:r}=e;return l4(t,void 0,r)}function _R(e){let{to:t,replace:r,state:n,relative:a}=e;Lc()||Ie(!1);let{matches:i}=x.useContext(pi),{pathname:o}=hi(),s=Z1(),l=Og(t,Kp(i).map(c=>c.pathnameBase),o,a==="path"),u=JSON.stringify(l);return x.useEffect(()=>s(JSON.parse(u),{replace:r,state:n,relative:a}),[s,u,a,r,n]),null}function ER(e){return s4(e.context)}function S4(e){let{basename:t="/",children:r=null,location:n,navigationType:a=cr.Pop,navigator:i,static:o=!1}=e;Lc()&&Ie(!1);let s=t.replace(/^\/*/,"/"),l=x.useMemo(()=>({basename:s,navigator:i,static:o}),[s,i,o]);typeof n=="string"&&(n=Zi(n));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:p="default"}=n,h=x.useMemo(()=>{let v=wl(u,s);return v==null?null:{location:{pathname:v,search:c,hash:f,state:d,key:p},navigationType:a}},[s,u,c,f,d,p,a]);return h==null?null:x.createElement(us.Provider,{value:l},x.createElement(Dg.Provider,{children:r,value:h}))}new Promise(()=>{});function x4(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:x.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function C4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function O4(e,t){return e.button===0&&(!t||t==="_self")&&!C4(e)}const T4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],D4=["aria-current","caseSensitive","className","end","style","to","children"];function P4(e,t){return Gz({basename:t==null?void 0:t.basename,future:el({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:mz({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||k4(),routes:e,mapRouteProperties:x4}).initialize()}function k4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=el({},t,{errors:A4(t.errors)})),t}function A4(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new X1(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let i=window[a.__subType];if(typeof i=="function")try{let o=new i(a.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(a.message);i.stack="",r[n]=i}}else r[n]=a;return r}const N4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",R4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,an=x.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:u,preventScrollReset:c}=t,f=SR(t,T4),{basename:d}=x.useContext(us),p,h=!1;if(typeof u=="string"&&R4.test(u)&&(p=u,N4))try{let g=new URL(window.location.href),E=u.startsWith("//")?new URL(g.protocol+u):new URL(u),w=wl(E.pathname,d);E.origin===g.origin&&w!=null?u=w+E.search+E.hash:h=!0}catch{}let v=a4(u,{relative:a}),y=j4(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:a});function m(g){n&&n(g),g.defaultPrevented||y(g)}return x.createElement("a",el({},f,{href:p||v,onClick:h||i?n:m,ref:r,target:l}))}),Bh=x.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:u}=t,c=SR(t,D4),f=tE(l,{relative:c.relative}),d=hi(),p=x.useContext(Tg),{navigator:h}=x.useContext(us),v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,y=d.pathname,m=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;a||(y=y.toLowerCase(),m=m?m.toLowerCase():null,v=v.toLowerCase());let g=y===v||!o&&y.startsWith(v)&&y.charAt(v.length)==="/",E=m!=null&&(m===v||!o&&m.startsWith(v)&&m.charAt(v.length)==="/"),w=g?n:void 0,C;typeof i=="function"?C=i({isActive:g,isPending:E}):C=[i,g?"active":null,E?"pending":null].filter(Boolean).join(" ");let S=typeof s=="function"?s({isActive:g,isPending:E}):s;return x.createElement(an,el({},c,{"aria-current":w,className:C,ref:r,style:S,to:l}),typeof u=="function"?u({isActive:g,isPending:E}):u)});function M4(e){let{getKey:t,storageKey:r}=e;return L4({getKey:t,storageKey:r}),null}var yb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(yb||(yb={}));var wb;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wb||(wb={}));function I4(e){let t=x.useContext(qp);return t||Ie(!1),t}function $4(e){let t=x.useContext(Tg);return t||Ie(!1),t}function j4(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o}=t===void 0?{}:t,s=Z1(),l=hi(),u=tE(e,{relative:o});return x.useCallback(c=>{if(O4(c,r)){c.preventDefault();let f=n!==void 0?n:Zs(l)===Zs(u);s(e,{replace:f,state:a,preventScrollReset:i,relative:o})}},[l,s,u,n,a,r,e,i,o])}const LC="react-router-scroll-positions";let zh={};function L4(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=I4(yb.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=$4(wb.UseScrollRestoration),{basename:o}=x.useContext(us),s=hi(),l=g4(),u=m4();x.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),F4(x.useCallback(()=>{if(u.state==="idle"){let c=(t?t(s,l):null)||s.key;zh[c]=window.scrollY}sessionStorage.setItem(r||LC,JSON.stringify(zh)),window.history.scrollRestoration="auto"},[r,t,u.state,s,l])),typeof document<"u"&&(x.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||LC);c&&(zh=JSON.parse(c))}catch{}},[r]),x.useLayoutEffect(()=>{let c=t&&o!=="/"?(d,p)=>t(el({},d,{pathname:wl(d.pathname,o)||d.pathname}),p):t,f=n==null?void 0:n.enableScrollRestoration(zh,()=>window.scrollY,c);return()=>f&&f()},[n,o,t]),x.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let c=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(c){c.scrollIntoView();return}}i!==!0&&window.scrollTo(0,0)}},[s,a,i]))}function F4(e,t){let{capture:r}=t||{};x.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Pg(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var xR={exports:{}},vt={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Nr=typeof Symbol=="function"&&Symbol.for,nE=Nr?Symbol.for("react.element"):60103,aE=Nr?Symbol.for("react.portal"):60106,kg=Nr?Symbol.for("react.fragment"):60107,Ag=Nr?Symbol.for("react.strict_mode"):60108,Ng=Nr?Symbol.for("react.profiler"):60114,Rg=Nr?Symbol.for("react.provider"):60109,Mg=Nr?Symbol.for("react.context"):60110,iE=Nr?Symbol.for("react.async_mode"):60111,Ig=Nr?Symbol.for("react.concurrent_mode"):60111,$g=Nr?Symbol.for("react.forward_ref"):60112,jg=Nr?Symbol.for("react.suspense"):60113,U4=Nr?Symbol.for("react.suspense_list"):60120,Lg=Nr?Symbol.for("react.memo"):60115,Fg=Nr?Symbol.for("react.lazy"):60116,B4=Nr?Symbol.for("react.block"):60121,z4=Nr?Symbol.for("react.fundamental"):60117,W4=Nr?Symbol.for("react.responder"):60118,H4=Nr?Symbol.for("react.scope"):60119;function Bn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case nE:switch(e=e.type,e){case iE:case Ig:case kg:case Ng:case Ag:case jg:return e;default:switch(e=e&&e.$$typeof,e){case Mg:case $g:case Fg:case Lg:case Rg:return e;default:return t}}case aE:return t}}}function CR(e){return Bn(e)===Ig}vt.AsyncMode=iE;vt.ConcurrentMode=Ig;vt.ContextConsumer=Mg;vt.ContextProvider=Rg;vt.Element=nE;vt.ForwardRef=$g;vt.Fragment=kg;vt.Lazy=Fg;vt.Memo=Lg;vt.Portal=aE;vt.Profiler=Ng;vt.StrictMode=Ag;vt.Suspense=jg;vt.isAsyncMode=function(e){return CR(e)||Bn(e)===iE};vt.isConcurrentMode=CR;vt.isContextConsumer=function(e){return Bn(e)===Mg};vt.isContextProvider=function(e){return Bn(e)===Rg};vt.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===nE};vt.isForwardRef=function(e){return Bn(e)===$g};vt.isFragment=function(e){return Bn(e)===kg};vt.isLazy=function(e){return Bn(e)===Fg};vt.isMemo=function(e){return Bn(e)===Lg};vt.isPortal=function(e){return Bn(e)===aE};vt.isProfiler=function(e){return Bn(e)===Ng};vt.isStrictMode=function(e){return Bn(e)===Ag};vt.isSuspense=function(e){return Bn(e)===jg};vt.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kg||e===Ig||e===Ng||e===Ag||e===jg||e===U4||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Lg||e.$$typeof===Rg||e.$$typeof===Mg||e.$$typeof===$g||e.$$typeof===z4||e.$$typeof===W4||e.$$typeof===H4||e.$$typeof===B4)};vt.typeOf=Bn;xR.exports=vt;var V4=xR.exports;function dm(e,t){return dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},dm(e,t)}function it(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dm(e,t)}var qa=function(t,r){if(typeof t=="function"){t(r);return}t!==null&&typeof t=="object"&&(t.current=r)},bb=function(t){return t!==null&&typeof t=="object"&&t.hasOwnProperty("current")},Y4=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o0?x.cloneElement(i,a):i;return x.createElement(o,{innerRef:n},s)};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}function YW(e,t){var r=this.__data__,n=Bg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function eo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=pH}var hH=1/0;function El(e){if(typeof e=="string"||Qp(e))return e;var t=e+"";return t=="0"&&1/e==-hH?"-0":t}function vH(e,t,r){t=Jp(t,e);for(var n=-1,a=t.length,i=!1;++na?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0){if(++t>=EH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OH=CH(_H);const MR=OH;function Gg(e,t){return MR(NR(e,t,Zp),e+"")}var TH=Gg(yH);const se=TH;var IR={exports:{}},DH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",PH=DH,kH=PH;function $R(){}function jR(){}jR.resetWarningCache=$R;var AH=function(){function e(n,a,i,o,s,l){if(l!==kH){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jR,resetWarningCache:$R};return r.PropTypes=r,r};IR.exports=AH();var LR=IR.exports;const $=Xr(LR);function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return e===void 0}var NH=/\s/;function RH(e){for(var t=e.length;t--&&NH.test(e.charAt(t)););return t}var MH=/^\s+/;function IH(e){return e&&e.slice(0,RH(e)+1).replace(MH,"")}var VC=0/0,$H=/^[-+]0x[0-9a-f]+$/i,jH=/^0b[01]+$/i,LH=/^0o[0-7]+$/i,FH=parseInt;function FR(e){if(typeof e=="number")return e;if(Qp(e))return VC;if(Ra(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ra(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IH(e);var r=jH.test(e);return r||LH.test(e)?FH(e.slice(2),r?2:8):$H.test(e)?VC:+e}var YC=1/0,UH=17976931348623157e292;function _b(e){if(!e)return e===0?e:0;if(e=FR(e),e===YC||e===-YC){var t=e<0?-1:1;return t*UH}return e===e?e:0}function uE(e){var t=_b(e),r=t%1;return t===t?r?t-r:t:0}function UR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++rs))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&W6?new Gu:void 0;for(i.set(e,t),i.set(t,e);++f-1}function nM(e,t,r){for(var n=-1,a=e==null?0:e.length;++n-1?a[i?t[o]:o]:void 0}}var KV=Math.max;function Ob(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:uE(r);return a<0&&(a=KV(n+a,0)),eM(e,Sl(t),a)}var qV=GV(Ob);const iM=qV;function QV(e,t){var r;return Uc(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}function oM(e,t,r){if(!Ra(r))return!1;var n=typeof t;return(n=="number"?gi(r)&&Vg(t,r.length):n=="string"&&t in r)?Ug(r[t],e):!1}function Zf(e,t,r){var n=Jt(e)?YR:QV;return r&&oM(e,t,r)&&(t=void 0),n(e,Sl(t))}var XV=function(t,r){return Zf(x.Children.toArray(t),{type:r})},re=function(t){return t==null||Array.isArray(t)&&t.length===0},JV={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function sO(e){var t=typeof e;return t==="string"||t==="number"?JV[e]||e:""}var T=function(t,r){return t&&r},kr=function(t,r){return t&&t!==!0&&t+" "+r},Ct=function(t,r){return t&&(t===!0?r:t+" "+r)},mm=function(t,r){return!t||t===!0?null:t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(n){return n.replace("-"," ")+" "+r}).join(" ")},Ia=function(t){return t==="justified"?"justified":kr(t,"aligned")},ro=function(t){return kr(t,"aligned")},rn=function(t,r,n){if(r===void 0&&(r=""),n===void 0&&(n=!1),n&&t==="equal")return"equal width";var a=typeof t;return(a==="string"||a==="number")&&r?sO(t)+" "+r:sO(t)},ZV=200;function sM(e,t,r,n){var a=-1,i=rM,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=Xp(t,qg(r))),n?(i=nM,o=!1):t.length>=ZV&&(i=dE,o=!1,t=new Gu(t));e:for(;++a0&&r(s)?t>1?Jg(s,t-1,r,n,a):hE(a,s):n||(a[a.length]=s)}return a}var tY=Gg(function(e,t){return vm(e)?sM(e,Jg(t,1,vm,!0)):[]});const uO=tY;function rY(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:lE(e,t,r)}function nY(e){return e.split("")}var aY="\\ud800-\\udfff",iY="\\u0300-\\u036f",oY="\\ufe20-\\ufe2f",sY="\\u20d0-\\u20ff",lY=iY+oY+sY,uY="\\ufe0e\\ufe0f",cY="\\u200d",fY=RegExp("["+cY+aY+lY+uY+"]");function mE(e){return fY.test(e)}var lM="\\ud800-\\udfff",dY="\\u0300-\\u036f",pY="\\ufe20-\\ufe2f",hY="\\u20d0-\\u20ff",vY=dY+pY+hY,mY="\\ufe0e\\ufe0f",gY="["+lM+"]",Tb="["+vY+"]",Db="\\ud83c[\\udffb-\\udfff]",yY="(?:"+Tb+"|"+Db+")",uM="[^"+lM+"]",cM="(?:\\ud83c[\\udde6-\\uddff]){2}",fM="[\\ud800-\\udbff][\\udc00-\\udfff]",wY="\\u200d",dM=yY+"?",pM="["+mY+"]?",bY="(?:"+wY+"(?:"+[uM,cM,fM].join("|")+")"+pM+dM+")*",_Y=pM+dM+bY,EY="(?:"+[uM+Tb+"?",Tb,cM,fM,gY].join("|")+")",SY=RegExp(Db+"(?="+Db+")|"+EY+_Y,"g");function xY(e){return e.match(SY)||[]}function CY(e){return mE(e)?xY(e):nY(e)}function hM(e,t,r){t=="__proto__"&&pm?pm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var OY=Object.prototype,TY=OY.hasOwnProperty;function gE(e,t,r){var n=e[t];(!(TY.call(e,t)&&Ug(n,r))||r===void 0&&!(t in e))&&hM(e,t,r)}function vM(e,t,r,n){if(!Ra(e))return e;t=Jp(t,e);for(var a=-1,i=t.length,o=i-1,s=e;s!=null&&++a=0;a-=1)this.handlers[a].called||(this.handlers[a].called=!0,this.handlers[a](t));for(var i=n;i>=0;i-=1)this.handlers[i].called=!1}else(0,this.handlers[n])(t)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var r=[],n=this.handlers.length,a=0;a0;var r=this.handlerSets.get(t);return!!r&&r.hasHandlers()}},{key:"removeHandlers",value:function(t,r){var n=dO(this.handlerSets);if(!n.has(t))return new e(this.poolName,n);var a=n.get(t).removeHandlers(r);return a.hasHandlers()?n.set(t,a):n.delete(t),new e(this.poolName,n)}}]),e}();ta(Pb,"createByType",function(e,t,r){var n=new Map;return n.set(t,new _M(r)),new Pb(e,n)});var YY=function(){function e(t){var r=this;eh(this,e),ta(this,"handlers",new Map),ta(this,"pools",new Map),ta(this,"target",void 0),ta(this,"createEmitter",function(n){return function(a){r.pools.forEach(function(i){i.dispatchEvent(n,a)})}}),this.target=t}return th(e,[{key:"addHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t);this.pools.set(t,a.addHandlers(r,n))}else this.pools.set(t,Pb.createByType(t,r,n));this.handlers.has(r)||this.addTargetHandler(r)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t).removeHandlers(r,n);a.hasHandlers()?this.pools.set(t,a):this.pools.delete(t);var i=!1;this.pools.forEach(function(o){return i=i||o.hasHandlers(r)}),i||this.removeTargetHandler(r)}}},{key:"addTargetHandler",value:function(t){var r=this.createEmitter(t);this.handlers.set(t,r),this.target.addEventListener(t,r,!0)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t),!0),this.handlers.delete(t))}}]),e}(),GY=function(){function e(){var t=this;eh(this,e),ta(this,"targets",new Map),ta(this,"getTarget",function(r){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=hO(r);if(t.targets.has(a))return t.targets.get(a);if(!n)return null;var i=new YY(a);return t.targets.set(a,i),i}),ta(this,"removeTarget",function(r){t.targets.delete(hO(r))})}return th(e,[{key:"sub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o;this.getTarget(i).addHandlers(s,t,pO(r))}}},{key:"unsub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o,l=this.getTarget(i,!1);l&&(l.removeHandlers(s,t,pO(r)),l.hasHandlers()||this.removeTarget(i))}}}]),e}(),kb=new GY,P0=function(e){function t(){return eh(this,t),HY(this,wM(t).apply(this,arguments))}return zY(t,BY.PureComponent),th(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(r){this.unsubscribe(r),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.sub(n,a,{pool:i,target:o})}},{key:"unsubscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.unsub(n,a,{pool:i,target:o})}},{key:"render",value:function(){return null}}]),t}();ta(P0,"defaultProps",{pool:"default",target:"document"}),P0.propTypes={},gm.instance=kb,gm.default=P0;var _E;_E=gm;bE.exports=_E.default;var Rf=bE.exports.instance=_E.instance,KY=bE.exports;const Ci=Xr(KY);function EM(){}var qY=1/0,QY=_u&&1/pE(new _u([,-0]))[1]==qY?function(e){return new _u(e)}:EM;const XY=QY;var JY=200;function SM(e,t,r){var n=-1,a=rM,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=nM;else if(i>=JY){var u=t?null:XY(e);if(u)return pE(u);o=!1,a=dE,l=new Gu}else l=t?[]:s;e:for(;++n-1:!!a&&tM(e,t,r)>-1}var xM=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],p8=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],h8=[].concat(xM,p8),CM=["alt","height","src","srcSet","width","loading"],Zg=function(t,r){r===void 0&&(r={});var n=r,a=n.htmlProps,i=a===void 0?h8:a,o=n.includeAria,s=o===void 0?!0:o,l={},u={};return HV(t,function(c,f){var d=s&&(/^aria-.*$/.test(f)||f==="role"),p=Qa(i,f)||d?l:u;p[f]=c}),[l,u]},v8=typeof document=="object"&&document!==null,m8=typeof window=="object"&&window!==null&&window.self===window,g8=function e(){return Be(e.override)?v8&&m8:e.override};const Ms=g8;var y8=Math.max,w8=Math.min;function b8(e,t,r){return e>=w8(t,r)&&e0&&a.indexOf(r)===n})):[]}function P8(e,t){return[t.filter(function(r){return e.indexOf(r)===-1}),e.filter(function(r){return t.indexOf(r)===-1})]}var yO=new Map,k0=function(t,r){var n=D8(r),a=P8(yO.get(t)||[],n),i=a[0],o=a[1];t&&(i.forEach(function(s){return t.classList.add(s)}),o.forEach(function(s){return t.classList.remove(s)})),yO.set(t,n)},k8=function(){var t=this;this.add=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);a.add(n);return}var i=new Set;i.add(n),t.nodes.set(r,i)},this.del=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);if(a.size===1){t.nodes.delete(r);return}a.delete(n)}},this.emit=function(r,n){n(r,t.nodes.get(r))},this.nodes=new Map},gf=new k8;function A8(e,t){var r=b.useRef(),n=b.useRef(!1);gO(function(){if(r.current=t,n.current){var a=bb(e)?e.current:e;gf.emit(a,k0)}n.current=!0},[t]),gO(function(){var a=bb(e)?e.current:e;return gf.add(a,r),gf.emit(a,k0),function(){gf.del(a,r),gf.emit(a,k0)}},[e])}var N8=Gg(function(e,t){return vm(e)?sM(e,t):[]});const R8=N8;function qu(e){var t=e.children,r=e.className,n=e.content,a=e.size,i=z(a,"icons",r),o=V(qu,e),s=q(qu,e);return b.createElement(s,P({},o,{className:i}),re(t)?n:t)}qu.handledProps=["as","children","className","content","size"];qu.propTypes={};qu.defaultProps={as:"i"};var nl=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};for(var Hh=0;Hh<24;Hh+=1)ym[112+Hh]="F"+(Hh+1);for(var A0=0;A0<26;A0+=1){var N0=A0+65;ym[N0]=[String.fromCharCode(N0+32),String.fromCharCode(N0)]}var oe={codes:ym,getCode:function(t){return wO(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var r=wO(t);if(r&&t.key)return t.key;var n=ym[r?t.keyCode||t.which:t];return Array.isArray(n)&&(r?n=n[t.shiftKey?1:0]:n=n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};oe.Spacebar=oe[" "];oe.Digit0=oe[0];oe.Digit1=oe[1];oe.Digit2=oe[2];oe.Digit3=oe[3];oe.Digit4=oe[4];oe.Digit5=oe[5];oe.Digit6=oe[6];oe.Digit7=oe[7];oe.Digit8=oe[8];oe.Digit9=oe[9];oe.Tilde=oe["~"];oe.GraveAccent=oe["`"];oe.ExclamationPoint=oe["!"];oe.AtSign=oe["@"];oe.PoundSign=oe["#"];oe.PercentSign=oe["%"];oe.Caret=oe["^"];oe.Ampersand=oe["&"];oe.PlusSign=oe["+"];oe.MinusSign=oe["-"];oe.EqualsSign=oe["="];oe.DivisionSign=oe["/"];oe.MultiplicationSign=oe["*"];oe.Comma=oe[","];oe.Decimal=oe["."];oe.Colon=oe[":"];oe.Semicolon=oe[";"];oe.Pipe=oe["|"];oe.BackSlash=oe["\\"];oe.QuestionMark=oe["?"];oe.SingleQuote=oe["'"];oe.DoubleQuote=oe['"'];oe.LeftCurlyBrace=oe["{"];oe.RightCurlyBrace=oe["}"];oe.LeftParenthesis=oe["("];oe.RightParenthesis=oe[")"];oe.LeftAngleBracket=oe["<"];oe.RightAngleBracket=oe[">"];oe.LeftSquareBracket=oe["["];oe.RightSquareBracket=oe["]"];var M8=oe;const _r=Xr(M8);var SE=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?f-1:0),p=1;p1?p-1:0),v=1;v1?f-1:0),p=1;p1?d-1:0),h=1;h1?d-1:0),h=1;h=u}),u>=f.length-1&&(p=d[d.length-1]);else{var v=Ob(f,["value",c]);p=Qa(d,v)?v:void 0}return(!p||p<0)&&(p=d[0]),p}var PO=function(t,r){return Be(t)?r:t},kO=function(t){return t&&t.map(function(r){return yE(r,["key","value"])})};function XM(e){var t=e.flag,r=e.image,n=e.text;return Vu(n)?n:{content:b.createElement(b.Fragment,null,GM.create(t),qt.create(r),n)}}var pr=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o=u||u===1){n.open(s);return}se(n.searchRef.current,"focus")},n.handleIconClick=function(s){var l=n.props.clearable,u=n.hasValue();se(n.props,"onClick",s,n.props),s.stopPropagation(),l&&u?n.clearValue(s):n.toggle(s)},n.handleItemClick=function(s,l){var u=n.props,c=u.multiple,f=u.search,d=n.state.value,p=l.value;if(s.stopPropagation(),(c||l.disabled)&&s.nativeEvent.stopImmediatePropagation(),!l.disabled){var h=l["data-additional"],v=c?TO(n.state.value,[p]):p,y=c?!!uO(v,d).length:v!==d;y&&(n.setState({value:v}),n.handleChange(s,v)),n.clearSearchQuery(),se(f?n.searchRef.current:n.ref.current,"focus"),n.closeOnChange(s),h&&se(n.props,"onAddItem",s,P({},n.props,{value:p}))}},n.handleFocus=function(s){var l=n.state.focus;l||(se(n.props,"onFocus",s,n.props),n.setState({focus:!0}))},n.handleBlur=function(s){var l=Ea(s,"currentTarget");if(!(l&&l.contains(document.activeElement))){var u=n.props,c=u.closeOnBlur,f=u.multiple,d=u.selectOnBlur;n.isMouseDown||(se(n.props,"onBlur",s,n.props),d&&!f&&(n.makeSelectedItemActive(s,n.state.selectedIndex),c&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}},n.handleSearchChange=function(s,l){var u=l.value;s.stopPropagation();var c=n.props.minCharacters,f=n.state.open,d=u;if(se(n.props,"onSearchChange",s,P({},n.props,{searchQuery:d})),n.setState({searchQuery:d,selectedIndex:0}),!f&&d.length>=c){n.open();return}f&&c!==1&&d.lengthc||d<0)?d=l:d>c?d=0:d<0&&(d=c),u[d].disabled?n.getSelectedIndexAfterMove(s,d):d}},n.handleIconOverrides=function(s){var l=n.props.clearable,u=z(l&&n.hasValue()&&"clear",s.className);return{className:u,onClick:function(f){se(s,"onClick",f,s),n.handleIconClick(f)}}},n.clearValue=function(s){var l=n.props.multiple,u=l?[]:"";n.setState({value:u}),n.handleChange(s,u)},n.computeSearchInputTabIndex=function(){var s=n.props,l=s.disabled,u=s.tabIndex;return Be(u)?l?-1:0:u},n.computeSearchInputWidth=function(){var s=n.state.searchQuery;if(n.sizerRef.current&&s){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=s;var l=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),l}},n.computeTabIndex=function(){var s=n.props,l=s.disabled,u=s.search,c=s.tabIndex;if(!u)return l?-1:Be(c)?0:c},n.handleSearchInputOverrides=function(s){return{onChange:function(u,c){se(s,"onChange",u,c),n.handleSearchChange(u,c)}}},n.hasValue=function(){var s=n.props.multiple,l=n.state.value;return s?!Nf(l):!Be(l)&&l!==""},n.scrollSelectedItemIntoView=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=s.querySelector(".item.selected");if(l){var u=l.offsetTops.scrollTop+s.clientHeight;u?s.scrollTop=l.offsetTop:c&&(s.scrollTop=l.offsetTop+l.clientHeight-s.clientHeight)}}}},n.setOpenDirection=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=n.ref.current.getBoundingClientRect(),u=s.clientHeight,c=document.documentElement.clientHeight-l.top-l.height-u,f=l.top-u,d=c<0&&f>c;!d!=!n.state.upward&&n.setState({upward:d})}}},n.open=function(s,l){s===void 0&&(s=null),l===void 0&&(l=!0);var u=n.props,c=u.disabled,f=u.search;c||(f&&se(n.searchRef.current,"focus"),se(n.props,"onOpen",s,n.props),l&&n.setState({open:!0}),n.scrollSelectedItemIntoView())},n.close=function(s,l){l===void 0&&(l=n.handleClose),n.state.open&&(se(n.props,"onClose",s,n.props),n.setState({open:!1},l))},n.handleClose=function(){var s=document.activeElement===n.searchRef.current;!s&&n.ref.current&&n.ref.current.blur();var l=document.activeElement===n.ref.current,u=s||l;n.setState({focus:u})},n.toggle=function(s){return n.state.open?n.close(s):n.open(s)},n.renderText=function(){var s=n.props,l=s.multiple,u=s.placeholder,c=s.search,f=s.text,d=n.state,p=d.searchQuery,h=d.selectedIndex,v=d.value,y=d.open,m=n.hasValue(),g=z(u&&!m&&"default","text",c&&p&&"filtered"),E=u,w;return f?E=f:y&&!l?w=n.getSelectedItem(h):m&&(w=n.getItemByValue(v)),Yo.create(w?XM(w):E,{defaultProps:{className:g}})},n.renderSearchInput=function(){var s=n.props,l=s.search,u=s.searchInput,c=n.state.searchQuery;return l&&b.createElement(jn,{innerRef:n.searchRef},qM.create(u,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:c},overrideProps:n.handleSearchInputOverrides}))},n.renderSearchSizer=function(){var s=n.props,l=s.search,u=s.multiple;return l&&u&&b.createElement("span",{className:"sizer",ref:n.sizerRef})},n.renderLabels=function(){var s=n.props,l=s.multiple,u=s.renderLabel,c=n.state,f=c.selectedLabel,d=c.value;if(!(!l||Nf(d))){var p=bn(d,n.getItemByValue);return bn(I5(p),function(h,v){var y={active:h.value===f,as:"a",key:PO(h.key,h.value),onClick:n.handleLabelClick,onRemove:n.handleLabelRemove,value:h.value};return Xt.create(u(h,v,y),{defaultProps:y})})}},n.renderOptions=function(){var s=n.props,l=s.lazyLoad,u=s.multiple,c=s.search,f=s.noResultsMessage,d=n.state,p=d.open,h=d.selectedIndex,v=d.value;if(l&&!p)return null;var y=ou({value:n.state.value,options:n.props.options,searchQuery:n.state.searchQuery,additionLabel:n.props.additionLabel,additionPosition:n.props.additionPosition,allowAdditions:n.props.allowAdditions,deburr:n.props.deburr,multiple:n.props.multiple,search:n.props.search});if(f!==null&&c&&Nf(y))return b.createElement("div",{className:"message"},f);var m=u?function(g){return Qa(v,g)}:function(g){return g===v};return bn(y,function(g,E){return KM.create(P({active:m(g.value),selected:h===E},g,{key:PO(g.key,g.value),style:P({},g.style,{pointerEvents:"all"})}),{generateKey:!1,overrideProps:function(C){return{onClick:function(O,D){C.onClick==null||C.onClick(O,D),n.handleItemClick(O,D)}}}})})},n.renderMenu=function(){var s=n.props,l=s.children,u=s.direction,c=s.header,f=n.state.open,d=n.getDropdownMenuAriaOptions();if(!re(l)){var p=x.Children.only(l),h=z(u,T(f,"visible"),p.props.className);return x.cloneElement(p,P({className:h},d))}return b.createElement(Zu,P({},d,{direction:u,open:f}),Vo.create(c,{autoGenerateKey:!1}),n.renderOptions())},n}var r=t.prototype;return r.getInitialAutoControlledState=function(){return{focus:!1,searchQuery:""}},t.getAutoControlledStateFromProps=function(a,i,o){var s={__options:a.options,__value:i.value},l=!ed(o.__value,i.value)||!S8(kO(a.options),kO(o.__options));return l&&(s.selectedIndex=DO({additionLabel:a.additionLabel,additionPosition:a.additionPosition,allowAdditions:a.allowAdditions,deburr:a.deburr,multiple:a.multiple,search:a.search,selectedIndex:i.selectedIndex,value:i.value,options:a.options,searchQuery:i.searchQuery})),s},r.componentDidMount=function(){var a=this.state.open;a&&this.open(null,!1)},r.shouldComponentUpdate=function(a,i){return!ed(a,this.props)||!ed(i,this.state)},r.componentDidUpdate=function(a,i){var o=this.props,s=o.closeOnBlur,l=o.minCharacters,u=o.openOnFocus,c=o.search;if(!i.focus&&this.state.focus){if(!this.isMouseDown){var f=!c||c&&l===1&&!this.state.open;u&&f&&this.open()}}else i.focus&&!this.state.focus&&!this.isMouseDown&&s&&this.close();!i.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):i.open&&this.state.open,i.selectedIndex!==this.state.selectedIndex&&this.scrollSelectedItemIntoView()},r.getDropdownMenuAriaOptions=function(){var a=this.props,i=a.search,o=a.multiple,s={};return i&&(s["aria-multiselectable"]=o,s.role="listbox"),s},r.render=function(){var a=this.props,i=a.basic,o=a.button,s=a.className,l=a.compact,u=a.disabled,c=a.error,f=a.fluid,d=a.floating,p=a.icon,h=a.inline,v=a.item,y=a.labeled,m=a.loading,g=a.multiple,E=a.pointing,w=a.search,C=a.selection,S=a.scrolling,O=a.simple,D=a.trigger,N=this.state,R=N.focus,j=N.open,U=N.upward,Q=z("ui",T(j,"active visible"),T(u,"disabled"),T(c,"error"),T(m,"loading"),T(i,"basic"),T(o,"button"),T(l,"compact"),T(f,"fluid"),T(d,"floating"),T(h,"inline"),T(y,"labeled"),T(v,"item"),T(g,"multiple"),T(w,"search"),T(C,"selection"),T(O,"simple"),T(S,"scrolling"),T(U,"upward"),Ct(E,"pointing"),"dropdown",s),X=V(t,this.props),J=q(t,this.props),te=this.getDropdownAriaOptions(J,this.props);return b.createElement(jn,{innerRef:this.ref},b.createElement(J,P({},X,te,{className:Q,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),D||this.renderText(),jt.create(p,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),j&&b.createElement(Ci,{name:"keydown",on:this.closeOnEscape}),j&&b.createElement(Ci,{name:"click",on:this.closeOnDocumentClick}),R&&b.createElement(Ci,{name:"keydown",on:this.removeItemOnBackspace})))},t}(Bc);pr.handledProps=["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"];pr.propTypes={};pr.defaultProps={additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:XM,searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0};pr.autoControlledProps=["open","searchQuery","selectedLabel","value","upward"];pr.Divider=Yd;pr.Header=Vo;pr.Item=KM;pr.Menu=Zu;pr.SearchInput=qM;pr.Text=Yo;function fs(e){return b.createElement(pr,P({},e,{selection:!0}))}fs.handledProps=["options"];fs.propTypes={};fs.Divider=pr.Divider;fs.Header=pr.Header;fs.Item=pr.Item;fs.Menu=pr.Menu;var ey=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?u-1:0),f=1;f1?r-1:0),a=1;a"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function R7(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!ia(i)||!li(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(o){var s=a[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function M7(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],i=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!ia(a)||!li(a)||(Object.assign(a.style,s),Object.keys(i).forEach(function(l){a.removeAttribute(l)}))})}}const I7={name:"applyStyles",enabled:!0,phase:"write",fn:R7,effect:M7,requires:["computeStyles"]};function ii(e){return e.split("-")[0]}var $s=Math.max,wm=Math.min,pc=Math.round;function $b(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rI(){return!/^((?!chrome|android).)*safari/i.test($b())}function hc(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&ia(e)&&(a=e.offsetWidth>0&&pc(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&pc(n.height)/e.offsetHeight||1);var o=ol(e)?Ln(e):window,s=o.visualViewport,l=!rI()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/a,c=(n.top+(l&&s?s.offsetTop:0))/i,f=n.width/a,d=n.height/i;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function DE(e){var t=hc(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function nI(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&TE(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Yi(e){return Ln(e).getComputedStyle(e)}function $7(e){return["table","td","th"].indexOf(li(e))>=0}function ds(e){return((ol(e)?e.ownerDocument:e.document)||window.document).documentElement}function ty(e){return li(e)==="html"?e:e.assignedSlot||e.parentNode||(TE(e)?e.host:null)||ds(e)}function MO(e){return!ia(e)||Yi(e).position==="fixed"?null:e.offsetParent}function j7(e){var t=/firefox/i.test($b()),r=/Trident/i.test($b());if(r&&ia(e)){var n=Yi(e);if(n.position==="fixed")return null}var a=ty(e);for(TE(a)&&(a=a.host);ia(a)&&["html","body"].indexOf(li(a))<0;){var i=Yi(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function nh(e){for(var t=Ln(e),r=MO(e);r&&$7(r)&&Yi(r).position==="static";)r=MO(r);return r&&(li(r)==="html"||li(r)==="body"&&Yi(r).position==="static")?t:r||j7(e)||t}function PE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function td(e,t,r){return $s(e,wm(t,r))}function L7(e,t,r){var n=td(e,t,r);return n>r?r:n}function aI(){return{top:0,right:0,bottom:0,left:0}}function iI(e){return Object.assign({},aI(),e)}function oI(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var F7=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,iI(typeof t!="number"?t:oI(t,rh))};function U7(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,s=ii(r.placement),l=PE(s),u=[En,fa].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!o)){var f=F7(a.padding,r),d=DE(i),p=l==="y"?_n:En,h=l==="y"?ca:fa,v=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],y=o[l]-r.rects.reference[l],m=nh(i),g=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,E=v/2-y/2,w=f[p],C=g-d[c]-f[h],S=g/2-d[c]/2+E,O=td(w,S,C),D=l;r.modifiersData[n]=(t={},t[D]=O,t.centerOffset=O-S,t)}}function B7(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||nI(t.elements.popper,a)&&(t.elements.arrow=a))}const z7={name:"arrow",enabled:!0,phase:"main",fn:U7,effect:B7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vc(e){return e.split("-")[1]}var W7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function H7(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:pc(r*a)/a||0,y:pc(n*a)/a||0}}function IO(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=o.x,p=d===void 0?0:d,h=o.y,v=h===void 0?0:h,y=typeof c=="function"?c({x:p,y:v}):{x:p,y:v};p=y.x,v=y.y;var m=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),E=En,w=_n,C=window;if(u){var S=nh(r),O="clientHeight",D="clientWidth";if(S===Ln(r)&&(S=ds(r),Yi(S).position!=="static"&&s==="absolute"&&(O="scrollHeight",D="scrollWidth")),S=S,a===_n||(a===En||a===fa)&&i===ip){w=ca;var N=f&&S===C&&C.visualViewport?C.visualViewport.height:S[O];v-=N-n.height,v*=l?1:-1}if(a===En||(a===_n||a===ca)&&i===ip){E=fa;var R=f&&S===C&&C.visualViewport?C.visualViewport.width:S[D];p-=R-n.width,p*=l?1:-1}}var j=Object.assign({position:s},u&&W7),U=c===!0?H7({x:p,y:v},Ln(r)):{x:p,y:v};if(p=U.x,v=U.y,l){var Q;return Object.assign({},j,(Q={},Q[w]=g?"0":"",Q[E]=m?"0":"",Q.transform=(C.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",Q))}return Object.assign({},j,(t={},t[w]=g?v+"px":"",t[E]=m?p+"px":"",t.transform="",t))}function V7(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,o=i===void 0?!0:i,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:ii(t.placement),variation:vc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,IO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,IO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Y7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:V7,data:{}};var Vh={passive:!0};function G7(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=a===void 0?!0:a,o=n.resize,s=o===void 0?!0:o,l=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",r.update,Vh)}),s&&l.addEventListener("resize",r.update,Vh),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Vh)}),s&&l.removeEventListener("resize",r.update,Vh)}}const K7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:G7,data:{}};var q7={left:"right",right:"left",bottom:"top",top:"bottom"};function xv(e){return e.replace(/left|right|bottom|top/g,function(t){return q7[t]})}var Q7={start:"end",end:"start"};function $O(e){return e.replace(/start|end/g,function(t){return Q7[t]})}function kE(e){var t=Ln(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function AE(e){return hc(ds(e)).left+kE(e).scrollLeft}function X7(e,t){var r=Ln(e),n=ds(e),a=r.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var u=rI();(u||!u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+AE(e),y:l}}function J7(e){var t,r=ds(e),n=kE(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=$s(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=$s(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+AE(e),l=-n.scrollTop;return Yi(a||r).direction==="rtl"&&(s+=$s(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function NE(e){var t=Yi(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function sI(e){return["html","body","#document"].indexOf(li(e))>=0?e.ownerDocument.body:ia(e)&&NE(e)?e:sI(ty(e))}function rd(e,t){var r;t===void 0&&(t=[]);var n=sI(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=Ln(n),o=a?[i].concat(i.visualViewport||[],NE(n)?n:[]):n,s=t.concat(o);return a?s:s.concat(rd(ty(o)))}function jb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Z7(e,t){var r=hc(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function jO(e,t,r){return t===eI?jb(X7(e,r)):ol(t)?Z7(t,r):jb(J7(ds(e)))}function eG(e){var t=rd(ty(e)),r=["absolute","fixed"].indexOf(Yi(e).position)>=0,n=r&&ia(e)?nh(e):e;return ol(n)?t.filter(function(a){return ol(a)&&nI(a,n)&&li(a)!=="body"}):[]}function tG(e,t,r,n){var a=t==="clippingParents"?eG(e):[].concat(t),i=[].concat(a,[r]),o=i[0],s=i.reduce(function(l,u){var c=jO(e,u,n);return l.top=$s(c.top,l.top),l.right=wm(c.right,l.right),l.bottom=wm(c.bottom,l.bottom),l.left=$s(c.left,l.left),l},jO(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function lI(e){var t=e.reference,r=e.element,n=e.placement,a=n?ii(n):null,i=n?vc(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(a){case _n:l={x:o,y:t.y-r.height};break;case ca:l={x:o,y:t.y+t.height};break;case fa:l={x:t.x+t.width,y:s};break;case En:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=a?PE(a):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case dc:l[u]=l[u]-(t[c]/2-r[c]/2);break;case ip:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function op(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,i=r.strategy,o=i===void 0?e.strategy:i,s=r.boundary,l=s===void 0?_7:s,u=r.rootBoundary,c=u===void 0?eI:u,f=r.elementContext,d=f===void 0?yf:f,p=r.altBoundary,h=p===void 0?!1:p,v=r.padding,y=v===void 0?0:v,m=iI(typeof y!="number"?y:oI(y,rh)),g=d===yf?E7:yf,E=e.rects.popper,w=e.elements[h?g:d],C=tG(ol(w)?w:w.contextElement||ds(e.elements.popper),l,c,o),S=hc(e.elements.reference),O=lI({reference:S,element:E,strategy:"absolute",placement:a}),D=jb(Object.assign({},E,O)),N=d===yf?D:S,R={top:C.top-N.top+m.top,bottom:N.bottom-C.bottom+m.bottom,left:C.left-N.left+m.left,right:N.right-C.right+m.right},j=e.modifiersData.offset;if(d===yf&&j){var U=j[a];Object.keys(R).forEach(function(Q){var X=[fa,ca].indexOf(Q)>=0?1:-1,J=[_n,ca].indexOf(Q)>=0?"y":"x";R[Q]+=U[J]*X})}return R}function rG(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?tI:l,c=vc(n),f=c?s?RO:RO.filter(function(h){return vc(h)===c}):rh,d=f.filter(function(h){return u.indexOf(h)>=0});d.length===0&&(d=f);var p=d.reduce(function(h,v){return h[v]=op(e,{placement:v,boundary:a,rootBoundary:i,padding:o})[ii(v)],h},{});return Object.keys(p).sort(function(h,v){return p[h]-p[v]})}function nG(e){if(ii(e)===OE)return[];var t=xv(e);return[$O(e),t,$O(t)]}function aG(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,v=r.allowedAutoPlacements,y=t.options.placement,m=ii(y),g=m===y,E=l||(g||!h?[xv(y)]:nG(y)),w=[y].concat(E).reduce(function(ye,Le){return ye.concat(ii(Le)===OE?rG(t,{placement:Le,boundary:c,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:v}):Le)},[]),C=t.rects.reference,S=t.rects.popper,O=new Map,D=!0,N=w[0],R=0;R=0,J=X?"width":"height",te=op(t,{placement:j,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),ge=X?Q?fa:En:Q?ca:_n;C[J]>S[J]&&(ge=xv(ge));var H=xv(ge),ee=[];if(i&&ee.push(te[U]<=0),s&&ee.push(te[ge]<=0,te[H]<=0),ee.every(function(ye){return ye})){N=j,D=!1;break}O.set(j,ee)}if(D)for(var ce=h?3:1,_e=function(Le){var He=w.find(function(lt){var Ce=O.get(lt);if(Ce)return Ce.slice(0,Le).every(function(xe){return xe})});if(He)return N=He,"break"},we=ce;we>0;we--){var rt=_e(we);if(rt==="break")break}t.placement!==N&&(t.modifiersData[n]._skip=!0,t.placement=N,t.reset=!0)}}const iG={name:"flip",enabled:!0,phase:"main",fn:aG,requiresIfExists:["offset"],data:{_skip:!1}};function LO(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function FO(e){return[_n,fa,ca,En].some(function(t){return e[t]>=0})}function oG(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=op(t,{elementContext:"reference"}),s=op(t,{altBoundary:!0}),l=LO(o,n),u=LO(s,a,i),c=FO(l),f=FO(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const sG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oG};function lG(e,t,r){var n=ii(e),a=[En,_n].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[En,fa].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function uG(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=a===void 0?[0,0]:a,o=tI.reduce(function(c,f){return c[f]=lG(f,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}const cG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uG};function fG(e){var t=e.state,r=e.name;t.modifiersData[r]=lI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dG={name:"popperOffsets",enabled:!0,phase:"read",fn:fG,data:{}};function pG(e){return e==="x"?"y":"x"}function hG(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,p=d===void 0?!0:d,h=r.tetherOffset,v=h===void 0?0:h,y=op(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),m=ii(t.placement),g=vc(t.placement),E=!g,w=PE(m),C=pG(w),S=t.modifiersData.popperOffsets,O=t.rects.reference,D=t.rects.popper,N=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(S){if(i){var Q,X=w==="y"?_n:En,J=w==="y"?ca:fa,te=w==="y"?"height":"width",ge=S[w],H=ge+y[X],ee=ge-y[J],ce=p?-D[te]/2:0,_e=g===dc?O[te]:D[te],we=g===dc?-D[te]:-O[te],rt=t.elements.arrow,ye=p&&rt?DE(rt):{width:0,height:0},Le=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aI(),He=Le[X],lt=Le[J],Ce=td(0,O[te],ye[te]),xe=E?O[te]/2-ce-Ce-He-R.mainAxis:_e-Ce-He-R.mainAxis,gt=E?-O[te]/2+ce+Ce+lt+R.mainAxis:we+Ce+lt+R.mainAxis,Nt=t.elements.arrow&&nh(t.elements.arrow),sr=Nt?w==="y"?Nt.clientTop||0:Nt.clientLeft||0:0,jr=(Q=j==null?void 0:j[w])!=null?Q:0,Je=ge+xe-jr-sr,er=ge+gt-jr,Ut=td(p?wm(H,Je):H,ge,p?$s(ee,er):ee);S[w]=Ut,U[w]=Ut-ge}if(s){var lr,Jr=w==="x"?_n:En,Lr=w==="x"?ca:fa,Ot=S[C],ln=C==="y"?"height":"width",I=Ot+y[Jr],ue=Ot-y[Lr],F=[_n,En].indexOf(m)!==-1,Y=(lr=j==null?void 0:j[C])!=null?lr:0,pe=F?I:Ot-O[ln]-D[ln]-Y+R.altAxis,be=F?Ot+O[ln]+D[ln]-Y-R.altAxis:ue,Ne=p&&F?L7(pe,Ot,be):td(p?pe:I,Ot,p?be:ue);S[C]=Ne,U[C]=Ne-Ot}t.modifiersData[n]=U}}const vG={name:"preventOverflow",enabled:!0,phase:"main",fn:hG,requiresIfExists:["offset"]};function mG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gG(e){return e===Ln(e)||!ia(e)?kE(e):mG(e)}function yG(e){var t=e.getBoundingClientRect(),r=pc(t.width)/e.offsetWidth||1,n=pc(t.height)/e.offsetHeight||1;return r!==1||n!==1}function wG(e,t,r){r===void 0&&(r=!1);var n=ia(t),a=ia(t)&&yG(t),i=ds(t),o=hc(e,a,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((li(t)!=="body"||NE(i))&&(s=gG(t)),ia(t)?(l=hc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=AE(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function bG(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function a(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&a(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||a(i)}),n}function _G(e){var t=bG(e);return N7.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function EG(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function SG(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var UO={placement:"bottom",modifiers:[],strategy:"absolute"};function BO(){for(var e=arguments.length,t=new Array(e),r=0;r=n&&(r.finalize(i.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,r9))}}),e}(),a9=typeof FinalizationRegistry<"u"?FinalizationRegistry:n9,Lb=new a9(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),dI={exports:{}},pI={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ec=x;function i9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var o9=typeof Object.is=="function"?Object.is:i9,s9=Ec.useState,l9=Ec.useEffect,u9=Ec.useLayoutEffect,c9=Ec.useDebugValue;function f9(e,t){var r=t(),n=s9({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return u9(function(){a.value=r,a.getSnapshot=t,R0(a)&&i({inst:a})},[e,r,t]),l9(function(){return R0(a)&&i({inst:a}),e(function(){R0(a)&&i({inst:a})})},[e]),c9(r),r}function R0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o9(e,r)}catch{return!0}}function d9(e,t){return t()}var p9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d9:f9;pI.useSyncExternalStore=Ec.useSyncExternalStore!==void 0?Ec.useSyncExternalStore:p9;dI.exports=pI;var h9=dI.exports,v9=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},m9=function(){},hI=typeof sN().stateVersion<"u";function WO(e){e.reaction=new Od("observer".concat(e.name),function(){var t;hI||(e.stateVersion=Symbol()),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function g9(e,t){t===void 0&&(t="observed");var r=b.useRef(null),n=v9(b.useState(),2),a=n[1];if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(u){return Lb.unregister(i),i.onStoreChange=u,i.reaction||(WO(i),a(Symbol())),function(){var c;i.onStoreChange=null,(c=i.reaction)===null||c===void 0||c.dispose(),i.reaction=null}},getSnapshot:function(){return hI?sN().stateVersion:i.stateVersion}};r.current=i}var o=r.current;o.reaction||(WO(o),Lb.register(r,o,o)),b.useDebugValue(o.reaction,e9),h9.useSyncExternalStore(o.subscribe,o.getSnapshot,m9);var s,l;if(o.reaction.track(function(){try{s=e()}catch(u){l=u}}),l)throw l;return s}var vI=typeof Symbol=="function"&&Symbol.for,HO=vI?Symbol.for("react.forward_ref"):typeof x.forwardRef=="function"&&x.forwardRef(function(e){return null}).$$typeof,VO=vI?Symbol.for("react.memo"):typeof x.memo=="function"&&x.memo(function(e){return null}).$$typeof;function wt(e,t){var r;if(VO&&e.$$typeof===VO)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=t==null?void 0:t.forwardRef)!==null&&r!==void 0?r:!1,a=e,i=e.displayName||e.name;if(HO&&e.$$typeof===HO&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,l){return g9(function(){return a(s,l)},i)};return o.displayName=e.displayName,Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=x.forwardRef(o)),o=x.memo(o),w9(e,o),o}var y9={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function w9(e,t){Object.keys(e).forEach(function(r){y9[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}globalThis&&globalThis.__read;var M0;ZG(Fo.unstable_batchedUpdates);M0=Lb.finalizeAllImmediately;const b9=wt(function(){const{userStore:{user:t,logout:r,isLoggedIn:n}}=Ft();return _.jsx(ba,{inverted:!0,fixed:"top",children:_.jsxs(Ko,{children:[_.jsxs(ba.Item,{as:Bh,to:"/",header:!0,children:[_.jsx("img",{src:"/assets/logo.png",alt:"logo",style:{marginRight:"10px"}}),"Reactivities"]}),n&&_.jsxs(_.Fragment,{children:[_.jsx(ba.Item,{as:Bh,to:"/activities",name:"Activities"}),_.jsx(ba.Item,{as:Bh,to:"/errors",name:"Errors"}),_.jsx(ba.Item,{children:_.jsx($e,{as:Bh,to:"/createActivity",positive:!0,content:"Create Activity"})}),_.jsxs(ba.Item,{position:"right",children:[_.jsx(qt,{src:(t==null?void 0:t.image)||"/assets/user.png",avatar:!0,spaced:"right"}),_.jsx(pr,{pointing:"top left",text:t==null?void 0:t.displayName,children:_.jsxs(pr.Menu,{children:[_.jsx(pr.Item,{as:an,to:`/profiles/${t==null?void 0:t.username}`,text:"My Profile",icon:"user"}),_.jsx(pr.Item,{onClick:r,text:"Logout",icon:"power"})]})})]})]})]})})});var _9=function(t){return E9(t)&&!S9(t)};function E9(e){return!!e&&typeof e=="object"}function S9(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||O9(e)}var x9=typeof Symbol=="function"&&Symbol.for,C9=x9?Symbol.for("react.element"):60103;function O9(e){return e.$$typeof===C9}function T9(e){return Array.isArray(e)?[]:{}}function bm(e,t){return t.clone!==!1&&t.isMergeableObject(e)?gp(T9(e),e,t):e}function D9(e,t,r){return e.concat(t).map(function(n){return bm(n,r)})}function P9(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(a){n[a]=bm(e[a],r)}),Object.keys(t).forEach(function(a){!r.isMergeableObject(t[a])||!e[a]?n[a]=bm(t[a],r):n[a]=gp(e[a],t[a],r)}),n}function gp(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||D9,r.isMergeableObject=r.isMergeableObject||_9;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):P9(e,t,r):bm(t,r)}gp.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return gp(n,a,r)},{})};var Fb=gp,YO=Array.isArray,GO=Object.keys,k9=Object.prototype.hasOwnProperty,A9=typeof Element<"u";function Ub(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=YO(e),n=YO(t),a,i,o;if(r&&n){if(i=e.length,i!=t.length)return!1;for(a=i;a--!==0;)if(!Ub(e[a],t[a]))return!1;return!0}if(r!=n)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var f=GO(e);if(i=f.length,i!==GO(t).length)return!1;for(a=i;a--!==0;)if(!k9.call(t,f[a]))return!1;if(A9&&e instanceof Element&&t instanceof Element)return e===t;for(a=i;a--!==0;)if(o=f[a],!(o==="_owner"&&e.$$typeof)&&!Ub(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var N9=function(t,r){try{return Ub(t,r)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||n.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}};const vo=Xr(N9);var R9=!0;function ry(e,t){if(!R9){if(e)return;var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}function ny(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i=0)&&(r[a]=e[a]);return r}function iT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hy=x.createContext(void 0);hy.displayName="FormikContext";var hq=hy.Provider,vq=hy.Consumer;function UE(){var e=x.useContext(hy);return e||ry(!1),e}var oT=function(t){return Array.isArray(t)&&t.length===0},zr=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},mq=function(t){return String(Math.floor(Number(t)))===t},I0=function(t){return Object.prototype.toString.call(t)==="[object String]"},OI=function(t){return x.Children.count(t)===0},$0=function(t){return Gc(t)&&zr(t.then)};function Mt(e,t,r,n){n===void 0&&(n=0);for(var a=bI(t);e&&n=0?[]:{}}}return(i===0?e:a)[o[i]]===r?e:(r===void 0?delete a[o[i]]:a[o[i]]=r,i===0&&r===void 0&&delete n[o[i]],n)}function TI(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var a=0,i=Object.keys(e);a0?ue.map(function(Y){return R(Y,Mt(I,Y))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(F).then(function(Y){return Y.reduce(function(pe,be,Ne){return be==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||be&&(pe=oi(pe,ue[Ne],be)),pe},{})})},[R]),U=x.useCallback(function(I){return Promise.all([j(I),d.validationSchema?N(I):{},d.validate?D(I):{}]).then(function(ue){var F=ue[0],Y=ue[1],pe=ue[2],be=Fb.all([F,Y,pe],{arrayMerge:_q});return be})},[d.validate,d.validationSchema,j,D,N]),Q=Hn(function(I){return I===void 0&&(I=S.values),O({type:"SET_ISVALIDATING",payload:!0}),U(I).then(function(ue){return m.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:ue})),ue})});x.useEffect(function(){o&&m.current===!0&&vo(p.current,d.initialValues)&&Q(p.current)},[o,Q]);var X=x.useCallback(function(I){var ue=I&&I.values?I.values:p.current,F=I&&I.errors?I.errors:h.current?h.current:d.initialErrors||{},Y=I&&I.touched?I.touched:v.current?v.current:d.initialTouched||{},pe=I&&I.status?I.status:y.current?y.current:d.initialStatus;p.current=ue,h.current=F,v.current=Y,y.current=pe;var be=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!I&&!!I.isSubmitting,errors:F,touched:Y,status:pe,values:ue,isValidating:!!I&&!!I.isValidating,submitCount:I&&I.submitCount&&typeof I.submitCount=="number"?I.submitCount:0}})};if(d.onReset){var Ne=d.onReset(S.values,jr);$0(Ne)?Ne.then(be):be()}else be()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);x.useEffect(function(){m.current===!0&&!vo(p.current,d.initialValues)&&u&&(p.current=d.initialValues,X(),o&&Q(p.current))},[u,d.initialValues,X,o,Q]),x.useEffect(function(){u&&m.current===!0&&!vo(h.current,d.initialErrors)&&(h.current=d.initialErrors||vs,O({type:"SET_ERRORS",payload:d.initialErrors||vs}))},[u,d.initialErrors]),x.useEffect(function(){u&&m.current===!0&&!vo(v.current,d.initialTouched)&&(v.current=d.initialTouched||Yh,O({type:"SET_TOUCHED",payload:d.initialTouched||Yh}))},[u,d.initialTouched]),x.useEffect(function(){u&&m.current===!0&&!vo(y.current,d.initialStatus)&&(y.current=d.initialStatus,O({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var J=Hn(function(I){if(g.current[I]&&zr(g.current[I].validate)){var ue=Mt(S.values,I),F=g.current[I].validate(ue);return $0(F)?(O({type:"SET_ISVALIDATING",payload:!0}),F.then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Y}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:I,value:F}}),Promise.resolve(F))}else if(d.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),N(S.values,I).then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Mt(Y,I)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),te=x.useCallback(function(I,ue){var F=ue.validate;g.current[I]={validate:F}},[]),ge=x.useCallback(function(I){delete g.current[I]},[]),H=Hn(function(I,ue){O({type:"SET_TOUCHED",payload:I});var F=ue===void 0?a:ue;return F?Q(S.values):Promise.resolve()}),ee=x.useCallback(function(I){O({type:"SET_ERRORS",payload:I})},[]),ce=Hn(function(I,ue){var F=zr(I)?I(S.values):I;O({type:"SET_VALUES",payload:F});var Y=ue===void 0?r:ue;return Y?Q(F):Promise.resolve()}),_e=x.useCallback(function(I,ue){O({type:"SET_FIELD_ERROR",payload:{field:I,value:ue}})},[]),we=Hn(function(I,ue,F){O({type:"SET_FIELD_VALUE",payload:{field:I,value:ue}});var Y=F===void 0?r:F;return Y?Q(oi(S.values,I,ue)):Promise.resolve()}),rt=x.useCallback(function(I,ue){var F=ue,Y=I,pe;if(!I0(I)){I.persist&&I.persist();var be=I.target?I.target:I.currentTarget,Ne=be.type,ur=be.name,Zr=be.id,un=be.value,da=be.checked,io=be.outerHTML,M=be.options,L=be.multiple;F=ue||ur||Zr,Y=/number|range/.test(Ne)?(pe=parseFloat(un),isNaN(pe)?"":pe):/checkbox/.test(Ne)?Sq(Mt(S.values,F),da,un):M&&L?Eq(M):un}F&&we(F,Y)},[we,S.values]),ye=Hn(function(I){if(I0(I))return function(ue){return rt(ue,I)};rt(I)}),Le=Hn(function(I,ue,F){ue===void 0&&(ue=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:I,value:ue}});var Y=F===void 0?a:F;return Y?Q(S.values):Promise.resolve()}),He=x.useCallback(function(I,ue){I.persist&&I.persist();var F=I.target,Y=F.name,pe=F.id,be=F.outerHTML,Ne=ue||Y||pe;Le(Ne,!0)},[Le]),lt=Hn(function(I){if(I0(I))return function(ue){return He(ue,I)};He(I)}),Ce=x.useCallback(function(I){zr(I)?O({type:"SET_FORMIK_STATE",payload:I}):O({type:"SET_FORMIK_STATE",payload:function(){return I}})},[]),xe=x.useCallback(function(I){O({type:"SET_STATUS",payload:I})},[]),gt=x.useCallback(function(I){O({type:"SET_ISSUBMITTING",payload:I})},[]),Nt=Hn(function(){return O({type:"SUBMIT_ATTEMPT"}),Q().then(function(I){var ue=I instanceof Error,F=!ue&&Object.keys(I).length===0;if(F){var Y;try{if(Y=Je(),Y===void 0)return}catch(pe){throw pe}return Promise.resolve(Y).then(function(pe){return m.current&&O({type:"SUBMIT_SUCCESS"}),pe}).catch(function(pe){if(m.current)throw O({type:"SUBMIT_FAILURE"}),pe})}else if(m.current&&(O({type:"SUBMIT_FAILURE"}),ue))throw I})}),sr=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),Nt().catch(function(ue){console.warn("Warning: An unhandled error was caught from submitForm()",ue)})}),jr={resetForm:X,validateForm:Q,validateField:J,setErrors:ee,setFieldError:_e,setFieldTouched:Le,setFieldValue:we,setStatus:xe,setSubmitting:gt,setTouched:H,setValues:ce,setFormikState:Ce,submitForm:Nt},Je=Hn(function(){return c(S.values,jr)}),er=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),X()}),Ut=x.useCallback(function(I){return{value:Mt(S.values,I),error:Mt(S.errors,I),touched:!!Mt(S.touched,I),initialValue:Mt(p.current,I),initialTouched:!!Mt(v.current,I),initialError:Mt(h.current,I)}},[S.errors,S.touched,S.values]),lr=x.useCallback(function(I){return{setValue:function(F,Y){return we(I,F,Y)},setTouched:function(F,Y){return Le(I,F,Y)},setError:function(F){return _e(I,F)}}},[we,Le,_e]),Jr=x.useCallback(function(I){var ue=Gc(I),F=ue?I.name:I,Y=Mt(S.values,F),pe={name:F,value:Y,onChange:ye,onBlur:lt};if(ue){var be=I.type,Ne=I.value,ur=I.as,Zr=I.multiple;be==="checkbox"?Ne===void 0?pe.checked=!!Y:(pe.checked=!!(Array.isArray(Y)&&~Y.indexOf(Ne)),pe.value=Ne):be==="radio"?(pe.checked=Y===Ne,pe.value=Ne):ur==="select"&&Zr&&(pe.value=pe.value||[],pe.multiple=!0)}return pe},[lt,ye,S.values]),Lr=x.useMemo(function(){return!vo(p.current,S.values)},[p.current,S.values]),Ot=x.useMemo(function(){return typeof s<"u"?Lr?S.errors&&Object.keys(S.errors).length===0:s!==!1&&zr(s)?s(d):s:S.errors&&Object.keys(S.errors).length===0},[s,Lr,S.errors,d]),ln=dt({},S,{initialValues:p.current,initialErrors:h.current,initialTouched:v.current,initialStatus:y.current,handleBlur:lt,handleChange:ye,handleReset:er,handleSubmit:sr,resetForm:X,setErrors:ee,setFormikState:Ce,setFieldTouched:Le,setFieldValue:we,setFieldError:_e,setStatus:xe,setSubmitting:gt,setTouched:H,setValues:ce,submitForm:Nt,validateForm:Q,validateField:J,isValid:Ot,dirty:Lr,unregisterField:ge,registerField:te,getFieldProps:Jr,getFieldMeta:Ut,getFieldHelpers:lr,validateOnBlur:a,validateOnChange:r,validateOnMount:o});return ln}function ah(e){var t=yq(e),r=e.component,n=e.children,a=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(hq,{value:t},r?x.createElement(r,t):a?a(t):n?zr(n)?n(t):OI(n)?null:x.Children.only(n):null)}function wq(e){var t={};if(e.inner){if(e.inner.length===0)return oi(t,e.path,e.message);for(var a=e.inner,r=Array.isArray(a),n=0,a=r?a:a[Symbol.iterator]();;){var i;if(r){if(n>=a.length)break;i=a[n++]}else{if(n=a.next(),n.done)break;i=n.value}var o=i;Mt(t,o.path)||(t=oi(t,o.path,o.message))}}return t}function bq(e,t,r,n){r===void 0&&(r=!1);var a=Bb(e);return t[r?"validateSync":"validate"](a,{abortEarly:!1,context:n||a})}function Bb(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(a){return Array.isArray(a)===!0||Ku(a)?Bb(a):a!==""?a:void 0}):Ku(e[n])?t[n]=Bb(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function _q(e,t,r){var n=e.slice();return t.forEach(function(i,o){if(typeof n[o]>"u"){var s=r.clone!==!1,l=s&&r.isMergeableObject(i);n[o]=l?Fb(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[o]=Fb(e[o],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function Eq(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Sq(e,t,r){if(typeof e=="boolean")return!!t;var n=[],a=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),a=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!a?n.concat(r):a?n.slice(0,i).concat(n.slice(i+1)):n}var xq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function Hn(e){var t=x.useRef(e);return xq(function(){t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;an?a:n},0);return Array.from(dt({},t,{length:r+1}))}else return[]},sT=function(t,r){var n=typeof t=="function"?t:r;return function(a){if(Array.isArray(a)||Gc(a)){var i=ul(a);return n(i)}return a}},kq=function(e){CI(t,e);function t(n){var a;return a=e.call(this,n)||this,a.updateArrayField=function(i,o,s){var l=a.props,u=l.name,c=l.formik.setFormikState;c(function(f){var d=sT(s,i),p=sT(o,i),h=oi(f.values,u,i(Mt(f.values,u))),v=s?d(Mt(f.errors,u)):void 0,y=o?p(Mt(f.touched,u)):void 0;return oT(v)&&(v=void 0),oT(y)&&(y=void 0),dt({},f,{values:h,errors:s?oi(f.errors,u,v):f.errors,touched:o?oi(f.touched,u,y):f.touched})})},a.push=function(i){return a.updateArrayField(function(o){return[].concat(ul(o),[pq(i)])},!1,!1)},a.handlePush=function(i){return function(){return a.push(i)}},a.swap=function(i,o){return a.updateArrayField(function(s){return Dq(s,i,o)},!0,!0)},a.handleSwap=function(i,o){return function(){return a.swap(i,o)}},a.move=function(i,o){return a.updateArrayField(function(s){return Tq(s,i,o)},!0,!0)},a.handleMove=function(i,o){return function(){return a.move(i,o)}},a.insert=function(i,o){return a.updateArrayField(function(s){return j0(s,i,o)},function(s){return j0(s,i,null)},function(s){return j0(s,i,null)})},a.handleInsert=function(i,o){return function(){return a.insert(i,o)}},a.replace=function(i,o){return a.updateArrayField(function(s){return Pq(s,i,o)},!1,!1)},a.handleReplace=function(i,o){return function(){return a.replace(i,o)}},a.unshift=function(i){var o=-1;return a.updateArrayField(function(s){var l=s?[i].concat(s):[i];return o=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),o},a.handleUnshift=function(i){return function(){return a.unshift(i)}},a.handleRemove=function(i){return function(){return a.remove(i)}},a.handlePop=function(){return function(){return a.pop()}},a.remove=a.remove.bind(iT(a)),a.pop=a.pop.bind(iT(a)),a}var r=t.prototype;return r.componentDidUpdate=function(a){this.props.validateOnChange&&this.props.formik.validateOnChange&&!vo(Mt(a.formik.values,a.name),Mt(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(a){var i;return this.updateArrayField(function(o){var s=o?ul(o):[];return i||(i=s[a]),zr(s.splice)&&s.splice(a,1),zr(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},r.pop=function(){var a;return this.updateArrayField(function(i){var o=i.slice();return a||(a=o&&o.pop&&o.pop()),o},!0,!0),a},r.render=function(){var a={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,o=i.component,s=i.render,l=i.children,u=i.name,c=i.formik,f=Eo(c,["validate","validationSchema"]),d=dt({},a,{form:f,name:u});return o?x.createElement(o,d):s?s(d):l?typeof l=="function"?l(d):OI(l)?null:x.Children.only(l):null},t}(x.Component);kq.defaultProps={validateOnChange:!0};var Aq=function(e){CI(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.shouldComponentUpdate=function(a){return Mt(this.props.formik.errors,this.props.name)!==Mt(a.formik.errors,this.props.name)||Mt(this.props.formik.touched,this.props.name)!==Mt(a.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(a).length},r.render=function(){var a=this.props,i=a.component,o=a.formik,s=a.render,l=a.children,u=a.name,c=Eo(a,["component","formik","render","children","name"]),f=Mt(o.touched,u),d=Mt(o.errors,u);return f&&d?s?zr(s)?s(d):null:l?zr(l)?l(d):null:i?x.createElement(i,c,d):d:null},t}(x.Component),DI=Oq(Aq);function Xa(e){const[t,r]=vy(e.name);return _.jsxs(Hc.Field,{error:r.touched&&!!r.error,children:[_.jsx("label",{children:e.label}),_.jsx("input",{...t,...e}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const PI=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.login(r).catch(a=>n({error:a.response.data})),children:({handleSubmit:r,isSubmitting:n,errors:a})=>_.jsxs(Hc,{className:"ui form",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Login to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(Xt,{style:{marginBottom:10},basic:!0,color:"red",content:a.error})}),_.jsx($e,{loading:n,positive:!0,content:"Login",type:"submit",fluid:!0})]})})});function Cl(e){this._maxSize=e,this.clear()}Cl.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Cl.prototype.get=function(e){return this._values[e]};Cl.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Nq=/[^.^\]^[]+|(?=\[\]|\.\.)/g,kI=/^\d+$/,Rq=/^\d/,Mq=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Iq=/^\s*(['"]?)(.*?)(\1)\s*$/,BE=512,lT=new Cl(BE),uT=new Cl(BE),cT=new Cl(BE),js={Cache:Cl,split:zb,normalizePath:L0,setter:function(e){var t=L0(e);return uT.get(e)||uT.set(e,function(n,a){for(var i=0,o=t.length,s=n;ie.match(Uq)||[],yy=e=>e[0].toUpperCase()+e.slice(1),WE=(e,t)=>gy(e).join(t).toLowerCase(),AI=e=>gy(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Bq=e=>yy(AI(e)),zq=e=>WE(e,"_"),Wq=e=>WE(e,"-"),Hq=e=>yy(WE(e," ")),Vq=e=>gy(e).map(yy).join(" ");var F0={words:gy,upperFirst:yy,camelCase:AI,pascalCase:Bq,snakeCase:zq,kebabCase:Wq,sentenceCase:Hq,titleCase:Vq},HE={exports:{}};HE.exports=function(e){return NI(Yq(e),e)};HE.exports.array=NI;function NI(e,t){var r=e.length,n=new Array(r),a={},i=r,o=Gq(t),s=Kq(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||l(e[i],i,new Set);return n;function l(u,c,f){if(f.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!a[c]){a[c]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),c=p.length){f.add(u);do{var h=p[--c];l(h,s.get(h),f)}while(c);f.delete(u)}n[--r]=u}}}function Yq(e){for(var t=new Set,r=0,n=e.length;r"",tQ=/^Symbol\((.*)\)(.*)$/;function rQ(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function fT(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return rQ(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return eQ.call(e).replace(tQ,"Symbol($1)");const n=Xq.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Jq.call(e)+"]":n==="RegExp"?Zq.call(e):null}function $o(e,t){let r=fT(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=fT(this[n],t);return i!==null?i:a},2)}function RI(e){return e==null?[]:[].concat(e)}let MI,nQ=/\$\{\s*(\w+)\s*\}/g;MI=Symbol.toStringTag;let _a=class Wb{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(nQ,(a,i)=>$o(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a,i){this.name=void 0,this.message=void 0,this.stack=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[MI]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],RI(t).forEach(o=>{if(Wb.isError(o)){this.errors.push(...o.errors);const s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,Wb)}},za={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const a=n!=null&&n!==r?` (cast from the value \`${$o(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${$o(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${$o(r,!0)}\``+a}},va={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},aQ={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Hb={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},iQ={isValue:"${path} field must be ${value}"},Vb={noUnknown:"${path} field has unspecified keys: ${unknown}"},oQ={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},sQ={notType:e=>{const{path:t,value:r,spec:n}=e,a=n.types.length;if(Array.isArray(r)){if(r.lengtha)return`${t} tuple value has too many items, expected a length of ${a} but got ${r.length} for value: \`${$o(r,!0)}\``}return _a.formatError(za.notType,e)}};Object.assign(Object.create(null),{mixed:za,string:va,number:aQ,date:Hb,object:Vb,array:oQ,boolean:iQ,tuple:sQ});const VE=e=>e&&e.__isYupSchema__;class _m{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:a,otherwise:i}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new _m(t,(s,l)=>{var u;let c=o(...s)?a:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!VE(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const Gh={context:"$",value:"."};let Ol=class{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Gh.context,this.isValue=this.key[0]===Gh.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Gh.context:this.isValue?Gh.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&js.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let a=this.isContext?n:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}};Ol.prototype.__isYupRef=!0;const As=e=>e==null;function Il(e){function t({value:r,path:n="",options:a,originalValue:i,schema:o},s,l){const{name:u,test:c,params:f,message:d,skipAbsent:p}=e;let{parent:h,context:v,abortEarly:y=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=a;function g(j){return Ol.isRef(j)?j.getValue(r,h,v):j}function E(j={}){var U;const Q=Object.assign({value:r,originalValue:i,label:o.spec.label,path:j.path||n,spec:o.spec},f,j.params);for(const J of Object.keys(Q))Q[J]=g(Q[J]);const X=new _a(_a.formatError(j.message||d,Q),r,Q.path,j.type||u,(U=j.disableStackTrace)!=null?U:m);return X.params=Q,X}const w=y?s:l;let C={path:n,parent:h,type:u,from:a.from,createError:E,resolve:g,options:a,originalValue:i,schema:o};const S=j=>{_a.isError(j)?w(j):j?l(null):w(E())},O=j=>{_a.isError(j)?w(j):s(j)};if(p&&As(r))return S(!0);let N;try{var R;if(N=c.call(C,r,C),typeof((R=N)==null?void 0:R.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,O)}}catch(j){O(j);return}S(N)}return t.OPTIONS=e,t}function lQ(e,t,r,n=r){let a,i,o;return t?(js.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:a,value:r});let f=e.type==="tuple",d=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[d],e=f?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);a=r,r=r&&r[c],e=e.fields[c]}i=c,o=l?"["+s+"]":"."+s}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Em extends Set{describe(){const t=[];for(const r of this.values())t.push(Ol.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Em(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function su(e,t=new Map){if(VE(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n{this.typeError(za.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=su(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const a=Object.assign({},r.spec,n.spec);return n.spec=a,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((a,i)=>i.resolve(a,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,a,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),a=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(a&&As(i))return i;let o=$o(t),s=$o(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". + +attempted value: ${o} +`+(s!==o?`result of cast: ${s}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:o,options:r,tests:u},n,c=>{if(c.length)return a(c,l);this.runTests({path:i,value:l,originalValue:o,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:o,originalValue:s,path:l,options:u}=t,c=v=>{a||(a=!0,r(v,o))},f=v=>{a||(a=!0,n(v,o))},d=i.length,p=[];if(!d)return f([]);let h={value:o,originalValue:s,path:l,options:u,schema:this};for(let v=0;vthis.resolve(c)._validate(u,c,d,p)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((o,s)=>a._validate(t,r,(l,u)=>{_a.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new _a(l,u,void 0,void 0,i)):o(u)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw _a.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new _a(s,t,void 0,void 0,o);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(_a.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(_a.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):su(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Il({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Il({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=za.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=za.notNull){return this.nullability(!1,t)}required(t=za.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=za.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Il(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(i||o.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=RI(t).map(i=>new Ol(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new _m(a,r):_m.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Il({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=za.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Il({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),n}notOneOf(t,r=za.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Il({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:o}=r.spec;return{meta:a,label:n,optional:i,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}ui.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ui.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:o}=lQ(this,t,r,n.context);return o[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])ui.prototype[e]=ui.prototype.oneOf;for(const e of["not","nope"])ui.prototype[e]=ui.prototype.notOneOf;let uQ=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cQ=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fQ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,dQ=e=>As(e)||e===e.trim(),pQ={}.toString();function Pn(){return new II}class II extends ui{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===pQ?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||za.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=va.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=va.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=va.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||va.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=va.email){return this.matches(uQ,{name:"email",message:t,excludeEmptyString:!0})}url(t=va.url){return this.matches(cQ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=va.uuid){return this.matches(fQ,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=va.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:dQ})}lowercase(t=va.lowercase){return this.transform(r=>As(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toLowerCase()})}uppercase(t=va.uppercase){return this.transform(r=>As(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toUpperCase()})}}Pn.prototype=II.prototype;const hQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _i(e,t=0){return Number(e)||t}function vQ(e){const t=hQ.exec(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;const r={year:_i(t[1]),month:_i(t[2],1)-1,day:_i(t[3],1),hour:_i(t[4]),minute:_i(t[5]),second:_i(t[6]),millisecond:t[7]?_i(t[7].substring(0,3)):0,z:t[8]||void 0,plusMinus:t[9]||void 0,hourOffset:_i(t[10]),minuteOffset:_i(t[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}let mQ=new Date(""),gQ=e=>Object.prototype.toString.call(e)==="[object Date]";class wy extends ui{constructor(){super({type:"date",check(t){return gQ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=vQ(t),isNaN(t)?wy.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ol.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=Hb.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=Hb.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}wy.INVALID_DATE=mQ;wy.prototype;function yQ(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([o,s])=>`${o}-${s}`));function i(o,s){let l=js.split(o)[0];n.add(l),a.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Ol.isRef(s)&&s.isSibling?i(s.path,o):VE(s)&&"deps"in s&&s.deps.forEach(l=>i(l,o))}return Qq.array(Array.from(n),r).reverse()}function dT(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function $I(e){return(t,r)=>dT(e,t)-dT(e,r)}const wQ=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ov(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ov(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ov(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ov)}):"optional"in e?e.optional():e}const bQ=(e,t)=>{const r=[...js.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=js.getter(js.join(r),!0)(e);return!!(a&&n in a)};let pT=e=>Object.prototype.toString.call(e)==="[object Object]";function _Q(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const EQ=$I([]);function ih(e){return new jI(e)}class jI extends ui{constructor(t){super({type:"object",check(r){return pT(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=EQ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(a).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of s){let d=i[f],p=f in a;if(d){let h,v=a[f];u.path=(r.path?`${r.path}.`:"")+f,d=d.resolve({value:v,context:r.context,parent:l});let y=d instanceof ui?d.spec:void 0,m=y==null?void 0:y.strict;if(y!=null&&y.strip){c=c||f in a;continue}h=!r.__validating||!m?d.cast(a[f],u):a[f],h!==void 0&&(l[f]=h)}else p&&!o&&(l[f]=a[f]);(p!==f in l||l[f]!==a[f])&&(c=!0)}return c?l:a}_validate(t,r={},n,a){let{from:i=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...i],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,u)=>{if(!s||!pT(u)){a(l,u);return}o=o||u;let c=[];for(let f of this._nodes){let d=this.fields[f];!d||Ol.isRef(d)||c.push(d.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:c,value:u,originalValue:o,options:r},n,f=>{a(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const o=n[a];n[a]=o===void 0?i:o}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=yQ(t,r),n._sortErrors=$I(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ov(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r)}omit(t){const r=Object.assign({},this.fields);for(const n of t)delete r[n];return this.setFields(r)}from(t,r,n){let a=js.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return bQ(i,t)&&(o=Object.assign({},i),n||delete o[t],o[r]=a(i)),o})}json(){return this.transform(wQ)}noUnknown(t=!0,r=Vb.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=_Q(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Vb.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(F0.camelCase)}snakeCase(){return this.transformKeys(F0.snakeCase)}constantCase(){return this.transformKeys(t=>F0.snakeCase(t).toUpperCase())}describe(t){let r=super.describe(t);r.fields={};for(const[a,i]of Object.entries(this.fields)){var n;let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),r.fields[a]=i.describe(o)}return r}}ih.prototype=jI.prototype;function LI({errors:e}){return _.jsx(Ri,{error:!0,children:e&&_.jsx(Ri.List,{children:e.map((t,r)=>_.jsx(Ri.Item,{children:t},r))})})}const SQ=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{displayName:"",username:"",email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.register(r).catch(a=>n({error:a})),validationSchema:ih({displayName:Pn().required(),username:Pn().required(),email:Pn().required(),password:Pn().required()}),children:({handleSubmit:r,isSubmitting:n,errors:a,isValid:i,dirty:o})=>_.jsxs(Hc,{className:"ui form error",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Sign up to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(Xa,{placeholder:"Username",name:"username"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(LI,{errors:a.error})}),_.jsx($e,{disabled:!i||!o||n,loading:n,positive:!0,content:"Register",type:"submit",fluid:!0})]})})});var FI={},Sm={},YE={},by={},_y={};Object.defineProperty(_y,"__esModule",{value:!0});_y.createScriptEle=void 0;const xQ=(e,t)=>new Promise(r=>{var n;const i=document.getElementsByTagName("script")[0];if(document.getElementById(e)){r(void 0);return}const o=document.createElement("script");if(o.id=e,o.src=t,o.onload=r,i)(n=i.parentNode)===null||n===void 0||n.insertBefore(o,i);else{const s=document.body.childNodes;document.body.insertBefore(o,s.item(s.length-1))}});_y.createScriptEle=xQ;var UI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.paramsToObject=e.objectToParams=e.isObject=void 0;const t=a=>Object.prototype.toString.call(a)==="[object Object]";e.isObject=t;const r=a=>!(0,e.isObject)(a)||Object.keys(a).length===0?"":"?"+Object.keys(a).map(i=>`${i}=${encodeURIComponent(a[i])}`).join("&");e.objectToParams=r;const n=a=>(a==null?void 0:a.replace(/^\?/,"").split("&").reduce((i,o)=>{if(!o)return i;const[s,l]=o.split("=");return Object.assign(Object.assign({},i),{[s]:decodeURIComponent(l)})},{}))||{};e.paramsToObject=n})(UI);var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.isFacebookApp=void 0;const CQ=()=>{if(typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return e.indexOf("FBAN")>-1||e.indexOf("FBAV")>-1||e.indexOf("Instagram")>-1};Ey.isFacebookApp=CQ;(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(_y,e),r(UI,e),r(Ey,e)})(by);(function(e){var t=et&&et.__awaiter||function(a,i,o,s){function l(u){return u instanceof o?u:new o(function(c){c(u)})}return new(o||(o=Promise))(function(u,c){function f(h){try{p(s.next(h))}catch(v){c(v)}}function d(h){try{p(s.throw(h))}catch(v){c(v)}}function p(h){h.done?u(h.value):l(h.value).then(f,d)}p((s=s.apply(a,i||[])).next())})},r=et&&et.__rest||function(a,i){var o={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.indexOf(s)<0&&(o[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(a);lwindow.FB?window.FB:(console.warn("FB not found"),null),getLoginStatus(a,i=!1){const o=this.getFB();if(!o){a({status:"unknown"});return}o.getLoginStatus(a,i)},getProfile(a,i){var o;(o=this.getFB())===null||o===void 0||o.api("me",i,a)},init(a){var i;(i=this.getFB())===null||i===void 0||i.init(a)},clear(){window.FB=null;const a=document.getElementById(e.SDK_SCRIPT_ELE_ID);a&&a.remove()},isRedirected(a){var i,o;const s=(0,n.paramsToObject)(window.location.search);return((i=s.state===(a==null?void 0:a.state))!==null&&i!==void 0?i:"facebookdirect")&&s[(o=a==null?void 0:a.response_type)!==null&&o!==void 0?o:""]!==void 0},loadSdk(a,i){return t(this,void 0,void 0,function*(){yield(0,n.createScriptEle)(e.SDK_SCRIPT_ELE_ID,`https://connect.facebook.net/${a}/sdk${i?"/xfbml.customerchat":""}.js`)})},redirectToDialog(a,i){var o=r(i,["ignoreSdkError"]);window.location.href=`https://www.facebook.com/dialog/oauth${(0,n.objectToParams)(Object.assign(Object.assign({},a),o))}`},login(a,i){var o,{ignoreSdkError:s}=i,l=r(i,["ignoreSdkError"]);try{(o=this.getFB())===null||o===void 0||o.login(a,l)}catch(u){if(s)return;throw u}},logout(a){this.getLoginStatus(i=>{var o;i.status==="connected"?(o=this.getFB())===null||o===void 0||o.logout(a):a()})}}})(YE);var OQ=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),TQ=et&&et.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DQ=et&&et.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&OQ(t,e,r);return TQ(t,e),t},PQ=et&&et.__awaiter||function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(Sm,"__esModule",{value:!0});const hT=DQ(x),ms=YE,kQ=by;function AQ(e){var t,r;const{appId:n,language:a="en_US",scope:i="public_profile, email",fields:o="name,email,picture",onSuccess:s,onFail:l,onProfileSuccess:u,className:c,style:f,children:d="Login with Facebook",render:p,autoLoad:h=!1,useRedirect:v=!1,useCustomerChat:y=!1}=e,m=Object.assign(Object.assign({version:"v9.0",xfbml:!1,cookie:!1,localStorage:!0},e.initParams),{appId:n}),g=Object.assign(Object.assign({redirect_uri:typeof window<"u"?location.origin+location.pathname:"/",state:"facebookdirect",response_type:"code"},e.dialogParams),{client_id:n}),E=Object.assign(Object.assign({return_scopes:!1,ignoreSdkError:!1},e.loginOptions),{auth_nonce:typeof((t=e.loginOptions)===null||t===void 0?void 0:t.auth_nonce)=="function"?e.loginOptions.auth_nonce():(r=e.loginOptions)===null||r===void 0?void 0:r.auth_nonce,scope:i});(0,hT.useEffect)(()=>{w()},[]);const w=()=>PQ(this,void 0,void 0,function*(){yield ms.FacebookLoginClient.loadSdk(a,y),window.fbAsyncInit=()=>{ms.FacebookLoginClient.init(m);const O=ms.FacebookLoginClient.isRedirected(g);if(O===!1&&h){S();return}O===!0&&v&&C()}}),C=()=>{ms.FacebookLoginClient.login(O=>{if(!O.authResponse){l&&l({status:"loginCancelled"});return}s&&s(O.authResponse),u&&ms.FacebookLoginClient.getProfile(u,{fields:o})},Object.assign(Object.assign({},E),{scope:i}))},S=()=>{if((0,kQ.isFacebookApp)()||v){ms.FacebookLoginClient.redirectToDialog(g,E);return}if(!window.FB){l&&l({status:"facebookNotLoaded"});return}C()};return p?p({onClick:S,logout:ms.FacebookLoginClient.logout}):hT.default.createElement("button",{type:"button",onClick:S,className:c,style:f},d)}Sm.default=AQ;var BI={},zI={};Object.defineProperty(zI,"__esModule",{value:!0});var WI={};Object.defineProperty(WI,"__esModule",{value:!0});var HI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LoginStatus=void 0,function(t){t.Connected="connected",t.NotAuthorized="not_authorized",t.Unknown="unknown"}(e.LoginStatus||(e.LoginStatus={}))})(HI);(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zI,e),r(WI,e),r(HI,e)})(BI);(function(e){var t=et&&et.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=et&&et.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,i,s)},n=et&&et.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0});const a=n(Sm);r(by,e),r(BI,e),r(Sm,e),r(YE,e),e.default=a.default})(FI);const NQ=Xr(FI),RQ=wt(function(){const{userStore:t,modalStore:r}=Ft();return _.jsx(je,{inverted:!0,textAlign:"center",vertical:!0,className:"masthead",children:_.jsxs(Ko,{text:!0,children:[_.jsxs(qe,{as:"h1",inverted:!0,children:[_.jsx(qt,{size:"massive",src:"/assets/logo.png",alt:"logo",style:{marginBottom:12}}),"Reactivities"]}),t.isLoggedIn?_.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h2",inverted:!0,content:"Welcome to Reactivities"}),_.jsx($e,{as:an,to:"/activities",size:"huge",inverted:!0,children:"Go to Activities!"})]}):_.jsxs(_.Fragment,{children:[_.jsx($e,{onClick:()=>r.openModal(_.jsx(PI,{})),size:"huge",inverted:!0,children:"Login!"}),_.jsx($e,{onClick:()=>r.openModal(_.jsx(SQ,{})),size:"huge",inverted:!0,children:"Register"}),_.jsx(cc,{horizontal:!0,inverted:!0,children:"Or"}),_.jsx(NQ,{appId:"859222439029599",onSuccess:n=>{t.facebookLogin(n.accessToken),console.log("Login Success!",n)},onFail:n=>{console.log("Login Failed!",n)},className:`ui button facebook huge inverted ${t.fbLoading&&"loading"}`})]})]})})});function Sy({inverted:e=!0,content:t="Loading..."}){return _.jsx(Uo,{active:!0,inverted:e,children:_.jsx(il,{content:t})})}const MQ=wt(function(){const{modalStore:t}=Ft();return _.jsx(_O,{open:t.modal.open,onClose:t.closeModal,size:"mini",children:_.jsx(_O.Content,{children:t.modal.body})})});function IQ(){const e=hi(),{commonStore:t,userStore:r}=Ft();return x.useEffect(()=>{t.token?r.getUser().finally(()=>t.setAppLoaded()):t.setAppLoaded()},[t,r]),t.appLoaded?_.jsxs(_.Fragment,{children:[_.jsx(M4,{}),_.jsx(MQ,{}),_.jsx(pb,{position:"bottom-right",hideProgressBar:!0,theme:"colored"}),e.pathname==="/"?_.jsx(RQ,{}):_.jsxs(_.Fragment,{children:[_.jsx(b9,{}),_.jsx(Ko,{style:{marginTop:"7em"},children:_.jsx(ER,{})})]})]}):_.jsx(Sy,{content:"Loading app ..."})}const $Q=wt(IQ);function Ge(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function le(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function fe(e){le(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ma(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Kc(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function qi(e,t){le(2,arguments);var r=fe(e),n=Ge(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function GE(e,t){le(2,arguments);var r=fe(e).getTime(),n=Ge(t);return new Date(r+n)}var jQ=36e5;function LQ(e,t){le(2,arguments);var r=Ge(t);return GE(e,r*jQ)}var FQ={};function wi(){return FQ}function yp(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getDay(),h=(pa||isNaN(a.getDate()))&&(r=a)}),r||new Date(NaN)}function Tv(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getTime()-n.getTime();return a<0?-1:a>0?1:a}var qE=6e4,QE=36e5,zQ=1e3;function WQ(e,t){le(2,arguments);var r=cl(e),n=cl(t);return r.getTime()===n.getTime()}function XE(e){return le(1,arguments),e instanceof Date||Ma(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VI(e){if(le(1,arguments),!XE(e)&&typeof e!="number")return!1;var t=fe(e);return!isNaN(Number(t))}function bp(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function Gb(e){le(1,arguments);var t=fe(e),r=Math.floor(t.getMonth()/3)+1;return r}function Cm(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()-n.getFullYear()}function HQ(e,t){return le(2,arguments),fe(e).getTime()-fe(t).getTime()}var gT={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},VQ="trunc";function YQ(e){return e?gT[e]:gT[VQ]}function YI(e){le(1,arguments);var t=fe(e);return t.setHours(23,59,59,999),t}function GQ(e){le(1,arguments);var t=fe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function KQ(e){le(1,arguments);var t=fe(e);return YI(t).getTime()===GQ(t).getTime()}function qQ(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=Tv(r,n),i=Math.abs(bp(r,n)),o;if(i<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*i);var s=Tv(r,n)===-a;KQ(fe(e))&&i===1&&Tv(e,n)===1&&(s=!1),o=a*(i-Number(s))}return o===0?0:o}function QQ(e,t,r){le(2,arguments);var n=HQ(e,t)/1e3;return YQ(r==null?void 0:r.roundingMethod)(n)}function Kb(e){le(1,arguments);var t=fe(e),r=t.getMonth(),n=r-r%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function XQ(e){le(1,arguments);var t=fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JQ(e){le(1,arguments);var t=fe(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function GI(e,t){le(2,arguments);var r=Ge(t);return GE(e,-r)}var ZQ=864e5;function eX(e){le(1,arguments);var t=fe(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/ZQ)+1}function xc(e){le(1,arguments);var t=1,r=fe(e),n=r.getUTCDay(),a=(n=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function tX(e){le(1,arguments);var t=KI(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=xc(r);return n}var rX=6048e5;function qI(e){le(1,arguments);var t=fe(e),r=xc(t).getTime()-tX(t).getTime();return Math.round(r/rX)+1}function fl(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getUTCDay(),h=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var v=fl(h,t),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var m=fl(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function nX(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=JE(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=fl(p,t);return h}var aX=6048e5;function QI(e,t){le(1,arguments);var r=fe(e),n=fl(r,t).getTime()-nX(r,t).getTime();return Math.round(n/aX)+1}function ft(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return ft(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):ft(n+1,2)},d:function(t,r){return ft(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return ft(t.getUTCHours()%12||12,r.length)},H:function(t,r){return ft(t.getUTCHours(),r.length)},m:function(t,r){return ft(t.getUTCMinutes(),r.length)},s:function(t,r){return ft(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ft(i,r.length)}};const co=iX;var $l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oX={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return co.y(t,r)},Y:function(t,r,n,a){var i=JE(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return ft(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):ft(o,r.length)},R:function(t,r){var n=KI(t);return ft(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return ft(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ft(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ft(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return co.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ft(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=QI(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):ft(i,r.length)},I:function(t,r,n){var a=qI(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ft(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):co.d(t,r)},D:function(t,r,n){var a=eX(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ft(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return ft(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return ft(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=$l.noon:a===0?i=$l.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=$l.evening:a>=12?i=$l.afternoon:a>=4?i=$l.morning:i=$l.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return co.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):co.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):co.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):co.s(t,r)},S:function(t,r){return co.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return wT(o);case"XXXX":case"XX":return Ss(o);case"XXXXX":case"XXX":default:return Ss(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return wT(o);case"xxxx":case"xx":return Ss(o);case"xxxxx":case"xxx":default:return Ss(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yT(o,":");case"OOOO":default:return"GMT"+Ss(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yT(o,":");case"zzzz":default:return"GMT"+Ss(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return ft(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return ft(o,r.length)}};function yT(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t||"";return r+String(a)+o+ft(i,2)}function wT(e,t){if(e%60===0){var r=e>0?"-":"+";return r+ft(Math.abs(e)/60,2)}return Ss(e,t)}function Ss(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=ft(Math.floor(a/60),2),o=ft(a%60,2);return n+i+r+o}const sX=oX;var bT=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},XI=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},lX=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return bT(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",bT(a,r)).replace("{{time}}",XI(i,r))},uX={p:XI,P:lX};const qb=uX;var cX=["D","DD"],fX=["YY","YYYY"];function JI(e){return cX.indexOf(e)!==-1}function ZI(e){return fX.indexOf(e)!==-1}function Om(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var dX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pX=function(t,r,n){var a,i=dX[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const hX=pX;function U0(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var vX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yX={date:U0({formats:vX,defaultWidth:"full"}),time:U0({formats:mX,defaultWidth:"full"}),dateTime:U0({formats:gX,defaultWidth:"full"})};const wX=yX;var bX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_X=function(t,r,n,a){return bX[t]};const EX=_X;function wf(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var SX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},PX=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kX={ordinalNumber:PX,era:wf({values:SX,defaultWidth:"wide"}),quarter:wf({values:xX,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wf({values:CX,defaultWidth:"wide"}),day:wf({values:OX,defaultWidth:"wide"}),dayPeriod:wf({values:TX,defaultWidth:"wide",formattingValues:DX,defaultFormattingWidth:"wide"})};const AX=kX;function bf(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?RX(s,function(f){return f.test(o)}):NX(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function NX(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function RX(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var IX=/^(\d+)(th|st|nd|rd)?/i,$X=/\d+/i,jX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LX={any:[/^b/i,/^(a|c)/i]},FX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UX={any:[/1/i,/2/i,/3/i,/4/i]},BX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},HX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},VX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},GX={ordinalNumber:MX({matchPattern:IX,parsePattern:$X,valueCallback:function(t){return parseInt(t,10)}}),era:bf({matchPatterns:jX,defaultMatchWidth:"wide",parsePatterns:LX,defaultParseWidth:"any"}),quarter:bf({matchPatterns:FX,defaultMatchWidth:"wide",parsePatterns:UX,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:bf({matchPatterns:BX,defaultMatchWidth:"wide",parsePatterns:zX,defaultParseWidth:"any"}),day:bf({matchPatterns:WX,defaultMatchWidth:"wide",parsePatterns:HX,defaultParseWidth:"any"}),dayPeriod:bf({matchPatterns:VX,defaultMatchWidth:"any",parsePatterns:YX,defaultParseWidth:"any"})};const KX=GX;var qX={code:"en-US",formatDistance:hX,formatLong:wX,formatRelative:EX,localize:AX,match:KX,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ZE=qX;var QX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JX=/^'([^]*?)'?$/,ZX=/''/g,eJ=/[a-zA-Z]/;function ci(e,t,r){var n,a,i,o,s,l,u,c,f,d,p,h,v,y,m,g,E,w;le(2,arguments);var C=String(t),S=wi(),O=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:ZE,D=Ge((i=(o=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=Ge((p=(h=(v=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(m=r.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:S.weekStartsOn)!==null&&h!==void 0?h:(E=S.locale)===null||E===void 0||(w=E.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var R=fe(e);if(!VI(R))throw new RangeError("Invalid time value");var j=Sc(R),U=GI(R,j),Q={firstWeekContainsDate:D,weekStartsOn:N,locale:O,_originalDate:R},X=C.match(XX).map(function(J){var te=J[0];if(te==="p"||te==="P"){var ge=qb[te];return ge(J,O.formatLong)}return J}).join("").match(QX).map(function(J){if(J==="''")return"'";var te=J[0];if(te==="'")return tJ(J);var ge=sX[te];if(ge)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ZI(J)&&Om(J,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&JI(J)&&Om(J,t,String(e)),ge(U,J,O.localize,Q);if(te.match(eJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return J}).join("");return X}function tJ(e){var t=e.match(JX);return t?t[1].replace(ZX,"'"):e}function eS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function rJ(e){return eS({},e)}var _T=1440,nJ=2520,B0=43200,aJ=86400;function iJ(e,t,r){var n,a;le(2,arguments);var i=wi(),o=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:i.locale)!==null&&n!==void 0?n:ZE;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Tv(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=eS(rJ(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=fe(t),c=fe(e)):(u=fe(e),c=fe(t));var f=QQ(c,u),d=(Sc(c)-Sc(u))/1e3,p=Math.round((f-d)/60),h;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p<_T){var v=Math.round(p/60);return o.formatDistance("aboutXHours",v,l)}else{if(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var v=yp(h,t),y=new Date(0);y.setFullYear(f,0,p),y.setHours(0,0,0,0);var m=yp(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function fJ(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=cJ(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=yp(p,t);return h}var dJ=6048e5;function pJ(e,t){le(1,arguments);var r=fe(e),n=yp(r,t).getTime()-fJ(r,t).getTime();return Math.round(n/dJ)+1}function xt(e){return le(1,arguments),fe(e).getFullYear()}function Qi(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()>n.getTime()}function Ls(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function Qe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dm(e,t)}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tm(e)}function mJ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gJ(e,t){if(t&&(Ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function Xe(e){var t=mJ();return function(){var n=Tm(e),a;if(t){var i=Tm(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return gJ(this,a)}}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t,r){return t=cI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yJ=10,e$=function(){function e(){Ve(this,e),ae(this,"priority",void 0),ae(this,"subPriority",0)}return We(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),wJ=function(e){Qe(r,e);var t=Xe(r);function r(n,a,i,o,s){var l;return Ve(this,r),l=t.call(this),l.value=n,l.validateValue=a,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return We(r,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),r}(e$),bJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function n$(e){return e%400===0||e%4===0&&e%100!==0}var EJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var l=r$(o.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var u=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),SJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o,s){var l=JE(a,s);if(o.isTwoDigitYear){var u=r$(o.year,l);return a.setUTCFullYear(u,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}}]),r}(ot),xJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),TJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),DJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),PJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function kJ(e,t,r){le(2,arguments);var n=fe(e),a=Ge(t),i=QI(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var AJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o,s){return fl(kJ(a,o,s),s)}}]),r}(ot);function NJ(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=qI(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var RJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o){return xc(NJ(a,o))}}]),r}(ot),MJ=[31,28,31,30,31,30,31,31,30,31,30,31],IJ=[31,29,31,30,31,30,31,31,30,31,30,31],$J=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=IJ[l]:i>=1&&i<=MJ[l]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),jJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function rS(e,t,r){var n,a,i,o,s,l,u,c;le(2,arguments);var f=wi(),d=Ge((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&a!==void 0?a:(u=f.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=fe(e),h=Ge(t),v=p.getUTCDay(),y=h%7,m=(y+7)%7,g=(m=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),FJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),UJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function BJ(e,t){le(2,arguments);var r=Ge(t);r%7===0&&(r=r-7);var n=1,a=fe(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(a,i,o){return a=BJ(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),WJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),GJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(ot),KJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),qJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(ot),QJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(ot),XJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(ot),JJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Ge((h=(v=(y=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(g=n.locale)===null||g===void 0||(E=g.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&y!==void 0?y:D.weekStartsOn)!==null&&v!==void 0?v:(w=D.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&h!==void 0?h:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return S===""?fe(r):new Date(NaN);var U={firstWeekContainsDate:R,weekStartsOn:j,locale:N},Q=[new bJ],X=O.match(iZ).map(function(Ce){var xe=Ce[0];if(xe in qb){var gt=qb[xe];return gt(Ce,N.formatLong)}return Ce}).join("").match(aZ),J=[],te=ST(X),ge;try{var H=function(){var xe=ge.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ZI(xe)&&Om(xe,O,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&JI(xe)&&Om(xe,O,e);var gt=xe[0],Nt=nZ[gt];if(Nt){var sr=Nt.incompatibleTokens;if(Array.isArray(sr)){var jr=J.find(function(er){return sr.includes(er.token)||er.token===gt});if(jr)throw new RangeError("The format string mustn't contain `".concat(jr.fullToken,"` and `").concat(xe,"` at the same time"))}else if(Nt.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(xe,"` and any other token at the same time"));J.push({token:gt,fullToken:xe});var Je=Nt.run(S,xe,N.match,U);if(!Je)return{v:new Date(NaN)};Q.push(Je.setter),S=Je.rest}else{if(gt.match(uZ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+gt+"`");if(xe==="''"?xe="'":gt==="'"&&(xe=cZ(xe)),S.indexOf(xe)===0)S=S.slice(xe.length);else return{v:new Date(NaN)}}};for(te.s();!(ge=te.n()).done;){var ee=H();if(Ma(ee)==="object")return ee.v}}catch(Ce){te.e(Ce)}finally{te.f()}if(S.length>0&&lZ.test(S))return new Date(NaN);var ce=Q.map(function(Ce){return Ce.priority}).sort(function(Ce,xe){return xe-Ce}).filter(function(Ce,xe,gt){return gt.indexOf(Ce)===xe}).map(function(Ce){return Q.filter(function(xe){return xe.priority===Ce}).sort(function(xe,gt){return gt.subPriority-xe.subPriority})}).map(function(Ce){return Ce[0]}),_e=fe(r);if(isNaN(_e.getTime()))return new Date(NaN);var we=GI(_e,Sc(_e)),rt={},ye=ST(ce),Le;try{for(ye.s();!(Le=ye.n()).done;){var He=Le.value;if(!He.validate(we,U))return new Date(NaN);var lt=He.set(we,rt,U);Array.isArray(lt)?(we=lt[0],eS(rt,lt[1])):we=lt}}catch(Ce){ye.e(Ce)}finally{ye.f()}return we}function cZ(e){return e.match(oZ)[1].replace(sZ,"'")}function fZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function dZ(e,t){le(2,arguments);var r=Kb(e),n=Kb(t);return r.getTime()===n.getTime()}function pZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()}function a$(e,t){le(2,arguments);var r=fe(e).getTime(),n=fe(t.start).getTime(),a=fe(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function hZ(e,t){le(2,arguments);var r=Ge(t);return Kc(e,-r)}function vZ(e,t){var r;le(1,arguments);var n=Ge((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=wZ(e),i;if(a.date){var o=bZ(a.date,n);i=_Z(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),l=0,u;if(a.time&&(l=EZ(a.time),isNaN(l)))return new Date(NaN);if(a.timezone){if(u=SZ(a.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),f=new Date(0);return f.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),f.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),f}return new Date(s+l+u)}var qh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mZ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gZ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yZ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wZ(e){var t={},r=e.split(qh.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],qh.timeZoneDelimiter.test(t.date)&&(t.date=e.split(qh.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=qh.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function bZ(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function _Z(e,t){if(t===null)return new Date(NaN);var r=e.match(mZ);if(!r)return new Date(NaN);var n=!!r[4],a=_f(r[1]),i=_f(r[2])-1,o=_f(r[3]),s=_f(r[4]),l=_f(r[5])-1;if(n)return DZ(t,s,l)?xZ(t,s,l):new Date(NaN);var u=new Date(0);return!OZ(t,i,o)||!TZ(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}function _f(e){return e?parseInt(e):1}function EZ(e){var t=e.match(gZ);if(!t)return NaN;var r=W0(t[1]),n=W0(t[2]),a=W0(t[3]);return PZ(r,n,a)?r*QE+n*qE+a*1e3:NaN}function W0(e){return e&&parseFloat(e.replace(",","."))||0}function SZ(e){if(e==="Z")return 0;var t=e.match(yZ);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return kZ(n,a)?r*(n*QE+a*qE):NaN}function xZ(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var CZ=[31,null,31,30,31,30,31,31,30,31,30,31];function i$(e){return e%400===0||e%4===0&&e%100!==0}function OZ(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(CZ[t]||(i$(e)?29:28))}function TZ(e,t){return t>=1&&t<=(i$(e)?366:365)}function DZ(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function PZ(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function kZ(e,t){return t>=0&&t<=59}function Ya(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=lJ(o);return r.setMonth(n,Math.min(i,s)),r}function ad(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setHours(n),r}function id(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setMinutes(n),r}function Mf(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=Math.floor(r.getMonth()/3)+1,i=n-a;return Ya(r,r.getMonth()+i*3)}function AZ(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setSeconds(n),r}function Pm(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function _p(e,t){le(2,arguments);var r=Ge(t);return qi(e,-r)}function NZ(e,t){le(2,arguments);var r=Ge(t);return KE(e,-r)}function km(e,t){le(2,arguments);var r=Ge(t);return wp(e,-r)}const o$=wt(function({profile:t}){var s;const{profileStore:r,userStore:n}=Ft(),{updateFollowing:a,loading:i}=r;if(((s=n.user)==null?void 0:s.username)===t.username)return null;function o(l,u){l.preventDefault(),t.following?a(u,!1):a(u,!0)}return _.jsxs(Io,{animated:"move",children:[_.jsx(Io.Content,{visible:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,color:"teal",content:t.following?"Following":"Not following"})}),_.jsx(Io.Content,{hidden:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,basic:!0,color:t.following?"red":"green",content:t.following?"Unfollow":"Follow",loading:i,onClick:l=>o(l,t.username)})})]})}),s$=wt(function({profile:t}){function r(n){if(n)return n.length>40?n.substring(0,37)+"...":n}return _.jsxs(nr,{as:an,to:`/profiles/${t.username}`,children:[_.jsx(qt,{src:t.image||"/assets/user.png"}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{children:t.displayName}),_.jsx(nr.Description,{children:r(t.bio)})]}),_.jsxs(nr.Content,{extra:!0,children:[_.jsx(jt,{name:"users"}),t.followersCount," followers"]}),_.jsx(o$,{profile:t})]})}),RZ=wt(function({attendees:t}){const r={border:"orange 3px solid"};return _.jsx(Ib,{horizontal:!0,children:t.map(n=>_.jsx(Vc,{hoverable:!0,trigger:_.jsx(Ib.Item,{as:an,to:`/profiles/${n.username}`,children:_.jsx(qt,{size:"mini",circular:!0,src:n.image||"/assets/user.png",style:n.following?r:null})},n.username),children:_.jsx(Gi,{children:_.jsx(s$,{profile:n})})},n.username))})});function MZ({activity:e}){var t,r;return _.jsxs(je.Group,{children:[_.jsxs(je,{children:[e.isCancelled&&_.jsx(Xt,{attached:"top",color:"red",content:"Cancelled",style:{textAlign:"center"}}),_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{style:{marginBottom:3},size:"tiny",circular:!0,src:((t=e.host)==null?void 0:t.image)||"/assets/user.png"}),_.jsxs(nt.Content,{children:[_.jsx(nt.Header,{as:an,to:`/activities/${e.id}`,children:e.title}),_.jsxs(nt.Description,{children:["Hosted by ",_.jsx(an,{to:`/profiles/${e.hostUsername}`,children:(r=e.host)==null?void 0:r.displayName})]}),e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"orange",children:"You are hosting the activty"})}),e.isGoing&&!e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"green",children:"You are going to this activty"})})]})]})})]}),_.jsx(je,{children:_.jsxs("span",{children:[_.jsx(jt,{name:"clock"})," ",ci(e.date,"dd MMM yyyy h:mm aa"),_.jsx(jt,{name:"marker"})," ",e.venue]})}),_.jsx(je,{children:_.jsx(RZ,{attendees:e.attendees})}),_.jsxs(je,{clearing:!0,children:[_.jsx("span",{children:e.description}),_.jsx($e,{as:an,to:`/activities/${e.id}`,color:"teal",floated:"right",content:"View"})]})]})}const IZ=wt(function(){const{activityStore:t}=Ft(),{groupedAcivities:r}=t;return _.jsx(_.Fragment,{children:r.map(([n,a])=>_.jsxs(x.Fragment,{children:[_.jsx(qe,{sub:!0,color:"teal",children:n}),a.map(i=>_.jsx(MZ,{activity:i},i.id))]},n))})});function l$(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t-1}function oee(e,t){var r=this.__data__,n=Cy(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}qc.prototype.clear=ree;qc.prototype.delete=nee;qc.prototype.get=aee;qc.prototype.has=iee;qc.prototype.set=oee;function Tl(e){var t=-1,r=e?e.length:0;for(this.clear();++t0,ee=te!=="century",ce=Jee(te,t),_e=ee?Zee(te,t):void 0,we=P$(te,t),rt=ee?ete(te,t):void 0,ye=function(){if(ce.getFullYear()<0)return!0;var Je=tte(te,t);return u&&u>=Je}(),Le=ee&&function(){if(_e.getFullYear()<0)return!0;var Je=rte(te,t);return u&&u>=Je}(),He=l&&le?t:r&&r=e}function ute(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function M$(e,t){return xp(e[0],t)||xp(e[1],t)}function PT(e,t,r){var n=M$(t,e),a=[];if(n){a.push(r);var i=xp(e[0],t),o=xp(e[1],t);i&&a.push("".concat(r,"Start")),o&&a.push("".concat(r,"End")),i&&o&&a.push("".concat(r,"BothEnds"))}return a}function cte(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function fte(e){if(!e)throw new Error("args is required");var t=e.value,r=e.date,n=e.hover,a="react-calendar__tile",i=[a];if(!r)return i;var o=new Date,s=function(){if(Array.isArray(r))return r;var p=e.dateType;if(!p)throw new Error("dateType is required when date is not an array of two dates");return TT(p,r)}();if(xp(o,s)&&i.push("".concat(a,"--now")),!t||!cte(t))return i;var l=function(){if(Array.isArray(t))return t;var p=e.valueType;if(!p)throw new Error("valueType is required when value is not an array of two dates");return TT(p,t)}();ute(l,s)?i.push("".concat(a,"--active")):M$(l,s)&&i.push("".concat(a,"--hasActive"));var u=PT(l,s,"".concat(a,"--range"));i.push.apply(i,u);var c=Array.isArray(t)?t:[t];if(n&&c.length===1){var f=n>l[0]?[l[0],n]:[n,l[0]],d=PT(f,s,"".concat(a,"--hover"));i.push.apply(i,d)}return i}var dte=(jl={},jl[lu.ARABIC]=kt.ISLAMIC,jl[lu.HEBREW]=kt.HEBREW,jl[lu.ISO_8601]=kt.ISO_8601,jl[lu.US]=kt.GREGORY,jl);function pte(e){return e!==void 0&&e in lu}var kT=!1;function Ay(e){if(pte(e)){var t=dte[e];return ry(kT,'Specifying calendarType="'.concat(e,'" is deprecated. Use calendarType="').concat(t,'" instead.')),kT=!0,t}return e}function Ny(e){for(var t=e.className,r=e.count,n=r===void 0?3:r,a=e.dateTransform,i=e.dateType,o=e.end,s=e.hover,l=e.offset,u=e.renderTile,c=e.start,f=e.step,d=f===void 0?1:f,p=e.value,h=e.valueType,v=[],y=c;y<=o;y+=d){var m=a(y);v.push(u({classes:fte({date:m,dateType:i,hover:s,value:p,valueType:h}),date:m}))}return b.createElement(dS,{className:t,count:n,offset:l,wrap:!0},v)}function Ry(e){var t=e.activeStartDate,r=e.children,n=e.classes,a=e.date,i=e.formatAbbr,o=e.locale,s=e.maxDate,l=e.maxDateTransform,u=e.minDate,c=e.minDateTransform,f=e.onClick,d=e.onMouseOver,p=e.style,h=e.tileClassName,v=e.tileContent,y=e.tileDisabled,m=e.view,g=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof h=="function"?h(w):h},[t,a,h,m]),E=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof v=="function"?v(w):v},[t,a,v,m]);return b.createElement("button",{className:xy(n,g),disabled:u&&c(u)>a||s&&l(s)s?new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null},hS=function(t,r,n){var a=t,i=r,o=a[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, expected instance of `Date`."));var s=t.minDate;return s&&o0,ja=x.useCallback(function(De){var bt=function(){switch(er){case"start":return gS;case"end":return H$;case"range":return Kte;default:throw new Error("Invalid returnValue.")}}();return bt({maxDate:S,maxDetail:D,minDate:R,value:De})},[S,D,R,er]),bi=x.useCallback(function(De,bt){un(De);var Me={action:bt,activeStartDate:De,value:he,view:Re};ce&&!Jh(me,De)&&ce(Me)},[me,ce,he,Re]),oo=x.useCallback(function(De,bt){var Me=function(){switch(Re){case"century":return rt;case"decade":return He;case"year":return ye;case"month":return we;default:throw new Error("Invalid view: ".concat(Re,"."))}}();Me&&Me(De,bt)},[we,rt,ye,He,Re]),Cn=x.useCallback(function(De,bt){if(Tt){oo(De,bt);var Me=Ae[Ae.indexOf(Re)+1];if(!Me)throw new Error("Attempted to drill down from the lowest view.");un(De),Te(Me);var Fr={action:"drillDown",activeStartDate:De,value:he,view:Me};ce&&!Jh(me,De)&&ce(Fr),xe&&Re!==Me&&xe(Fr),lt&<(Fr)}},[me,Tt,ce,oo,lt,xe,he,Re,Ae]),On=x.useCallback(function(){if($a){var De=Ae[Ae.indexOf(Re)-1];if(!De)throw new Error("Attempted to drill up from the highest view.");var bt=Fs(De,me);un(bt),Te(De);var Me={action:"drillUp",activeStartDate:bt,value:he,view:De};ce&&!Jh(me,bt)&&ce(Me),xe&&Re!==De&&xe(Me),Ce&&Ce(Me)}},[me,$a,ce,Ce,xe,he,Re,Ae]),so=x.useCallback(function(De,bt){var Me=he;oo(De,bt);var Fr=Ut&&!G0(Me),cn;if(Ut)if(Fr)cn=Fs(yt,De);else{if(!Me)throw new Error("previousValue is required");if(Array.isArray(Me))throw new Error("previousValue must not be an array");cn=nte(yt,Me,De)}else cn=ja(De);var tf=!Ut||Fr||g?V$({maxDate:S,maxDetail:D,minDate:R,minDetail:U,value:cn,view:Re}):null;bt.persist(),un(tf),de(cn);var O2={action:"onChange",activeStartDate:tf,value:cn,view:Re};if(ce&&!Jh(me,tf)&&ce(O2),_e)if(Ut){var T2=G0(cn);if(!T2)_e(cn||null,bt);else if(a){if(Array.isArray(cn))throw new Error("value must not be an array");_e([cn||null,null],bt)}}else _e(cn||null,bt)},[me,a,ja,g,S,D,R,U,ce,_e,oo,Ut,he,yt,Re]);function ef(De){M(De)}function hs(){M(null)}x.useImperativeHandle(r,function(){return{activeStartDate:me,drillDown:Cn,drillUp:On,onChange:so,setActiveStartDate:bi,value:he,view:Re}},[me,Cn,On,so,bi,he,Re]);function Nl(De){var bt=De?P$(Re,me):Fs(Re,me),Me=Tt?Cn:so,Fr={activeStartDate:bt,hover:ut,locale:w,maxDate:S,minDate:R,onClick:Me,onMouseOver:Ut?ef:void 0,tileClassName:F,tileContent:Y,tileDisabled:pe,value:he,valueType:yt};switch(Re){case"century":return b.createElement(xte,cu({formatYear:y},Fr));case"decade":return b.createElement(Pte,cu({formatYear:y},Fr));case"year":return b.createElement(Mte,cu({formatMonth:d,formatMonthYear:p},Fr));case"month":return b.createElement(Wte,cu({calendarType:i,formatDay:c,formatLongDate:f,formatShortWeekday:h,formatWeekday:v,onClickWeekNumber:Le,onMouseLeave:Ut?hs:void 0,showFixedNumberOfWeeks:typeof Jr<"u"?Jr:lr,showNeighboringMonth:I,showWeekNumbers:ue},Fr));default:throw new Error("Invalid view: ".concat(Re,"."))}}function st(){return Ot?b.createElement(ote,{activeStartDate:me,drillUp:On,formatMonthYear:p,formatYear:y,locale:w,maxDate:S,minDate:R,navigationAriaLabel:Q,navigationAriaLive:X,navigationLabel:J,next2AriaLabel:te,next2Label:ge,nextAriaLabel:H,nextLabel:ee,prev2AriaLabel:gt,prev2Label:Nt,prevAriaLabel:sr,prevLabel:jr,setActiveStartDate:bi,showDoubleView:lr,view:Re,views:Ae}):null}var Tn=Array.isArray(he)?he:[he];return b.createElement("div",{className:xy(Xh,Ut&&Tn.length===1&&"".concat(Xh,"--selectRange"),lr&&"".concat(Xh,"--doubleView"),o),ref:E},st(),b.createElement("div",{className:"".concat(Xh,"__viewContainer"),onBlur:Ut?hs:void 0,onMouseLeave:Ut?hs:void 0},Nl(),lr?Nl(!0):null))}),BT=$.instanceOf(Date),zT=$.oneOfType([$.string,$.instanceOf(Date)]),WT=$.oneOfType([zT,Ste(zT)]);Y$.propTypes={activeStartDate:BT,allowPartialRange:$.bool,calendarType:I$,className:Am,defaultActiveStartDate:BT,defaultValue:WT,defaultView:Nm,formatDay:$.func,formatLongDate:$.func,formatMonth:$.func,formatMonthYear:$.func,formatShortWeekday:$.func,formatWeekday:$.func,formatYear:$.func,goToRangeStartOnSelect:$.bool,inputRef:bte,locale:$.string,maxDate:hS,maxDetail:$.oneOf(xu),minDate:pS,minDetail:$.oneOf(xu),navigationAriaLabel:$.string,navigationAriaLive:$.oneOf(["off","polite","assertive"]),navigationLabel:$.func,next2AriaLabel:$.string,next2Label:$.node,nextAriaLabel:$.string,nextLabel:$.node,onActiveStartDateChange:$.func,onChange:$.func,onClickDay:$.func,onClickDecade:$.func,onClickMonth:$.func,onClickWeekNumber:$.func,onClickYear:$.func,onDrillDown:$.func,onDrillUp:$.func,onViewChange:$.func,prev2AriaLabel:$.string,prev2Label:$.node,prevAriaLabel:$.string,prevLabel:$.node,returnValue:$.oneOf(["start","end","range"]),selectRange:$.bool,showDoubleView:$.bool,showFixedNumberOfWeeks:$.bool,showNavigation:$.bool,showNeighboringMonth:$.bool,showWeekNumbers:$.bool,tileClassName:$.oneOfType([$.func,Am]),tileContent:$.oneOfType([$.func,$.node]),tileDisabled:$.func,value:WT,view:Nm};const Qte=Y$,Xte=wt(function(){const{activityStore:{predicate:t,setPredicate:r}}=Ft();return _.jsxs(_.Fragment,{children:[_.jsxs(ba,{vertical:!0,size:"large",style:{width:"100%",marginTop:25},children:[_.jsx(qe,{icon:"filter",attached:!0,color:"teal",content:"Filters"}),_.jsx(ba.Item,{content:"All Activities",active:t.has("all"),onClick:()=>r("all","true")}),_.jsx(ba.Item,{content:"I'm going",active:t.has("isGoing"),onClick:()=>r("isGoing","true")}),_.jsx(ba.Item,{content:"I'm hosting",active:t.has("isHost"),onClick:()=>r("isHost","true")})]}),_.jsx(qe,{}),_.jsx(Qte,{onChange:n=>r("startDate",n),value:t.get("startDate")||new Date})]})});class Jte{constructor(t,r){Z(this,"data");Z(this,"pagination");this.data=t,this.pagination=r}}class l_{constructor(t=1,r=2){Z(this,"pageNumber");Z(this,"pageSize");this.pageNumber=t,this.pageSize=r}}class u_ extends x.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const r=this.props.getScrollParent&&this.props.getScrollParent();return r??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,r=window,n=this.getParentElement(t);let a;if(this.props.useWindow){const i=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:i.scrollTop;this.props.isReverse?a=o:a=this.calculateOffset(t,o)}else this.props.isReverse?a=n.scrollTop:a=t.scrollHeight-n.scrollTop-n.clientHeight;a{this.scrollComponent=m,c&&c(m)};const y=[r];return a&&(s?o?y.unshift(s):y.push(s):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),b.createElement(n,v,y)}}Z(u_,"propTypes",{children:$.node.isRequired,element:$.node,hasMore:$.bool,initialLoad:$.bool,isReverse:$.bool,loader:$.node,loadMore:$.func.isRequired,pageStart:$.number,ref:$.func,getScrollParent:$.func,threshold:$.number,useCapture:$.bool,useWindow:$.bool}),Z(u_,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});function HT(){return _.jsx(_.Fragment,{children:_.jsx(xr,{fluid:!0,style:{marginTop:25},children:_.jsxs(je.Group,{children:[_.jsx(je,{style:{minHeight:110},children:_.jsxs(xr,{children:[_.jsxs(xr.Header,{image:!0,children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]}),_.jsx(xr.Paragraph,{children:_.jsx(xr.Line,{})})]})}),_.jsx(je,{children:_.jsxs(xr,{children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]})}),_.jsx(je,{secondary:!0,style:{minHeight:70}}),_.jsx(je,{clearing:!0,children:_.jsx($e,{disabled:!0,color:"blue",floated:"right",content:"View"})})]})})})}const Zte=wt(function(){const{activityStore:t}=Ft(),{loadActivities:r,activityRegistry:n,setPagingParams:a,pagination:i}=t,[o,s]=x.useState(!1);function l(){s(!0),a(new l_(i.currentPage+1)),r().then(()=>s(!1))}return x.useEffect(()=>{n.size<=1&&r()},[r,n.size]),_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"10",children:t.loadingInitial&&n.size===0&&!o?_.jsxs(_.Fragment,{children:[_.jsx(HT,{}),_.jsx(HT,{})]}):_.jsx(u_,{pageStart:0,loadMore:l,hasMore:!o&&!!i&&i.currentPagen.setValue(i.value),onBlur:()=>n.setTouched(!0),placeholder:e.placeholder}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const ore=[{text:"Drinks",value:"drinks"},{text:"Culture",value:"culture"},{text:"Film",value:"film"},{text:"Food",value:"food"},{text:"Music",value:"music"},{text:"Travel",value:"travel"}];var K$={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a=0)&&(r[a]=e[a]);return r}function YT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cre(e,t,r){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(r):e.classList.contains(r)}function fre(e,t,r){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&cre(e,t,r))return!0;e=e.parentNode||e.host}return e}function dre(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var pre=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,r=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,r),window.removeEventListener("testPassiveEventSupport",n,r),t}};function hre(e){return e===void 0&&(e=0),function(){return++e}}var vre=hre(),f_,ev={},K0={},mre=["touchstart","touchmove"],gre="ignore-react-onclickoutside";function GT(e,t){var r={},n=mre.indexOf(t)!==-1;return n&&f_&&(r.passive=!e.props.preventDefault),r}function Iy(e,t){var r,n,a=e.displayName||e.name||"Component";return n=r=function(i){lre(o,i);function o(l){var u;return u=i.call(this,l)||this,u.__outsideClickHandler=function(c){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(c);return}var f=u.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(c);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(c);return}throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var c=u.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(c):typeof c.setClickOutsideRef=="function"?c.setClickOutsideRef():Fo.findDOMNode(c)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||K0[u._uid])){typeof f_>"u"&&(f_=pre()),K0[u._uid]=!0;var c=u.props.eventTypes;c.forEach||(c=[c]),ev[u._uid]=function(f){if(u.componentNode!==null&&(u.props.preventDefault&&f.preventDefault(),u.props.stopPropagation&&f.stopPropagation(),!(u.props.excludeScrollbar&&dre(f)))){var d=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;fre(d,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(f)}},c.forEach(function(f){document.addEventListener(f,ev[u._uid],GT(YT(u),f))})}},u.disableOnClickOutside=function(){delete K0[u._uid];var c=ev[u._uid];if(c&&typeof document<"u"){var f=u.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(d){return document.removeEventListener(d,c,GT(YT(u),d))}),delete ev[u._uid]}},u.getRef=function(c){return u.instanceRef=c},u._uid=vre(),u}var s=o.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var u=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(u),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+a+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var u=this.props;u.excludeScrollbar;var c=ure(u,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,x.createElement(e,c)},o}(x.Component),r.displayName="OnClickOutside("+a+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:gre,preventDefault:!1,stopPropagation:!1},r.getClass=function(){return e.getClass?e.getClass():e},n}var KT=Object.prototype.toString,q$=function(t){var r=KT.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&KT.call(t.callee)==="[object Function]"),n},q0,qT;function yre(){if(qT)return q0;qT=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=q$,a=Object.prototype.propertyIsEnumerable,i=!a.call({toString:null},"toString"),o=a.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",v=r.call(p)==="[object Function]",y=n(p),m=h&&r.call(p)==="[object String]",g=[];if(!h&&!v&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&v;if(m&&p.length>0&&!t.call(p,0))for(var w=0;w0)for(var C=0;C"u"||!Sr?Fe:Sr(Uint8Array),Bs={"%AggregateError%":typeof AggregateError>"u"?Fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Fe:ArrayBuffer,"%ArrayIteratorPrototype%":Ll&&Sr?Sr([][Symbol.iterator]()):Fe,"%AsyncFromSyncIteratorPrototype%":Fe,"%AsyncFunction%":Wl,"%AsyncGenerator%":Wl,"%AsyncGeneratorFunction%":Wl,"%AsyncIteratorPrototype%":Wl,"%Atomics%":typeof Atomics>"u"?Fe:Atomics,"%BigInt%":typeof BigInt>"u"?Fe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Fe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Fe:FinalizationRegistry,"%Function%":J$,"%GeneratorFunction%":Wl,"%Int8Array%":typeof Int8Array>"u"?Fe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Fe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ll&&Sr?Sr(Sr([][Symbol.iterator]())):Fe,"%JSON%":typeof JSON=="object"?JSON:Fe,"%Map%":typeof Map>"u"?Fe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ll||!Sr?Fe:Sr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Fe:Promise,"%Proxy%":typeof Proxy>"u"?Fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Fe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ll||!Sr?Fe:Sr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ll&&Sr?Sr(""[Symbol.iterator]()):Fe,"%Symbol%":Ll?Symbol:Fe,"%SyntaxError%":Cc,"%ThrowTypeError%":Rre,"%TypedArray%":Ire,"%TypeError%":Cu,"%Uint8Array%":typeof Uint8Array>"u"?Fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Fe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Fe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Fe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Fe:WeakSet};if(Sr)try{null.error}catch(e){var $re=Sr(Sr(e));Bs["%Error.prototype%"]=$re}var jre=function e(t){var r;if(t==="%AsyncFunction%")r=X0("async function () {}");else if(t==="%GeneratorFunction%")r=X0("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=X0("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Sr&&(r=Sr(a.prototype))}return Bs[t]=r,r},eD={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fh=wS,jm=Nre,Lre=fh.call(Function.call,Array.prototype.concat),Fre=fh.call(Function.apply,Array.prototype.splice),tD=fh.call(Function.call,String.prototype.replace),Lm=fh.call(Function.call,String.prototype.slice),Ure=fh.call(Function.call,RegExp.prototype.exec),Bre=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zre=/\\(\\)?/g,Wre=function(t){var r=Lm(t,0,1),n=Lm(t,-1);if(r==="%"&&n!=="%")throw new Cc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Cc("invalid intrinsic syntax, expected opening `%`");var a=[];return tD(t,Bre,function(i,o,s,l){a[a.length]=s?tD(l,zre,"$1"):o||i}),a},Hre=function(t,r){var n=t,a;if(jm(eD,n)&&(a=eD[n],n="%"+a[0]+"%"),jm(Bs,n)){var i=Bs[n];if(i===Wl&&(i=jre(n)),typeof i>"u"&&!r)throw new Cu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new Cc("intrinsic "+t+" does not exist!")},dh=function(t,r){if(typeof t!="string"||t.length===0)throw new Cu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Cu('"allowMissing" argument must be a boolean');if(Ure(/^%?[^%]*%?$/,t)===null)throw new Cc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wre(t),a=n.length>0?n[0]:"",i=Hre("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],Fre(n,Lre([0,1],u)));for(var c=1,f=!0;c=n.length){var v=Us(s,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[d]}else f=jm(s,d),s=s[d];f&&!l&&(Bs[o]=s)}}return s},Z$={exports:{}};(function(e){var t=wS,r=dh,n=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(a,n),o=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var d=i(t,a,arguments);if(o&&s){var p=o(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var u=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u})(Z$);var bS=Z$.exports,ej=dh,tj=bS,Vre=tj(ej("String.prototype.indexOf")),rj=function(t,r){var n=ej(t,!!r);return typeof n=="function"&&Vre(t,".prototype.")>-1?tj(n):n},Yre=yS(),Gre=rj,d_=Gre("Object.prototype.toString"),$y=function(t){return Yre&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:d_(t)==="[object Arguments]"},nj=function(t){return $y(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&d_(t)!=="[object Array]"&&d_(t.callee)==="[object Function]"},Kre=function(){return $y(arguments)}();$y.isLegacyArguments=nj;var qre=Kre?$y:nj,Qre=dh,p_=Qre("%Object.defineProperty%",!0),h_=function(){if(p_)try{return p_({},"a",{value:1}),!0}catch{return!1}return!1};h_.hasArrayLengthDefineBug=function(){if(!h_())return null;try{return p_([],"length",{value:1}).length!==1}catch{return!0}};var _S=h_,Z0,rD;function Xre(){if(rD)return Z0;rD=1;var e=dh,t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return Z0=t,Z0}var Jre=_S(),ES=dh,nD=Jre&&ES("%Object.defineProperty%",!0),Zre=ES("%SyntaxError%"),Fl=ES("%TypeError%"),aD=Xre(),aj=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Fl("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Fl("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Fl("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Fl("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Fl("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Fl("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!aD&&aD(t,r);if(nD)nD(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new Zre("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ene=Q$,tne=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",rne=Object.prototype.toString,nne=Array.prototype.concat,iD=aj,ane=function(e){return typeof e=="function"&&rne.call(e)==="[object Function]"},ij=_S(),ine=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!ane(n)||!n())return}ij?iD(e,t,r,!0):iD(e,t,r)},oj=function(e,t){var r=arguments.length>2?arguments[2]:{},n=ene(t);tne&&(n=nne.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a2&&!!arguments[2];return(!n||Ene)&&(_ne?sD(t,"name",r,!0,!0):sD(t,"name",r)),t},Cne=xne,One=Object,Tne=TypeError,hj=Cne(function(){if(this!=null&&this!==One(this))throw new Tne("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Dne=hj,Pne=ph.supportsDescriptors,kne=Object.getOwnPropertyDescriptor,vj=function(){if(Pne&&/a/mig.flags==="gim"){var t=kne(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return Dne},Ane=ph.supportsDescriptors,Nne=vj,Rne=Object.getOwnPropertyDescriptor,Mne=Object.defineProperty,Ine=TypeError,lD=Object.getPrototypeOf,$ne=/a/,jne=function(){if(!Ane||!lD)throw new Ine("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Nne(),r=lD($ne),n=Rne(r,"flags");return(!n||n.get!==t)&&Mne(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},Lne=ph,Fne=bS,Une=hj,mj=vj,Bne=jne,gj=Fne(mj());Lne(gj,{getPolyfill:mj,implementation:Une,shim:Bne});var zne=gj,Wne=Date.prototype.getDay,Hne=function(t){try{return Wne.call(t),!0}catch{return!1}},Vne=Object.prototype.toString,Yne="[object Date]",Gne=yS(),Kne=function(t){return typeof t!="object"||t===null?!1:Gne?Hne(t):Vne.call(t)===Yne},uD=Q$,cD=qre,fD=hne,dD=yne,pD=zne,hD=Kne,vD=Date.prototype.getTime;function yj(e,t,r){var n=r||{};return(n.strict?fD(e,t):e===t)?!0:!e||!t||typeof e!="object"&&typeof t!="object"?n.strict?fD(e,t):e==t:qne(e,t,n)}function mD(e){return e==null}function gD(e){return!(!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number")}function qne(e,t,r){var n,a;if(typeof e!=typeof t||mD(e)||mD(t)||e.prototype!==t.prototype||cD(e)!==cD(t))return!1;var i=dD(e),o=dD(t);if(i!==o)return!1;if(i||o)return e.source===t.source&&pD(e)===pD(t);if(hD(e)&&hD(t))return vD.call(e)===vD.call(t);var s=gD(e),l=gD(t);if(s!==l)return!1;if(s||l){if(e.length!==t.length)return!1;for(n=0;n=0;n--)if(u[n]!=c[n])return!1;for(n=u.length-1;n>=0;n--)if(a=u[n],!yj(e[a],t[a],r))return!1;return!0}var Qne=yj;const Xne=Xr(Qne);/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1 + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */var hh=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Jne=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();function Zne(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function eae(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Jne))}}var tae=hh&&window.Promise,rae=tae?Zne:eae;function wj(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Al(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function SS(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function vh(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Al(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+n)?e:vh(SS(e))}function bj(e){return e&&e.referenceNode?e.referenceNode:e}var yD=hh&&!!(window.MSInputMethodContext&&document.documentMode),wD=hh&&/MSIE 10/.test(navigator.userAgent);function Xc(e){return e===11?yD:e===10?wD:yD||wD}function Oc(e){if(!e)return document.documentElement;for(var t=Xc(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Al(r,"position")==="static"?Oc(r):r}function nae(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Oc(e.firstElementChild)===e}function y_(e){return e.parentNode!==null?y_(e.parentNode):e}function Fm(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,a=r?t:e,i=document.createRange();i.setStart(n,0),i.setEnd(a,0);var o=i.commonAncestorContainer;if(e!==o&&t!==o||n.contains(a))return nae(o)?o:Oc(o);var s=y_(e);return s.host?Fm(s.host,t):Fm(e,y_(t).host)}function Tc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[r]}return e[r]}function aae(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Tc(t,"top"),a=Tc(t,"left"),i=r?-1:1;return e.top+=n*i,e.bottom+=n*i,e.left+=a*i,e.right+=a*i,e}function bD(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function _D(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Xc(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function _j(e){var t=e.body,r=e.documentElement,n=Xc(10)&&getComputedStyle(r);return{height:_D("Height",t,r,n),width:_D("Width",t,r,n)}}var iae=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},oae=function(){function e(t,r){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!1,n=Xc(10),a=t.nodeName==="HTML",i=w_(e),o=w_(t),s=vh(e),l=Al(t),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);r&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=ns({top:i.top-o.top-u,left:i.left-o.left-c,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!n&&a){var d=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(n&&!r?t.contains(s):t===s&&s.nodeName!=="BODY")&&(f=aae(f,t)),f}function sae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=xS(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),i=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:Tc(r),s=t?0:Tc(r,"left"),l={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:a,height:i};return ns(l)}function Ej(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Al(e,"position")==="fixed")return!0;var r=SS(e);return r?Ej(r):!1}function Sj(e){if(!e||!e.parentElement||Xc())return document.documentElement;for(var t=e.parentElement;t&&Al(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function CS(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},o=a?Sj(e):Fm(e,bj(t));if(n==="viewport")i=sae(o,a);else{var s=void 0;n==="scrollParent"?(s=vh(SS(t)),s.nodeName==="BODY"&&(s=e.ownerDocument.documentElement)):n==="window"?s=e.ownerDocument.documentElement:s=n;var l=xS(s,o,a);if(s.nodeName==="HTML"&&!Ej(o)){var u=_j(e.ownerDocument),c=u.height,f=u.width;i.top+=l.top-l.marginTop,i.bottom=c+l.top,i.left+=l.left-l.marginLeft,i.right=f+l.left}else i=l}r=r||0;var d=typeof r=="number";return i.left+=d?r:r.left||0,i.top+=d?r:r.top||0,i.right-=d?r:r.right||0,i.bottom-=d?r:r.bottom||0,i}function lae(e){var t=e.width,r=e.height;return t*r}function xj(e,t,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=CS(r,n,i,a),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(d){return ra({key:d},s[d],{area:lae(s[d])})}).sort(function(d,p){return p.area-d.area}),u=l.filter(function(d){var p=d.width,h=d.height;return p>=r.clientWidth&&h>=r.clientHeight}),c=u.length>0?u[0].key:l[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function Cj(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=n?Sj(t):Fm(t,bj(r));return xS(r,a,n)}function Oj(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+n};return i}function Um(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function Tj(e,t,r){r=r.split("-")[0];var n=Oj(e),a={width:n.width,height:n.height},i=["right","left"].indexOf(r)!==-1,o=i?"top":"left",s=i?"left":"top",l=i?"height":"width",u=i?"width":"height";return a[o]=t[o]+t[l]/2-n[l]/2,r===s?a[s]=t[s]-n[u]:a[s]=t[Um(s)],a}function mh(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function uae(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var n=mh(e,function(a){return a[t]===r});return e.indexOf(n)}function Dj(e,t,r){var n=r===void 0?e:e.slice(0,uae(e,"name",r));return n.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&wj(i)&&(t.offsets.popper=ns(t.offsets.popper),t.offsets.reference=ns(t.offsets.reference),t=i(t,a))}),t}function cae(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Cj(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=xj(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Tj(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Dj(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Pj(e,t){return e.some(function(r){var n=r.name,a=r.enabled;return a&&n===t})}function OS(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;no[p]&&(e.offsets.popper[f]+=s[f]+h-o[p]),e.offsets.popper=ns(e.offsets.popper);var v=s[f]+s[u]/2-h/2,y=Al(e.instance.popper),m=parseFloat(y["margin"+c]),g=parseFloat(y["border"+c+"Width"]),E=v-e.offsets.popper[f]-m-g;return E=Math.max(Math.min(o[u]-h,E),0),e.arrowElement=n,e.offsets.arrow=(r={},Dc(r,f,Math.round(E)),Dc(r,d,""),r),e}function Sae(e){return e==="end"?"start":e==="start"?"end":e}var Rj=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],tw=Rj.slice(3);function ED(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=tw.indexOf(e),n=tw.slice(r+1).concat(tw.slice(0,r));return t?n.reverse():n}var rw={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function xae(e,t){if(Pj(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=CS(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],a=Um(n),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case rw.FLIP:o=[n,a];break;case rw.CLOCKWISE:o=ED(n);break;case rw.COUNTERCLOCKWISE:o=ED(n,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(n!==s||o.length===l+1)return e;n=e.placement.split("-")[0],a=Um(n);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=n==="left"&&f(u.right)>f(c.left)||n==="right"&&f(u.left)f(c.top)||n==="bottom"&&f(u.top)f(r.right),v=f(u.top)f(r.bottom),m=n==="left"&&p||n==="right"&&h||n==="top"&&v||n==="bottom"&&y,g=["top","bottom"].indexOf(n)!==-1,E=!!t.flipVariations&&(g&&i==="start"&&p||g&&i==="end"&&h||!g&&i==="start"&&v||!g&&i==="end"&&y),w=!!t.flipVariationsByContent&&(g&&i==="start"&&h||g&&i==="end"&&p||!g&&i==="start"&&y||!g&&i==="end"&&v),C=E||w;(d||m||C)&&(e.flipped=!0,(d||m)&&(n=o[l+1]),C&&(i=Sae(i)),e.placement=n+(i?"-"+i:""),e.offsets.popper=ra({},e.offsets.popper,Tj(e.instance.popper,e.offsets.reference,e.placement)),e=Dj(e.instance.modifiers,e,"flip"))}),e}function Cae(e){var t=e.offsets,r=t.popper,n=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=["top","bottom"].indexOf(a)!==-1,s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return r[s]i(n[s])&&(e.offsets.popper[l]=i(n[s])),e}function Oae(e,t,r,n){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(o.indexOf("%")===0){var s=void 0;switch(o){case"%p":s=r;break;case"%":case"%r":default:s=n}var l=ns(s);return l[t]/100*i}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*i}else return i}function Tae(e,t,r,n){var a=[0,0],i=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(c){return c.trim()}),s=o.indexOf(mh(o,function(c){return c.search(/,|\s/)!==-1}));o[s]&&o[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=s!==-1?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return u=u.map(function(c,f){var d=(f===1?!i:i)?"height":"width",p=!1;return c.reduce(function(h,v){return h[h.length-1]===""&&["+","-"].indexOf(v)!==-1?(h[h.length-1]=v,p=!0,h):p?(h[h.length-1]+=v,p=!1,h):h.concat(v)},[]).map(function(h){return Oae(h,d,t,r)})}),u.forEach(function(c,f){c.forEach(function(d,p){TS(d)&&(a[f]+=d*(c[p-1]==="-"?-1:1))})}),a}function Dae(e,t){var r=t.offset,n=e.placement,a=e.offsets,i=a.popper,o=a.reference,s=n.split("-")[0],l=void 0;return TS(+r)?l=[+r,0]:l=Tae(r,i,o,s),s==="left"?(i.top+=l[0],i.left-=l[1]):s==="right"?(i.top+=l[0],i.left+=l[1]):s==="top"?(i.left+=l[0],i.top-=l[1]):s==="bottom"&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e}function Pae(e,t){var r=t.boundariesElement||Oc(e.instance.popper);e.instance.reference===r&&(r=Oc(r));var n=OS("transform"),a=e.instance.popper.style,i=a.top,o=a.left,s=a[n];a.top="",a.left="",a[n]="";var l=CS(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=i,a.left=o,a[n]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]l[p]&&!t.escapeWithReference&&(v=Math.min(c[h],l[p]-(p==="right"?c.width:c.height))),Dc({},h,v)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=ra({},c,f[p](d))}),e.offsets.popper=c,e}function kae(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var a=e.offsets,i=a.reference,o=a.popper,s=["bottom","top"].indexOf(r)!==-1,l=s?"left":"top",u=s?"width":"height",c={start:Dc({},l,i[l]),end:Dc({},l,i[l]+i[u]-o[u])};e.offsets.popper=ra({},o,c[n])}return e}function Aae(e){if(!Nj(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=mh(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottomr.right||t.top>r.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};iae(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=rae(this.update.bind(this)),this.options=ra({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ra({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){n.options.modifiers[o]=ra({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return ra({name:o},n.options.modifiers[o])}).sort(function(o,s){return o.order-s.order}),this.modifiers.forEach(function(o){o.enabled&&wj(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return oae(e,[{key:"update",value:function(){return cae.call(this)}},{key:"destroy",value:function(){return fae.call(this)}},{key:"enableEventListeners",value:function(){return pae.call(this)}},{key:"disableEventListeners",value:function(){return vae.call(this)}}]),e}();jy.Utils=(typeof window<"u"?window:global).PopperUtils;jy.placements=Rj;jy.Defaults=Mae;const Mj=jy;var __={exports:{}},E_={exports:{}},SD="__global_unique_id__",Iae=function(){return et[SD]=(et[SD]||0)+1};(function(e,t){t.__esModule=!0;var r=x;l(r);var n=LR,a=l(n),i=Iae,o=l(i),s=uI;l(s);function l(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function c(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function f(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var d=1073741823;function p(m,g){return m===g?m!==0||1/m===1/g:m!==m&&g!==g}function h(m){var g=[];return{on:function(w){g.push(w)},off:function(w){g=g.filter(function(C){return C!==w})},get:function(){return m},set:function(w,C){m=w,g.forEach(function(S){return S(m,C)})}}}function v(m){return Array.isArray(m)?m[0]:m}function y(m,g){var E,w,C="__create-react-context-"+(0,o.default)()+"__",S=function(D){f(N,D);function N(){var R,j,U;u(this,N);for(var Q=arguments.length,X=Array(Q),J=0;J1?r-1:0),a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,n=S_(e);if(t){var a=S_(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Hae(this,r)}}function TD(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function DD(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Vae={p:DD,P:function(e,t){var r,n=e.match(/(P+)(p+)?/),a=n[1],i=n[2];if(!i)return TD(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",TD(a,t)).replace("{{time}}",DD(i,t))}},Yae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Ar(e){var t=e?typeof e=="string"||e instanceof String?vZ(e):fe(e):new Date;return mo(t)?t:null}function Gae(e,t,r,n){var a=null,i=Hs(r)||Ws(),o=!0;return Array.isArray(t)?(t.forEach(function(s){var l=z0(e,s,new Date,{locale:i});n&&(o=mo(l)&&e===ci(l,s,{awareOfUnicodeTokens:!0})),mo(l)&&o&&(a=l)}),a):(a=z0(e,t,new Date,{locale:i}),n?o=mo(a)&&e===ci(a,t,{awareOfUnicodeTokens:!0}):mo(a)||(t=t.match(Yae).map(function(s){var l=s[0];return l==="p"||l==="P"?i?(0,Vae[l])(s,i.formatLong):l:s}).join(""),e.length>0&&(a=z0(e,t.slice(0,e.length),new Date)),mo(a)||(a=new Date(e))),mo(a)&&o?a:null)}function mo(e){return VI(e)&&Qi(e,new Date("1/1/1000"))}function wr(e,t,r){if(r==="en")return ci(e,t,{awareOfUnicodeTokens:!0});var n=Hs(r);return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),!n&&Ws()&&Hs(Ws())&&(n=Hs(Ws())),ci(e,t,{locale:n||null,awareOfUnicodeTokens:!0})}function PD(e,t){var r=t.hour,n=r===void 0?0:r,a=t.minute,i=a===void 0?0:a,o=t.second;return ad(id(AZ(e,o===void 0?0:o),i),n)}function Kae(e,t){var r=t&&Hs(t)||Ws()&&Hs(Ws());return pJ(e,r?{locale:r}:null)}function qae(e,t){return wr(e,"ddd",t)}function Qae(e){return cl(e)}function DS(e,t){var r=Hs(t||Ws());return yp(e,{locale:r})}function zs(e){return XQ(e)}function $f(e){return JQ(e)}function Xae(e){return Kb(e)}function Wj(e,t){return e&&t?pZ(e,t):!e&&!t}function So(e,t){return e&&t?fZ(e,t):!e&&!t}function zm(e,t){return e&&t?dZ(e,t):!e&&!t}function hn(e,t){return e&&t?WQ(e,t):!e&&!t}function Ou(e,t){return e&&t?hJ(e,t):!e&&!t}function Pv(e,t,r){var n,a=cl(t),i=YI(r);try{n=a$(e,{start:a,end:i})}catch{n=!1}return n}function Ws(){return(typeof window<"u"?window:global).__localeId__}function Hs(e){if(typeof e=="string"){var t=typeof window<"u"?window:global;return t.__localeData__?t.__localeData__[e]:null}return e}function Hj(e,t){return wr(Ya(Ar(),e),"LLLL",t)}function Vj(e,t){return wr(Ya(Ar(),e),"LLL",t)}function Jae(e,t){return wr(Mf(Ar(),e),"QQQ",t)}function PS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return hn(e,s)})||i&&!i.some(function(s){return hn(e,s)})||o&&!o(Ar(e))||!1}function Yj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeDates;return r&&r.some(function(n){return hn(e,n)})||!1}function Zae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return So(e,s)})||i&&!i.some(function(s){return So(e,s)})||o&&!o(Ar(e))||!1}function eie(e,t,r,n){var a=xt(e),i=Sa(e),o=xt(t),s=Sa(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function tie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return zm(e,s)})||i&&!i.some(function(s){return zm(e,s)})||o&&!o(Ar(e))||!1}function rie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=new Date(e,0,1);return Ly(a,{minDate:r,maxDate:n})||!1}function nie(e,t,r,n){var a=xt(e),i=Gb(e),o=xt(t),s=Gb(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function Ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate;return r&&xm(e,r)<0||n&&xm(e,n)>0}function kD(e,t){return t.some(function(r){return Pa(r)===Pa(e)&&ka(r)===ka(e)})}function AD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeTimes,n=t.includeTimes,a=t.filterTime;return r&&kD(e,r)||n&&!kD(e,n)||a&&!a(e)||!1}function ND(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var a,i=Ar(),o=ad(id(i,ka(e)),Pa(e)),s=ad(id(i,ka(r)),Pa(r)),l=ad(id(i,ka(n)),Pa(n));try{a=!a$(o,{start:s,end:l})}catch{a=!1}return a}function RD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=_p(e,1);return r&&bp(r,a)>0||n&&n.every(function(i){return bp(i,a)>0})||!1}function MD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=qi(e,1);return r&&bp(a,r)>0||n&&n.every(function(i){return bp(a,i)>0})||!1}function ID(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=km(e,1);return r&&Cm(r,a)>0||n&&n.every(function(i){return Cm(i,a)>0})||!1}function $D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=wp(e,1);return r&&Cm(a,r)>0||n&&n.every(function(i){return Cm(a,i)>0})||!1}function Gj(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)>=0});return mT(n)}return r?mT(r):t}function Kj(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)<=0});return vT(n)}return r?vT(r):t}function jD(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",r=new Map,n=0,a=e.length;n1&&arguments[1]!==void 0?arguments[1]:12,r=Math.ceil(xt(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function iie(e,t,r,n){for(var a=[],i=0;i<2*t+1;i++){var o=e+t-i,s=!0;r&&(s=xt(r)<=o),n&&s&&(s=xt(n)>=o),s&&a.push(o)}return a}var oie=Iy(function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;Mr(this,r),k(A(a=t.call(this,n)),"renderOptions",function(){var l=a.props.year,u=a.state.yearsList.map(function(d){return b.createElement("div",{className:l===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:a.onChange.bind(A(a),d)},l===d?b.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=a.props.minDate?xt(a.props.minDate):null,f=a.props.maxDate?xt(a.props.maxDate):null;return f&&a.state.yearsList.find(function(d){return d===f})||u.unshift(b.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),c&&a.state.yearsList.find(function(d){return d===c})||u.push(b.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u}),k(A(a),"onChange",function(l){a.props.onChange(l)}),k(A(a),"handleClickOutside",function(){a.props.onCancel()}),k(A(a),"shiftYears",function(l){var u=a.state.yearsList.map(function(c){return c+l});a.setState({yearsList:u})}),k(A(a),"incrementYears",function(){return a.shiftYears(1)}),k(A(a),"decrementYears",function(){return a.shiftYears(-1)});var i=n.yearDropdownItemNumber,o=n.scrollableYearDropdown,s=i||(o?10:5);return a.state={yearsList:iie(a.props.year,s,a.props.minDate,a.props.maxDate)},a}return or(r,[{key:"render",value:function(){var n=Sn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return b.createElement("div",{className:n},this.renderOptions())}}]),r}()),sie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},l=!1;n.getTabIndex()===0&&!s.isInputFocused&&n.isSameDay(n.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||n.props.inline||(l=!0),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&n.dayEl.current.focus({preventScroll:!0})}),k(A(n),"renderDayContents",function(){return n.isOutsideMonth()&&(n.props.monthShowsDuplicateDaysEnd&&Kh(n.props.day)<10||n.props.monthShowsDuplicateDaysStart&&Kh(n.props.day)>20)?null:n.props.renderDayContents?n.props.renderDayContents(Kh(n.props.day),n.props.day):Kh(n.props.day)}),k(A(n),"render",function(){return b.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.handleMouseEnter,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"button","aria-disabled":n.isDisabled()},n.renderDayContents())}),n}return or(r,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(n){this.handleFocusDay(n)}}]),r}(),hie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=6,p=!l&&!n.isWeekInMonth(u);if(d||p){if(!n.props.peekNextMonth)break;f=!0}}return s}),k(A(n),"onMonthClick",function(s,l){n.handleDayClick(zs(Ya(n.props.day,l)),s)}),k(A(n),"handleMonthNavigation",function(s,l){n.isDisabled(l)||n.isExcluded(l)||(n.props.setPreSelection(l),n.MONTH_REFS[s].current&&n.MONTH_REFS[s].current.focus())}),k(A(n),"onMonthKeyDown",function(s,l){var u=s.key;if(!n.props.disabledKeyboardNavigation)switch(u){case"Enter":n.onMonthClick(s,l),n.props.setPreSelection(n.props.selected);break;case"ArrowRight":n.handleMonthNavigation(l===11?0:l+1,qi(n.props.preSelection,1));break;case"ArrowLeft":n.handleMonthNavigation(l===0?11:l-1,_p(n.props.preSelection,1))}}),k(A(n),"onQuarterClick",function(s,l){n.handleDayClick(Xae(Mf(n.props.day,l)),s)}),k(A(n),"getMonthClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate,v=l.preSelection;return Sn("react-datepicker__month-text","react-datepicker__month-".concat(s),{"react-datepicker__month--disabled":(p||h)&&Zae(Ya(u,s),n.props),"react-datepicker__month--selected":Sa(u)===s&&xt(u)===xt(d),"react-datepicker__month-text--keyboard-selected":Sa(v)===s,"react-datepicker__month--in-range":eie(c,f,s,u),"react-datepicker__month--range-start":n.isRangeStartMonth(s),"react-datepicker__month--range-end":n.isRangeEndMonth(s)})}),k(A(n),"getTabIndex",function(s){var l=Sa(n.props.preSelection);return n.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),k(A(n),"getAriaLabel",function(s){var l=n.props,u=l.ariaLabelPrefix,c=u===void 0?"Choose":u,f=l.disabledDayAriaLabelPrefix,d=f===void 0?"Not available":f,p=l.day,h=Ya(p,s),v=n.isDisabled(h)||n.isExcluded(h)?d:c;return"".concat(v," ").concat(wr(h,"MMMM yyyy"))}),k(A(n),"getQuarterClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate;return Sn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter--disabled":(p||h)&&tie(Mf(u,s),n.props),"react-datepicker__quarter--selected":Gb(u)===s&&xt(u)===xt(d),"react-datepicker__quarter--in-range":nie(c,f,s,u),"react-datepicker__quarter--range-start":n.isRangeStartQuarter(s),"react-datepicker__quarter--range-end":n.isRangeEndQuarter(s)})}),k(A(n),"renderMonths",function(){var s=n.props,l=s.showFullMonthYearPicker,u=s.showTwoColumnMonthYearPicker,c=s.locale;return(u?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(f,d){return b.createElement("div",{className:"react-datepicker__month-wrapper",key:d},f.map(function(p,h){return b.createElement("div",{ref:n.MONTH_REFS[p],key:h,onClick:function(v){n.onMonthClick(v,p)},onKeyDown:function(v){n.onMonthKeyDown(v,p)},tabIndex:n.getTabIndex(p),className:n.getMonthClassNames(p),role:"button","aria-label":n.getAriaLabel(p)},l?Hj(p,c):Vj(p,c))}))})}),k(A(n),"renderQuarters",function(){return b.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(s,l){return b.createElement("div",{key:l,onClick:function(u){n.onQuarterClick(u,s)},className:n.getQuarterClassNames(s)},Jae(s,n.props.locale))}))}),k(A(n),"getClassNames",function(){var s=n.props,l=s.day,u=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,d=s.showMonthYearPicker,p=s.showQuarterYearPicker,h=s.monthClassName,v=h?h(l):void 0;return Sn("react-datepicker__month",v,{"react-datepicker__month--selecting-range":u&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),n}return or(r,[{key:"render",value:function(){var n=this.props,a=n.showMonthYearPicker,i=n.showQuarterYearPicker,o=n.day,s=n.ariaLabelPrefix,l=s===void 0?"month ":s;return b.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(wr(o,"yyyy-MM"))},a?this.renderMonths():i?this.renderQuarters():this.renderWeeks())}}]),r}(),qj=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},s=(o.className||"").split(/\s+/);return bie.some(function(l){return s.indexOf(l)>=0})})(i.target)&&a.props.onDropdownFocus()}),k(A(a),"getDateInView",function(){var i=a.props,o=i.preSelection,s=i.selected,l=i.openToDate,u=Gj(a.props),c=Kj(a.props),f=Ar(),d=l||s||o;return d||(u&&Ls(f,u)?u:c&&Qi(f,c)?c:f)}),k(A(a),"increaseMonth",function(){a.setState(function(i){var o=i.date;return{date:qi(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"decreaseMonth",function(){a.setState(function(i){var o=i.date;return{date:_p(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"handleDayClick",function(i,o,s){a.props.onSelect(i,o,s),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleDayMouseEnter",function(i){a.setState({selectingDate:i}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(i)}),k(A(a),"handleMonthMouseLeave",function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()}),k(A(a),"handleYearChange",function(i){a.props.onYearChange&&a.props.onYearChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthChange",function(i){a.props.onMonthChange&&a.props.onMonthChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthYearChange",function(i){a.handleYearChange(i),a.handleMonthChange(i)}),k(A(a),"changeYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(s,i)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"changeMonth",function(i){a.setState(function(o){var s=o.date;return{date:Ya(s,i)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"changeMonthYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(Ya(s,Sa(i)),xt(i))}},function(){return a.handleMonthYearChange(a.state.date)})}),k(A(a),"header",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=DS(i,a.props.locale),s=[];return a.props.showWeekNumbers&&s.push(b.createElement("div",{key:"W",className:"react-datepicker__day-name"},a.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(l){var u=Kc(o,l),c=a.formatWeekday(u,a.props.locale),f=a.props.weekDayClassName?a.props.weekDayClassName(u):void 0;return b.createElement("div",{key:l,className:Sn("react-datepicker__day-name",f)},c)}))}),k(A(a),"formatWeekday",function(i,o){return a.props.formatWeekDay?function(s,l,u){return l(wr(s,"EEEE",u))}(i,a.props.formatWeekDay,o):a.props.useWeekdaysShort?function(s,l){return wr(s,"EEE",l)}(i,o):function(s,l){return wr(s,"EEEEEE",l)}(i,o)}),k(A(a),"decreaseYear",function(){a.setState(function(i){var o=i.date;return{date:km(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderPreviousButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=ID(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.minDate,m=v.yearItemNumber,g=m===void 0?12:m,E=$f(km(h,g)),w=kv(E,g),C=w.endPeriod,S=y&&xt(y);return S&&S>C||!1}(a.state.date,a.props);break;default:i=RD(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!i)&&!a.props.showTimeSelectOnly){var o=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(s=a.decreaseYear),i&&a.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--previous--disabled"),s=null);var l=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,u=a.props,c=u.previousMonthAriaLabel,f=c===void 0?"Previous Month":c,d=u.previousYearAriaLabel,p=d===void 0?"Previous Year":d;return b.createElement("button",{type:"button",className:o.join(" "),onClick:s,"aria-label":l?p:f},l?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel)}}}),k(A(a),"increaseYear",function(){a.setState(function(i){var o=i.date;return{date:wp(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderNextButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=$D(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.maxDate,m=v.yearItemNumber,g=m===void 0?12:m,E=wp(h,g),w=kv(E,g),C=w.startPeriod,S=y&&xt(y);return S&&S0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=["react-datepicker__current-month"];return a.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),a.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),a.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),b.createElement("div",{className:o.join(" ")},wr(i,a.props.dateFormat,a.props.locale))}),k(A(a),"renderYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showYearDropdown&&!i)return b.createElement(sie,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:xt(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})}),k(A(a),"renderMonthDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthDropdown&&!i)return b.createElement(uie,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:Sa(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})}),k(A(a),"renderMonthYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthYearDropdown&&!i)return b.createElement(die,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})}),k(A(a),"renderTodayButton",function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return b.createElement("div",{className:"react-datepicker__today-button",onClick:function(i){return a.props.onSelect(cl(Ar()),i)}},a.props.todayButton)}),k(A(a),"renderDefaultHeader",function(i){var o=i.monthDate,s=i.i;return b.createElement("div",{className:"react-datepicker__header ".concat(a.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},a.renderCurrentMonth(o),b.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(s!==0),a.renderMonthYearDropdown(s!==0),a.renderYearDropdown(s!==0)),b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderCustomHeader",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.monthDate,s=i.i;if(s!==0&&s!==void 0)return null;var l=RD(a.state.date,a.props),u=MD(a.state.date,a.props),c=ID(a.state.date,a.props),f=$D(a.state.date,a.props),d=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return b.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(OD(OD({},a.state),{},{changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:u,prevYearButtonDisabled:c,nextYearButtonDisabled:f})),d&&b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderYearHeader",function(){var i=a.state.date,o=a.props,s=o.showYearPicker,l=kv(i,o.yearItemNumber),u=l.startPeriod,c=l.endPeriod;return b.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(u," - ").concat(c):xt(i))}),k(A(a),"renderHeader",function(i){switch(!0){case a.props.renderCustomHeader!==void 0:return a.renderCustomHeader(i);case(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker):return a.renderYearHeader(i);default:return a.renderDefaultHeader(i)}}),k(A(a),"renderMonths",function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var i=[],o=a.props.showPreviousMonths?a.props.monthsShown-1:0,s=_p(a.state.date,o),l=0;l0;i.push(b.createElement("div",{key:f,ref:function(h){a.monthContainer=h},className:"react-datepicker__month-container"},a.renderHeader({monthDate:c,i:l}),b.createElement(mie,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,onChange:a.changeMonthYear,day:c,dayClassName:a.props.dayClassName,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,inline:a.props.inline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:d,monthShowsDuplicateDaysStart:p})))}return i}}),k(A(a),"renderYears",function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?b.createElement("div",{className:"react-datepicker__year--container"},a.renderHeader(),b.createElement(gie,Tp({onDayClick:a.handleDayClick,date:a.state.date},a.props))):void 0}),k(A(a),"renderTimeSection",function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return b.createElement(qj,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,showTimeSelectOnly:a.props.showTimeSelectOnly})}),k(A(a),"renderInputTimeSection",function(){var i=new Date(a.props.selected),o=mo(i)&&a.props.selected?"".concat(LD(i.getHours()),":").concat(LD(i.getMinutes())):"";if(a.props.showTimeInput)return b.createElement(yie,{date:i,timeString:o,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})}),a.containerRef=b.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null},a}return or(r,null,[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),or(r,[{key:"componentDidMount",value:function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=void n.setState({monthContainer:n.monthContainer}))}},{key:"componentDidUpdate",value:function(n){this.props.preSelection&&!hn(this.props.preSelection,n.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!hn(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var n=this.props.container||wie;return b.createElement("div",{ref:this.containerRef},b.createElement(n,{className:Sn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}]),r}(),Eie=function(e){return!e.disabled&&e.tabIndex!==-1},Sie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getTabChildren",function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Eie)}),k(A(a),"handleFocusStart",function(i){var o=a.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),k(A(a),"handleFocusEnd",function(i){var o=a.getTabChildren();o&&o.length>1&&o[0].focus()}),a.tabLoopRef=b.createRef(),a}return or(r,null,[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),or(r,[{key:"render",value:function(){return this.props.enableTabLoop?b.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},b.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,b.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}]),r}(),xie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),(a=t.call(this,n)).el=document.createElement("div"),a}return or(r,[{key:"componentDidMount",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return nU.createPortal(this.props.children,this.el)}}]),r}(),Cie=function(e){Ir(r,b.Component);var t=$r(r);function r(){return Mr(this,r),t.apply(this,arguments)}return or(r,[{key:"render",value:function(){var n,a=this.props,i=a.className,o=a.wrapperClassName,s=a.hidePopper,l=a.popperComponent,u=a.popperModifiers,c=a.popperPlacement,f=a.popperProps,d=a.targetComponent,p=a.enableTabLoop,h=a.popperOnKeyDown,v=a.portalId;if(!s){var y=Sn("react-datepicker-popper",i);n=b.createElement(Bae,Tp({modifiers:u,placement:c},f),function(g){var E=g.ref,w=g.style,C=g.placement,S=g.arrowProps;return b.createElement(Sie,{enableTabLoop:p},b.createElement("div",Tp({ref:E,style:w},{className:y,"data-placement":C,onKeyDown:h}),b.cloneElement(l,{arrowProps:S})))})}this.props.popperContainer&&(n=b.createElement(this.props.popperContainer,{},n)),v&&!s&&(n=b.createElement(xie,{portalId:v},n));var m=Sn("react-datepicker-wrapper",o);return b.createElement(Lae,{className:"react-datepicker-manager"},b.createElement(Wae,null,function(g){var E=g.ref;return b.createElement("div",{ref:E,className:m},d)}),n)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),r}(),Oie=Iy(_ie),Tie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getPreSelection",function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:Ar()}),k(A(a),"calcInitialState",function(){var i=a.getPreSelection(),o=Gj(a.props),s=Kj(a.props),l=o&&Ls(i,o)?o:s&&Qi(i,s)?s:i;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:a.props.selected?a.props.selected:l,highlightDates:jD(a.props.highlightDates),focused:!1}}),k(A(a),"clearPreventFocusTimeout",function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)}),k(A(a),"setFocus",function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})}),k(A(a),"setBlur",function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()}),k(A(a),"setOpen",function(i){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.setState({open:i,preSelection:i&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:nw},function(){i||a.setState(function(s){return{focused:!!o&&s.focused}},function(){!o&&a.setBlur(),a.setState({inputValue:null})})})}),k(A(a),"inputOk",function(){return XE(a.state.preSelection)}),k(A(a),"isCalendarOpen",function(){return a.props.open===void 0?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open}),k(A(a),"handleFocus",function(i){a.state.preventFocus||(a.props.onFocus(i),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})}),k(A(a),"cancelFocusInput",function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null}),k(A(a),"deferFocusInput",function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout(function(){return a.setFocus()},1)}),k(A(a),"handleDropdownFocus",function(){a.cancelFocusInput()}),k(A(a),"handleBlur",function(i){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(i),a.setState({focused:!1})}),k(A(a),"handleCalendarClickOutside",function(i){a.props.inline||a.setOpen(!1),a.props.onClickOutside(i),a.props.withPortal&&i.preventDefault()}),k(A(a),"handleChange",function(){for(var i=arguments.length,o=new Array(i),s=0;sn.setValue(a)}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const FD=wt(function(){const{activityStore:t}=Ft(),{createActivity:r,updateActivity:n,loadActivity:a,loadingInitial:i}=t,{id:o}=eE(),s=Z1(),[l,u]=x.useState(new lC),c=ih({title:Pn().required("The activity title is required"),description:Pn().required("The activity description is required"),category:Pn().required(),date:Pn().required("date is required"),venue:Pn().required(),city:Pn().required()});x.useEffect(()=>{o&&a(o).then(d=>u(new lC(d)))},[o,a]);function f(d){d.id?n(d).then(()=>s(`/activities/${d.id}`)):(d.id=are(),r(d).then(()=>s(`/activities/${d.id}`)))}return i?_.jsx(Sy,{content:"Loading Activity ..."}):_.jsxs(je,{clearing:!0,children:[_.jsx(qe,{content:"Activity Details",sub:!0,color:"teal"}),_.jsx(ah,{validationSchema:c,enableReinitialize:!0,initialValues:l,onSubmit:d=>f(d),children:({handleSubmit:d,isValid:p,isSubmitting:h,dirty:v})=>_.jsxs(my,{className:"ui form",onSubmit:d,autoComplete:"off",children:[_.jsx(Xa,{name:"title",placeholder:"Title"}),_.jsx(G$,{rows:3,placeholder:"Description",name:"description"}),_.jsx(ire,{option:ore,placeholder:"Category",name:"category"}),_.jsx(kie,{placeholderText:"Date",name:"date",showTimeSelect:!0,timeCaption:"time",dateFormat:"MMMM d, yyyy h:mm aa"}),_.jsx(qe,{content:"Location Details",sub:!0,color:"teal"}),_.jsx(Xa,{placeholder:"City",name:"city"}),_.jsx(Xa,{placeholder:"Venue",name:"venue"}),_.jsx($e,{disabled:h||!v||!p,loading:h,floated:"right",positive:!0,type:"submit",content:"Submit"}),_.jsx($e,{as:an,to:"/activities",floated:"right",type:"button",content:"Cancel"})]})})]})}),Aie={filter:"brightness(30%)"},Nie={position:"absolute",bottom:"5%",left:"5%",width:"100%",height:"auto",color:"white"},Rie=wt(function({activity:t}){var i,o;const{activityStore:{updateAttendance:r,loading:n,cancelActivityToggle:a}}=Ft();return _.jsxs(je.Group,{children:[_.jsxs(je,{basic:!0,attached:"top",style:{padding:"0"},children:[t.isCancelled&&_.jsx(Xt,{style:{position:"absolute",zIndex:1e3,left:-14,top:20},ribbon:!0,color:"red",content:"Cancelled"}),_.jsx(qt,{src:`/assets/categoryImages/${t.category}.jpg`,fluid:!0,style:Aie}),_.jsx(je,{style:Nie,basic:!0,children:_.jsx(nt.Group,{children:_.jsx(nt,{children:_.jsxs(nt.Content,{children:[_.jsx(qe,{size:"huge",content:t.title,style:{color:"white"}}),_.jsx("p",{children:ci(t.date,"dd MMM yyyy")}),_.jsxs("p",{children:["Hosted by ",_.jsx("strong",{children:_.jsx(an,{to:`/profiles/${(i=t.host)==null?void 0:i.username}`,children:(o=t.host)==null?void 0:o.displayName})})]})]})})})})]}),_.jsx(je,{clearing:!0,attached:"bottom",children:t.isHost?_.jsxs(_.Fragment,{children:[_.jsx($e,{color:t.isCancelled?"green":"red",floated:"left",basic:!0,content:t.isCancelled?"Re-activate Activity":"Cancel Activity",onClick:a,loading:n}),_.jsx($e,{as:an,to:`/manage/${t.id}`,color:"orange",floated:"right",disabled:t.isCancelled,children:"Manage Event"})]}):t.isGoing?_.jsx($e,{loading:n,onClick:r,children:"Cancel attendance"}):_.jsx($e,{loading:n,color:"teal",onClick:r,disabled:t.isCancelled,children:"Join Activity"})})]})}),Mie=wt(function({activity:t}){return _.jsxs(je.Group,{children:[_.jsx(je,{attached:"top",children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{size:"large",color:"teal",name:"info"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("p",{children:t.description})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"calendar",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("span",{children:ci(t.date,"dd MMM yyyy h:mm aa")})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"marker",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:11,children:_.jsxs("span",{children:[t.venue,", ",t.city]})})]})})]})}),Iie=wt(function({activityId:t}){const{commentStore:r}=Ft();return x.useEffect(()=>(t&&r.createHubConnection(t),()=>{r.clearComments()}),[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(je,{textAlign:"center",attached:"top",inverted:!0,color:"teal",style:{border:"none"},children:_.jsx(qe,{children:"Chat about this event"})}),_.jsxs(je,{attached:!0,clearing:!0,children:[_.jsx(ah,{onSubmit:(n,{resetForm:a})=>r.addComment(n).then(()=>a()),initialValues:{body:""},validationSchema:ih({body:Pn().required()}),children:({isSubmitting:n,isValid:a,handleSubmit:i})=>_.jsx(my,{className:"ui form",children:_.jsx(Cq,{name:"body",children:o=>_.jsxs("div",{style:{position:"relative"},children:[_.jsx(il,{active:n}),_.jsx("textarea",{placeholder:"Enter your comment (Enter to submit, SHIFT + Enter for new line)",rows:2,...o.field,onKeyDown:s=>{s.key==="Enter"&&s.shiftKey||s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a&&i())}})]})})})}),_.jsx(mr.Group,{children:r.comments.map(n=>_.jsxs(mr,{children:[_.jsx(mr.Avatar,{src:n.image||"/assets/user.png"}),_.jsxs(mr.Content,{children:[_.jsx(mr.Author,{as:an,to:`/profiles/${n.username}`,children:n.displayName}),_.jsx(mr.Metadata,{children:_.jsxs("div",{children:[oJ(n.createdAt)," ago"]})}),_.jsx(mr.Text,{style:{whiteSpace:"pre-wrap"},children:n.body})]})]},n.id))})]})]})}),$ie=wt(function({activity:{attendees:t,host:r}}){return t?_.jsxs(_.Fragment,{children:[_.jsxs(je,{textAlign:"center",style:{border:"none"},attached:"top",secondary:!0,inverted:!0,color:"teal",children:[t.length," ",t.length===1?"Person":"People"," going"]}),_.jsx(je,{attached:!0,children:_.jsx(Ib,{relaxed:!0,divided:!0,children:t.map(n=>_.jsxs(nt,{style:{position:"relative"},children:[n.username===(r==null?void 0:r.username)&&_.jsx(Xt,{style:{position:"absolute"},color:"orange",ribbon:"right",children:"Host"}),_.jsx(qt,{size:"tiny",src:n.image||"/assets/user.png"}),_.jsxs(nt.Content,{verticalAlign:"middle",children:[_.jsx(nt.Header,{as:"h3",children:_.jsx(an,{to:`/profiles/${n.username}`,children:n.displayName})}),n.following&&_.jsx(nt.Extra,{style:{color:"orange"},children:"Following"})]})]},n.username))})})]}):null}),jie=wt(function(){const{activityStore:t}=Ft(),{selectedActivity:r,loadActivity:n,loadingInitial:a,clearSelectedActivity:i}=t,{id:o}=eE();return x.useEffect(()=>(o&&n(o),()=>i()),[o,n,i]),a||!r?_.jsx(Sy,{}):_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:10,children:[_.jsx(Rie,{activity:r}),_.jsx(Mie,{activity:r}),_.jsx(Iie,{activityId:r.id})]}),_.jsx(Oe.Column,{width:6,children:_.jsx($ie,{activity:r})})]})});function Lie(){const e="/api/",[t,r]=x.useState(null);function n(){tn.get(e+"buggy/not-found").catch(u=>console.log(u.response))}function a(){tn.get(e+"buggy/bad-request").catch(u=>console.log(u.response))}function i(){tn.get(e+"buggy/server-error").catch(u=>console.log(u.response))}function o(){tn.get(e+"buggy/unauthorised").catch(u=>console.log(u.response))}function s(){tn.get(e+"activities/notaguid").catch(u=>console.log(u.response))}function l(){tn.post(e+"activities",{}).catch(u=>r(u))}return _.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h1",content:"Test Error component"}),_.jsx(je,{children:_.jsxs($e.Group,{widths:"7",children:[_.jsx($e,{onClick:n,content:"Not Found",basic:!0,primary:!0}),_.jsx($e,{onClick:a,content:"Bad Request",basic:!0,primary:!0}),_.jsx($e,{onClick:l,content:"Validation Error",basic:!0,primary:!0}),_.jsx($e,{onClick:i,content:"Server Error",basic:!0,primary:!0}),_.jsx($e,{onClick:o,content:"Unauthorised",basic:!0,primary:!0}),_.jsx($e,{onClick:s,content:"Bad Guid",basic:!0,primary:!0})]})}),t&&_.jsx(LI,{errors:t})]})}function Fie(){return _.jsxs(je,{placeholder:!0,children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"search"}),"Oops -we've looked everywhere but could not find what you are looking for!"]}),_.jsx(je.Inline,{children:_.jsx($e,{as:an,to:"/activities",children:"Return to activities page"})})]})}const Uie=wt(function(){var r,n;const{commonStore:t}=Ft();return _.jsxs(Ko,{children:[_.jsx(qe,{as:"h1",content:"Server Error"}),_.jsx(qe,{sub:!0,as:"h5",color:"red",content:(r=t.error)==null?void 0:r.message}),((n=t.error)==null?void 0:n.details)&&_.jsxs(je,{children:[_.jsx(qe,{as:"h4",content:"Stack trace",color:"teal"}),_.jsx("code",{style:{marginTop:"10px"},children:t.error.details})]})]})}),Bie=wt(function({profile:t}){return _.jsx(je,{children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:12,children:_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{avatar:!0,size:"small",src:t.image||"/assets/user.png"}),_.jsx(nt.Content,{verticalAlign:"middle",children:_.jsx(qe,{as:"h1",content:t.displayName})})]})})}),_.jsxs(Oe.Column,{width:4,children:[_.jsxs(In.Group,{widths:2,children:[_.jsx(In,{label:"Followers",value:t.followersCount}),_.jsx(In,{label:"Following",value:t.followingCount})]}),_.jsx(cc,{}),_.jsx(o$,{profile:t})]})]})})});function Jc(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function Zc(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function BD(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function Wie(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),a=zie.get(n);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var Hie=[".DS_Store","Thumbs.db"];function Vie(e){return Jc(this,void 0,void 0,function(){return Zc(this,function(t){return Wm(e)&&Yie(e.dataTransfer)?[2,Qie(e.dataTransfer,e.type)]:Gie(e)?[2,Kie(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,qie(e)]:[2,[]]})})}function Yie(e){return Wm(e)}function Gie(e){return Wm(e)&&Wm(e.target)}function Wm(e){return typeof e=="object"&&e!==null}function Kie(e){return x_(e.target.files).map(function(t){return gh(t)})}function qie(e){return Jc(this,void 0,void 0,function(){var t;return Zc(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return gh(n)})]}})})}function Qie(e,t){return Jc(this,void 0,void 0,function(){var r,n;return Zc(this,function(a){switch(a.label){case 0:return e.items?(r=x_(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Xie))]):[3,2];case 1:return n=a.sent(),[2,zD(Qj(n))];case 2:return[2,zD(x_(e.files).map(function(i){return gh(i)}))]}})})}function zD(e){return e.filter(function(t){return Hie.indexOf(t.name)===-1})}function x_(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,GD(r)];if(e.sizer)return[!1,GD(r)]}return[!0,null]}function xs(e){return e!=null}function poe(e){var t=e.files,r=e.accept,n=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&o>=1&&t.length>o?!1:t.every(function(l){var u=e2(l,r),c=Dp(u,1),f=c[0],d=t2(l,n,a),p=Dp(d,1),h=p[0],v=s?s(l):null;return f&&h&&!v})}function Hm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function tv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function qD(e){e.preventDefault()}function hoe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function voe(e){return e.indexOf("Edge/")!==-1}function moe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hoe(e)||voe(e)}function Ua(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),o=1;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Roe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var kS=x.forwardRef(function(e,t){var r=e.children,n=Vm(e,Eoe),a=o2(n),i=a.open,o=Vm(a,Soe);return x.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(x.Fragment,null,r(zt(zt({},o),{},{open:i})))});kS.displayName="Dropzone";var i2={disabled:!1,getFilesFromEvent:Vie,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};kS.defaultProps=i2;kS.propTypes={children:$.func,accept:$.objectOf($.arrayOf($.string)),multiple:$.bool,preventDropOnDocument:$.bool,noClick:$.bool,noKeyboard:$.bool,noDrag:$.bool,noDragEventsBubbling:$.bool,minSize:$.number,maxSize:$.number,maxFiles:$.number,disabled:$.bool,getFilesFromEvent:$.func,onFileDialogCancel:$.func,onFileDialogOpen:$.func,useFsAccessApi:$.bool,autoFocus:$.bool,onDragEnter:$.func,onDragLeave:$.func,onDragOver:$.func,onDrop:$.func,onDropAccepted:$.func,onDropRejected:$.func,onError:$.func,validator:$.func};var D_={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function o2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=zt(zt({},i2),e),r=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,y=t.onFileDialogOpen,m=t.useFsAccessApi,g=t.autoFocus,E=t.preventDropOnDocument,w=t.noClick,C=t.noKeyboard,S=t.noDrag,O=t.noDragEventsBubbling,D=t.onError,N=t.validator,R=x.useMemo(function(){return woe(r)},[r]),j=x.useMemo(function(){return yoe(r)},[r]),U=x.useMemo(function(){return typeof y=="function"?y:XD},[y]),Q=x.useMemo(function(){return typeof v=="function"?v:XD},[v]),X=x.useRef(null),J=x.useRef(null),te=x.useReducer(Moe,D_),ge=aw(te,2),H=ge[0],ee=ge[1],ce=H.isFocused,_e=H.isFileDialogActive,we=x.useRef(typeof window<"u"&&window.isSecureContext&&m&&goe()),rt=function(){!we.current&&_e&&setTimeout(function(){if(J.current){var Y=J.current.files;Y.length||(ee({type:"closeDialog"}),Q())}},300)};x.useEffect(function(){return window.addEventListener("focus",rt,!1),function(){window.removeEventListener("focus",rt,!1)}},[J,_e,Q,we]);var ye=x.useRef([]),Le=function(Y){X.current&&X.current.contains(Y.target)||(Y.preventDefault(),ye.current=[])};x.useEffect(function(){return E&&(document.addEventListener("dragover",qD,!1),document.addEventListener("drop",Le,!1)),function(){E&&(document.removeEventListener("dragover",qD),document.removeEventListener("drop",Le))}},[X,E]),x.useEffect(function(){return!n&&g&&X.current&&X.current.focus(),function(){}},[X,g,n]);var He=x.useCallback(function(F){D?D(F):console.error(F)},[D]),lt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[].concat(Ooe(ye.current),[F.target]),tv(F)&&Promise.resolve(a(F)).then(function(Y){if(!(Hm(F)&&!O)){var pe=Y.length,be=pe>0&&poe({files:Y,accept:R,minSize:o,maxSize:i,multiple:s,maxFiles:l,validator:N}),Ne=pe>0&&!be;ee({isDragAccept:be,isDragReject:Ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(F)}}).catch(function(Y){return He(Y)})},[a,u,He,O,R,o,i,s,l,N]),Ce=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=tv(F);if(Y&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return Y&&f&&f(F),!1},[f,O]),xe=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=ye.current.filter(function(be){return X.current&&X.current.contains(be)}),pe=Y.indexOf(F.target);pe!==-1&&Y.splice(pe,1),ye.current=Y,!(Y.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),tv(F)&&c&&c(F))},[X,c,O]),gt=x.useCallback(function(F,Y){var pe=[],be=[];F.forEach(function(Ne){var ur=e2(Ne,R),Zr=aw(ur,2),un=Zr[0],da=Zr[1],io=t2(Ne,o,i),M=aw(io,2),L=M[0],G=M[1],de=N?N(Ne):null;if(un&&L&&!de)pe.push(Ne);else{var Ee=[da,G];de&&(Ee=Ee.concat(de)),be.push({file:Ne,errors:Ee.filter(function(Se){return Se})})}}),(!s&&pe.length>1||s&&l>=1&&pe.length>l)&&(pe.forEach(function(Ne){be.push({file:Ne,errors:[doe]})}),pe.splice(0)),ee({acceptedFiles:pe,fileRejections:be,type:"setFiles"}),d&&d(pe,be,Y),be.length>0&&h&&h(be,Y),pe.length>0&&p&&p(pe,Y)},[ee,s,R,o,i,l,d,p,h,N]),Nt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[],tv(F)&&Promise.resolve(a(F)).then(function(Y){Hm(F)&&!O||gt(Y,F)}).catch(function(Y){return He(Y)}),ee({type:"reset"})},[a,gt,He,O]),sr=x.useCallback(function(){if(we.current){ee({type:"openDialog"}),U();var F={multiple:s,types:j};window.showOpenFilePicker(F).then(function(Y){return a(Y)}).then(function(Y){gt(Y,null),ee({type:"closeDialog"})}).catch(function(Y){boe(Y)?(Q(Y),ee({type:"closeDialog"})):_oe(Y)?(we.current=!1,J.current?(J.current.value=null,J.current.click()):He(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):He(Y)});return}J.current&&(ee({type:"openDialog"}),U(),J.current.value=null,J.current.click())},[ee,U,Q,m,gt,He,j,s]),jr=x.useCallback(function(F){!X.current||!X.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),sr())},[X,sr]),Je=x.useCallback(function(){ee({type:"focus"})},[]),er=x.useCallback(function(){ee({type:"blur"})},[]),Ut=x.useCallback(function(){w||(moe()?setTimeout(sr,0):sr())},[w,sr]),lr=function(Y){return n?null:Y},Jr=function(Y){return C?null:lr(Y)},Lr=function(Y){return S?null:lr(Y)},Ot=function(Y){O&&Y.stopPropagation()},ln=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.role,Ne=F.onKeyDown,ur=F.onFocus,Zr=F.onBlur,un=F.onClick,da=F.onDragEnter,io=F.onDragOver,M=F.onDragLeave,L=F.onDrop,G=Vm(F,xoe);return zt(zt(T_({onKeyDown:Jr(Ua(Ne,jr)),onFocus:Jr(Ua(ur,Je)),onBlur:Jr(Ua(Zr,er)),onClick:lr(Ua(un,Ut)),onDragEnter:Lr(Ua(da,lt)),onDragOver:Lr(Ua(io,Ce)),onDragLeave:Lr(Ua(M,xe)),onDrop:Lr(Ua(L,Nt)),role:typeof be=="string"&&be!==""?be:"presentation"},pe,X),!n&&!C?{tabIndex:0}:{}),G)}},[X,jr,Je,er,Ut,lt,Ce,xe,Nt,C,S,n]),I=x.useCallback(function(F){F.stopPropagation()},[]),ue=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.onChange,Ne=F.onClick,ur=Vm(F,Coe),Zr=T_({accept:R,multiple:s,type:"file",style:{display:"none"},onChange:lr(Ua(be,Nt)),onClick:lr(Ua(Ne,I)),tabIndex:-1},pe,J);return zt(zt({},Zr),ur)}},[J,r,s,Nt,n]);return zt(zt({},H),{},{isFocused:ce&&!n,getRootProps:ln,getInputProps:ue,rootRef:X,inputRef:J,open:lr(sr)})}function Moe(e,t){switch(t.type){case"focus":return zt(zt({},e),{},{isFocused:!0});case"blur":return zt(zt({},e),{},{isFocused:!1});case"openDialog":return zt(zt({},D_),{},{isFileDialogActive:!0});case"closeDialog":return zt(zt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return zt(zt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return zt(zt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return zt({},D_);default:return e}}function XD(){}function Ioe({setFiles:e}){const t={border:"dashed 3px #eee",borderColor:"#eee",borderRadius:"5px",paddingTop:"30px",textAlign:"center",height:"200px"},r={borderColor:"green"},n=x.useCallback(s=>{e(s.map(l=>Object.assign(l,{preview:URL.createObjectURL(l)})))},[e]),{getRootProps:a,getInputProps:i,isDragActive:o}=o2({onDrop:n});return _.jsxs("div",{...a(),style:o?{...t,...r}:t,children:[_.jsx("input",{...i()}),_.jsx(jt,{name:"upload",size:"huge"}),_.jsx(qe,{content:"Drop image here"})]})}/*! + * Cropper.js v1.6.1 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:44:19.860Z + */function JD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function s2(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r
',Zoe=Number.isNaN||fi.isNaN;function Ue(e){return typeof e=="number"&&!Zoe(e)}var fP=function(t){return t>0&&t<1/0};function iw(e){return typeof e>"u"}function pl(e){return P_(e)==="object"&&e!==null}var ese=Object.prototype.hasOwnProperty;function fu(e){if(!pl(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&ese.call(r,"isPrototypeOf")}catch{return!1}}function fn(e){return typeof e=="function"}var tse=Array.prototype.slice;function g2(e){return Array.from?Array.from(e):tse.call(e)}function dr(e,t){return e&&fn(t)&&(Array.isArray(e)||Ue(e.length)?g2(e).forEach(function(r,n){t.call(e,r,n,e)}):pl(e)&&Object.keys(e).forEach(function(r){t.call(e,e[r],r,e)})),e}var It=Object.assign||function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a0&&n.forEach(function(i){pl(i)&&Object.keys(i).forEach(function(o){t[o]=i[o]})}),t},rse=/\.\d*(?:0|9){12}\d*$/;function Tu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return rse.test(e)?Math.round(e*t)/t:e}var nse=/^width|height|left|top|marginLeft|marginTop$/;function xo(e,t){var r=e.style;dr(t,function(n,a){nse.test(a)&&Ue(n)&&(n="".concat(n,"px")),r[a]=n})}function ase(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Cr(e,t){if(t){if(Ue(e.length)){dr(e,function(n){Cr(n,t)});return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function si(e,t){if(t){if(Ue(e.length)){dr(e,function(r){si(r,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function du(e,t,r){if(t){if(Ue(e.length)){dr(e,function(n){du(n,t,r)});return}r?Cr(e,t):si(e,t)}}var ise=/([a-z\d])([A-Z])/g;function IS(e){return e.replace(ise,"$1-$2").toLowerCase()}function L_(e,t){return pl(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(IS(t)))}function kp(e,t,r){pl(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(IS(t)),r)}function ose(e,t){if(pl(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(IS(t)))}var y2=/\s\s*/,w2=function(){var e=!1;if(Fy){var t=!1,r=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(i){t=i}});fi.addEventListener("test",r,n),fi.removeEventListener("test",r,n)}return e}();function ha(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(!w2){var o=e.listeners;o&&o[i]&&o[i][r]&&(a=o[i][r],delete o[i][r],Object.keys(o[i]).length===0&&delete o[i],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(i,a,n)})}function Vn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(n.once&&!w2){var o=e.listeners,s=o===void 0?{}:o;a=function(){delete s[i][r],e.removeEventListener(i,a,n);for(var u=arguments.length,c=new Array(u),f=0;fMath.abs(r)&&(r=d)})}),r}function nv(e,t){var r=e.pageX,n=e.pageY,a={endX:r,endY:n};return t?a:s2({startX:r,startY:n},a)}function use(e){var t=0,r=0,n=0;return dr(e,function(a){var i=a.startX,o=a.startY;t+=i,r+=o,n+=1}),t/=n,r/=n,{pageX:t,pageY:r}}function Co(e){var t=e.aspectRatio,r=e.height,n=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=fP(n),o=fP(r);if(i&&o){var s=r*t;a==="contain"&&s>n||a==="cover"&&s90?{width:l,height:s}:{width:s,height:l}}function fse(e,t,r,n){var a=t.aspectRatio,i=t.naturalWidth,o=t.naturalHeight,s=t.rotate,l=s===void 0?0:s,u=t.scaleX,c=u===void 0?1:u,f=t.scaleY,d=f===void 0?1:f,p=r.aspectRatio,h=r.naturalWidth,v=r.naturalHeight,y=n.fillColor,m=y===void 0?"transparent":y,g=n.imageSmoothingEnabled,E=g===void 0?!0:g,w=n.imageSmoothingQuality,C=w===void 0?"low":w,S=n.maxWidth,O=S===void 0?1/0:S,D=n.maxHeight,N=D===void 0?1/0:D,R=n.minWidth,j=R===void 0?0:R,U=n.minHeight,Q=U===void 0?0:U,X=document.createElement("canvas"),J=X.getContext("2d"),te=Co({aspectRatio:p,width:O,height:N}),ge=Co({aspectRatio:p,width:j,height:Q},"cover"),H=Math.min(te.width,Math.max(ge.width,h)),ee=Math.min(te.height,Math.max(ge.height,v)),ce=Co({aspectRatio:a,width:O,height:N}),_e=Co({aspectRatio:a,width:j,height:Q},"cover"),we=Math.min(ce.width,Math.max(_e.width,i)),rt=Math.min(ce.height,Math.max(_e.height,o)),ye=[-we/2,-rt/2,we,rt];return X.width=Tu(H),X.height=Tu(ee),J.fillStyle=m,J.fillRect(0,0,H,ee),J.save(),J.translate(H/2,ee/2),J.rotate(l*Math.PI/180),J.scale(c,d),J.imageSmoothingEnabled=E,J.imageSmoothingQuality=C,J.drawImage.apply(J,[e].concat(l2(ye.map(function(Le){return Math.floor(Tu(Le))})))),J.restore(),X}var _2=String.fromCharCode;function dse(e,t,r){var n="";r+=t;for(var a=t;a0;)r.push(_2.apply(null,g2(a.subarray(0,n)))),a=a.subarray(n);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}function mse(e){var t=new DataView(e),r;try{var n,a,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(i=u+f)}}}if(i){var d=t.getUint16(i,n),p,h;for(h=0;h=0?i:v2),height:Math.max(n.offsetHeight,o>=0?o:m2)};this.containerData=s,xo(a,{width:s.width,height:s.height}),Cr(t,dn),si(a,dn)},initCanvas:function(){var t=this.containerData,r=this.imageData,n=this.options.viewMode,a=Math.abs(r.rotate)%180===90,i=a?r.naturalHeight:r.naturalWidth,o=a?r.naturalWidth:r.naturalHeight,s=i/o,l=t.width,u=t.height;t.height*s>t.width?n===3?l=t.height*s:u=t.width/s:n===3?u=t.width/s:l=t.height*s;var c={aspectRatio:s,naturalWidth:i,naturalHeight:o,width:l,height:u};this.canvasData=c,this.limited=n===1||n===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=It({},c)},limitCanvas:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=n.viewMode,l=i.aspectRatio,u=this.cropped&&o;if(t){var c=Number(n.minCanvasWidth)||0,f=Number(n.minCanvasHeight)||0;s>1?(c=Math.max(c,a.width),f=Math.max(f,a.height),s===3&&(f*l>c?c=f*l:f=c/l)):s>0&&(c?c=Math.max(c,u?o.width:0):f?f=Math.max(f,u?o.height:0):u&&(c=o.width,f=o.height,f*l>c?c=f*l:f=c/l));var d=Co({aspectRatio:l,width:c,height:f});c=d.width,f=d.height,i.minWidth=c,i.minHeight=f,i.maxWidth=1/0,i.maxHeight=1/0}if(r)if(s>(u?0:1)){var p=a.width-i.width,h=a.height-i.height;i.minLeft=Math.min(0,p),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,p),i.maxTop=Math.max(0,h),u&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,s===2&&(i.width>=a.width&&(i.minLeft=Math.min(0,p),i.maxLeft=Math.max(0,p)),i.height>=a.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=a.width,i.maxTop=a.height},renderCanvas:function(t,r){var n=this.canvasData,a=this.imageData;if(r){var i=cse({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=i.width,s=i.height,l=n.width*(o/n.naturalWidth),u=n.height*(s/n.naturalHeight);n.left-=(l-n.width)/2,n.top-=(u-n.height)/2,n.width=l,n.height=u,n.aspectRatio=o/s,n.naturalWidth=o,n.naturalHeight=s,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightr.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*a),i.height=Math.max(i.minHeight,i.height*a),i.left=r.left+(r.width-i.width)/2,i.top=r.top+(r.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=It({},i)},limitCropBox:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=this.limited,l=n.aspectRatio;if(t){var u=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,f=s?Math.min(a.width,i.width,i.width+i.left,a.width-i.left):a.width,d=s?Math.min(a.height,i.height,i.height+i.top,a.height-i.top):a.height;u=Math.min(u,a.width),c=Math.min(c,a.height),l&&(u&&c?c*l>u?c=u/l:u=c*l:u?c=u/l:c&&(u=c*l),d*l>f?d=f/l:f=d*l),o.minWidth=Math.min(u,f),o.minHeight=Math.min(c,d),o.maxWidth=f,o.maxHeight=d}r&&(s?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(a.width,i.left+i.width)-o.width,o.maxTop=Math.min(a.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,r=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=r.width&&n.height>=r.height?f2:RS),xo(this.cropBox,It({width:n.width,height:n.height},sd({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Du(this.element,R_,this.getData())}},wse={initPreview:function(){var t=this.element,r=this.crossOrigin,n=this.options.preview,a=r?this.crossOriginUrl:this.url,i=t.alt||"The image to preview",o=document.createElement("img");if(r&&(o.crossOrigin=r),o.src=a,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,!!n){var s=n;typeof n=="string"?s=t.ownerDocument.querySelectorAll(n):n.querySelector&&(s=[n]),this.previews=s,dr(s,function(l){var u=document.createElement("img");kp(l,rv,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),r&&(u.crossOrigin=r),u.src=a,u.alt=i,u.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(u)})}},resetPreview:function(){dr(this.previews,function(t){var r=L_(t,rv);xo(t,{width:r.width,height:r.height}),t.innerHTML=r.html,ose(t,rv)})},preview:function(){var t=this.imageData,r=this.canvasData,n=this.cropBoxData,a=n.width,i=n.height,o=t.width,s=t.height,l=n.left-r.left-t.left,u=n.top-r.top-t.top;!this.cropped||this.disabled||(xo(this.viewBoxImage,It({width:o,height:s},sd(It({translateX:-l,translateY:-u},t)))),dr(this.previews,function(c){var f=L_(c,rv),d=f.width,p=f.height,h=d,v=p,y=1;a&&(y=d/a,v=i*y),i&&v>p&&(y=p/i,h=a*y,v=p),xo(c,{width:h,height:v}),xo(c.getElementsByTagName("img")[0],It({width:o*y,height:s*y},sd(It({translateX:-l*y,translateY:-u*y},t))))}))}},bse={bind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&Vn(t,$_,r.cropstart),fn(r.cropmove)&&Vn(t,I_,r.cropmove),fn(r.cropend)&&Vn(t,M_,r.cropend),fn(r.crop)&&Vn(t,R_,r.crop),fn(r.zoom)&&Vn(t,j_,r.zoom),Vn(n,nP,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&Vn(n,lP,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&Vn(n,rP,this.onDblclick=this.dblclick.bind(this)),Vn(t.ownerDocument,aP,this.onCropMove=this.cropMove.bind(this)),Vn(t.ownerDocument,iP,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&Vn(window,sP,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&ha(t,$_,r.cropstart),fn(r.cropmove)&&ha(t,I_,r.cropmove),fn(r.cropend)&&ha(t,M_,r.cropend),fn(r.crop)&&ha(t,R_,r.crop),fn(r.zoom)&&ha(t,j_,r.zoom),ha(n,nP,this.onCropStart),r.zoomable&&r.zoomOnWheel&&ha(n,lP,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&ha(n,rP,this.onDblclick),ha(t.ownerDocument,aP,this.onCropMove),ha(t.ownerDocument,iP,this.onCropEnd),r.responsive&&ha(window,sP,this.onResize)}},_se={resize:function(){if(!this.disabled){var t=this.options,r=this.container,n=this.containerData,a=r.offsetWidth/n.width,i=r.offsetHeight/n.height,o=Math.abs(a-1)>Math.abs(i-1)?a:i;if(o!==1){var s,l;t.restore&&(s=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(dr(s,function(u,c){s[c]=u*o})),this.setCropBoxData(dr(l,function(u,c){l[c]=u*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===h2||this.setDragMode(ase(this.dragBox,A_)?p2:MS)},wheel:function(t){var r=this,n=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*n,t)))},cropStart:function(t){var r=t.buttons,n=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Ue(r)&&r!==1||Ue(n)&&n!==0||t.ctrlKey))){var a=this.options,i=this.pointers,o;t.changedTouches?dr(t.changedTouches,function(s){i[s.identifier]=nv(s)}):i[t.pointerId||0]=nv(t),Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?o=d2:o=L_(t.target,Pp),Koe.test(o)&&Du(this.element,$_,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===c2&&(this.cropping=!0,Cr(this.dragBox,Ym)))}},cropMove:function(t){var r=this.action;if(!(this.disabled||!r)){var n=this.pointers;t.preventDefault(),Du(this.element,I_,{originalEvent:t,action:r})!==!1&&(t.changedTouches?dr(t.changedTouches,function(a){It(n[a.identifier]||{},nv(a,!0))}):It(n[t.pointerId||0]||{},nv(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var r=this.action,n=this.pointers;t.changedTouches?dr(t.changedTouches,function(a){delete n[a.identifier]}):delete n[t.pointerId||0],r&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,du(this.dragBox,Ym,this.cropped&&this.options.modal)),Du(this.element,M_,{originalEvent:t,action:r}))}}},Ese={change:function(t){var r=this.options,n=this.canvasData,a=this.containerData,i=this.cropBoxData,o=this.pointers,s=this.action,l=r.aspectRatio,u=i.left,c=i.top,f=i.width,d=i.height,p=u+f,h=c+d,v=0,y=0,m=a.width,g=a.height,E=!0,w;!l&&t.shiftKey&&(l=f&&d?f/d:1),this.limited&&(v=i.minLeft,y=i.minTop,m=v+Math.min(a.width,n.width,n.left+n.width),g=y+Math.min(a.height,n.height,n.top+n.height));var C=o[Object.keys(o)[0]],S={x:C.endX-C.startX,y:C.endY-C.startY},O=function(N){switch(N){case gs:p+S.x>m&&(S.x=m-p);break;case ys:u+S.xg&&(S.y=g-h);break}};switch(s){case RS:u+=S.x,c+=S.y;break;case gs:if(S.x>=0&&(p>=m||l&&(c<=y||h>=g))){E=!1;break}O(gs),f+=S.x,f<0&&(s=ys,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case fo:if(S.y<=0&&(c<=y||l&&(u<=v||p>=m))){E=!1;break}O(fo),d-=S.y,c+=S.y,d<0&&(s=Ul,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case ys:if(S.x<=0&&(u<=v||l&&(c<=y||h>=g))){E=!1;break}O(ys),f-=S.x,u+=S.x,f<0&&(s=gs,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case Ul:if(S.y>=0&&(h>=g||l&&(u<=v||p>=m))){E=!1;break}O(Ul),d+=S.y,d<0&&(s=fo,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case Sf:if(l){if(S.y<=0&&(c<=y||p>=m)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l}else O(fo),O(gs),S.x>=0?py&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Of,d=-d,f=-f,c-=d,u-=f):f<0?(s=xf,f=-f,u-=f):d<0&&(s=Cf,d=-d,c-=d);break;case xf:if(l){if(S.y<=0&&(c<=y||u<=v)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l,u+=i.width-f}else O(fo),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y<=0&&c<=y&&(E=!1):(f-=S.x,u+=S.x),S.y<=0?c>y&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Cf,d=-d,f=-f,c-=d,u-=f):f<0?(s=Sf,f=-f,u-=f):d<0&&(s=Of,d=-d,c-=d);break;case Of:if(l){if(S.x<=0&&(u<=v||h>=g)){E=!1;break}O(ys),f-=S.x,u+=S.x,d=f/l}else O(Ul),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y>=0&&h>=g&&(E=!1):(f-=S.x,u+=S.x),S.y>=0?h=0&&(p>=m||h>=g)){E=!1;break}O(gs),f+=S.x,d=f/l}else O(Ul),O(gs),S.x>=0?p=0&&h>=g&&(E=!1):f+=S.x,S.y>=0?h0?s=S.y>0?Cf:Sf:S.x<0&&(u-=f,s=S.y>0?Of:xf),S.y<0&&(c-=d),this.cropped||(si(this.cropBox,dn),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}E&&(i.width=f,i.height=d,i.left=u,i.top=c,this.action=s,this.renderCropBox()),dr(o,function(D){D.startX=D.endX,D.startY=D.endY})}},Sse={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Cr(this.dragBox,Ym),si(this.cropBox,dn),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=It({},this.initialImageData),this.canvasData=It({},this.initialCanvasData),this.cropBoxData=It({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(It(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),si(this.dragBox,Ym),Cr(this.cropBox,dn)),this},replace:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),r?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,dr(this.previews,function(n){n.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,si(this.cropper,eP)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Cr(this.cropper,eP)),this},destroy:function(){var t=this.element;return t[Rt]?(t[Rt]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=n.left,i=n.top;return this.moveTo(iw(t)?t:a+Number(t),iw(r)?r:i+Number(r))},moveTo:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&(Ue(t)&&(n.left=t,a=!0),Ue(r)&&(n.top=r,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,r){var n=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(n.width*t/n.naturalWidth,null,r)},zoomTo:function(t,r,n){var a=this.options,i=this.canvasData,o=i.width,s=i.height,l=i.naturalWidth,u=i.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var c=l*t,f=u*t;if(Du(this.element,j_,{ratio:t,oldRatio:o/l,originalEvent:n})===!1)return this;if(n){var d=this.pointers,p=b2(this.cropper),h=d&&Object.keys(d).length?use(d):{pageX:n.pageX,pageY:n.pageY};i.left-=(c-o)*((h.pageX-p.left-i.left)/o),i.top-=(f-s)*((h.pageY-p.top-i.top)/s)}else fu(r)&&Ue(r.x)&&Ue(r.y)?(i.left-=(c-o)*((r.x-i.left)/o),i.top-=(f-s)*((r.y-i.top)/s)):(i.left-=(c-o)/2,i.top-=(f-s)/2);i.width=c,i.height=f,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Ue(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var r=this.imageData.scaleY;return this.scale(t,Ue(r)?r:1)},scaleY:function(t){var r=this.imageData.scaleX;return this.scale(Ue(r)?r:1,t)},scale:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&(Ue(t)&&(n.scaleX=t,a=!0),Ue(r)&&(n.scaleY=r,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,n=this.imageData,a=this.canvasData,i=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:i.left-a.left,y:i.top-a.top,width:i.width,height:i.height};var s=n.width/n.naturalWidth;if(dr(o,function(c,f){o[f]=c/s}),t){var l=Math.round(o.y+o.height),u=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=u-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return r.rotatable&&(o.rotate=n.rotate||0),r.scalable&&(o.scaleX=n.scaleX||1,o.scaleY=n.scaleY||1),o},setData:function(t){var r=this.options,n=this.imageData,a=this.canvasData,i={};if(this.ready&&!this.disabled&&fu(t)){var o=!1;r.rotatable&&Ue(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),r.scalable&&(Ue(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),Ue(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=n.width/n.naturalWidth;Ue(t.x)&&(i.left=t.x*s+a.left),Ue(t.y)&&(i.top=t.y*s+a.top),Ue(t.width)&&(i.width=t.width*s),Ue(t.height)&&(i.height=t.height*s),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?It({},this.containerData):{}},getImageData:function(){return this.sized?It({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,r={};return this.ready&&dr(["left","top","width","height","naturalWidth","naturalHeight"],function(n){r[n]=t[n]}),r},setCanvasData:function(t){var r=this.canvasData,n=r.aspectRatio;return this.ready&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)?(r.width=t.width,r.height=t.width/n):Ue(t.height)&&(r.height=t.height,r.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:t.left,top:t.top,width:t.width,height:t.height}),r||{}},setCropBoxData:function(t){var r=this.cropBoxData,n=this.options.aspectRatio,a,i;return this.ready&&this.cropped&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)&&t.width!==r.width&&(a=!0,r.width=t.width),Ue(t.height)&&t.height!==r.height&&(i=!0,r.height=t.height),n&&(a?r.height=r.width/n:i&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,n=fse(this.image,this.imageData,r,t);if(!this.cropped)return n;var a=this.getData(t.rounded),i=a.x,o=a.y,s=a.width,l=a.height,u=n.width/Math.floor(r.naturalWidth);u!==1&&(i*=u,o*=u,s*=u,l*=u);var c=s/l,f=Co({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Co({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=Co({aspectRatio:c,width:t.width||(u!==1?n.width:s),height:t.height||(u!==1?n.height:l)}),h=p.width,v=p.height;h=Math.min(f.width,Math.max(d.width,h)),v=Math.min(f.height,Math.max(d.height,v));var y=document.createElement("canvas"),m=y.getContext("2d");y.width=Tu(h),y.height=Tu(v),m.fillStyle=t.fillColor||"transparent",m.fillRect(0,0,h,v);var g=t.imageSmoothingEnabled,E=g===void 0?!0:g,w=t.imageSmoothingQuality;m.imageSmoothingEnabled=E,w&&(m.imageSmoothingQuality=w);var C=n.width,S=n.height,O=i,D=o,N,R,j,U,Q,X;O<=-s||O>C?(O=0,N=0,j=0,Q=0):O<=0?(j=-O,O=0,N=Math.min(C,s+O),Q=N):O<=C&&(j=0,N=Math.min(s,C-O),Q=N),N<=0||D<=-l||D>S?(D=0,R=0,U=0,X=0):D<=0?(U=-D,D=0,R=Math.min(S,l+D),X=R):D<=S&&(U=0,R=Math.min(l,S-D),X=R);var J=[O,D,N,R];if(Q>0&&X>0){var te=h/s;J.push(j*te,U*te,Q*te,X*te)}return m.drawImage.apply(m,[n].concat(l2(J.map(function(ge){return Math.floor(Tu(ge))})))),y},setAspectRatio:function(t){var r=this.options;return!this.disabled&&!iw(t)&&(r.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var r=this.options,n=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var i=t===MS,o=r.movable&&t===p2;t=i||o?t:h2,r.dragMode=t,kp(n,Pp,t),du(n,A_,i),du(n,N_,o),r.cropBoxMovable||(kp(a,Pp,t),du(a,A_,i),du(a,N_,o))}return this}},xse=fi.Cropper,E2=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if($oe(this,e),!t||!Xoe.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=It({},cP,fu(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return joe(e,[{key:"init",value:function(){var r=this.element,n=r.tagName.toLowerCase(),a;if(!r[Rt]){if(r[Rt]=this,n==="img"){if(this.isImg=!0,a=r.getAttribute("src")||"",this.originalUrl=a,!a)return;a=r.src}else n==="canvas"&&window.HTMLCanvasElement&&(a=r.toDataURL());this.load(a)}}},{key:"load",value:function(r){var n=this;if(r){this.url=r,this.imageData={};var a=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(qoe.test(r)){Qoe.test(r)?this.read(hse(r)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==uP&&o.abort()},o.onload=function(){n.read(o.response)},o.onloadend=function(){n.reloading=!1,n.xhr=null},i.checkCrossOrigin&&dP(r)&&a.crossOrigin&&(r=pP(r)),o.open("GET",r,!0),o.responseType="arraybuffer",o.withCredentials=a.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(r){var n=this.options,a=this.imageData,i=mse(r),o=0,s=1,l=1;if(i>1){this.url=vse(r,uP);var u=gse(i);o=u.rotate,s=u.scaleX,l=u.scaleY}n.rotatable&&(a.rotate=o),n.scalable&&(a.scaleX=s,a.scaleY=l),this.clone()}},{key:"clone",value:function(){var r=this.element,n=this.url,a=r.crossOrigin,i=n;this.options.checkCrossOrigin&&dP(n)&&(a||(a="anonymous"),i=pP(n)),this.crossOrigin=a,this.crossOriginUrl=i;var o=document.createElement("img");a&&(o.crossOrigin=a),o.src=i||n,o.alt=r.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),Cr(o,tP),r.parentNode.insertBefore(o,r.nextSibling)}},{key:"start",value:function(){var r=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var a=fi.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(fi.navigator.userAgent),i=function(u,c){It(r.imageData,{naturalWidth:u,naturalHeight:c,aspectRatio:u/c}),r.initialImageData=It({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(n.naturalWidth&&!a){i(n.naturalWidth,n.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){i(o.width,o.height),a||s.removeChild(o)},o.src=n.src,a||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(o))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,n=this.options,a=this.image,i=r.parentNode,o=document.createElement("div");o.innerHTML=Joe;var s=o.querySelector(".".concat(Rt,"-container")),l=s.querySelector(".".concat(Rt,"-canvas")),u=s.querySelector(".".concat(Rt,"-drag-box")),c=s.querySelector(".".concat(Rt,"-crop-box")),f=c.querySelector(".".concat(Rt,"-face"));this.container=i,this.cropper=s,this.canvas=l,this.dragBox=u,this.cropBox=c,this.viewBox=s.querySelector(".".concat(Rt,"-view-box")),this.face=f,l.appendChild(a),Cr(r,dn),i.insertBefore(s,r.nextSibling),si(a,tP),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,Cr(c,dn),n.guides||Cr(c.getElementsByClassName("".concat(Rt,"-dashed")),dn),n.center||Cr(c.getElementsByClassName("".concat(Rt,"-center")),dn),n.background&&Cr(s,"".concat(Rt,"-bg")),n.highlight||Cr(f,Hoe),n.cropBoxMovable&&(Cr(f,N_),kp(f,Pp,RS)),n.cropBoxResizable||(Cr(c.getElementsByClassName("".concat(Rt,"-line")),dn),Cr(c.getElementsByClassName("".concat(Rt,"-point")),dn)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),fn(n.ready)&&Vn(r,oP,n.ready,{once:!0}),Du(r,oP)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),si(this.element,dn)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=xse,e}},{key:"setDefaults",value:function(r){It(cP,fu(r)&&r)}}]),e}();It(E2.prototype,yse,wse,bse,_se,Ese,Sse);var Cs=function(){return Cs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&D.zoomTo(ge)}(O.currentTarget.cropper,E),y&&y(O)}}));m&&m(S)}return function(){var O,D;(D=(O=w.current)===null||O===void 0?void 0:O.cropper)===null||D===void 0||D.destroy()}},[w]);var C=function(S){return Cse.reduce(function(O,D){var N=O,R=D;return N[R],sw(N,[typeof R=="symbol"?R:R+""])},S)}(Cs(Cs({},g),{crossOrigin:l,src:i,alt:v}));return b.createElement("div",{style:o,className:s},b.createElement("img",Cs({},C,{style:Ose,ref:w})))});function Dse({imagePreview:e,setCropper:t}){return _.jsx(Tse,{src:e,style:{height:200,width:"100%"},initialAspectRatio:1,aspectRatio:1,preview:".img-preview",guides:!1,viewMode:1,autoCropArea:1,background:!1,onInitialized:r=>t(r)})}function Pse({loading:e,uploadPhoto:t}){const[r,n]=x.useState([]),[a,i]=x.useState();function o(){a&&a.getCroppedCanvas().toBlob(s=>t(s))}return x.useEffect(()=>()=>{r.forEach(s=>URL.revokeObjectURL(s.preview))},[r]),_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 1 - Add Photo"}),_.jsx(Ioe,{setFiles:n})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 2 - Resize Image"}),r&&r.length>0&&_.jsx(Dse,{setCropper:i,imagePreview:r[0].preview})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 3 - preview & Upload"}),r&&r.length>0&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"img-preview",style:{minHeight:200,overflow:"hidden"}}),_.jsxs($e.Group,{widths:2,children:[_.jsx($e,{loading:e,onClick:o,positive:!0,icon:"check"}),_.jsx($e,{disabled:e,onClick:()=>n([]),icon:"close"})]})]})]})]})}const kse=wt(function({profile:t}){var v;const{profileStore:{isCurrentUser:r,uploadPhoto:n,uploading:a,loading:i,setMainPhoto:o,deletePhoto:s}}=Ft(),[l,u]=x.useState(!1),[c,f]=x.useState("");function d(y){n(y).then(()=>u(!1))}function p(y,m){f(m.currentTarget.name),o(y)}function h(y,m){f(m.currentTarget.name),s(y)}return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:16,children:[_.jsx(qe,{floated:"left",icon:"image",content:"Photos"}),r&&_.jsx($e,{floated:"right",basic:!0,content:l?"Cancel":"Add Photo",onClick:()=>u(!l)})]}),_.jsx(Oe.Column,{width:16,children:l?_.jsx(Pse,{uploadPhoto:d,loading:a}):_.jsx(nr.Group,{itemsPerRow:5,children:(v=t.photos)==null?void 0:v.map(y=>_.jsxs(nr,{children:[_.jsx(qt,{src:y.url||"/assets/user.png"}),r&&_.jsxs($e.Group,{fluid:!0,widths:2,children:[_.jsx($e,{basic:!0,color:"green",content:"Main",name:"main"+y.id,disabled:y.isMain,loading:c==="main"+y.id&&i,onClick:m=>p(y,m)}),_.jsx($e,{basic:!0,color:"red",icon:"trash",name:y.id,loading:c===y.id&&i,onClick:m=>h(y,m),disabled:y.isMain})]})]},y.id))})})]})})}),Ase=wt(function({setEditMode:t}){const{profileStore:{profile:r,updateProfile:n}}=Ft();return _.jsx(ah,{initialValues:{displayName:r==null?void 0:r.displayName,bio:(r==null?void 0:r.bio)||""},onSubmit:a=>{n(a).then(()=>{t(!1)})},validationSchema:ih({displayName:Pn().required()}),children:({isSubmitting:a,isValid:i,dirty:o})=>_.jsxs(my,{className:"ui form",children:[_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(G$,{rows:3,placeholder:"Add your bio",name:"bio"}),_.jsx($e,{positive:!0,type:"submit",loading:a,content:"Update profile",floated:"right",disabled:!i||!o})]})})}),Nse=wt(function(){const{profileStore:t}=Ft(),{isCurrentUser:r,profile:n}=t,[a,i]=x.useState(!1);return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:"16",children:[_.jsx(qe,{floated:"left",icon:"user",content:`About ${n==null?void 0:n.displayName}`}),r&&_.jsx($e,{floated:"right",basic:!0,content:a?"Cancel":"Edit Profile",onClick:()=>i(!a)})]}),_.jsx(Oe.Column,{width:"16",children:a?_.jsx(Ase,{setEditMode:i}):_.jsx("span",{style:{whiteSpace:"pre-wrap"},children:n==null?void 0:n.bio})})]})})}),hP=wt(function(){const{profileStore:t}=Ft(),{profile:r,followings:n,loadingFollowings:a,activeTab:i}=t;return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"16",children:_.jsx(qe,{floated:"left",icon:"user",content:i===3?`People following ${r.displayName}`:`People ${r==null?void 0:r.displayName} is following`})}),_.jsx(Oe.Column,{width:16,children:_.jsx(nr.Group,{itemsPerRow:4,children:n.map(o=>_.jsx(s$,{profile:o},o.username))})})]})})}),vP=[{menuItem:"Future Events",pane:{key:"future"}},{menuItem:"Past Events",pane:{key:"past"}},{menuItem:"Hosting",pane:{key:"hosting"}}],Rse=wt(function(){const{profileStore:t}=Ft(),{loadUserActivities:r,profile:n,loadingActivities:a,userActivities:i}=t;x.useEffect(()=>{r(n.username)},[r,n]);const o=(s,l)=>{r(n.username,vP[l.activeIndex].pane.key)};return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:16,children:_.jsx(qe,{floated:"left",icon:"calendar",content:"Activities"})}),_.jsxs(Oe.Column,{width:16,children:[_.jsx(mc,{panes:vP,menu:{secondary:!0,pointing:!0},onTabChange:(s,l)=>o(s,l)}),_.jsx("br",{}),_.jsx(nr.Group,{itemsPerRow:4,children:i.map(s=>_.jsxs(nr,{as:an,to:`/activities/${s.id}`,children:[_.jsx(qt,{src:`/assets/categoryImages/${s.category}.jpg`,style:{minHeight:100,objectFit:"cover"}}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{textAlign:"center",children:s.title}),_.jsxs(nr.Meta,{textAlign:"center",children:[_.jsx("div",{children:ci(new Date(s.date),"do LLL")}),_.jsx("div",{children:ci(new Date(s.date),"h:mm a")})]})]})]},s.id))})]})]})})}),Mse=wt(function({profile:t}){const{profileStore:r}=Ft(),n=[{menuItem:"About",render:()=>_.jsx(Nse,{})},{menuItem:"Photos",render:()=>_.jsx(kse,{profile:t})},{menuItem:"Events",render:()=>_.jsx(Rse,{})},{menuItem:"Followers",render:()=>_.jsx(hP,{})},{menuItem:"Following",render:()=>_.jsx(hP,{})}];return _.jsx(mc,{menu:{fluid:!0,vertical:!0},menuPosition:"right",panes:n,onTabChange:(a,i)=>r.setActiveTab(i.activeIndex)})}),Ise=wt(function(){const{username:t}=eE(),{profileStore:r}=Ft(),{loadProfile:n,loadingProfile:a,profile:i,setActiveTab:o}=r;return x.useEffect(()=>(t&&n(t),()=>{o(0)}),[n,t]),a?_.jsx(Sy,{content:"Loading Profile..."}):_.jsx(Oe,{children:_.jsx(Oe.Column,{width:16,children:i&&_.jsxs(_.Fragment,{children:[_.jsx(Bie,{profile:i}),_.jsx(Mse,{profile:i})]})})})});function $se(){const{userStore:{isLoggedIn:e}}=Ft(),t=hi();return e?_.jsx(ER,{}):_.jsx(_R,{to:"/",state:{from:t}})}function F_(){return new URLSearchParams(hi().search)}function jse(){const e=F_().get("email");function t(){Vt.Account.resendEmailConfirm(e).then(()=>{ct.success("verification email resent - please check your email")}).catch(r=>console.log(r))}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,color:"green",children:[_.jsx(jt,{name:"check"}),"Successfully registered!"]}),_.jsx("p",{children:"Please check your email (including junk email) fot the verification email"}),e&&_.jsxs(_.Fragment,{children:[_.jsx("p",{children:"Didn't receive the email? Click the below button to resend"}),_.jsx($e,{primary:!0,onClick:t,content:"Resend Email",size:"huge"})]})]})}function Lse(){const{modalStore:e}=Ft(),t=F_().get("email"),r=F_().get("token"),n={Verifying:"Verifying",Failed:"Failed",Success:"Success"},[a,i]=x.useState(n.Verifying);function o(){Vt.Account.resendEmailConfirm(t).then(()=>{ct.success("verification email resent - please check your email")}).catch(l=>console.log(l))}x.useEffect(()=>{Vt.Account.verifyEmail(r,t).then(()=>{i(n.Success)}).catch(()=>{i(n.Failed)})},[n.Verifying,n.Failed,n.Success,r,t]);function s(){switch(a){case n.Verifying:return _.jsx("p",{children:"Verifying..."});case n.Failed:return _.jsxs("div",{children:[_.jsx("p",{children:"Verification failed. You can try resending the verify link to your email"}),_.jsx($e,{primary:!0,onClick:o,size:"huge",content:"Resend email"})]});case n.Success:return _.jsxs("div",{children:[_.jsx("p",{children:"Email has been verified - you can now login"}),_.jsx($e,{primary:!0,onClick:()=>e.openModal(_.jsx(PI,{})),size:"huge",content:"Login"})]})}}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"envelope"}),"Email verification"]}),_.jsx(je.Inline,{children:s()})]})}const Fse=[{path:"/",element:_.jsx($Q,{}),children:[{element:_.jsx($se,{}),children:[{path:"activities",element:_.jsx(Zte,{})},{path:"activities/:id",element:_.jsx(jie,{})},{path:"createActivity",element:_.jsx(FD,{},"create")},{path:"manage/:id",element:_.jsx(FD,{},"manage")},{path:"profiles/:username",element:_.jsx(Ise,{})},{path:"errors",element:_.jsx(Lie,{})}]},{path:"not-found",element:_.jsx(Fie,{})},{path:"server-error",element:_.jsx(Uie,{})},{path:"account/userRegisterSuccess",element:_.jsx(jse,{})},{path:"account/verifyEmail",element:_.jsx(Lse,{})},{path:"*",element:_.jsx(_R,{replace:!0,to:"/not-found"})}]}],Oo=P4(Fse);tn.defaults.baseURL="/api";tn.interceptors.request.use(e=>{const t=pt.commonStore.token;return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e});tn.interceptors.response.use(async e=>{const t=e.headers.pagination;return t&&(e.data=new Jte(e.data,JSON.parse(t))),e},e=>{var i;console.log(e);const{data:t,status:r,config:n,headers:a}=e.response;switch(r){case 400:if(n.method==="get"&&Object.prototype.hasOwnProperty.call(t.errors,"id")&&Oo.navigate("/not-found"),t.errors){const o=[];for(const s in t.errors)t.errors[s]&&o.push(t.errors[s]);throw o.flat()}else ct.error(t);break;case 401:r===401&&((i=a["www-authenticate"])!=null&&i.startsWith('Bearer error="invalid_token"'))?(pt.userStore.logout(),ct.error("Session expired - please login again")):ct.error("unauthorized");break;case 403:ct.error("forbiddent");break;case 404:Oo.navigate("/not-found");break;case 500:pt.commonStore.setServerError(t),Oo.navigate("/server-error");break}return Promise.reject(e)});const jf=e=>e.data,gr={get:e=>tn.get(e).then(jf),post:(e,t)=>tn.post(e,t).then(jf),put:(e,t)=>tn.put(e,t).then(jf),del:e=>tn.delete(e).then(jf)},Use={list:e=>tn.get("/activities",{params:e}).then(jf),details:e=>gr.get(`/activities/${e}`),create:e=>gr.post("/activities",e),update:e=>gr.put(`/activities/${e.id}`,e),delete:e=>gr.del(`/activities/${e}`),attend:e=>gr.post(`/activities/${e}/attend`,{})},Bse={current:()=>gr.get("/account"),login:e=>gr.post("/account/login",e),register:e=>gr.post("/account/register",e),fbLogin:e=>gr.post(`/account/fbLogin?accessToken=${e}`,{}),refreshToken:()=>gr.post("/account/refreshToken",{}),verifyEmail:(e,t)=>gr.post(`/account/verifyEmail?token=${e}&email=${t}`,{}),resendEmailConfirm:e=>gr.get(`/account/resendEmailConfirmationLink?email=${e}`)},zse={get:e=>gr.get(`/profiles/${e}`),uploadPhoto:e=>{let t=new FormData;return t.append("File",e),tn.post("photos",t,{headers:{"Content-Type":"multipart/form-data"}})},setMainPhoto:e=>gr.post(`/photos/${e}/setMain`,{}),deletePhoto:e=>gr.del(`/photos/${e}`),updateProfile:e=>gr.put("/profiles",e),updateFollowing:e=>gr.post(`/follow/${e}`,{}),listFollowings:(e,t)=>gr.get(`/follow/${e}?predicate=${t}`),listActivities:(e,t)=>gr.get(`/profiles/${e}/activities?predicate=${t}`)},Vt={Activities:Use,Account:Bse,Profiles:zse};class mP{constructor(t){Z(this,"username");Z(this,"displayName");Z(this,"image");Z(this,"bio");Z(this,"followersCount",0);Z(this,"followingCount",0);Z(this,"following",!1);Z(this,"photos");this.username=t.username,this.displayName=t.displayName,this.image=t.image}}class Wse{constructor(){Z(this,"activityRegistry",new Map);Z(this,"selectedActivity");Z(this,"editMode",!1);Z(this,"loading",!1);Z(this,"loadingInitial",!1);Z(this,"pagination",null);Z(this,"pagingParams",new l_);Z(this,"predicate",new Map().set("all",!0));Z(this,"setPredicate",(t,r)=>{const n=()=>{this.predicate.forEach((a,i)=>{i!=="startDate"&&this.predicate.delete(i)})};switch(t){case"all":n(),this.predicate.set("all",!0);break;case"isGoing":n(),this.predicate.set("isGoing",!0);break;case"isHost":n(),this.predicate.set("isHost",!0);break;case"startDate":this.predicate.delete("startDate"),this.predicate.set("startDate",r);break}});Z(this,"setPagingParams",t=>{this.pagingParams=t});Z(this,"loadActivities",async()=>{this.setLoadingInitial(!0);try{const t=await Vt.Activities.list(this.axiosParams);t.data.forEach(r=>{this.setActivity(r)}),this.setPagination(t.pagination),this.setLoadingInitial(!1)}catch(t){console.log(t),this.setLoadingInitial(!1)}});Z(this,"setPagination",t=>{this.pagination=t});Z(this,"loadActivity",async t=>{let r=this.getActivity(t);if(r)return this.selectedActivity=r,r;this.setLoadingInitial(!0);try{return r=await Vt.Activities.details(t),this.setActivity(r),Ze(()=>this.selectedActivity=r),this.setLoadingInitial(!1),r}catch(n){console.log(n),this.setLoadingInitial(!1)}});Z(this,"getActivity",t=>this.activityRegistry.get(t));Z(this,"setActivity",t=>{var n;const r=pt.userStore.user;r&&(t.isGoing=t.attendees.some(a=>a.username===r.username),t.isHost=t.hostUsername===r.username,t.host=(n=t.attendees)==null?void 0:n.find(a=>a.username===t.hostUsername)),t.date=new Date(t.date),this.activityRegistry.set(t.id,t)});Z(this,"setLoadingInitial",t=>{this.loadingInitial=t});Z(this,"createActivity",async t=>{const r=pt.userStore.user,n=new mP(r);try{await Vt.Activities.create(t);const a=new H3(t);a.hostUsername=r==null?void 0:r.username,a.attendees=[n],this.setActivity(a),Ze(()=>{this.selectedActivity=a})}catch(a){console.log(a)}});Z(this,"updateActivity",async t=>{try{await Vt.Activities.update(t),Ze(()=>{if(t.id){const r={...this.getActivity(t.id),...t};this.activityRegistry.set(t.id,r),this.selectedActivity=r}})}catch(r){console.log(r)}});Z(this,"deleteActivity",async t=>{this.loading=!0;try{await Vt.Activities.delete(t),Ze(()=>{this.activityRegistry.delete(t),this.loading=!1})}catch(r){console.log(r),Ze(()=>{this.loading=!1})}});Z(this,"updateAttendance",async()=>{const t=pt.userStore.user;this.loading=!0;try{await Vt.Activities.attend(this.selectedActivity.id),Ze(()=>{var r,n,a,i;if((r=this.selectedActivity)!=null&&r.isGoing)this.selectedActivity.attendees=(n=this.selectedActivity.attendees)==null?void 0:n.filter(o=>o.username!==(t==null?void 0:t.username)),this.selectedActivity.isGoing=!1;else{const o=new mP(t);(i=(a=this.selectedActivity)==null?void 0:a.attendees)==null||i.push(o),this.selectedActivity.isGoing=!0}this.activityRegistry.set(this.selectedActivity.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>this.loading=!1)}});Z(this,"cancelActivityToggle",async()=>{var t;this.loading=!0;try{await Vt.Activities.attend((t=this.selectedActivity)==null?void 0:t.id),Ze(()=>{var r,n;this.selectedActivity.isCancelled=!((r=this.selectedActivity)!=null&&r.isCancelled),this.activityRegistry.set((n=this.selectedActivity)==null?void 0:n.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"clearSelectedActivity",()=>{this.selectedActivity=void 0});Z(this,"updateAttendeeFollowing",t=>{this.activityRegistry.forEach(r=>{r.attendees.forEach(n=>{n.username==t&&(n.following?n.followersCount--:n.followersCount++,n.following=!n.following)})})});Ic(this),B1(()=>this.predicate.keys(),()=>{this.pagingParams=new l_,this.activityRegistry.clear(),this.loadActivities()})}get axiosParams(){const t=new URLSearchParams;return t.append("pageNumber",this.pagingParams.pageNumber.toString()),t.append("pageSize",this.pagingParams.pageSize.toString()),this.predicate.forEach((r,n)=>{n==="startDate"?t.append(n,r.toISOString()):t.append(n,r)}),t}get activitiesByDate(){return Array.from(this.activityRegistry.values()).sort((t,r)=>t.date.getTime()-r.date.getTime())}get groupedAcivities(){return Object.entries(this.activitiesByDate.reduce((t,r)=>{const n=ci(r.date,"dd MMM yyyy");return t[n]=t[n]?[...t[n],r]:[r],t},{}))}}class Hse{constructor(){Z(this,"error",null);Z(this,"token",localStorage.getItem("jwt"));Z(this,"appLoaded",!1);Z(this,"setToken",t=>{this.token=t});Z(this,"setAppLoaded",()=>{this.appLoaded=!0});Ic(this),B1(()=>this.token,t=>{t?localStorage.setItem("jwt",t):localStorage.removeItem("jwt")})}setServerError(t){this.error=t}}class Vse{constructor(){Z(this,"user",null);Z(this,"fbLoading",!1);Z(this,"refreshTokenTimeout");Z(this,"login",async t=>{const r=await Vt.Account.login(t);pt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>this.user=r),Oo.navigate("/activities"),pt.modalStore.closeModal()});Z(this,"register",async t=>{var r;try{await Vt.Account.register(t),Oo.navigate(`/account/userRegisterSuccess?email=${t.email}`),pt.modalStore.closeModal()}catch(n){if(((r=n==null?void 0:n.response)==null?void 0:r.status)===400)throw n;pt.modalStore.closeModal(),console.log(n)}});Z(this,"logout",()=>{pt.commonStore.setToken(null),this.user=null,Oo.navigate("/")});Z(this,"getUser",async()=>{try{const t=await Vt.Account.current();pt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t),Ze(()=>{this.user=t})}catch(t){console.log(t)}});Z(this,"setImage",t=>{this.user&&(this.user.image=t)});Z(this,"setDisplayName",t=>{this.user&&(this.user.displayName=t)});Z(this,"facebookLogin",async t=>{try{this.fbLoading=!0;const r=await Vt.Account.fbLogin(t);pt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>{this.user=r,this.fbLoading=!1}),Oo.navigate("/activities")}catch(r){console.log(r),Ze(()=>{this.fbLoading=!1})}});Z(this,"refreshToken",async()=>{this.stopRefreshTokenTimer();try{const t=await Vt.Account.refreshToken();Ze(()=>this.user=t),pt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t)}catch(t){console.log(t)}});Ic(this)}get isLoggedIn(){return!!this.user}startRefreshTokenTimer(t){const r=JSON.parse(atob(t.token.split(".")[1])),a=new Date(r.exp*1e3).getTime()-Date.now()-60*1e3;this.refreshTokenTimeout=setTimeout(this.refreshToken,a),console.log({refreshTimeout:this.refreshTokenTimeout})}stopRefreshTokenTimer(){clearTimeout(this.refreshTokenTimeout)}}class Yse{constructor(){Z(this,"modal",{open:!1,body:null});Z(this,"openModal",t=>{this.modal.open=!0,this.modal.body=t});Z(this,"closeModal",()=>{this.modal.open=!1,this.modal.body=null});Ic(this)}}class Gse{constructor(){Z(this,"profile",null);Z(this,"loadingProfile",!1);Z(this,"uploading",!1);Z(this,"loading",!1);Z(this,"followings",[]);Z(this,"loadingFollowings",!1);Z(this,"activeTab",0);Z(this,"userActivities",[]);Z(this,"loadingActivities",!1);Z(this,"setActiveTab",t=>{this.activeTab=t});Z(this,"loadProfile",async t=>{this.loadingProfile=!0;try{const r=await Vt.Profiles.get(t);Ze(()=>{this.profile=r})}catch(r){console.log(r)}finally{Ze(()=>{this.loadingProfile=!1})}});Z(this,"uploadPhoto",async t=>{this.uploading=!0;try{const n=(await Vt.Profiles.uploadPhoto(t)).data;Ze(()=>{var a;this.profile&&((a=this.profile.photos)==null||a.push(n),n.isMain&&pt.userStore.user&&(pt.userStore.setImage(n.url),this.profile.image=n.url))})}catch(r){console.log(r)}finally{Ze(()=>{this.uploading=!1})}});Z(this,"setMainPhoto",async t=>{this.loading=!0;try{await Vt.Profiles.setMainPhoto(t.id),pt.userStore.setImage(t.url),Ze(()=>{this.profile&&this.profile.photos&&(this.profile.photos.find(r=>r.isMain).isMain=!1,this.profile.photos.find(r=>r.id===t.id).isMain=!0,this.profile.image=t.url)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"deletePhoto",async t=>{this.loading=!0;try{await Vt.Profiles.deletePhoto(t.id),Ze(()=>{var r;this.profile&&(this.profile.photos=(r=this.profile.photos)==null?void 0:r.filter(n=>n.id!==t.id))})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"updateProfile",async t=>{this.loading=!0;try{await Vt.Profiles.updateProfile(t),Ze(()=>{var r;t.displayName&&t.displayName!==((r=pt.userStore.user)==null?void 0:r.displayName)&&pt.userStore.setDisplayName(t.displayName),this.profile={...this.profile,...t},this.loading=!1})}catch(r){console.log(r),Ze(()=>this.loading=!1)}});Z(this,"updateFollowing",async(t,r)=>{this.loading=!0;try{await Vt.Profiles.updateFollowing(t),pt.activityStore.updateAttendeeFollowing(t),Ze(()=>{var n,a;this.profile&&this.profile.username!==((n=pt.userStore.user)==null?void 0:n.username)&&this.profile.username===t&&(r?this.profile.followersCount++:this.profile.followersCount--,this.profile.following=!this.profile.following),this.profile&&this.profile.username===((a=pt.userStore.user)==null?void 0:a.username)&&(r?this.profile.followersCount++:this.profile.followersCount--),this.followings.forEach(i=>{i.username==t&&(i.following?i.followersCount--:i.followersCount++,i.following=!i.following)}),this.loading=!1})}catch(n){console.log(n),Ze(()=>this.loading=!1)}});Z(this,"loadFollowings",async t=>{this.loadingFollowings=!0;try{const r=await Vt.Profiles.listFollowings(this.profile.username,t);Ze(()=>{this.followings=r,this.loadingFollowings=!1})}catch(r){console.log(r),Ze(()=>this.loadingFollowings=!1)}});Z(this,"loadUserActivities",async(t,r)=>{this.loadingActivities=!0;try{const n=await Vt.Profiles.listActivities(t,r);Ze(()=>{this.userActivities=n,this.loadingActivities=!1})}catch(n){console.log(n),Ze(()=>{this.loadingActivities=!1})}});Ic(this),B1(()=>this.activeTab,t=>{if(t===3||t===4){const r=t===3?"followers":"following";this.loadFollowings(r)}else this.followings=[]})}get isCurrentUser(){return pt.userStore.user&&this.profile?pt.userStore.user.username===this.profile.username:!1}}class Pc extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class $S extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class xa extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Kse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Xse extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Jse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class S2{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Uy{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var B;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(B||(B={}));class Ap{constructor(){}log(t,r){}}Ap.instance=new Ap;const Zse="7.0.12";class Dr{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class Tr{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Np(e,t){let r="";return yh(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${ele(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function ele(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const a=n<16?"0":"";r+=`0x${a}${n.toString(16)} `}),r.substr(0,r.length-1)}function yh(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function x2(e,t,r,n,a,i){const o={},[s,l]=kc();o[s]=l,e.log(B.Trace,`(${t} transport) sending data. ${Np(a,i.logMessageContent)}.`);const u=yh(a)?"arraybuffer":"text",c=await r.post(n,{content:a,headers:{...o,...i.headers},responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});e.log(B.Trace,`(${t} transport) request complete. Response status: ${c.statusCode}.`)}function tle(e){return e===void 0?new Gm(B.Information):e===null?Ap.instance:e.log!==void 0?e:new Gm(e)}class rle{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class Gm{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${B[t]}: ${r}`;switch(t){case B.Critical:case B.Error:this.out.error(n);break;case B.Warning:this.out.warn(n);break;case B.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function kc(){let e="X-SignalR-User-Agent";return Tr.isNode&&(e="User-Agent"),[e,nle(Zse,ale(),ole(),ile())]}function nle(e,t,r,n){let a="Microsoft SignalR/";const i=e.split(".");return a+=`${i[0]}.${i[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${r}`,n?a+=`; ${n}`:a+="; Unknown Runtime Version",a+=")",a}function ale(){if(Tr.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function ile(){if(Tr.isNode)return process.versions.node}function ole(){return Tr.isNode?"NodeJS":"Browser"}function gP(e){return e.stack?e.stack:e.message?e.message:`${e}`}function sle(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class lle extends Uy{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,this._fetchType=r("node-fetch"),this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(sle());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new xa;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new xa});let a=null;if(t.timeout){const l=t.timeout;a=setTimeout(()=>{r.abort(),this._logger.log(B.Warning,"Timeout from HTTP request."),n=new $S},l)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},yh(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(l){throw n||(this._logger.log(B.Warning,`Error from HTTP request. ${l}.`),l)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!i.ok){const l=await yP(i,"text");throw new Pc(l||i.statusText,i.status)}const s=await yP(i,t.responseType);return new S2(i.status,i.statusText,s)}getCookieString(t){let r="";return Tr.isNode&&this._jar&&this._jar.getCookies(t,(n,a)=>r=a.join("; ")),r}}function yP(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class ule extends Uy{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?new Promise((r,n)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(yh(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(o=>{a.setRequestHeader(o,i[o])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),n(new xa)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?r(new S2(a.status,a.statusText,a.response||a.responseText)):n(new Pc(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(B.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),n(new Pc(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(B.Warning,"Timeout from HTTP request."),n(new $S)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class cle extends Uy{constructor(t){if(super(),typeof fetch<"u"||Tr.isNode)this._httpClient=new lle(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new ule(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class An{static write(t){return`${t}${An.RecordSeparator}`}static parse(t){if(t[t.length-1]!==An.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(An.RecordSeparator);return r.pop(),r}}An.RecordSeparatorCode=30;An.RecordSeparator=String.fromCharCode(An.RecordSeparatorCode);class fle{writeHandshakeRequest(t){return An.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(yh(t)){const s=new Uint8Array(t),l=s.indexOf(An.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),n=s.byteLength>u?s.slice(u).buffer:null}else{const s=t,l=s.indexOf(An.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=s.substring(0,u),n=s.length>u?s.substring(u):null}const a=An.parse(r),i=JSON.parse(a[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[n,i]}}var Et;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(Et||(Et={}));class dle{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new rle(this,t)}}const ple=30*1e3,hle=15*1e3;var Bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Bt||(Bt={}));class jS{constructor(t,r,n,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(B.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Dr.isRequired(t,"connection"),Dr.isRequired(r,"logger"),Dr.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=ple,this.keepAliveIntervalInMilliseconds=hle,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new fle,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Et.Ping})}static create(t,r,n,a){return new jS(t,r,n,a)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Bt.Disconnected&&this._connectionState!==Bt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Bt.Connecting,this._logger.log(B.Debug,"Starting HubConnection.");try{await this._startInternal(),Tr.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Bt.Connected,this._connectionStarted=!0,this._logger.log(B.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Bt.Disconnected,this._logger.log(B.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{const r={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(B.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(B.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(B.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===Bt.Disconnected?(this._logger.log(B.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===Bt.Disconnecting?(this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=Bt.Disconnecting,this._logger.log(B.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(B.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new xa("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createStreamInvocation(t,r,a);let o;const s=new dle;return s.cancelCallback=()=>{const l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],o.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){s.error(u);return}else l&&(l.type===Et.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},o=this._sendWithProtocol(i).catch(l=>{s.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(n,o),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._sendWithProtocol(this._createInvocation(t,r,!0,a));return this._launchStreams(n,i),i}invoke(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createInvocation(t,r,!1,a);return new Promise((s,l)=>{this._callbacks[i.invocationId]=(c,f)=>{if(f){l(f);return}else c&&(c.type===Et.Completion?c.error?l(new Error(c.error)):s(c.result):l(new Error(`Unexpected message type: ${c.type}`)))};const u=this._sendWithProtocol(i).catch(c=>{l(c),delete this._callbacks[i.invocationId]});this._launchStreams(n,u)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const a=n.indexOf(r);a!==-1&&(n.splice(a,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)switch(n.type){case Et.Invocation:this._invokeClientMethod(n);break;case Et.StreamItem:case Et.Completion:{const a=this._callbacks[n.invocationId];if(a){n.type===Et.Completion&&delete this._callbacks[n.invocationId];try{a(n)}catch(i){this._logger.log(B.Error,`Stream callback threw error: ${gP(i)}`)}}break}case Et.Ping:break;case Et.Close:{this._logger.log(B.Information,"Close message received from server.");const a=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}default:this._logger.log(B.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const i="Error parsing handshake response: "+a;this._logger.log(B.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}if(r.error){const a="Server returned handshake error: "+r.error;this._logger.log(B.Error,a);const i=new Error(a);throw this._handshakeRejecter(i),i}else this._logger.log(B.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===Bt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(B.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=n.slice(),i=!!t.invocationId;let o,s,l;for(const u of a)try{const c=o;o=await u.apply(this,t.arguments),i&&o&&c&&(this._logger.log(B.Error,`Multiple results provided for '${r}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(c){s=c,this._logger.log(B.Error,`A callback for the method '${r}' threw error '${c}'.`)}l?await this._sendWithProtocol(l):i?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):o!==void 0?l=this._createCompletionMessage(t.invocationId,null,o):(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):o&&this._logger.log(B.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(B.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new xa("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Bt.Disconnecting?this._completeClose(t):this._connectionState===Bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Bt.Disconnected,this._connectionStarted=!1,Tr.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(B.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(n++,0,a);if(i===null){this._logger.log(B.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Bt.Reconnecting,t?this._logger.log(B.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(B.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(o=>o.apply(this,[t]))}catch(o){this._logger.log(B.Error,`An onreconnecting callback called with error '${t}' threw error '${o}'.`)}if(this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(B.Information,`Reconnect attempt number ${n} will start in ${i} ms.`),await new Promise(o=>{this._reconnectDelayHandle=setTimeout(o,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Bt.Connected,this._logger.log(B.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(o=>o.apply(this,[this.connection.connectionId]))}catch(o){this._logger.log(B.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${o}'.`)}return}catch(o){if(this._logger.log(B.Information,`Reconnect attempt failed because of error '${o}'.`),this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Bt.Disconnecting&&this._completeClose();return}a=o instanceof Error?o:new Error(o.toString()),i=this._getNextRetryDelay(n++,Date.now()-r,a)}}this._logger.log(B.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(a){return this._logger.log(B.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const a=r[n];try{a(null,t)}catch(i){this._logger.log(B.Error,`Stream 'error' callback called with '${t}' threw error: ${gP(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,a){if(n)return a.length!==0?{arguments:r,streamIds:a,target:t,type:Et.Invocation}:{arguments:r,target:t,type:Et.Invocation};{const i=this._invocationId;return this._invocationId++,a.length!==0?{arguments:r,invocationId:i.toString(),streamIds:a,target:t,type:Et.Invocation}:{arguments:r,invocationId:i.toString(),target:t,type:Et.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:a=>{let i;a instanceof Error?i=a.message:a&&a.toString?i=a.toString():i="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,i)))},next:a=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,a)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let a=0;a0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Vs.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Vs.Authorization]&&delete t.headers[Vs.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Er;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Er||(Er={}));var qr;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(qr||(qr={}));let gle=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class bP{constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new gle,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,r){if(Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._url=t,this._logger.log(B.Trace,"(LongPolling transport) Connecting."),r===qr.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,a]=kc(),i={[n]:a,...this._options.headers},o={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};r===qr.Binary&&(o.responseType="arraybuffer");const s=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${s}.`);const l=await this._httpClient.get(s,o);l.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new Pc(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,o)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${n}.`);const a=await this._httpClient.get(n,r);a.statusCode===204?(this._logger.log(B.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Pc(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(B.Trace,`(LongPolling transport) data received. ${Np(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $S?this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(B.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(B.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?x2(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(B.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(B.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=kc();t[r]=n;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,a),this._logger.log(B.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(B.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(B.Trace,t),this.onclose(this._closeError)}}}class yle{constructor(t,r,n,a){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,r){return Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,a)=>{let i=!1;if(r!==qr.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let o;if(Tr.isBrowser||Tr.isWebWorker)o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const s=this._httpClient.getCookieString(t),l={};l.Cookie=s;const[u,c]=kc();l[u]=c,o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...l,...this._options.headers}})}try{o.onmessage=s=>{if(this.onreceive)try{this._logger.log(B.Trace,`(SSE transport) data received. ${Np(s.data,this._options.logMessageContent)}.`),this.onreceive(s.data)}catch(l){this._close(l);return}},o.onerror=s=>{i?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(B.Information,`SSE connected to ${this._url}`),this._eventSource=o,i=!0,n()}}catch(s){a(s);return}})}async send(t){return this._eventSource?x2(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class wle{constructor(t,r,n,a,i,o){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=a,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=o}async connect(t,r){Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((a,i)=>{t=t.replace(/^http/,"ws");let o;const s=this._httpClient.getCookieString(t);let l=!1;if(Tr.isNode||Tr.isReactNative){const u={},[c,f]=kc();u[c]=f,n&&(u[Vs.Authorization]=`Bearer ${n}`),s&&(u[Vs.Cookie]=s),o=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);o||(o=new this._webSocketConstructor(t)),r===qr.Binary&&(o.binaryType="arraybuffer"),o.onopen=u=>{this._logger.log(B.Information,`WebSocket connected to ${t}.`),this._webSocket=o,l=!0,a()},o.onerror=u=>{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="There was an error with the transport",this._logger.log(B.Information,`(WebSockets transport) ${c}.`)},o.onmessage=u=>{if(this._logger.log(B.Trace,`(WebSockets transport) data received. ${Np(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(c){this._close(c);return}},o.onclose=u=>{if(l)this._close(u);else{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(c))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(B.Trace,`(WebSockets transport) sending data. ${Np(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(B.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const _P=100;class ble{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Dr.isRequired(t,"url"),this._logger=tle(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,a=null;if(Tr.isNode&&typeof require<"u"){const i=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=i("ws"),a=i("eventsource")}!Tr.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Tr.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Tr.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Tr.isNode&&!r.EventSource&&typeof a<"u"&&(r.EventSource=a),this._httpClient=new mle(r.httpClient||new cle(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||qr.Binary,Dr.isIn(t,qr,"transferFormat"),this._logger.log(B.Debug,`Starting connection with transfer format '${qr[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(B.Error,r),await this._stopPromise,Promise.reject(new xa(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(B.Error,r),Promise.reject(new xa(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new LS(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(B.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(B.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Er.WebSockets)this.transport=this._constructTransport(Er.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,a=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xa("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const i=n.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}a++}while(n.url&&a<_P);if(a===_P&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof bP&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(B.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(B.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,a]=kc();r[n]=a;const i=this._resolveNegotiateUrl(t);this._logger.log(B.Debug,`Sending negotiation request: ${i}.`);try{const o=await this._httpClient.post(i,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(o.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${o.statusCode}'`));const s=JSON.parse(o.content);return(!s.negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),s}catch(o){let s="Failed to complete negotiation with the server: "+o;return o instanceof Pc&&o.statusCode===404&&(s=s+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(B.Error,s),Promise.reject(new Xse(s))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,a){let i=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(B.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(i,a),this.connectionId=n.connectionId;return}const o=[],s=n.availableTransports||[];let l=n;for(const u of s){const c=this._resolveTransportOrError(u,r,a);if(c instanceof Error)o.push(`${u.transport} failed:`),o.push(c);else if(this._isITransport(c)){if(this.transport=c,!l){try{l=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}i=this._createConnectUrl(t,l.connectionToken)}try{await this._startTransport(i,a),this.connectionId=l.connectionId;return}catch(f){if(this._logger.log(B.Error,`Failed to start the transport '${u.transport}': ${f}`),l=void 0,o.push(new Qse(`${u.transport} failed: ${f}`,Er[u.transport])),this._connectionState!=="Connecting"){const d="Failed to select transport before stop() was called.";return this._logger.log(B.Debug,d),Promise.reject(new xa(d))}}}}return o.length>0?Promise.reject(new Jse(`Unable to connect to the server with any of the available transports. ${o.join(" ")}`,o)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Er.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new wle(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Er.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new yle(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Er.LongPolling:return new bP(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n){const a=Er[t.transport];if(a==null)return this._logger.log(B.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(_le(r,a))if(t.transferFormats.map(o=>qr[o]).indexOf(n)>=0){if(a===Er.WebSockets&&!this._options.WebSocket||a===Er.ServerSentEvents&&!this._options.EventSource)return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it is not supported in your environment.'`),new Kse(`'${Er[a]}' is not supported in your environment.`,a);this._logger.log(B.Debug,`Selecting transport '${Er[a]}'.`);try{return this._constructTransport(a)}catch(o){return o}}else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it does not support the requested transfer format '${qr[n]}'.`),new Error(`'${Er[a]}' does not support ${qr[n]}.`);else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it was disabled by the client.`),new qse(`'${Er[a]}' is disabled by the client.`,a)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(B.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(B.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(B.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(B.Error,`Connection disconnected with error '${t}'.`):this._logger.log(B.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(B.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(B.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Tr.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(B.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=t.indexOf("?");let n=t.substring(0,r===-1?t.length:r);return n[n.length-1]!=="/"&&(n+="/"),n+="negotiate",n+=r===-1?"":t.substring(r),n.indexOf("negotiateVersion")===-1&&(n+=r===-1?"?":"&",n+="negotiateVersion="+this._negotiateVersion),n}}function _le(e,t){return!e||(t&e)!==0}class LS{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new av,this._transportResult=new av,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new av),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new av;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):LS._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(i=>i.byteLength).reduce((i,o)=>i+o),n=new Uint8Array(r);let a=0;for(const i of t)n.set(new Uint8Array(i),a),a+=i.byteLength;return n.buffer}}class av{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const Ele="json";class Sle{constructor(){this.name=Ele,this.version=1,this.transferFormat=qr.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ap.instance);const n=An.parse(t),a=[];for(const i of n){const o=JSON.parse(i);if(typeof o.type!="number")throw new Error("Invalid payload.");switch(o.type){case Et.Invocation:this._isInvocationMessage(o);break;case Et.StreamItem:this._isStreamItemMessage(o);break;case Et.Completion:this._isCompletionMessage(o);break;case Et.Ping:break;case Et.Close:break;default:r.log(B.Information,"Unknown message type '"+o.type+"' ignored.");continue}a.push(o)}return a}writeMessage(t){return An.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const xle={trace:B.Trace,debug:B.Debug,info:B.Information,information:B.Information,warn:B.Warning,warning:B.Warning,error:B.Error,critical:B.Critical,none:B.None};function Cle(e){const t=xle[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class Ole{configureLogging(t){if(Dr.isRequired(t,"logging"),Tle(t))this.logger=t;else if(typeof t=="string"){const r=Cle(t);this.logger=new Gm(r)}else this.logger=new Gm(t);return this}withUrl(t,r){return Dr.isRequired(t,"url"),Dr.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Dr.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new wP(t):this.reconnectPolicy=t:this.reconnectPolicy=new wP,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new ble(this.url,t);return jS.create(r,this.logger||Ap.instance,this.protocol||new Sle,this.reconnectPolicy)}}function Tle(e){return e.log!==void 0}class Dle{constructor(){Z(this,"comments",[]);Z(this,"hubConnection",null);Z(this,"createHubConnection",t=>{pt.activityStore.selectedActivity&&(this.hubConnection=new Ole().withUrl(`/chat?activityId=${t}`,{accessTokenFactory:()=>{var r;return(r=pt.userStore.user)==null?void 0:r.token}}).withAutomaticReconnect().configureLogging(B.Information).build(),this.hubConnection.start().catch(r=>console.log("Error establishing the connection: "+r)),this.hubConnection.on("LoadComments",r=>{Ze(()=>{r.forEach(n=>{n.createdAt=new Date(n.createdAt)}),this.comments=r})}),this.hubConnection.on("ReceiveComment",r=>{Ze(()=>{r.createdAt=new Date(r.createdAt),this.comments.unshift(r)})}))});Z(this,"stopHubConnection",()=>{var t;(t=this.hubConnection)==null||t.stop().catch(r=>console.log("Error stopping connection: ",r))});Z(this,"clearComments",()=>{this.comments=[],this.stopHubConnection()});Z(this,"addComment",async t=>{var r,n;t.activityId=(r=pt.activityStore.selectedActivity)==null?void 0:r.id;try{await((n=this.hubConnection)==null?void 0:n.invoke("SendComment",t))}catch(a){console.log(a)}});Ic(this)}}const pt={activityStore:new Wse,commonStore:new Hse,userStore:new Vse,modalStore:new Yse,profileStore:new Gse,commentStore:new Dle},C2=x.createContext(pt);function Ft(){return x.useContext(C2)}lw.createRoot(document.getElementById("root")).render(_.jsx(b.StrictMode,{children:_.jsx(C2.Provider,{value:pt,children:_.jsx(_4,{router:Oo})})}))});export default Ple(); diff --git a/API/wwwroot/assets/index-51875c2d.js b/API/wwwroot/assets/index-51875c2d.js new file mode 100644 index 0000000..963db93 --- /dev/null +++ b/API/wwwroot/assets/index-51875c2d.js @@ -0,0 +1,143 @@ +var D2=Object.defineProperty;var P2=(e,t,r)=>t in e?D2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var k2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z=(e,t,r)=>(P2(e,typeof t!="symbol"?t+"":t,r),r);var Ple=k2((Nn,Rn)=>{function A2(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EP={exports:{}},Km={},SP={exports:{}},ze={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rp=Symbol.for("react.element"),N2=Symbol.for("react.portal"),R2=Symbol.for("react.fragment"),M2=Symbol.for("react.strict_mode"),I2=Symbol.for("react.profiler"),$2=Symbol.for("react.provider"),j2=Symbol.for("react.context"),L2=Symbol.for("react.forward_ref"),F2=Symbol.for("react.suspense"),U2=Symbol.for("react.memo"),B2=Symbol.for("react.lazy"),FS=Symbol.iterator;function z2(e){return e===null||typeof e!="object"?null:(e=FS&&e[FS]||e["@@iterator"],typeof e=="function"?e:null)}var xP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CP=Object.assign,OP={};function Ac(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}Ac.prototype.isReactComponent={};Ac.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ac.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function TP(){}TP.prototype=Ac.prototype;function U_(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}var B_=U_.prototype=new TP;B_.constructor=U_;CP(B_,Ac.prototype);B_.isPureReactComponent=!0;var US=Array.isArray,DP=Object.prototype.hasOwnProperty,z_={current:null},PP={key:!0,ref:!0,__self:!0,__source:!0};function kP(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)DP.call(t,n)&&!PP.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1>>1,we=H[_e];if(0>>1;_ea(Le,ce))Hea(lt,Le)?(H[_e]=lt,H[He]=ce,_e=He):(H[_e]=Le,H[ye]=ce,_e=ye);else if(Hea(lt,ce))H[_e]=lt,H[He]=ce,_e=He;else break e}}return ee}function a(H,ee){var ce=H.sortIndex-ee.sortIndex;return ce!==0?ce:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,h=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var ee=r(u);ee!==null;){if(ee.callback===null)n(u);else if(ee.startTime<=H)n(u),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=r(u)}}function w(H){if(v=!1,E(H),!h)if(r(l)!==null)h=!0,te(C);else{var ee=r(u);ee!==null&&ge(w,ee.startTime-H)}}function C(H,ee){h=!1,v&&(v=!1,m(D),D=-1),p=!0;var ce=d;try{for(E(ee),f=r(l);f!==null&&(!(f.expirationTime>ee)||H&&!j());){var _e=f.callback;if(typeof _e=="function"){f.callback=null,d=f.priorityLevel;var we=_e(f.expirationTime<=ee);ee=e.unstable_now(),typeof we=="function"?f.callback=we:f===r(l)&&n(l),E(ee)}else n(l);f=r(l)}if(f!==null)var rt=!0;else{var ye=r(u);ye!==null&&ge(w,ye.startTime-ee),rt=!1}return rt}finally{f=null,d=ce,p=!1}}var S=!1,O=null,D=-1,N=5,R=-1;function j(){return!(e.unstable_now()-RH||125_e?(H.sortIndex=ce,t(u,H),r(l)===null&&H===r(u)&&(v?(m(D),D=-1):v=!0,ge(w,ce-_e))):(H.sortIndex=we,t(l,H),h||p||(h=!0,te(C))),H},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(H){var ee=d;return function(){var ce=d;d=ee;try{return H.apply(this,arguments)}finally{d=ce}}}})(MP);RP.exports=MP;var eL=RP.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IP=x,$n=eL;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uw=Object.prototype.hasOwnProperty,tL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zS={},WS={};function rL(e){return uw.call(WS,e)?!0:uw.call(zS,e)?!1:tL.test(e)?WS[e]=!0:(zS[e]=!0,!1)}function nL(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aL(e,t,r,n){if(t===null||typeof t>"u"||nL(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vr[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vr[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vr[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vr[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vr[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vr[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vr[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vr[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vr[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var H_=/[\-:]([a-z])/g;function V_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Vr.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y_(e,t,r,n){var a=Vr.hasOwnProperty(t)?Vr[t]:null;(a!==null?a.type!==0:n||!(2s||a[o]!==i[s]){var l=` +`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{Wy=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Tf(e):""}function iL(e){switch(e.tag){case 5:return Tf(e.type);case 16:return Tf("Lazy");case 13:return Tf("Suspense");case 19:return Tf("SuspenseList");case 0:case 2:case 15:return e=Hy(e.type,!1),e;case 11:return e=Hy(e.type.render,!1),e;case 1:return e=Hy(e.type,!0),e;default:return""}}function pw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vl:return"Fragment";case Hl:return"Portal";case cw:return"Profiler";case G_:return"StrictMode";case fw:return"Suspense";case dw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case LP:return(e.displayName||"Context")+".Consumer";case jP:return(e._context.displayName||"Context")+".Provider";case K_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q_:return t=e.displayName||null,t!==null?t:pw(e.type)||"Memo";case po:t=e._payload,e=e._init;try{return pw(e(t))}catch{}}return null}function oL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pw(t);case 8:return t===G_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sL(e){var t=UP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _h(e){e._valueTracker||(e._valueTracker=sL(e))}function BP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=UP(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Av(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hw(e,t){var r=t.checked;return Kt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function VS(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=jo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zP(e,t){t=t.checked,t!=null&&Y_(e,"checked",t,!1)}function vw(e,t){zP(e,t);var r=jo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mw(e,t.type,r):t.hasOwnProperty("defaultValue")&&mw(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YS(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mw(e,t,r){(t!=="number"||Av(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Df=Array.isArray;function pu(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Eh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ud(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Lf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lL=["Webkit","ms","Moz","O"];Object.keys(Lf).forEach(function(e){lL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lf[t]=Lf[e]})});function YP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Lf.hasOwnProperty(e)&&Lf[e]?(""+t).trim():t+"px"}function GP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=YP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var uL=Kt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ww(e,t){if(t){if(uL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function bw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _w=null;function Q_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ew=null,hu=null,vu=null;function qS(e){if(e=$p(e)){if(typeof Ew!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Zm(t),Ew(e.stateNode,e.type,t))}}function KP(e){hu?vu?vu.push(e):vu=[e]:hu=e}function qP(){if(hu){var e=hu,t=vu;if(vu=hu=null,qS(e),t)for(e=0;e>>=0,e===0?32:31-(bL(e)/_L|0)|0}var Sh=64,xh=4194304;function Pf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Iv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=Pf(s):(i&=o,i!==0&&(n=Pf(i)))}else o=r&~a,o!==0?n=Pf(o):i!==0&&(n=Pf(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Mp(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ca(t),e[t]=r}function CL(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Uf),ax=String.fromCharCode(32),ix=!1;function vk(e,t){switch(e){case"keyup":return ZL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yl=!1;function tF(e,t){switch(e){case"compositionend":return mk(t);case"keypress":return t.which!==32?null:(ix=!0,ax);case"textInput":return e=t.data,e===ax&&ix?null:e;default:return null}}function rF(e,t){if(Yl)return e==="compositionend"||!a1&&vk(e,t)?(e=pk(),lv=t1=wo=null,Yl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ux(r)}}function bk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _k(){for(var e=window,t=Av();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Av(e.document)}return t}function i1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fF(e){var t=_k(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bk(r.ownerDocument.documentElement,r)){if(n!==null&&i1(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=cx(r,i);var o=cx(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Gl=null,Dw=null,zf=null,Pw=!1;function fx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Pw||Gl==null||Gl!==Av(n)||(n=Gl,"selectionStart"in n&&i1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zf&&vd(zf,n)||(zf=n,n=Lv(Dw,"onSelect"),0Ql||(e.current=Iw[Ql],Iw[Ql]=null,Ql--)}function St(e,t){Ql++,Iw[Ql]=e.current,e.current=t}var Lo={},Qr=is(Lo),gn=is(!1),Ys=Lo;function ku(e,t){var r=e.type.contextTypes;if(!r)return Lo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yn(e){return e=e.childContextTypes,e!=null}function Uv(){At(gn),At(Qr)}function yx(e,t,r){if(Qr.current!==Lo)throw Error(ne(168));St(Qr,t),St(gn,r)}function kk(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(ne(108,oL(e)||"Unknown",a));return Kt({},r,n)}function Bv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,Ys=Qr.current,St(Qr,e),St(gn,gn.current),!0}function wx(e,t,r){var n=e.stateNode;if(!n)throw Error(ne(169));r?(e=kk(e,t,Ys),n.__reactInternalMemoizedMergedChildContext=e,At(gn),At(Qr),St(Qr,e)):At(gn),St(gn,r)}var Si=null,eg=!1,a0=!1;function Ak(e){Si===null?Si=[e]:Si.push(e)}function SF(e){eg=!0,Ak(e)}function os(){if(!a0&&Si!==null){a0=!0;var e=0,t=pt;try{var r=Si;for(pt=1;e>=o,a-=o,Oi=1<<32-Ca(t)+a|r<D?(N=O,O=null):N=O.sibling;var R=d(m,O,E[D],w);if(R===null){O===null&&(O=N);break}e&&O&&R.alternate===null&&t(m,O),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R,O=N}if(D===E.length)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;DD?(N=O,O=null):N=O.sibling;var j=d(m,O,R.value,w);if(j===null){O===null&&(O=N);break}e&&O&&j.alternate===null&&t(m,O),g=i(j,g,D),S===null?C=j:S.sibling=j,S=j,O=N}if(R.done)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;!R.done;D++,R=E.next())R=f(m,R.value,w),R!==null&&(g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return $t&&ws(m,D),C}for(O=n(m,O);!R.done;D++,R=E.next())R=p(O,m,D,R.value,w),R!==null&&(e&&R.alternate!==null&&O.delete(R.key===null?D:R.key),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return e&&O.forEach(function(U){return t(m,U)}),$t&&ws(m,D),C}function y(m,g,E,w){if(typeof E=="object"&&E!==null&&E.type===Vl&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case bh:e:{for(var C=E.key,S=g;S!==null;){if(S.key===C){if(C=E.type,C===Vl){if(S.tag===7){r(m,S.sibling),g=a(S,E.props.children),g.return=m,m=g;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===po&&Ox(C)===S.type){r(m,S.sibling),g=a(S,E.props),g.ref=lf(m,S,E),g.return=m,m=g;break e}r(m,S);break}else t(m,S);S=S.sibling}E.type===Vl?(g=Rs(E.props.children,m.mode,w,E.key),g.return=m,m=g):(w=mv(E.type,E.key,E.props,null,m.mode,w),w.ref=lf(m,g,E),w.return=m,m=w)}return o(m);case Hl:e:{for(S=E.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===E.containerInfo&&g.stateNode.implementation===E.implementation){r(m,g.sibling),g=a(g,E.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=d0(E,m.mode,w),g.return=m,m=g}return o(m);case po:return S=E._init,y(m,g,S(E._payload),w)}if(Df(E))return h(m,g,E,w);if(rf(E))return v(m,g,E,w);Ah(m,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,g!==null&&g.tag===6?(r(m,g.sibling),g=a(g,E),g.return=m,m=g):(r(m,g),g=f0(E,m.mode,w),g.return=m,m=g),o(m)):r(m,g)}return y}var Nu=Fk(!0),Uk=Fk(!1),jp={},Za=is(jp),wd=is(jp),bd=is(jp);function Ds(e){if(e===jp)throw Error(ne(174));return e}function h1(e,t){switch(St(bd,t),St(wd,e),St(Za,jp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yw(t,e)}At(Za),St(Za,t)}function Ru(){At(Za),At(wd),At(bd)}function Bk(e){Ds(bd.current);var t=Ds(Za.current),r=yw(t,e.type);t!==r&&(St(wd,e),St(Za,r))}function v1(e){wd.current===e&&(At(Za),At(wd))}var Ht=is(0);function Gv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var i0=[];function m1(){for(var e=0;er?r:4,e(!0);var n=o0.transition;o0.transition={};try{e(!1),t()}finally{pt=r,o0.transition=n}}function nA(){return sa().memoizedState}function TF(e,t,r){var n=Ro(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},aA(e))iA(t,r);else if(r=Ik(e,t,r,n),r!==null){var a=nn();Oa(r,e,n,a),oA(r,t,n)}}function DF(e,t,r){var n=Ro(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(aA(e))iA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,Aa(s,o)){var l=t.interleaved;l===null?(a.next=a,d1(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=Ik(e,t,a,n),r!==null&&(a=nn(),Oa(r,e,n,a),oA(r,t,n))}}function aA(e){var t=e.alternate;return e===Gt||t!==null&&t===Gt}function iA(e,t){Wf=Kv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function oA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,J_(e,r)}}var qv={readContext:oa,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useInsertionEffect:Yr,useLayoutEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useDeferredValue:Yr,useTransition:Yr,useMutableSource:Yr,useSyncExternalStore:Yr,useId:Yr,unstable_isNewReconciler:!1},PF={readContext:oa,useCallback:function(e,t){return Ba().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:Dx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,dv(4194308,4,Jk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return dv(4194308,4,e,t)},useInsertionEffect:function(e,t){return dv(4,2,e,t)},useMemo:function(e,t){var r=Ba();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ba();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=TF.bind(null,Gt,e),[n.memoizedState,e]},useRef:function(e){var t=Ba();return e={current:e},t.memoizedState=e},useState:Tx,useDebugValue:_1,useDeferredValue:function(e){return Ba().memoizedState=e},useTransition:function(){var e=Tx(!1),t=e[0];return e=OF.bind(null,e[1]),Ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Gt,a=Ba();if($t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=t(),Pr===null)throw Error(ne(349));Ks&30||Hk(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,Dx(Yk.bind(null,n,i,e),[e]),n.flags|=2048,Sd(9,Vk.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ba(),t=Pr.identifierPrefix;if($t){var r=Ti,n=Oi;r=(n&~(1<<32-Ca(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=_d++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Wa]=t,e[yd]=n,vA(e,t,!1,!1),t.stateNode=e;e:{switch(o=bw(r,n),r){case"dialog":Dt("cancel",e),Dt("close",e),a=n;break;case"iframe":case"object":case"embed":Dt("load",e),a=n;break;case"video":case"audio":for(a=0;aIu&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304)}else{if(!n)if(e=Gv(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),uf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$t)return Gr(t),null}else 2*rr()-i.renderingStartTime>Iu&&r!==1073741824&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=rr(),t.sibling=null,r=Ht.current,St(Ht,n?r&1|2:r&1),t):(Gr(t),null);case 22:case 23:return T1(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dn&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function jF(e,t){switch(s1(t),t.tag){case 1:return yn(t.type)&&Uv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ru(),At(gn),At(Qr),m1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return v1(t),null;case 13:if(At(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Au()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(Ht),null;case 4:return Ru(),null;case 10:return f1(t.type._context),null;case 22:case 23:return T1(),null;case 24:return null;default:return null}}var Rh=!1,Kr=!1,LF=typeof WeakSet=="function"?WeakSet:Set,ve=null;function eu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qt(e,t,n)}else r.current=null}function Gw(e,t,r){try{r()}catch(n){Qt(e,t,n)}}var jx=!1;function FF(e,t){if(kw=$v,e=_k(),i1(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===a&&(s=o),d===i&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Aw={focusedElem:e,selectionRange:r},$v=!1,ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){t=ve;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,y=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:ma(t.type,v),y);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){Qt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}return h=jx,jx=!1,h}function Hf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Gw(t,r,i)}a=a.next}while(a!==n)}}function ng(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Kw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function yA(e){var t=e.alternate;t!==null&&(e.alternate=null,yA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wa],delete t[yd],delete t[Mw],delete t[_F],delete t[EF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wA(e){return e.tag===5||e.tag===3||e.tag===4}function Lx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Fv));else if(n!==4&&(e=e.child,e!==null))for(qw(e,t,r),e=e.sibling;e!==null;)qw(e,t,r),e=e.sibling}function Qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Qw(e,t,r),e=e.sibling;e!==null;)Qw(e,t,r),e=e.sibling}var Br=null,ga=!1;function lo(e,t,r){for(r=r.child;r!==null;)bA(e,t,r),r=r.sibling}function bA(e,t,r){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount(qm,r)}catch{}switch(r.tag){case 5:Kr||eu(r,t);case 6:var n=Br,a=ga;Br=null,lo(e,t,r),Br=n,ga=a,Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Br.removeChild(r.stateNode));break;case 18:Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?n0(e.parentNode,r):e.nodeType===1&&n0(e,r),pd(e)):n0(Br,r.stateNode));break;case 4:n=Br,a=ga,Br=r.stateNode.containerInfo,ga=!0,lo(e,t,r),Br=n,ga=a;break;case 0:case 11:case 14:case 15:if(!Kr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Gw(r,t,o),a=a.next}while(a!==n)}lo(e,t,r);break;case 1:if(!Kr&&(eu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Qt(r,t,s)}lo(e,t,r);break;case 21:lo(e,t,r);break;case 22:r.mode&1?(Kr=(n=Kr)||r.memoizedState!==null,lo(e,t,r),Kr=n):lo(e,t,r);break;default:lo(e,t,r)}}function Fx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new LF),t.forEach(function(n){var a=KF.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function pa(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=o),n&=~i}if(n=a,n=rr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BF(n/1960))-n,10e?16:e,bo===null)var n=!1;else{if(e=bo,bo=null,Jv=0,Ke&6)throw Error(ne(331));var a=Ke;for(Ke|=4,ve=e.current;ve!==null;){var i=ve,o=i.child;if(ve.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lrr()-C1?Ns(e,0):x1|=r),wn(e,t)}function DA(e,t){t===0&&(e.mode&1?(t=xh,xh<<=1,!(xh&130023424)&&(xh=4194304)):t=1);var r=nn();e=$i(e,t),e!==null&&(Mp(e,t,r),wn(e,r))}function GF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),DA(e,r)}function KF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(t),DA(e,r)}var PA;PA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)vn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return vn=!1,IF(e,t,r);vn=!!(e.flags&131072)}else vn=!1,$t&&t.flags&1048576&&Nk(t,Wv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;pv(e,t),e=t.pendingProps;var a=ku(t,Qr.current);gu(t,r),a=y1(null,t,n,e,a,r);var i=w1();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(i=!0,Bv(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,p1(t),a.updater=tg,t.stateNode=a,a._reactInternals=t,Uw(t,n,e,r),t=Ww(null,t,n,!0,i,r)):(t.tag=0,$t&&i&&o1(t),en(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(pv(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=QF(n),e=ma(n,e),a){case 0:t=zw(null,t,n,e,r);break e;case 1:t=Mx(null,t,n,e,r);break e;case 11:t=Nx(null,t,n,e,r);break e;case 14:t=Rx(null,t,n,ma(n.type,e),r);break e}throw Error(ne(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),zw(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Mx(e,t,n,a,r);case 3:e:{if(dA(t),e===null)throw Error(ne(387));n=t.pendingProps,i=t.memoizedState,a=i.element,$k(e,t),Yv(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Mu(Error(ne(423)),t),t=Ix(e,t,n,r,a);break e}else if(n!==a){a=Mu(Error(ne(424)),t),t=Ix(e,t,n,r,a);break e}else for(kn=ko(t.stateNode.containerInfo.firstChild),Mn=t,$t=!0,wa=null,r=Uk(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Au(),n===a){t=ji(e,t,r);break e}en(e,t,n,r)}t=t.child}return t;case 5:return Bk(t),e===null&&jw(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Nw(n,a)?o=null:i!==null&&Nw(n,i)&&(t.flags|=32),fA(e,t),en(e,t,o,r),t.child;case 6:return e===null&&jw(t),null;case 13:return pA(e,t,r);case 4:return h1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Nu(t,null,n,r):en(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Nx(e,t,n,a,r);case 7:return en(e,t,t.pendingProps,r),t.child;case 8:return en(e,t,t.pendingProps.children,r),t.child;case 12:return en(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,St(Hv,n._currentValue),n._currentValue=o,i!==null)if(Aa(i.value,o)){if(i.children===a.children&&!gn.current){t=ji(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Di(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Lw(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Lw(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}en(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,gu(t,r),a=oa(a),n=n(a),t.flags|=1,en(e,t,n,r),t.child;case 14:return n=t.type,a=ma(n,t.pendingProps),a=ma(n.type,a),Rx(e,t,n,a,r);case 15:return uA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),pv(e,t),t.tag=1,yn(n)?(e=!0,Bv(t)):e=!1,gu(t,r),Lk(t,n,a),Uw(t,n,a,r),Ww(null,t,n,!0,e,r);case 19:return hA(e,t,r);case 22:return cA(e,t,r)}throw Error(ne(156,t.tag))};function kA(e,t){return rk(e,t)}function qF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(e,t,r,n){return new qF(e,t,r,n)}function P1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QF(e){if(typeof e=="function")return P1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===K_)return 11;if(e===q_)return 14}return 2}function Mo(e,t){var r=e.alternate;return r===null?(r=Jn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function mv(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")P1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Vl:return Rs(r.children,a,i,t);case G_:o=8,a|=8;break;case cw:return e=Jn(12,r,t,a|2),e.elementType=cw,e.lanes=i,e;case fw:return e=Jn(13,r,t,a),e.elementType=fw,e.lanes=i,e;case dw:return e=Jn(19,r,t,a),e.elementType=dw,e.lanes=i,e;case FP:return ig(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jP:o=10;break e;case LP:o=9;break e;case K_:o=11;break e;case q_:o=14;break e;case po:o=16,n=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Jn(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Rs(e,t,r,n){return e=Jn(7,e,n,t),e.lanes=r,e}function ig(e,t,r,n){return e=Jn(22,e,n,t),e.elementType=FP,e.lanes=r,e.stateNode={isHidden:!1},e}function f0(e,t,r){return e=Jn(6,e,null,t),e.lanes=r,e}function d0(e,t,r){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XF(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yy(0),this.expirationTimes=Yy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yy(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function k1(e,t,r,n,a,i,o,s,l){return e=new XF(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},p1(i),e}function JF(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MA)}catch(e){console.error(e)}}MA(),NP.exports=Fn;var Fo=NP.exports;const nU=Xr(Fo);var Gx=Fo;lw.createRoot=Gx.createRoot,lw.hydrateRoot=Gx.hydrateRoot;function at(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cU(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fU(e){var t=cU(e,"string");return typeof t=="symbol"?t:String(t)}var Ga=Symbol("mobx-stored-annotations");function ti(e){function t(r,n){Up(r,n,e)}return Object.assign(t,e)}function Up(e,t,r){Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),bU(r)||(e[Ga][t]=r)}function dU(e){return Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),e[Ga]}var Pe=Symbol("mobx administration"),Bp=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.batchId_=void 0,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=tt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r,this.batchId_=ie.inBatch?ie.batchId:NaN}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return cN(this)},t.reportChanged=function(){(!ie.inBatch||this.batchId_!==ie.batchId)&&(ie.stateVersion=ie.stateVersionn&&(n=s.dependenciesState_)}for(r.length=a,e.newObserving_=null,i=t.length;i--;){var l=t[i];l.diffValue_===0&&lN(l,e),l.diffValue_=0}for(;a--;){var u=r[a];u.diffValue_===1&&(u.diffValue_=0,r3(u,e))}n!==tt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function ab(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)lN(t[r],e);e.dependenciesState_=tt.NOT_TRACKING_}function aN(e){var t=gl();try{return e()}finally{ki(t)}}function gl(){var e=ie.trackingDerivation;return ie.trackingDerivation=null,e}function ki(e){ie.trackingDerivation=e}function F1(e){var t=ie.allowStateReads;return ie.allowStateReads=e,t}function Gf(e){ie.allowStateReads=e}function iN(e){if(e.dependenciesState_!==tt.UP_TO_DATE_){e.dependenciesState_=tt.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=tt.UP_TO_DATE_}}var yv=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.batchId=Number.MIN_SAFE_INTEGER,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0,this.stateVersion=Number.MIN_SAFE_INTEGER},wv=!0,oN=!1,ie=function(){var e=M1();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(wv=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new yv().version&&(wv=!1),wv?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new yv):(setTimeout(function(){oN||at(35)},1),new yv)}();function t3(){if((ie.pendingReactions.length||ie.inBatch||ie.isRunningReactions)&&at(36),oN=!0,wv){var e=M1();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),ie=new yv}}function sN(){return ie}function r3(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lN(e,t){e.observers_.delete(t),e.observers_.size===0&&uN(e)}function uN(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,ie.pendingUnobservations.push(e))}function Zn(){ie.inBatch===0&&(ie.batchId=ie.batchId0&&uN(e),!1)}function fN(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=tt.STALE_}))}function n3(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.POSSIBLY_STALE_?t.dependenciesState_=tt.STALE_:t.dependenciesState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.UP_TO_DATE_)}))}function a3(e){e.lowestObserverState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&(t.dependenciesState_=tt.POSSIBLY_STALE_,t.onBecomeStale_())}))}var Od=function(){function e(r,n,a,i){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=tt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=nm.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ie.pendingReactions.push(this),dN())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){Zn(),this.isScheduled_=!1;var n=ie.trackingContext;if(ie.trackingContext=this,nb(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}ie.trackingContext=n,ea()}},t.track=function(n){if(!this.isDisposed_){Zn(),this.isRunning_=!0;var a=ie.trackingContext;ie.trackingContext=this;var i=nN(this,n,void 0);ie.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&ab(this),gv(i)&&this.reportExceptionInDerivation_(i.cause),ea()}},t.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(ie.disableErrorBoundaries)throw n;var i="[mobx] uncaught error in '"+this+"'";ie.suppressReactionErrors||console.error(i,n),ie.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(Zn(),ab(this),ea()))},t.getDisposer_=function(n){var a=this,i=function o(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[Pe]=this,i},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}(),i3=100,ib=function(t){return t()};function dN(){ie.inBatch>0||ie.isRunningReactions||ib(o3)}function o3(){ie.isRunningReactions=!0;for(var e=ie.pendingReactions,t=0;e.length>0;){++t===i3&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,a=r.length;n0&&(t.dependencies=S3(e.observing_).map(SN)),t}function S3(e){return Array.from(new Set(e))}var x3=0;function xN(){this.message="FLOW_CANCELLED"}xN.prototype=Object.create(Error.prototype);var Zx=VA("flow"),C3=VA("flow.bound",{bound:!0}),Dd=Object.assign(function(t,r){if(Xs(r))return Up(t,r,Zx);var n=t,a=n.name||"",i=function(){var s=this,l=arguments,u=++x3,c=Ps(a+" - runid: "+u+" - init",n).apply(s,l),f,d=void 0,p=new Promise(function(h,v){var y=0;f=v;function m(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.next).call(c,w)}catch(S){return v(S)}E(C)}function g(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.throw).call(c,w)}catch(S){return v(S)}E(C)}function E(w){if(Na(w==null?void 0:w.then)){w.then(E,v);return}return w.done?h(w.value):(d=Promise.resolve(w.value),d.then(m,g))}m(void 0)});return p.cancel=Ps(a+" - runid: "+u+" - cancel",function(){try{d&&eC(d);var h=c.return(void 0),v=Promise.resolve(h.value);v.then(ru,ru),eC(v),f(new xN)}catch(y){f(y)}}),p};return i.isMobXFlow=!0,i},Zx);Dd.bound=ti(C3);function eC(e){Na(e.cancel)&&e.cancel()}function om(e){return(e==null?void 0:e.isMobXFlow)===!0}function O3(e,t){return e?t!==void 0?Pd(e)?e[Pe].values_.has(t):!1:Pd(e)||!!e[Pe]||j1(e)||im(e)||gg(e):!1}function CN(e){return O3(e)}function xi(e,t){t===void 0&&(t=void 0),Zn();try{return e.apply(t)}finally{ea()}}function Ml(e){return e[Pe]}var T3={has:function(t,r){return Ml(t).has_(r)},get:function(t,r){return Ml(t).get_(r)},set:function(t,r,n){var a;return Xs(r)?(a=Ml(t).set_(r,n,!0))!=null?a:!0:!1},deleteProperty:function(t,r){var n;return Xs(r)?(n=Ml(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var a;return(a=Ml(t).defineProperty_(r,n))!=null?a:!0},ownKeys:function(t){return Ml(t).ownKeys_()},preventExtensions:function(t){at(13)}};function D3(e,t){var r,n;return $A(),e=Vp(e,t),(n=(r=e[Pe]).proxy_)!=null?n:r.proxy_=new Proxy(e,T3)}function Qn(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Wp(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Xn(e,t){var r=gl();try{for(var n=[].concat(e.interceptors_||[]),a=0,i=n.length;a0}function Hp(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Da(e,t){var r=gl(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,i=n.length;a0?n.map(this.dehancer):n},t.intercept_=function(n){return Wp(this,n)},t.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Hp(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&at("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var i=new Array(n-a),o=0;o0&&$N(n+a+1)},t.spliceWithArray_=function(n,a,i){var o=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?a=s-n:a==null?a=0:a=Math.max(0,Math.min(a,s-n)),i===void 0&&(i=tb),Qn(this)){var l=Xn(this,{object:this.proxy_,type:tC,index:n,removedCount:a,added:i});if(!l)return tb;a=l.removedCount,i=l.added}if(i=i.length===0?i:i.map(function(f){return o.enhancer_(f,void 0)}),this.legacyMode_){var u=i.length-a;this.updateArrayLength_(s,u)}var c=this.spliceItemsIntoValues_(n,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(n,i,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(n,a,i){if(i.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,a){var i=this.values_;if(this.legacyMode_&&n>i.length&&at(17,n,i.length),n2?n-2:0),i=2;i-1?(this.splice(n,1),!0):!1}};br("concat",Ji);br("flat",Ji);br("includes",Ji);br("indexOf",Ji);br("join",Ji);br("lastIndexOf",Ji);br("slice",Ji);br("toString",Ji);br("toLocaleString",Ji);br("every",ss);br("filter",ss);br("find",ss);br("findIndex",ss);br("flatMap",ss);br("forEach",ss);br("map",ss);br("some",ss);br("reduce",ON);br("reduceRight",ON);function br(e,t){typeof Array.prototype[e]=="function"&&(sm[e]=t(e))}function Ji(e){return function(){var t=this[Pe];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function ss(e){return function(t,r){var n=this,a=this[Pe];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,s){return t.call(r,o,s,n)})}}function ON(e){return function(){var t=this,r=this[Pe];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(i,o,s){return a(i,o,s,t)},n[e].apply(n,arguments)}}var R3=ml("ObservableArrayAdministration",z1);function yg(e){return fg(e)&&R3(e[Pe])}var TN,DN,M3={},_o="add",lm="delete";TN=Symbol.iterator;DN=Symbol.toStringTag;var PN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Pe]=M3,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=a,Na(Map)||at(18),ls(function(){i.keysAtom_=WA("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,r&&i.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var a=this;if(!ie.trackingDerivation)return this.has_(n);var i=this.hasMap_.get(n);if(!i){var o=i=new wu(this.has_(n),dg,"ObservableMap.key?",!1);this.hasMap_.set(n,o),bN(o,function(){return a.hasMap_.delete(n)})}return i.get()},t.set=function(n,a){var i=this.has_(n);if(Qn(this)){var o=Xn(this,{type:i?ri:_o,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return i?this.updateValue_(n,a):this.addValue_(n,a),this},t.delete=function(n){var a=this;if(this.keysAtom_,Qn(this)){var i=Xn(this,{type:lm,object:this,name:n});if(!i)return!1}if(this.has_(n)){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:lm,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return xi(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(n))==null||u.setNewValue_(!1);var c=a.data_.get(n);c.setNewValue_(void 0),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.updateValue_=function(n,a){var i=this.data_.get(n);if(a=i.prepareNewValue_(a),a!==ie.UNCHANGED){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:ri,object:this,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),s&&Da(this,l)}},t.addValue_=function(n,a){var i=this;this.keysAtom_,xi(function(){var u,c=new wu(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(n,c),a=c.value_,(u=i.hasMap_.get(n))==null||u.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:_o,object:this,name:n,newValue:a}:null;s&&Da(this,l)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:n.get(l)}}})},t.entries=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:[l,n.get(l)]}}})},t[TN]=function(){return this.entries()},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value,l=s[0],u=s[1];n.call(a,u,l,this)}},t.merge=function(n){var a=this;return yl(n)&&(n=new Map(n)),xi(function(){Li(n)?sU(n).forEach(function(i){return a.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var o=i[0],s=i[1];return a.set(o,s)}):Mc(n)?(n.constructor!==Map&&at(19,n),n.forEach(function(i,o){return a.set(o,i)})):n!=null&&at(20,n)}),this},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.keys()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.replace=function(n){var a=this;return xi(function(){for(var i=I3(n),o=new Map,s=!1,l=nu(a.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!i.has(c)){var f=a.delete(c);if(f)s=!0;else{var d=a.data_.get(c);o.set(c,d)}}}for(var p=nu(i.entries()),h;!(h=p()).done;){var v=h.value,y=v[0],m=v[1],g=a.data_.has(y);if(a.set(y,m),a.data_.has(y)){var E=a.data_.get(y);o.set(y,E),g||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var w=a.data_.keys(),C=o.keys(),S=w.next(),O=C.next();!S.done;){if(S.value!==O.value){a.keysAtom_.reportChanged();break}S=w.next(),O=C.next()}a.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,a){return Hp(this,n)},t.intercept_=function(n){return Wp(this,n)},$1(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:DN,get:function(){return"Map"}}]),e}(),yl=ml("ObservableMap",PN);function I3(e){if(Mc(e)||yl(e))return e;if(Array.isArray(e))return new Map(e);if(Li(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return at(21,e)}var kN,AN,$3={};kN=Symbol.iterator;AN=Symbol.toStringTag;var NN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[Pe]=$3,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Na(Set)||at(22),this.enhancer_=function(o,s){return n(o,s,a)},ls(function(){i.atom_=WA(i.name_),r&&i.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.data_.values()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value;n.call(a,s,s,this)}},t.add=function(n){var a=this;if(this.atom_,Qn(this)){var i=Xn(this,{type:_o,object:this,newValue:n});if(!i)return this}if(!this.has(n)){xi(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:_o,object:this,newValue:n}:null;s&&Da(this,l)}return this},t.delete=function(n){var a=this;if(Qn(this)){var i=Xn(this,{type:lm,object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:lm,object:this,oldValue:n}:null;return xi(function(){a.atom_.reportChanged(),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,a=Array.from(this.keys()),i=Array.from(this.values());return kd({next:function(){var s=n;return n+=1,sv0){for(var t=v0;t=0&&r++;break}e=sC(e),t=sC(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Na(l)&&l instanceof l&&Na(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],a=a||[];for(var c=n.length;c--;)if(n[c]===e)return a[c]===t;if(n.push(e),a.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!sb(e[c],t[c],r-1,n,a))return!1}else{var f=Object.keys(e),d;if(c=f.length,Object.keys(t).length!==c)return!1;for(;c--;)if(d=f[c],!(Pi(t,d)&&sb(e[d],t[d],r-1,n,a)))return!1}return n.pop(),a.pop(),!0}function sC(e){return yg(e)?e.slice():Mc(e)||yl(e)||Fp(e)||$c(e)?Array.from(e.entries()):e}function kd(e){return e[Symbol.iterator]=W3,e}function W3(){return this}["Symbol","Map","Set"].forEach(function(e){var t=M1();typeof t[e]>"u"&&at("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:l3,extras:{getDebugName:ob},$mobx:Pe});class H3{constructor(t){Z(this,"id");Z(this,"title");Z(this,"date");Z(this,"description");Z(this,"category");Z(this,"city");Z(this,"venue");Z(this,"hostUsername","");Z(this,"isCancelled",!1);Z(this,"isGoing",!1);Z(this,"isHost",!1);Z(this,"host");Z(this,"attendees",[]);this.id=t==null?void 0:t.id,this.title=t==null?void 0:t.title,this.date=t==null?void 0:t.date,this.description=t==null?void 0:t.description,this.category=t==null?void 0:t.category,this.venue=t==null?void 0:t.venue,this.city=t==null?void 0:t.city}}class lC{constructor(t){Z(this,"id");Z(this,"title","");Z(this,"date",null);Z(this,"description","");Z(this,"category","");Z(this,"city","");Z(this,"venue","");t&&(this.id=t.id,this.title=t.title,this.category=t.category,this.description=t.description,this.date=t.date,this.city=t.city,this.venue=t.venue)}}function LN(e,t){return function(){return e.apply(t,arguments)}}const{toString:V3}=Object.prototype,{getPrototypeOf:V1}=Object,wg=(e=>t=>{const r=V3.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>wg(t)===e),bg=e=>t=>typeof t===e,{isArray:jc}=Array,Ad=bg("undefined");function Y3(e){return e!==null&&!Ad(e)&&e.constructor!==null&&!Ad(e.constructor)&&aa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const FN=di("ArrayBuffer");function G3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FN(e.buffer),t}const K3=bg("string"),aa=bg("function"),UN=bg("number"),_g=e=>e!==null&&typeof e=="object",q3=e=>e===!0||e===!1,bv=e=>{if(wg(e)!=="object")return!1;const t=V1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Q3=di("Date"),X3=di("File"),J3=di("Blob"),Z3=di("FileList"),eB=e=>_g(e)&&aa(e.pipe),tB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||aa(e.append)&&((t=wg(e))==="formdata"||t==="object"&&aa(e.toString)&&e.toString()==="[object FormData]"))},rB=di("URLSearchParams"),nB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yp(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),jc(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}const zN=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WN=e=>!Ad(e)&&e!==zN;function lb(){const{caseless:e}=WN(this)&&this||{},t={},r=(n,a)=>{const i=e&&BN(t,a)||a;bv(t[i])&&bv(n)?t[i]=lb(t[i],n):bv(n)?t[i]=lb({},n):jc(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(Yp(t,(a,i)=>{r&&aa(a)?e[i]=LN(a,r):e[i]=a},{allOwnKeys:n}),e),iB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oB=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},sB=(e,t,r,n)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&V1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lB=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},uB=e=>{if(!e)return null;if(jc(e))return e;let t=e.length;if(!UN(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&V1(Uint8Array)),fB=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},dB=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pB=di("HTMLFormElement"),hB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),uC=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),vB=di("RegExp"),HN=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yp(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},mB=e=>{HN(e,(t,r)=>{if(aa(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(aa(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},gB=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return jc(e)?n(e):n(String(e).split(t)),r},yB=()=>{},wB=(e,t)=>(e=+e,Number.isFinite(e)?e:t),m0="abcdefghijklmnopqrstuvwxyz",cC="0123456789",VN={DIGIT:cC,ALPHA:m0,ALPHA_DIGIT:m0+m0.toUpperCase()+cC},bB=(e=16,t=VN.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function _B(e){return!!(e&&aa(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const EB=e=>{const t=new Array(10),r=(n,a)=>{if(_g(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=jc(n)?[]:{};return Yp(n,(o,s)=>{const l=r(o,a+1);!Ad(l)&&(i[s]=l)}),t[a]=void 0,i}}return n};return r(e,0)},SB=di("AsyncFunction"),xB=e=>e&&(_g(e)||aa(e))&&aa(e.then)&&aa(e.catch),W={isArray:jc,isArrayBuffer:FN,isBuffer:Y3,isFormData:tB,isArrayBufferView:G3,isString:K3,isNumber:UN,isBoolean:q3,isObject:_g,isPlainObject:bv,isUndefined:Ad,isDate:Q3,isFile:X3,isBlob:J3,isRegExp:vB,isFunction:aa,isStream:eB,isURLSearchParams:rB,isTypedArray:cB,isFileList:Z3,forEach:Yp,merge:lb,extend:aB,trim:nB,stripBOM:iB,inherits:oB,toFlatObject:sB,kindOf:wg,kindOfTest:di,endsWith:lB,toArray:uB,forEachEntry:fB,matchAll:dB,isHTMLForm:pB,hasOwnProperty:uC,hasOwnProp:uC,reduceDescriptors:HN,freezeMethods:mB,toObjectSet:gB,toCamelCase:hB,noop:yB,toFiniteNumber:wB,findKey:BN,global:zN,isContextDefined:WN,ALPHABET:VN,generateString:bB,isSpecCompliantForm:_B,toJSONObject:EB,isAsyncFn:SB,isThenable:xB};function Ye(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}W.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const YN=Ye.prototype,GN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GN[e]={value:e}});Object.defineProperties(Ye,GN);Object.defineProperty(YN,"isAxiosError",{value:!0});Ye.from=(e,t,r,n,a,i)=>{const o=Object.create(YN);return W.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ye.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const CB=null;function ub(e){return W.isPlainObject(e)||W.isArray(e)}function KN(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function fC(e,t,r){return e?e.concat(t).map(function(a,i){return a=KN(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function OB(e){return W.isArray(e)&&!e.some(ub)}const TB=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Eg(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!W.isUndefined(y[v])});const n=r.metaTokens,a=r.visitor||c,i=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(a))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(W.isDate(h))return h.toISOString();if(!l&&W.isBlob(h))throw new Ye("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(h)||W.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,y){let m=h;if(h&&!y&&typeof h=="object"){if(W.endsWith(v,"{}"))v=n?v:v.slice(0,-2),h=JSON.stringify(h);else if(W.isArray(h)&&OB(h)||(W.isFileList(h)||W.endsWith(v,"[]"))&&(m=W.toArray(h)))return v=KN(v),m.forEach(function(E,w){!(W.isUndefined(E)||E===null)&&t.append(o===!0?fC([v],w,i):o===null?v:v+"[]",u(E))}),!1}return ub(h)?!0:(t.append(fC(y,v,i),u(h)),!1)}const f=[],d=Object.assign(TB,{defaultVisitor:c,convertValue:u,isVisitable:ub});function p(h,v){if(!W.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),W.forEach(h,function(m,g){(!(W.isUndefined(m)||m===null)&&a.call(t,m,W.isString(g)?g.trim():g,v,d))===!0&&p(m,v?v.concat(g):[g])}),f.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return p(e),t}function dC(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Y1(e,t){this._pairs=[],e&&Eg(e,this,t)}const qN=Y1.prototype;qN.append=function(t,r){this._pairs.push([t,r])};qN.toString=function(t){const r=t?function(n){return t.call(this,n,dC)}:dC;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function DB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QN(e,t,r){if(!t)return e;const n=r&&r.encode||DB,a=r&&r.serialize;let i;if(a?i=a(t,r):i=W.isURLSearchParams(t)?t.toString():new Y1(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class PB{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(n){n!==null&&t(n)})}}const pC=PB,XN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kB=typeof URLSearchParams<"u"?URLSearchParams:Y1,AB=typeof FormData<"u"?FormData:null,NB=typeof Blob<"u"?Blob:null,RB={isBrowser:!0,classes:{URLSearchParams:kB,FormData:AB,Blob:NB},protocols:["http","https","file","blob","url","data"]},JN=typeof window<"u"&&typeof document<"u",MB=(e=>JN&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),IB=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$B=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:JN,hasStandardBrowserEnv:MB,hasStandardBrowserWebWorkerEnv:IB},Symbol.toStringTag,{value:"Module"})),Ka={...$B,...RB};function jB(e,t){return Eg(e,new Ka.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Ka.isNode&&W.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function LB(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function FB(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n=r.length;return o=!o&&W.isArray(a)?a.length:o,l?(W.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!W.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&W.isArray(a[o])&&(a[o]=FB(a[o])),!s)}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(n,a)=>{t(LB(n),a,r,0)}),r}return null}function UB(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const G1={transitional:XN,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return a&&a?JSON.stringify(ZN(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jB(t,this.formSerializer).toString();if((s=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Eg(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),UB(t)):t}],transformResponse:[function(t){const r=this.transitional||G1.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&W.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ye.from(s,Ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ka.classes.FormData,Blob:Ka.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{G1.headers[e]={}});const K1=G1,BB=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zB=e=>{const t={};let r,n,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&BB[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},hC=Symbol("internals");function ff(e){return e&&String(e).trim().toLowerCase()}function _v(e){return e===!1||e==null?e:W.isArray(e)?e.map(_v):String(e)}function WB(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const HB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function g0(e,t,r,n,a){if(W.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!W.isString(t)){if(W.isString(n))return t.indexOf(n)!==-1;if(W.isRegExp(n))return n.test(t)}}function VB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function YB(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class Sg{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(s,l,u){const c=ff(l);if(!c)throw new Error("header name must be a non-empty string");const f=W.findKey(a,c);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||l]=_v(s))}const o=(s,l)=>W.forEach(s,(u,c)=>i(u,c,l));return W.isPlainObject(t)||t instanceof this.constructor?o(t,r):W.isString(t)&&(t=t.trim())&&!HB(t)?o(zB(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=ff(t),t){const n=W.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return WB(a);if(W.isFunction(r))return r.call(this,a,n);if(W.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ff(t),t){const n=W.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||g0(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=ff(o),o){const s=W.findKey(n,o);s&&(!r||g0(n,n[s],s,r))&&(delete n[s],a=!0)}}return W.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||g0(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return W.forEach(this,(a,i)=>{const o=W.findKey(n,i);if(o){r[o]=_v(a),delete r[i];return}const s=t?VB(i):String(i).trim();s!==i&&delete r[i],r[s]=_v(a),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return W.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&W.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[hC]=this[hC]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=ff(o);n[s]||(YB(a,o),n[s]=!0)}return W.isArray(t)?t.forEach(i):i(t),this}}Sg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(Sg.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});W.freezeMethods(Sg);const Ai=Sg;function y0(e,t){const r=this||K1,n=t||r,a=Ai.from(n.headers);let i=n.data;return W.forEach(e,function(s){i=s.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function eR(e){return!!(e&&e.__CANCEL__)}function Gp(e,t,r){Ye.call(this,e??"canceled",Ye.ERR_CANCELED,t,r),this.name="CanceledError"}W.inherits(Gp,Ye,{__CANCEL__:!0});function GB(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ye("Request failed with status code "+r.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const KB=Ka.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const o=[e+"="+encodeURIComponent(t)];W.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),W.isString(n)&&o.push("path="+n),W.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QB(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function tR(e,t){return e&&!qB(t)?QB(e,t):t}const XB=Ka.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const s=W.isString(o)?a(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function JB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ZB(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];o||(o=u),r[a]=l,n[a]=u;let f=i,d=0;for(;f!==a;)d+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o{const i=a.loaded,o=a.lengthComputable?a.total:void 0,s=i-r,l=n(s),u=i<=o;r=i;const c={loaded:i,total:o,progress:o?i/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const ez=typeof XMLHttpRequest<"u",tz=ez&&function(e){return new Promise(function(r,n){let a=e.data;const i=Ai.from(e.headers).normalize();let{responseType:o,withXSRFToken:s}=e,l;function u(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let c;if(W.isFormData(a)){if(Ka.hasStandardBrowserEnv||Ka.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[v,...y]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([v||"multipart/form-data",...y].join("; "))}}let f=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(v+":"+y))}const d=tR(e.baseURL,e.url);f.open(e.method.toUpperCase(),QN(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function p(){if(!f)return;const v=Ai.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:e,request:f};GB(function(E){r(E),u()},function(E){n(E),u()},m),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new Ye("Request aborted",Ye.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Ye("Network Error",Ye.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||XN;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(new Ye(y,m.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,e,f)),f=null},Ka.hasStandardBrowserEnv&&(s&&W.isFunction(s)&&(s=s(e)),s||s!==!1&&XB(d))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&KB.read(e.xsrfCookieName);v&&i.set(e.xsrfHeaderName,v)}a===void 0&&i.setContentType(null),"setRequestHeader"in f&&W.forEach(i.toJSON(),function(y,m){f.setRequestHeader(m,y)}),W.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",vC(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",vC(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=v=>{f&&(n(!v||v.type?new Gp(null,e,f):v),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const h=JB(d);if(h&&Ka.protocols.indexOf(h)===-1){n(new Ye("Unsupported protocol "+h+":",Ye.ERR_BAD_REQUEST,e));return}f.send(a||null)})},cb={http:CB,xhr:tz};W.forEach(cb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mC=e=>`- ${e}`,rz=e=>W.isFunction(e)||e===null||e===!1,rR={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(mC).join(` +`):" "+mC(i[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:cb};function w0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gp(null,e)}function gC(e){return w0(e),e.headers=Ai.from(e.headers),e.data=y0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rR.getAdapter(e.adapter||K1.adapter)(e).then(function(n){return w0(e),n.data=y0.call(e,e.transformResponse,n),n.headers=Ai.from(n.headers),n},function(n){return eR(n)||(w0(e),n&&n.response&&(n.response.data=y0.call(e,e.transformResponse,n.response),n.response.headers=Ai.from(n.response.headers))),Promise.reject(n)})}const yC=e=>e instanceof Ai?e.toJSON():e;function zu(e,t){t=t||{};const r={};function n(u,c,f){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:f},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function a(u,c,f){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u,f)}else return n(u,c,f)}function i(u,c){if(!W.isUndefined(c))return n(void 0,c)}function o(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>a(yC(u),yC(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||a,d=f(e[c],t[c],c);W.isUndefined(d)&&f!==s||(r[c]=d)}),r}const nR="1.6.2",q1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{q1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wC={};q1.transitional=function(t,r,n){function a(i,o){return"[Axios v"+nR+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(t===!1)throw new Ye(a(o," has been removed"+(r?" in "+r:"")),Ye.ERR_DEPRECATED);return r&&!wC[o]&&(wC[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,s):!0}};function nz(e,t,r){if(typeof e!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const s=e[i],l=s===void 0||o(s,i,e);if(l!==!0)throw new Ye("option "+i+" must be "+l,Ye.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ye("Unknown option "+i,Ye.ERR_BAD_OPTION)}}const fb={assertOptions:nz,validators:q1},uo=fb.validators;class um{constructor(t){this.defaults=t,this.interceptors={request:new pC,response:new pC}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=zu(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&fb.assertOptions(n,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),a!=null&&(W.isFunction(a)?r.paramsSerializer={serialize:a}:fb.assertOptions(a,{encode:uo.function,serialize:uo.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[r.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Ai.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,d;if(!l){const h=[gC.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,s){n.reason||(n.reason=new Gp(i,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Q1(function(a){t=a}),cancel:t}}}const az=Q1;function iz(e){return function(r){return e.apply(null,r)}}function oz(e){return W.isObject(e)&&e.isAxiosError===!0}const db={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(db).forEach(([e,t])=>{db[t]=e});const sz=db;function aR(e){const t=new Ev(e),r=LN(Ev.prototype.request,t);return W.extend(r,Ev.prototype,t,{allOwnKeys:!0}),W.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return aR(zu(e,a))},r}const hr=aR(K1);hr.Axios=Ev;hr.CanceledError=Gp;hr.CancelToken=az;hr.isCancel=eR;hr.VERSION=nR;hr.toFormData=Eg;hr.AxiosError=Ye;hr.Cancel=hr.CanceledError;hr.all=function(t){return Promise.all(t)};hr.spread=iz;hr.isAxiosError=oz;hr.mergeConfig=zu;hr.AxiosHeaders=Ai;hr.formToJSON=e=>ZN(W.isHTMLForm(e)?new FormData(e):e);hr.getAdapter=rR.getAdapter;hr.HttpStatusCode=sz;hr.default=hr;const tn=hr;function iR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Js=e=>typeof e=="string",mn=e=>typeof e=="function",Sv=e=>Js(e)||mn(e)?e:null,b0=e=>x.isValidElement(e)||Js(e)||mn(e)||qf(e);function lz(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=n+"px",a.transition=`all ${r}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,r)})})}function xg(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:a=!0,collapseDuration:i=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:f,isIn:d}=o;const p=n?`${t}--${l}`:t,h=n?`${r}--${l}`:r,v=x.useRef(0);return x.useLayoutEffect(()=>{const y=f.current,m=p.split(" "),g=E=>{E.target===f.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",g),y.removeEventListener("animationcancel",g),v.current===0&&E.type!=="animationcancel"&&y.classList.remove(...m))};y.classList.add(...m),y.addEventListener("animationend",g),y.addEventListener("animationcancel",g)},[]),x.useEffect(()=>{const y=f.current,m=()=>{y.removeEventListener("animationend",m),a?lz(y,c,i):c()};d||(u?m():(v.current=1,y.className+=` ${h}`,y.addEventListener("animationend",m)))},[d]),b.createElement(b.Fragment,null,s)}}function bC(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Gn={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Fh=e=>{let{theme:t,type:r,...n}=e;return b.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},_0={info:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return b.createElement("div",{className:"Toastify__spinner"})}};function uz(e){const[,t]=x.useReducer(p=>p+1,0),[r,n]=x.useState([]),a=x.useRef(null),i=x.useRef(new Map).current,o=p=>r.indexOf(p)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:p=>i.get(p)}).current;function l(p){let{containerId:h}=p;const{limit:v}=s.props;!v||h&&s.containerId!==h||(s.count-=s.queue.length,s.queue=[])}function u(p){n(h=>p==null?[]:h.filter(v=>v!==p))}function c(){const{toastContent:p,toastProps:h,staleId:v}=s.queue.shift();d(p,h,v)}function f(p,h){let{delay:v,staleId:y,...m}=h;if(!b0(p)||function(U){return!a.current||s.props.enableMultiContainer&&U.containerId!==s.props.containerId||i.has(U.toastId)&&U.updateId==null}(m))return;const{toastId:g,updateId:E,data:w}=m,{props:C}=s,S=()=>u(g),O=E==null;O&&s.count++;const D={...C,style:C.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(m).filter(U=>{let[Q,X]=U;return X!=null})),toastId:g,updateId:E,data:w,closeToast:S,isIn:!1,className:Sv(m.className||C.toastClassName),bodyClassName:Sv(m.bodyClassName||C.bodyClassName),progressClassName:Sv(m.progressClassName||C.progressClassName),autoClose:!m.isLoading&&(N=m.autoClose,R=C.autoClose,N===!1||qf(N)&&N>0?N:R),deleteToast(){const U=bC(i.get(g),"removed");i.delete(g),Gn.emit(4,U);const Q=s.queue.length;if(s.count=g==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),Q>0){const X=g==null?s.props.limit:1;if(Q===1||X===1)s.displayedToast++,c();else{const J=X>Q?Q:X;s.displayedToast=J;for(let te=0;teee in _0)(X)&&(ge=_0[X](H))),ge}(D),mn(m.onOpen)&&(D.onOpen=m.onOpen),mn(m.onClose)&&(D.onClose=m.onClose),D.closeButton=C.closeButton,m.closeButton===!1||b0(m.closeButton)?D.closeButton=m.closeButton:m.closeButton===!0&&(D.closeButton=!b0(C.closeButton)||C.closeButton);let j=p;x.isValidElement(p)&&!Js(p.type)?j=x.cloneElement(p,{closeToast:S,toastProps:D,data:w}):mn(p)&&(j=p({closeToast:S,toastProps:D,data:w})),C.limit&&C.limit>0&&s.count>C.limit&&O?s.queue.push({toastContent:j,toastProps:D,staleId:y}):qf(v)?setTimeout(()=>{d(j,D,y)},v):d(j,D,y)}function d(p,h,v){const{toastId:y}=h;v&&i.delete(v);const m={content:p,props:h};i.set(y,m),n(g=>[...g,y].filter(E=>E!==v)),Gn.emit(4,bC(m,m.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,Gn.cancelEmit(3).on(0,f).on(1,p=>a.current&&u(p)).on(5,l).emit(2,s),()=>{i.clear(),Gn.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=o,s.displayedToast=r.length}),{getToastToRender:function(p){const h=new Map,v=Array.from(i.values());return e.newestOnTop&&v.reverse(),v.forEach(y=>{const{position:m}=y.props;h.has(m)||h.set(m,[]),h.get(m).push(y)}),Array.from(h,y=>p(y[0],y[1]))},containerRef:a,isToastActive:o}}function _C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function EC(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function cz(e){const[t,r]=x.useState(!1),[n,a]=x.useState(!1),i=x.useRef(null),o=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:l,pauseOnHover:u,closeToast:c,onClick:f,closeOnClick:d}=e;function p(w){if(e.draggable){w.nativeEvent.type==="touchstart"&&w.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g),document.addEventListener("touchmove",m),document.addEventListener("touchend",g);const C=i.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=C.getBoundingClientRect(),C.style.transition="",o.x=_C(w.nativeEvent),o.y=EC(w.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(w){if(o.boundingRect){const{top:C,bottom:S,left:O,right:D}=o.boundingRect;w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&o.x>=O&&o.x<=D&&o.y>=C&&o.y<=S?y():v()}}function v(){r(!0)}function y(){r(!1)}function m(w){const C=i.current;o.canDrag&&C&&(o.didMove=!0,t&&y(),o.x=_C(w),o.y=EC(w),o.delta=e.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",g);const w=i.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return a(!0),void e.closeToast();w.style.transition="transform 0.2s, opacity 0.2s",w.style.transform=`translate${e.draggableDirection}(0)`,w.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(i.current&&i.current.addEventListener("d",v,{once:!0}),mn(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const w=s.current;mn(w.onClose)&&w.onClose(x.isValidElement(w.children)&&w.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",v),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const E={onMouseDown:p,onTouchStart:p,onMouseUp:h,onTouchEnd:h};return l&&u&&(E.onMouseEnter=y,E.onMouseLeave=v),d&&(E.onClick=w=>{f&&f(w),o.canCloseOnClick&&c()}),{playToast:v,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:E}}function oR(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return b.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:a=>{a.stopPropagation(),t(a)},"aria-label":n},b.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},b.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function fz(e){let{delay:t,isRunning:r,closeToast:n,type:a="default",hide:i,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:f,theme:d}=e;const p=i||l&&u===0,h={...s,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:p?0:1};l&&(h.transform=`scaleX(${u})`);const v=z("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":c}),y=mn(o)?o({rtl:c,type:a,defaultClassName:v}):z(v,o);return b.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:h,[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{f&&n()}})}const dz=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:a}=cz(e),{closeButton:i,children:o,autoClose:s,onClick:l,type:u,hideProgressBar:c,closeToast:f,transition:d,position:p,className:h,style:v,bodyClassName:y,bodyStyle:m,progressClassName:g,progressStyle:E,updateId:w,role:C,progress:S,rtl:O,toastId:D,deleteToast:N,isIn:R,isLoading:j,iconOut:U,closeOnClick:Q,theme:X}=e,J=z("Toastify__toast",`Toastify__toast-theme--${X}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":Q}),te=mn(h)?h({rtl:O,position:p,type:u,defaultClassName:J}):z(J,h),ge=!!S||!s,H={closeToast:f,type:u,theme:X};let ee=null;return i===!1||(ee=mn(i)?i(H):x.isValidElement(i)?x.cloneElement(i,H):oR(H)),b.createElement(d,{isIn:R,done:N,position:p,preventExitTransition:r,nodeRef:n},b.createElement("div",{id:D,onClick:l,className:te,...a,style:v,ref:n},b.createElement("div",{...R&&{role:C},className:mn(y)?y({type:u}):z("Toastify__toast-body",y),style:m},U!=null&&b.createElement("div",{className:z("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},U),b.createElement("div",null,o)),ee,b.createElement(fz,{...w&&!ge?{key:`pb-${w}`}:{},rtl:O,theme:X,delay:s,isRunning:t,isIn:R,closeToast:f,hide:c,type:u,style:E,className:g,controlledProgress:ge,progress:S||0})))},Cg=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},pz=xg(Cg("bounce",!0));xg(Cg("slide",!0));xg(Cg("zoom"));xg(Cg("flip"));const pb=x.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:a}=uz(e),{className:i,style:o,rtl:s,containerId:l}=e;function u(c){const f=z("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":s});return mn(i)?i({position:c,rtl:s,defaultClassName:f}):z(f,Sv(i))}return x.useEffect(()=>{t&&(t.current=n.current)},[]),b.createElement("div",{ref:n,className:"Toastify",id:l},r((c,f)=>{const d=f.length?{...o}:{...o,pointerEvents:"none"};return b.createElement("div",{className:u(c),style:d,key:`container-${c}`},f.map((p,h)=>{let{content:v,props:y}=p;return b.createElement(dz,{...y,isIn:a(y.toastId),style:{...y.style,"--nth":h+1,"--len":f.length},key:`toast-${y.key}`},v)}))}))});pb.displayName="ToastContainer",pb.defaultProps={position:"top-right",transition:pz,autoClose:5e3,closeButton:oR,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let E0,_s=new Map,Af=[],hz=1;function sR(){return""+hz++}function vz(e){return e&&(Js(e.toastId)||qf(e.toastId))?e.toastId:sR()}function Qf(e,t){return _s.size>0?Gn.emit(0,e,t):Af.push({content:e,options:t}),t.toastId}function cm(e,t){return{...t,type:t&&t.type||e,toastId:vz(t)}}function Uh(e){return(t,r)=>Qf(t,cm(e,r))}function ct(e,t){return Qf(e,cm("default",t))}ct.loading=(e,t)=>Qf(e,cm("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ct.promise=function(e,t,r){let n,{pending:a,error:i,success:o}=t;a&&(n=Js(a)?ct.loading(a,r):ct.loading(a.render,{...r,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,f,d)=>{if(f==null)return void ct.dismiss(n);const p={type:c,...s,...r,data:d},h=Js(f)?{render:f}:f;return n?ct.update(n,{...p,...h}):ct(h.render,{...p,...h}),d},u=mn(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",i,c)),u},ct.success=Uh("success"),ct.info=Uh("info"),ct.error=Uh("error"),ct.warning=Uh("warning"),ct.warn=ct.warning,ct.dark=(e,t)=>Qf(e,cm("default",{theme:"dark",...t})),ct.dismiss=e=>{_s.size>0?Gn.emit(1,e):Af=Af.filter(t=>e!=null&&t.options.toastId!==e)},ct.clearWaitingQueue=function(e){return e===void 0&&(e={}),Gn.emit(5,e)},ct.isActive=e=>{let t=!1;return _s.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},ct.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,a){let{containerId:i}=a;const o=_s.get(i||E0);return o&&o.getToast(n)}(e,t);if(r){const{props:n,content:a}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:sR()};i.toastId!==e&&(i.staleId=e);const o=i.render||a;delete i.render,Qf(o,i)}},0)},ct.done=e=>{ct.update(e,{progress:1})},ct.onChange=e=>(Gn.on(4,e),()=>{Gn.off(4,e)}),ct.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ct.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Gn.on(2,e=>{E0=e.containerId||e,_s.set(E0,e),Af.forEach(t=>{Gn.emit(0,t.content,t.options)}),Af=[]}).on(3,e=>{_s.delete(e.containerId||e),_s.size===0&&Gn.off(0).off(1).off(5)});/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gz(){return Math.random().toString(36).substr(2,8)}function xC(e,t){return{usr:e.state,key:e.key,idx:t}}function Nd(e,t,r,n){return r===void 0&&(r=null),Wt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Zi(t):t,{state:r,key:t&&t.key||n||gz()})}function Zs(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function yz(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s=cr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Wt({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=cr.Pop;let y=c(),m=y==null?null:y-u;u=y,l&&l({action:s,location:v.location,delta:m})}function d(y,m){s=cr.Push;let g=Nd(v.location,y,m);r&&r(g,y),u=c()+1;let E=xC(g,u),w=v.createHref(g);try{o.pushState(E,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(w)}i&&l&&l({action:s,location:v.location,delta:1})}function p(y,m){s=cr.Replace;let g=Nd(v.location,y,m);r&&r(g,y),u=c();let E=xC(g,u),w=v.createHref(g);o.replaceState(E,"",w),i&&l&&l({action:s,location:v.location,delta:0})}function h(y){let m=a.location.origin!=="null"?a.location.origin:a.location.href,g=typeof y=="string"?y:Zs(y);return Ie(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return s},get location(){return e(a,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(SC,f),l=y,()=>{a.removeEventListener(SC,f),l=null}},createHref(y){return t(a,y)},createURL:h,encodeLocation(y){let m=h(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:p,go(y){return o.go(y)}};return v}var tr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tr||(tr={}));const wz=new Set(["lazy","caseSensitive","path","id","index","children"]);function bz(e){return e.index===!0}function hb(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,i)=>{let o=[...r,i],s=typeof a.id=="string"?a.id:o.join("-");if(Ie(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ie(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),bz(a)){let l=Wt({},a,t(a),{id:s});return n[s]=l,l}else{let l=Wt({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=hb(a.children,t,o,n)),l}})}function au(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Zi(t):t,a=wl(n.pathname||"/",r);if(a==null)return null;let i=uR(e);_z(i);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ni([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),uR(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Dz(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of cR(i.path))a(i,o,l)}),t}function cR(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=cR(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function _z(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pz(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ez=/^:\w+$/,Sz=3,xz=2,Cz=1,Oz=10,Tz=-2,CC=e=>e==="*";function Dz(e,t){let r=e.split("/"),n=r.length;return r.some(CC)&&(n+=Tz),t&&(n+=xz),r.filter(a=>!CC(a)).reduce((a,i)=>a+(Ez.test(i)?Sz:i===""?Cz:Oz),n)}function Pz(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function kz(e,t){let{routesMeta:r}=e,n={},a="/",i=[];for(let o=0;o{if(c==="*"){let d=s[f]||"";o=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=Mz(s[f]||"",c),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Nz(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Wu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Rz(e){try{return decodeURI(e)}catch(t){return Wu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mz(e,t){try{return decodeURIComponent(e)}catch(r){return Wu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function wl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Iz(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Zi(e):e;return{pathname:r?r.startsWith("/")?r:$z(r,t):t,search:Lz(n),hash:Fz(a)}}function $z(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function S0(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Kp(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Og(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Zi(e):(a=Wt({},e),Ie(!a.pathname||!a.pathname.includes("?"),S0("?","pathname","search",a)),Ie(!a.pathname||!a.pathname.includes("#"),S0("#","pathname","hash",a)),Ie(!a.search||!a.search.includes("#"),S0("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(n||o==null)s=r;else{let f=t.length-1;if(o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;a.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=Iz(a,s),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ni=e=>e.join("/").replace(/\/\/+/g,"/"),jz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class X1{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function fR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dR=["post","put","patch","delete"],Uz=new Set(dR),Bz=["get",...dR],zz=new Set(Bz),Wz=new Set([301,302,303,307,308]),Hz=new Set([307,308]),x0={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},df={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yz=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Gz(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Ie(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;a=L=>({hasErrorBoundary:M(L)})}else a=Yz;let i={},o=hb(e.routes,a,void 0,i),s,l=e.basename||"/",u=Wt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,f=new Set,d=null,p=null,h=null,v=e.hydrationData!=null,y=au(o,e.history.location,l),m=null;if(y==null){let M=Yn(404,{pathname:e.history.location.pathname}),{matches:L,route:G}=RC(o);y=L,m={[G.id]:M}}let g=!y.some(M=>M.route.lazy)&&(!y.some(M=>M.route.loader)||e.hydrationData!=null),E,w={historyAction:e.history.action,location:e.history.location,matches:y,initialized:g,navigation:x0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},C=cr.Pop,S=!1,O,D=!1,N=!1,R=[],j=[],U=new Map,Q=0,X=-1,J=new Map,te=new Set,ge=new Map,H=new Map,ee=new Map,ce=!1;function _e(){return c=e.history.listen(M=>{let{action:L,location:G,delta:de}=M;if(ce){ce=!1;return}Wu(ee.size===0||de!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ee=be({currentLocation:w.location,nextLocation:G,historyAction:L});if(Ee&&de!=null){ce=!0,e.history.go(de*-1),pe(Ee,{state:"blocked",location:G,proceed(){pe(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(de)},reset(){let Se=new Map(w.blockers);Se.set(Ee,df),ye({blockers:Se})}});return}return Ce(L,G)}),w.initialized||Ce(cr.Pop,w.location),E}function we(){c&&c(),f.clear(),O&&O.abort(),w.fetchers.forEach((M,L)=>Lr(L)),w.blockers.forEach((M,L)=>Y(L))}function rt(M){return f.add(M),()=>f.delete(M)}function ye(M){w=Wt({},w,M),f.forEach(L=>L(w))}function Le(M,L){var G,de;let Ee=w.actionData!=null&&w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&w.navigation.state==="loading"&&((G=M.state)==null?void 0:G._isRedirect)!==!0,Se;L.actionData?Object.keys(L.actionData).length>0?Se=L.actionData:Se=null:Ee?Se=w.actionData:Se=null;let Te=L.loaderData?NC(w.loaderData,L.loaderData,L.matches||[],L.errors):w.loaderData,me=w.blockers;me.size>0&&(me=new Map(me),me.forEach((gt,Re)=>me.set(Re,df)));let he=S===!0||w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&((de=M.state)==null?void 0:de._isRedirect)!==!0;s&&(o=s,s=void 0),D||C===cr.Pop||(C===cr.Push?e.history.push(M,M.state):C===cr.Replace&&e.history.replace(M,M.state)),ye(Wt({},L,{actionData:Se,loaderData:Te,historyAction:C,location:M,initialized:!0,navigation:x0,revalidation:"idle",restoreScrollPosition:da(M,L.matches||w.matches),preventScrollReset:he,blockers:me})),C=cr.Pop,S=!1,D=!1,N=!1,R=[],j=[]}async function He(M,L){if(typeof M=="number"){e.history.go(M);return}let G=vb(w.location,w.matches,l,u.v7_prependBasename,M,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:de,submission:Ee,error:Se}=OC(u.v7_normalizeFormMethod,!1,G,L),Te=w.location,me=Nd(w.location,de,L&&L.state);me=Wt({},me,e.history.encodeLocation(me));let he=L&&L.replace!=null?L.replace:void 0,gt=cr.Push;he===!0?gt=cr.Replace:he===!1||Ee!=null&&ya(Ee.formMethod)&&Ee.formAction===w.location.pathname+w.location.search&&(gt=cr.Replace);let Re=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,Ae=be({currentLocation:Te,nextLocation:me,historyAction:gt});if(Ae){pe(Ae,{state:"blocked",location:me,proceed(){pe(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),He(M,L)},reset(){let ut=new Map(w.blockers);ut.set(Ae,df),ye({blockers:ut})}});return}return await Ce(gt,me,{submission:Ee,pendingError:Se,preventScrollReset:Re,replace:L&&L.replace})}function lt(){if(lr(),ye({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ce(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ce(C||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Ce(M,L,G){O&&O.abort(),O=null,C=M,D=(G&&G.startUninterruptedRevalidation)===!0,un(w.location,w.matches),S=(G&&G.preventScrollReset)===!0;let de=s||o,Ee=G&&G.overrideNavigation,Se=au(de,L,l);if(!Se){let ut=Yn(404,{pathname:L.pathname}),{matches:Tt,route:$a}=RC(de);Ne(),Le(L,{matches:Tt,loaderData:{},errors:{[$a.id]:ut}});return}if(w.initialized&&!N&&Jz(w.location,L)&&!(G&&G.submission&&ya(G.submission.formMethod))){Le(L,{matches:Se});return}O=new AbortController;let Te=hf(e.history,L,O.signal,G&&G.submission),me,he;if(G&&G.pendingError)he={[iu(Se).route.id]:G.pendingError};else if(G&&G.submission&&ya(G.submission.formMethod)){let ut=await xe(Te,L,G.submission,Se,{replace:G.replace});if(ut.shortCircuited)return;me=ut.pendingActionData,he=ut.pendingActionError,Ee=C0(L,G.submission),Te=new Request(Te.url,{signal:Te.signal})}let{shortCircuited:gt,loaderData:Re,errors:Ae}=await mt(Te,L,Se,Ee,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,me,he);gt||(O=null,Le(L,Wt({matches:Se},me?{actionData:me}:{},{loaderData:Re,errors:Ae})))}async function xe(M,L,G,de,Ee){Ee===void 0&&(Ee={}),lr();let Se=r4(L,G);ye({navigation:Se});let Te,me=gb(de,L);if(!me.route.action&&!me.route.lazy)Te={type:tr.error,error:Yn(405,{method:M.method,pathname:L.pathname,routeId:me.route.id})};else if(Te=await pf("action",M,me,de,i,a,l),M.signal.aborted)return{shortCircuited:!0};if(bu(Te)){let he;return Ee&&Ee.replace!=null?he=Ee.replace:he=Te.location===w.location.pathname+w.location.search,await er(w,Te,{submission:G,replace:he}),{shortCircuited:!0}}if(Xf(Te)){let he=iu(de,me.route.id);return(Ee&&Ee.replace)!==!0&&(C=cr.Push),{pendingActionData:{},pendingActionError:{[he.route.id]:Te.error}}}if(ks(Te))throw Yn(400,{type:"defer-action"});return{pendingActionData:{[me.route.id]:Te.data}}}async function mt(M,L,G,de,Ee,Se,Te,me,he){let gt=de||C0(L,Ee),Re=Ee||Se||$C(gt),Ae=s||o,[ut,Tt]=TC(e.history,w,G,Re,L,N,R,j,ge,te,Ae,l,me,he);if(Ne(st=>!(G&&G.some(Tn=>Tn.route.id===st))||ut&&ut.some(Tn=>Tn.route.id===st)),X=++Q,ut.length===0&&Tt.length===0){let st=I();return Le(L,Wt({matches:G,loaderData:{},errors:he||null},me?{actionData:me}:{},st?{fetchers:new Map(w.fetchers)}:{})),{shortCircuited:!0}}if(!D){Tt.forEach(Tn=>{let De=w.fetchers.get(Tn.key),bt=vf(void 0,De?De.data:void 0);w.fetchers.set(Tn.key,bt)});let st=me||w.actionData;ye(Wt({navigation:gt},st?Object.keys(st).length===0?{actionData:null}:{actionData:st}:{},Tt.length>0?{fetchers:new Map(w.fetchers)}:{}))}Tt.forEach(st=>{U.has(st.key)&&Ot(st.key),st.controller&&U.set(st.key,st.controller)});let $a=()=>Tt.forEach(st=>Ot(st.key));O&&O.signal.addEventListener("abort",$a);let{results:ja,loaderResults:bi,fetcherResults:oo}=await Ut(w.matches,G,ut,Tt,M);if(M.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",$a),Tt.forEach(st=>U.delete(st.key));let Cn=MC(ja);if(Cn){if(Cn.idx>=ut.length){let st=Tt[Cn.idx-ut.length].key;te.add(st)}return await er(w,Cn.result,{replace:Te}),{shortCircuited:!0}}let{loaderData:On,errors:so}=AC(w,G,ut,bi,he,Tt,oo,H);H.forEach((st,Tn)=>{st.subscribe(De=>{(De||st.done)&&H.delete(Tn)})});let ef=I(),hs=ue(X),Nl=ef||hs||Tt.length>0;return Wt({loaderData:On,errors:so},Nl?{fetchers:new Map(w.fetchers)}:{})}function Nt(M){return w.fetchers.get(M)||Vz}function sr(M,L,G,de){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");U.has(M)&&Ot(M);let Ee=s||o,Se=vb(w.location,w.matches,l,u.v7_prependBasename,G,L,de==null?void 0:de.relative),Te=au(Ee,Se,l);if(!Te){Jr(M,L,Yn(404,{pathname:Se}));return}let{path:me,submission:he,error:gt}=OC(u.v7_normalizeFormMethod,!0,Se,de);if(gt){Jr(M,L,gt);return}let Re=gb(Te,me);if(S=(de&&de.preventScrollReset)===!0,he&&ya(he.formMethod)){jr(M,L,me,Re,Te,he);return}ge.set(M,{routeId:L,path:me}),Je(M,L,me,Re,Te,he)}async function jr(M,L,G,de,Ee,Se){if(lr(),ge.delete(M),!de.route.action&&!de.route.lazy){let Me=Yn(405,{method:Se.formMethod,pathname:G,routeId:L});Jr(M,L,Me);return}let Te=w.fetchers.get(M),me=n4(Se,Te);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,gt=hf(e.history,G,he.signal,Se);U.set(M,he);let Re=Q,Ae=await pf("action",gt,de,Ee,i,a,l);if(gt.signal.aborted){U.get(M)===he&&U.delete(M);return}if(bu(Ae))if(U.delete(M),X>Re){let Me=Bl(void 0);w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M);let Me=vf(Se);return w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)}),er(w,Ae,{fetcherSubmission:Se})}if(Xf(Ae)){Jr(M,L,Ae.error);return}if(ks(Ae))throw Yn(400,{type:"defer-action"});let ut=w.navigation.location||w.location,Tt=hf(e.history,ut,he.signal),$a=s||o,ja=w.navigation.state!=="idle"?au($a,w.navigation.location,l):w.matches;Ie(ja,"Didn't find any matches after fetcher action");let bi=++Q;J.set(M,bi);let oo=vf(Se,Ae.data);w.fetchers.set(M,oo);let[Cn,On]=TC(e.history,w,ja,Se,ut,N,R,j,ge,te,$a,l,{[de.route.id]:Ae.data},void 0);On.filter(Me=>Me.key!==M).forEach(Me=>{let Fr=Me.key,cn=w.fetchers.get(Fr),tf=vf(void 0,cn?cn.data:void 0);w.fetchers.set(Fr,tf),U.has(Fr)&&Ot(Fr),Me.controller&&U.set(Fr,Me.controller)}),ye({fetchers:new Map(w.fetchers)});let so=()=>On.forEach(Me=>Ot(Me.key));he.signal.addEventListener("abort",so);let{results:ef,loaderResults:hs,fetcherResults:Nl}=await Ut(w.matches,ja,Cn,On,Tt);if(he.signal.aborted)return;he.signal.removeEventListener("abort",so),J.delete(M),U.delete(M),On.forEach(Me=>U.delete(Me.key));let st=MC(ef);if(st){if(st.idx>=Cn.length){let Me=On[st.idx-Cn.length].key;te.add(Me)}return er(w,st.result)}let{loaderData:Tn,errors:De}=AC(w,w.matches,Cn,hs,void 0,On,Nl,H);if(w.fetchers.has(M)){let Me=Bl(Ae.data);w.fetchers.set(M,Me)}let bt=ue(bi);w.navigation.state==="loading"&&bi>X?(Ie(C,"Expected pending action"),O&&O.abort(),Le(w.navigation.location,{matches:ja,loaderData:Tn,errors:De,fetchers:new Map(w.fetchers)})):(ye(Wt({errors:De,loaderData:NC(w.loaderData,Tn,ja,De)},bt||On.length>0?{fetchers:new Map(w.fetchers)}:{})),N=!1)}async function Je(M,L,G,de,Ee,Se){let Te=w.fetchers.get(M),me=vf(Se,Te?Te.data:void 0);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,gt=hf(e.history,G,he.signal);U.set(M,he);let Re=Q,Ae=await pf("loader",gt,de,Ee,i,a,l);if(ks(Ae)&&(Ae=await mR(Ae,gt.signal,!0)||Ae),U.get(M)===he&&U.delete(M),gt.signal.aborted)return;if(bu(Ae))if(X>Re){let Tt=Bl(void 0);w.fetchers.set(M,Tt),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M),await er(w,Ae);return}if(Xf(Ae)){let Tt=iu(w.matches,L);w.fetchers.delete(M),ye({fetchers:new Map(w.fetchers),errors:{[Tt.route.id]:Ae.error}});return}Ie(!ks(Ae),"Unhandled fetcher deferred data");let ut=Bl(Ae.data);w.fetchers.set(M,ut),ye({fetchers:new Map(w.fetchers)})}async function er(M,L,G){let{submission:de,fetcherSubmission:Ee,replace:Se}=G===void 0?{}:G;L.revalidate&&(N=!0);let Te=Nd(M.location,L.location,{_isRedirect:!0});if(Ie(Te,"Expected a location on the redirect navigation"),r){let ut=!1;if(L.reloadDocument)ut=!0;else if(pR.test(L.location)){const Tt=e.history.createURL(L.location);ut=Tt.origin!==t.location.origin||wl(Tt.pathname,l)==null}if(ut){Se?t.location.replace(L.location):t.location.assign(L.location);return}}O=null;let me=Se===!0?cr.Replace:cr.Push,{formMethod:he,formAction:gt,formEncType:Re}=M.navigation;!de&&!Ee&&he&>&&Re&&(de=$C(M.navigation));let Ae=de||Ee;if(Hz.has(L.status)&&Ae&&ya(Ae.formMethod))await Ce(me,Te,{submission:Wt({},Ae,{formAction:L.location}),preventScrollReset:S});else{let ut=C0(Te,de);await Ce(me,Te,{overrideNavigation:ut,fetcherSubmission:Ee,preventScrollReset:S})}}async function Ut(M,L,G,de,Ee){let Se=await Promise.all([...G.map(he=>pf("loader",Ee,he,L,i,a,l)),...de.map(he=>he.matches&&he.match&&he.controller?pf("loader",hf(e.history,he.path,he.controller.signal),he.match,he.matches,i,a,l):{type:tr.error,error:Yn(404,{pathname:he.path})})]),Te=Se.slice(0,G.length),me=Se.slice(G.length);return await Promise.all([IC(M,G,Te,Te.map(()=>Ee.signal),!1,w.loaderData),IC(M,de.map(he=>he.match),me,de.map(he=>he.controller?he.controller.signal:null),!0)]),{results:Se,loaderResults:Te,fetcherResults:me}}function lr(){N=!0,R.push(...Ne()),ge.forEach((M,L)=>{U.has(L)&&(j.push(L),Ot(L))})}function Jr(M,L,G){let de=iu(w.matches,L);Lr(M),ye({errors:{[de.route.id]:G},fetchers:new Map(w.fetchers)})}function Lr(M){let L=w.fetchers.get(M);U.has(M)&&!(L&&L.state==="loading"&&J.has(M))&&Ot(M),ge.delete(M),J.delete(M),te.delete(M),w.fetchers.delete(M)}function Ot(M){let L=U.get(M);Ie(L,"Expected fetch controller: "+M),L.abort(),U.delete(M)}function ln(M){for(let L of M){let G=Nt(L),de=Bl(G.data);w.fetchers.set(L,de)}}function I(){let M=[],L=!1;for(let G of te){let de=w.fetchers.get(G);Ie(de,"Expected fetcher: "+G),de.state==="loading"&&(te.delete(G),M.push(G),L=!0)}return ln(M),L}function ue(M){let L=[];for(let[G,de]of J)if(de0}function F(M,L){let G=w.blockers.get(M)||df;return ee.get(M)!==L&&ee.set(M,L),G}function Y(M){w.blockers.delete(M),ee.delete(M)}function pe(M,L){let G=w.blockers.get(M)||df;Ie(G.state==="unblocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="proceeding"||G.state==="blocked"&&L.state==="unblocked"||G.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+L.state);let de=new Map(w.blockers);de.set(M,L),ye({blockers:de})}function be(M){let{currentLocation:L,nextLocation:G,historyAction:de}=M;if(ee.size===0)return;ee.size>1&&Wu(!1,"A router only supports one blocker at a time");let Ee=Array.from(ee.entries()),[Se,Te]=Ee[Ee.length-1],me=w.blockers.get(Se);if(!(me&&me.state==="proceeding")&&Te({currentLocation:L,nextLocation:G,historyAction:de}))return Se}function Ne(M){let L=[];return H.forEach((G,de)=>{(!M||M(de))&&(G.cancel(),L.push(de),H.delete(de))}),L}function ur(M,L,G){if(d=M,h=L,p=G||null,!v&&w.navigation===x0){v=!0;let de=da(w.location,w.matches);de!=null&&ye({restoreScrollPosition:de})}return()=>{d=null,h=null,p=null}}function Zr(M,L){return p&&p(M,L.map(de=>lR(de,w.loaderData)))||M.key}function un(M,L){if(d&&h){let G=Zr(M,L);d[G]=h()}}function da(M,L){if(d){let G=Zr(M,L),de=d[G];if(typeof de=="number")return de}return null}function io(M){i={},s=hb(M,a,void 0,i)}return E={get basename(){return l},get state(){return w},get routes(){return o},initialize:_e,subscribe:rt,enableScrollRestoration:ur,navigate:He,fetch:sr,revalidate:lt,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:Nt,deleteFetcher:Lr,dispose:we,getBlocker:F,deleteBlocker:Y,_internalFetchControllers:U,_internalActiveDeferreds:H,_internalSetRoutes:io},E}function Kz(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vb(e,t,r,n,a,i,o){let s,l;if(i!=null&&o!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){l=c;break}}else s=t,l=t[t.length-1];let u=Og(a||".",Kp(s).map(c=>c.pathnameBase),wl(e.pathname,r)||e.pathname,o==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l&&l.route.index&&!J1(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Ni([r,u.pathname])),Zs(u)}function OC(e,t,r,n){if(!n||!Kz(n))return{path:r};if(n.formMethod&&!t4(n.formMethod))return{path:r,error:Yn(405,{method:n.formMethod})};let a=()=>({path:r,error:Yn(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),s=vR(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ya(o))return a();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,h)=>{let[v,y]=h;return""+p+v+"="+y+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!ya(o))return a();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return a()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=mb(n.formData),u=n.formData;else if(n.body instanceof FormData)l=mb(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=kC(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=kC(l)}catch{return a()}let c={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ya(c.formMethod))return{path:r,submission:c};let f=Zi(r);return t&&f.search&&J1(f.search)&&l.append("index",""),f.search="?"+l,{path:Zs(f),submission:c}}function qz(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function TC(e,t,r,n,a,i,o,s,l,u,c,f,d,p){let h=p?Object.values(p)[0]:d?Object.values(d)[0]:void 0,v=e.createURL(t.location),y=e.createURL(a),m=p?Object.keys(p)[0]:void 0,E=qz(r,m).filter((C,S)=>{if(C.route.lazy)return!0;if(C.route.loader==null)return!1;if(Qz(t.loaderData,t.matches[S],C)||o.some(N=>N===C.route.id))return!0;let O=t.matches[S],D=C;return DC(C,Wt({currentUrl:v,currentParams:O.params,nextUrl:y,nextParams:D.params},n,{actionResult:h,defaultShouldRevalidate:i||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||hR(O,D)}))}),w=[];return l.forEach((C,S)=>{if(!r.some(j=>j.route.id===C.routeId))return;let O=au(c,C.path,f);if(!O){w.push({key:S,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(S),N=gb(O,C.path),R=!1;u.has(S)?R=!1:s.includes(S)?R=!0:D&&D.state!=="idle"&&D.data===void 0?R=i:R=DC(N,Wt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:h,defaultShouldRevalidate:i})),R&&w.push({key:S,routeId:C.routeId,path:C.path,matches:O,match:N,controller:new AbortController})}),[E,w]}function Qz(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function hR(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function DC(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function PC(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];Ie(a,"No route found in manifest");let i={};for(let o in n){let l=a[o]!==void 0&&o!=="hasErrorBoundary";Wu(!l,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!wz.has(o)&&(i[o]=n[o])}Object.assign(a,i),Object.assign(a,Wt({},t(a),{lazy:void 0}))}async function pf(e,t,r,n,a,i,o,s){s===void 0&&(s={});let l,u,c,f=h=>{let v,y=new Promise((m,g)=>v=g);return c=()=>v(),t.signal.addEventListener("abort",c),Promise.race([h({request:t,params:r.params,context:s.requestContext}),y])};try{let h=r.route[e];if(r.route.lazy)if(h){let v,y=await Promise.all([f(h).catch(m=>{v=m}),PC(r.route,i,a)]);if(v)throw v;u=y[0]}else if(await PC(r.route,i,a),h=r.route[e],h)u=await f(h);else if(e==="action"){let v=new URL(t.url),y=v.pathname+v.search;throw Yn(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:tr.data,data:void 0};else if(h)u=await f(h);else{let v=new URL(t.url),y=v.pathname+v.search;throw Yn(404,{pathname:y})}Ie(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){l=tr.error,u=h}finally{c&&t.signal.removeEventListener("abort",c)}if(e4(u)){let h=u.status;if(Wz.has(h)){let m=u.headers.get("Location");if(Ie(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!pR.test(m))m=vb(new URL(t.url),n.slice(0,n.indexOf(r)+1),o,!0,m);else if(!s.isStaticRequest){let g=new URL(t.url),E=m.startsWith("//")?new URL(g.protocol+m):new URL(m),w=wl(E.pathname,o)!=null;E.origin===g.origin&&w&&(m=E.pathname+E.search+E.hash)}if(s.isStaticRequest)throw u.headers.set("Location",m),u;return{type:tr.redirect,status:h,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:l===tr.error?tr.error:tr.data,response:u};let v,y=u.headers.get("Content-Type");return y&&/\bapplication\/json\b/.test(y)?v=await u.json():v=await u.text(),l===tr.error?{type:l,error:new X1(h,u.statusText,v),headers:u.headers}:{type:tr.data,data:v,statusCode:u.status,headers:u.headers}}if(l===tr.error)return{type:l,error:u};if(Zz(u)){var d,p;return{type:tr.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((p=u.init)==null?void 0:p.headers)&&new Headers(u.init.headers)}}return{type:tr.data,data:u}}function hf(e,t,r,n){let a=e.createURL(vR(t)).toString(),i={signal:r};if(n&&ya(n.formMethod)){let{formMethod:o,formEncType:s}=n;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=mb(n.formData):i.body=n.formData}return new Request(a,i)}function mb(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function kC(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Xz(e,t,r,n,a){let i={},o=null,s,l=!1,u={};return r.forEach((c,f)=>{let d=t[f].route.id;if(Ie(!bu(c),"Cannot handle redirect results in processLoaderData"),Xf(c)){let p=iu(e,d),h=c.error;n&&(h=Object.values(n)[0],n=void 0),o=o||{},o[p.route.id]==null&&(o[p.route.id]=h),i[d]=void 0,l||(l=!0,s=fR(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else ks(c)?(a.set(d,c.deferredData),i[d]=c.deferredData.data):i[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!l&&(s=c.statusCode),c.headers&&(u[d]=c.headers)}),n&&(o=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:o,statusCode:s||200,loaderHeaders:u}}function AC(e,t,r,n,a,i,o,s){let{loaderData:l,errors:u}=Xz(t,r,n,a,s);for(let c=0;cn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function RC(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Yn(e,t){let{pathname:r,routeId:n,method:a,type:i}=t===void 0?{}:t,o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",s='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new X1(e||500,o,new Error(s),!0)}function MC(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(bu(r))return{result:r,idx:t}}}function vR(e){let t=typeof e=="string"?Zi(e):e;return Zs(Wt({},t,{hash:""}))}function Jz(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ks(e){return e.type===tr.deferred}function Xf(e){return e.type===tr.error}function bu(e){return(e&&e.type)===tr.redirect}function Zz(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function e4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function t4(e){return zz.has(e.toLowerCase())}function ya(e){return Uz.has(e.toLowerCase())}async function IC(e,t,r,n,a,i){for(let o=0;of.route.id===l.route.id),c=u!=null&&!hR(u,l)&&(i&&i[l.route.id])!==void 0;if(ks(s)&&(a||c)){let f=n[o];Ie(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await mR(s,f,a).then(d=>{d&&(r[o]=d||r[o])})}}}async function mR(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:tr.data,data:e.deferredData.unwrappedData}}catch(a){return{type:tr.error,error:a}}return{type:tr.data,data:e.deferredData.data}}}function J1(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gb(e,t){let r=typeof t=="string"?Zi(t).search:t.search;if(e[e.length-1].route.index&&J1(r||""))return e[e.length-1];let n=Kp(e);return n[n.length-1]}function $C(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function C0(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vf(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function n4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Bl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),o=x.useRef(!1);return yR(()=>{o.current=!0}),x.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){r.go(l);return}let c=Og(l,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ni([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,a,e])}const o4=x.createContext(null);function s4(e){let t=x.useContext(pi).outlet;return t&&x.createElement(o4.Provider,{value:e},t)}function eE(){let{matches:e}=x.useContext(pi),t=e[e.length-1];return t?t.params:{}}function tE(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=x.useContext(pi),{pathname:a}=hi(),i=JSON.stringify(Kp(n).map(o=>o.pathnameBase));return x.useMemo(()=>Og(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function l4(e,t,r){Lc()||Ie(!1);let{navigator:n}=x.useContext(us),{matches:a}=x.useContext(pi),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=hi(),u;if(t){var c;let v=typeof t=="string"?Zi(t):t;s==="/"||(c=v.pathname)!=null&&c.startsWith(s)||Ie(!1),u=v}else u=l;let f=u.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=au(e,{pathname:d}),h=p4(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:Ni([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Ni([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r);return t&&h?x.createElement(Dg.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cr.Pop}},h):h}function u4(){let e=y4(),t=fR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:a},r):null,i)}const c4=x.createElement(u4,null);class f4 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?x.createElement(pi.Provider,{value:this.props.routeContext},x.createElement(gR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function d4(e){let{routeContext:t,match:r,children:n}=e,a=x.useContext(qp);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(pi.Provider,{value:t},n)}function p4(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let i=e,o=(n=r)==null?void 0:n.errors;if(o!=null){let s=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));s>=0||Ie(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,u)=>{let c=l.route.id?o==null?void 0:o[l.route.id]:null,f=null;r&&(f=l.route.errorElement||c4);let d=t.concat(i.slice(0,u+1)),p=()=>{let h;return c?h=f:l.route.Component?h=x.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,x.createElement(d4,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?x.createElement(f4,{location:r.location,revalidation:r.revalidation,component:f,error:c,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var wR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wR||{}),Hu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Hu||{});function h4(e){let t=x.useContext(qp);return t||Ie(!1),t}function rE(e){let t=x.useContext(Tg);return t||Ie(!1),t}function v4(e){let t=x.useContext(pi);return t||Ie(!1),t}function bR(e){let t=v4(),r=t.matches[t.matches.length-1];return r.route.id||Ie(!1),r.route.id}function m4(){return rE(Hu.UseNavigation).navigation}function g4(){let{matches:e,loaderData:t}=rE(Hu.UseMatches);return x.useMemo(()=>e.map(r=>lR(r,t)),[e,t])}function y4(){var e;let t=x.useContext(gR),r=rE(Hu.UseRouteError),n=bR(Hu.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function w4(){let{router:e}=h4(wR.UseNavigateStable),t=bR(Hu.UseNavigateStable),r=x.useRef(!1);return yR(()=>{r.current=!0}),x.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,fm({fromRouteId:t},i)))},[e,t])}const b4="startTransition",jC=G2[b4];function _4(e){let{fallbackElement:t,router:r,future:n}=e,[a,i]=x.useState(r.state),{v7_startTransition:o}=n||{},s=x.useCallback(f=>{o&&jC?jC(()=>i(f)):i(f)},[i,o]);x.useLayoutEffect(()=>r.subscribe(s),[r,s]);let l=x.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:f=>r.navigate(f),push:(f,d,p)=>r.navigate(f,{state:d,preventScrollReset:p==null?void 0:p.preventScrollReset}),replace:(f,d,p)=>r.navigate(f,{replace:!0,state:d,preventScrollReset:p==null?void 0:p.preventScrollReset})}),[r]),u=r.basename||"/",c=x.useMemo(()=>({router:r,navigator:l,static:!1,basename:u}),[r,l,u]);return x.createElement(x.Fragment,null,x.createElement(qp.Provider,{value:c},x.createElement(Tg.Provider,{value:a},x.createElement(S4,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l},a.initialized?x.createElement(E4,{routes:r.routes,state:a}):t))),null)}function E4(e){let{routes:t,state:r}=e;return l4(t,void 0,r)}function _R(e){let{to:t,replace:r,state:n,relative:a}=e;Lc()||Ie(!1);let{matches:i}=x.useContext(pi),{pathname:o}=hi(),s=Z1(),l=Og(t,Kp(i).map(c=>c.pathnameBase),o,a==="path"),u=JSON.stringify(l);return x.useEffect(()=>s(JSON.parse(u),{replace:r,state:n,relative:a}),[s,u,a,r,n]),null}function ER(e){return s4(e.context)}function S4(e){let{basename:t="/",children:r=null,location:n,navigationType:a=cr.Pop,navigator:i,static:o=!1}=e;Lc()&&Ie(!1);let s=t.replace(/^\/*/,"/"),l=x.useMemo(()=>({basename:s,navigator:i,static:o}),[s,i,o]);typeof n=="string"&&(n=Zi(n));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:p="default"}=n,h=x.useMemo(()=>{let v=wl(u,s);return v==null?null:{location:{pathname:v,search:c,hash:f,state:d,key:p},navigationType:a}},[s,u,c,f,d,p,a]);return h==null?null:x.createElement(us.Provider,{value:l},x.createElement(Dg.Provider,{children:r,value:h}))}new Promise(()=>{});function x4(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:x.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function C4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function O4(e,t){return e.button===0&&(!t||t==="_self")&&!C4(e)}const T4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],D4=["aria-current","caseSensitive","className","end","style","to","children"];function P4(e,t){return Gz({basename:t==null?void 0:t.basename,future:el({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:mz({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||k4(),routes:e,mapRouteProperties:x4}).initialize()}function k4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=el({},t,{errors:A4(t.errors)})),t}function A4(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new X1(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let i=window[a.__subType];if(typeof i=="function")try{let o=new i(a.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(a.message);i.stack="",r[n]=i}}else r[n]=a;return r}const N4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",R4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,an=x.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:u,preventScrollReset:c}=t,f=SR(t,T4),{basename:d}=x.useContext(us),p,h=!1;if(typeof u=="string"&&R4.test(u)&&(p=u,N4))try{let g=new URL(window.location.href),E=u.startsWith("//")?new URL(g.protocol+u):new URL(u),w=wl(E.pathname,d);E.origin===g.origin&&w!=null?u=w+E.search+E.hash:h=!0}catch{}let v=a4(u,{relative:a}),y=j4(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:a});function m(g){n&&n(g),g.defaultPrevented||y(g)}return x.createElement("a",el({},f,{href:p||v,onClick:h||i?n:m,ref:r,target:l}))}),Bh=x.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:u}=t,c=SR(t,D4),f=tE(l,{relative:c.relative}),d=hi(),p=x.useContext(Tg),{navigator:h}=x.useContext(us),v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,y=d.pathname,m=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;a||(y=y.toLowerCase(),m=m?m.toLowerCase():null,v=v.toLowerCase());let g=y===v||!o&&y.startsWith(v)&&y.charAt(v.length)==="/",E=m!=null&&(m===v||!o&&m.startsWith(v)&&m.charAt(v.length)==="/"),w=g?n:void 0,C;typeof i=="function"?C=i({isActive:g,isPending:E}):C=[i,g?"active":null,E?"pending":null].filter(Boolean).join(" ");let S=typeof s=="function"?s({isActive:g,isPending:E}):s;return x.createElement(an,el({},c,{"aria-current":w,className:C,ref:r,style:S,to:l}),typeof u=="function"?u({isActive:g,isPending:E}):u)});function M4(e){let{getKey:t,storageKey:r}=e;return L4({getKey:t,storageKey:r}),null}var yb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(yb||(yb={}));var wb;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wb||(wb={}));function I4(e){let t=x.useContext(qp);return t||Ie(!1),t}function $4(e){let t=x.useContext(Tg);return t||Ie(!1),t}function j4(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o}=t===void 0?{}:t,s=Z1(),l=hi(),u=tE(e,{relative:o});return x.useCallback(c=>{if(O4(c,r)){c.preventDefault();let f=n!==void 0?n:Zs(l)===Zs(u);s(e,{replace:f,state:a,preventScrollReset:i,relative:o})}},[l,s,u,n,a,r,e,i,o])}const LC="react-router-scroll-positions";let zh={};function L4(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=I4(yb.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=$4(wb.UseScrollRestoration),{basename:o}=x.useContext(us),s=hi(),l=g4(),u=m4();x.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),F4(x.useCallback(()=>{if(u.state==="idle"){let c=(t?t(s,l):null)||s.key;zh[c]=window.scrollY}sessionStorage.setItem(r||LC,JSON.stringify(zh)),window.history.scrollRestoration="auto"},[r,t,u.state,s,l])),typeof document<"u"&&(x.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||LC);c&&(zh=JSON.parse(c))}catch{}},[r]),x.useLayoutEffect(()=>{let c=t&&o!=="/"?(d,p)=>t(el({},d,{pathname:wl(d.pathname,o)||d.pathname}),p):t,f=n==null?void 0:n.enableScrollRestoration(zh,()=>window.scrollY,c);return()=>f&&f()},[n,o,t]),x.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let c=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(c){c.scrollIntoView();return}}i!==!0&&window.scrollTo(0,0)}},[s,a,i]))}function F4(e,t){let{capture:r}=t||{};x.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Pg(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var xR={exports:{}},ht={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Nr=typeof Symbol=="function"&&Symbol.for,nE=Nr?Symbol.for("react.element"):60103,aE=Nr?Symbol.for("react.portal"):60106,kg=Nr?Symbol.for("react.fragment"):60107,Ag=Nr?Symbol.for("react.strict_mode"):60108,Ng=Nr?Symbol.for("react.profiler"):60114,Rg=Nr?Symbol.for("react.provider"):60109,Mg=Nr?Symbol.for("react.context"):60110,iE=Nr?Symbol.for("react.async_mode"):60111,Ig=Nr?Symbol.for("react.concurrent_mode"):60111,$g=Nr?Symbol.for("react.forward_ref"):60112,jg=Nr?Symbol.for("react.suspense"):60113,U4=Nr?Symbol.for("react.suspense_list"):60120,Lg=Nr?Symbol.for("react.memo"):60115,Fg=Nr?Symbol.for("react.lazy"):60116,B4=Nr?Symbol.for("react.block"):60121,z4=Nr?Symbol.for("react.fundamental"):60117,W4=Nr?Symbol.for("react.responder"):60118,H4=Nr?Symbol.for("react.scope"):60119;function Bn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case nE:switch(e=e.type,e){case iE:case Ig:case kg:case Ng:case Ag:case jg:return e;default:switch(e=e&&e.$$typeof,e){case Mg:case $g:case Fg:case Lg:case Rg:return e;default:return t}}case aE:return t}}}function CR(e){return Bn(e)===Ig}ht.AsyncMode=iE;ht.ConcurrentMode=Ig;ht.ContextConsumer=Mg;ht.ContextProvider=Rg;ht.Element=nE;ht.ForwardRef=$g;ht.Fragment=kg;ht.Lazy=Fg;ht.Memo=Lg;ht.Portal=aE;ht.Profiler=Ng;ht.StrictMode=Ag;ht.Suspense=jg;ht.isAsyncMode=function(e){return CR(e)||Bn(e)===iE};ht.isConcurrentMode=CR;ht.isContextConsumer=function(e){return Bn(e)===Mg};ht.isContextProvider=function(e){return Bn(e)===Rg};ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===nE};ht.isForwardRef=function(e){return Bn(e)===$g};ht.isFragment=function(e){return Bn(e)===kg};ht.isLazy=function(e){return Bn(e)===Fg};ht.isMemo=function(e){return Bn(e)===Lg};ht.isPortal=function(e){return Bn(e)===aE};ht.isProfiler=function(e){return Bn(e)===Ng};ht.isStrictMode=function(e){return Bn(e)===Ag};ht.isSuspense=function(e){return Bn(e)===jg};ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kg||e===Ig||e===Ng||e===Ag||e===jg||e===U4||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Lg||e.$$typeof===Rg||e.$$typeof===Mg||e.$$typeof===$g||e.$$typeof===z4||e.$$typeof===W4||e.$$typeof===H4||e.$$typeof===B4)};ht.typeOf=Bn;xR.exports=ht;var V4=xR.exports;function dm(e,t){return dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},dm(e,t)}function it(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dm(e,t)}var qa=function(t,r){if(typeof t=="function"){t(r);return}t!==null&&typeof t=="object"&&(t.current=r)},bb=function(t){return t!==null&&typeof t=="object"&&t.hasOwnProperty("current")},Y4=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o0?x.cloneElement(i,a):i;return x.createElement(o,{innerRef:n},s)};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}function YW(e,t){var r=this.__data__,n=Bg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function eo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=pH}var hH=1/0;function El(e){if(typeof e=="string"||Qp(e))return e;var t=e+"";return t=="0"&&1/e==-hH?"-0":t}function vH(e,t,r){t=Jp(t,e);for(var n=-1,a=t.length,i=!1;++na?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0){if(++t>=EH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OH=CH(_H);const MR=OH;function Gg(e,t){return MR(NR(e,t,Zp),e+"")}var TH=Gg(yH);const se=TH;var IR={exports:{}},DH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",PH=DH,kH=PH;function $R(){}function jR(){}jR.resetWarningCache=$R;var AH=function(){function e(n,a,i,o,s,l){if(l!==kH){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jR,resetWarningCache:$R};return r.PropTypes=r,r};IR.exports=AH();var LR=IR.exports;const $=Xr(LR);function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return e===void 0}var NH=/\s/;function RH(e){for(var t=e.length;t--&&NH.test(e.charAt(t)););return t}var MH=/^\s+/;function IH(e){return e&&e.slice(0,RH(e)+1).replace(MH,"")}var VC=0/0,$H=/^[-+]0x[0-9a-f]+$/i,jH=/^0b[01]+$/i,LH=/^0o[0-7]+$/i,FH=parseInt;function FR(e){if(typeof e=="number")return e;if(Qp(e))return VC;if(Ra(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ra(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IH(e);var r=jH.test(e);return r||LH.test(e)?FH(e.slice(2),r?2:8):$H.test(e)?VC:+e}var YC=1/0,UH=17976931348623157e292;function _b(e){if(!e)return e===0?e:0;if(e=FR(e),e===YC||e===-YC){var t=e<0?-1:1;return t*UH}return e===e?e:0}function uE(e){var t=_b(e),r=t%1;return t===t?r?t-r:t:0}function UR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++rs))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&W6?new Gu:void 0;for(i.set(e,t),i.set(t,e);++f-1}function nM(e,t,r){for(var n=-1,a=e==null?0:e.length;++n-1?a[i?t[o]:o]:void 0}}var KV=Math.max;function Ob(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:uE(r);return a<0&&(a=KV(n+a,0)),eM(e,Sl(t),a)}var qV=GV(Ob);const iM=qV;function QV(e,t){var r;return Uc(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}function oM(e,t,r){if(!Ra(r))return!1;var n=typeof t;return(n=="number"?gi(r)&&Vg(t,r.length):n=="string"&&t in r)?Ug(r[t],e):!1}function Zf(e,t,r){var n=Jt(e)?YR:QV;return r&&oM(e,t,r)&&(t=void 0),n(e,Sl(t))}var XV=function(t,r){return Zf(x.Children.toArray(t),{type:r})},re=function(t){return t==null||Array.isArray(t)&&t.length===0},JV={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function sO(e){var t=typeof e;return t==="string"||t==="number"?JV[e]||e:""}var T=function(t,r){return t&&r},kr=function(t,r){return t&&t!==!0&&t+" "+r},Ct=function(t,r){return t&&(t===!0?r:t+" "+r)},mm=function(t,r){return!t||t===!0?null:t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(n){return n.replace("-"," ")+" "+r}).join(" ")},Ia=function(t){return t==="justified"?"justified":kr(t,"aligned")},ro=function(t){return kr(t,"aligned")},rn=function(t,r,n){if(r===void 0&&(r=""),n===void 0&&(n=!1),n&&t==="equal")return"equal width";var a=typeof t;return(a==="string"||a==="number")&&r?sO(t)+" "+r:sO(t)},ZV=200;function sM(e,t,r,n){var a=-1,i=rM,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=Xp(t,qg(r))),n?(i=nM,o=!1):t.length>=ZV&&(i=dE,o=!1,t=new Gu(t));e:for(;++a0&&r(s)?t>1?Jg(s,t-1,r,n,a):hE(a,s):n||(a[a.length]=s)}return a}var tY=Gg(function(e,t){return vm(e)?sM(e,Jg(t,1,vm,!0)):[]});const uO=tY;function rY(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:lE(e,t,r)}function nY(e){return e.split("")}var aY="\\ud800-\\udfff",iY="\\u0300-\\u036f",oY="\\ufe20-\\ufe2f",sY="\\u20d0-\\u20ff",lY=iY+oY+sY,uY="\\ufe0e\\ufe0f",cY="\\u200d",fY=RegExp("["+cY+aY+lY+uY+"]");function mE(e){return fY.test(e)}var lM="\\ud800-\\udfff",dY="\\u0300-\\u036f",pY="\\ufe20-\\ufe2f",hY="\\u20d0-\\u20ff",vY=dY+pY+hY,mY="\\ufe0e\\ufe0f",gY="["+lM+"]",Tb="["+vY+"]",Db="\\ud83c[\\udffb-\\udfff]",yY="(?:"+Tb+"|"+Db+")",uM="[^"+lM+"]",cM="(?:\\ud83c[\\udde6-\\uddff]){2}",fM="[\\ud800-\\udbff][\\udc00-\\udfff]",wY="\\u200d",dM=yY+"?",pM="["+mY+"]?",bY="(?:"+wY+"(?:"+[uM,cM,fM].join("|")+")"+pM+dM+")*",_Y=pM+dM+bY,EY="(?:"+[uM+Tb+"?",Tb,cM,fM,gY].join("|")+")",SY=RegExp(Db+"(?="+Db+")|"+EY+_Y,"g");function xY(e){return e.match(SY)||[]}function CY(e){return mE(e)?xY(e):nY(e)}function hM(e,t,r){t=="__proto__"&&pm?pm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var OY=Object.prototype,TY=OY.hasOwnProperty;function gE(e,t,r){var n=e[t];(!(TY.call(e,t)&&Ug(n,r))||r===void 0&&!(t in e))&&hM(e,t,r)}function vM(e,t,r,n){if(!Ra(e))return e;t=Jp(t,e);for(var a=-1,i=t.length,o=i-1,s=e;s!=null&&++a=0;a-=1)this.handlers[a].called||(this.handlers[a].called=!0,this.handlers[a](t));for(var i=n;i>=0;i-=1)this.handlers[i].called=!1}else(0,this.handlers[n])(t)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var r=[],n=this.handlers.length,a=0;a0;var r=this.handlerSets.get(t);return!!r&&r.hasHandlers()}},{key:"removeHandlers",value:function(t,r){var n=dO(this.handlerSets);if(!n.has(t))return new e(this.poolName,n);var a=n.get(t).removeHandlers(r);return a.hasHandlers()?n.set(t,a):n.delete(t),new e(this.poolName,n)}}]),e}();ta(Pb,"createByType",function(e,t,r){var n=new Map;return n.set(t,new _M(r)),new Pb(e,n)});var YY=function(){function e(t){var r=this;eh(this,e),ta(this,"handlers",new Map),ta(this,"pools",new Map),ta(this,"target",void 0),ta(this,"createEmitter",function(n){return function(a){r.pools.forEach(function(i){i.dispatchEvent(n,a)})}}),this.target=t}return th(e,[{key:"addHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t);this.pools.set(t,a.addHandlers(r,n))}else this.pools.set(t,Pb.createByType(t,r,n));this.handlers.has(r)||this.addTargetHandler(r)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t).removeHandlers(r,n);a.hasHandlers()?this.pools.set(t,a):this.pools.delete(t);var i=!1;this.pools.forEach(function(o){return i=i||o.hasHandlers(r)}),i||this.removeTargetHandler(r)}}},{key:"addTargetHandler",value:function(t){var r=this.createEmitter(t);this.handlers.set(t,r),this.target.addEventListener(t,r,!0)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t),!0),this.handlers.delete(t))}}]),e}(),GY=function(){function e(){var t=this;eh(this,e),ta(this,"targets",new Map),ta(this,"getTarget",function(r){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=hO(r);if(t.targets.has(a))return t.targets.get(a);if(!n)return null;var i=new YY(a);return t.targets.set(a,i),i}),ta(this,"removeTarget",function(r){t.targets.delete(hO(r))})}return th(e,[{key:"sub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o;this.getTarget(i).addHandlers(s,t,pO(r))}}},{key:"unsub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o,l=this.getTarget(i,!1);l&&(l.removeHandlers(s,t,pO(r)),l.hasHandlers()||this.removeTarget(i))}}}]),e}(),kb=new GY,P0=function(e){function t(){return eh(this,t),HY(this,wM(t).apply(this,arguments))}return zY(t,BY.PureComponent),th(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(r){this.unsubscribe(r),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.sub(n,a,{pool:i,target:o})}},{key:"unsubscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.unsub(n,a,{pool:i,target:o})}},{key:"render",value:function(){return null}}]),t}();ta(P0,"defaultProps",{pool:"default",target:"document"}),P0.propTypes={},gm.instance=kb,gm.default=P0;var _E;_E=gm;bE.exports=_E.default;var Rf=bE.exports.instance=_E.instance,KY=bE.exports;const Ci=Xr(KY);function EM(){}var qY=1/0,QY=_u&&1/pE(new _u([,-0]))[1]==qY?function(e){return new _u(e)}:EM;const XY=QY;var JY=200;function SM(e,t,r){var n=-1,a=rM,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=nM;else if(i>=JY){var u=t?null:XY(e);if(u)return pE(u);o=!1,a=dE,l=new Gu}else l=t?[]:s;e:for(;++n-1:!!a&&tM(e,t,r)>-1}var xM=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],p8=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],h8=[].concat(xM,p8),CM=["alt","height","src","srcSet","width","loading"],Zg=function(t,r){r===void 0&&(r={});var n=r,a=n.htmlProps,i=a===void 0?h8:a,o=n.includeAria,s=o===void 0?!0:o,l={},u={};return HV(t,function(c,f){var d=s&&(/^aria-.*$/.test(f)||f==="role"),p=Qa(i,f)||d?l:u;p[f]=c}),[l,u]},v8=typeof document=="object"&&document!==null,m8=typeof window=="object"&&window!==null&&window.self===window,g8=function e(){return Be(e.override)?v8&&m8:e.override};const Ms=g8;var y8=Math.max,w8=Math.min;function b8(e,t,r){return e>=w8(t,r)&&e0&&a.indexOf(r)===n})):[]}function P8(e,t){return[t.filter(function(r){return e.indexOf(r)===-1}),e.filter(function(r){return t.indexOf(r)===-1})]}var yO=new Map,k0=function(t,r){var n=D8(r),a=P8(yO.get(t)||[],n),i=a[0],o=a[1];t&&(i.forEach(function(s){return t.classList.add(s)}),o.forEach(function(s){return t.classList.remove(s)})),yO.set(t,n)},k8=function(){var t=this;this.add=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);a.add(n);return}var i=new Set;i.add(n),t.nodes.set(r,i)},this.del=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);if(a.size===1){t.nodes.delete(r);return}a.delete(n)}},this.emit=function(r,n){n(r,t.nodes.get(r))},this.nodes=new Map},gf=new k8;function A8(e,t){var r=b.useRef(),n=b.useRef(!1);gO(function(){if(r.current=t,n.current){var a=bb(e)?e.current:e;gf.emit(a,k0)}n.current=!0},[t]),gO(function(){var a=bb(e)?e.current:e;return gf.add(a,r),gf.emit(a,k0),function(){gf.del(a,r),gf.emit(a,k0)}},[e])}var N8=Gg(function(e,t){return vm(e)?sM(e,t):[]});const R8=N8;function qu(e){var t=e.children,r=e.className,n=e.content,a=e.size,i=z(a,"icons",r),o=V(qu,e),s=q(qu,e);return b.createElement(s,P({},o,{className:i}),re(t)?n:t)}qu.handledProps=["as","children","className","content","size"];qu.propTypes={};qu.defaultProps={as:"i"};var nl=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};for(var Hh=0;Hh<24;Hh+=1)ym[112+Hh]="F"+(Hh+1);for(var A0=0;A0<26;A0+=1){var N0=A0+65;ym[N0]=[String.fromCharCode(N0+32),String.fromCharCode(N0)]}var oe={codes:ym,getCode:function(t){return wO(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var r=wO(t);if(r&&t.key)return t.key;var n=ym[r?t.keyCode||t.which:t];return Array.isArray(n)&&(r?n=n[t.shiftKey?1:0]:n=n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};oe.Spacebar=oe[" "];oe.Digit0=oe[0];oe.Digit1=oe[1];oe.Digit2=oe[2];oe.Digit3=oe[3];oe.Digit4=oe[4];oe.Digit5=oe[5];oe.Digit6=oe[6];oe.Digit7=oe[7];oe.Digit8=oe[8];oe.Digit9=oe[9];oe.Tilde=oe["~"];oe.GraveAccent=oe["`"];oe.ExclamationPoint=oe["!"];oe.AtSign=oe["@"];oe.PoundSign=oe["#"];oe.PercentSign=oe["%"];oe.Caret=oe["^"];oe.Ampersand=oe["&"];oe.PlusSign=oe["+"];oe.MinusSign=oe["-"];oe.EqualsSign=oe["="];oe.DivisionSign=oe["/"];oe.MultiplicationSign=oe["*"];oe.Comma=oe[","];oe.Decimal=oe["."];oe.Colon=oe[":"];oe.Semicolon=oe[";"];oe.Pipe=oe["|"];oe.BackSlash=oe["\\"];oe.QuestionMark=oe["?"];oe.SingleQuote=oe["'"];oe.DoubleQuote=oe['"'];oe.LeftCurlyBrace=oe["{"];oe.RightCurlyBrace=oe["}"];oe.LeftParenthesis=oe["("];oe.RightParenthesis=oe[")"];oe.LeftAngleBracket=oe["<"];oe.RightAngleBracket=oe[">"];oe.LeftSquareBracket=oe["["];oe.RightSquareBracket=oe["]"];var M8=oe;const _r=Xr(M8);var SE=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?f-1:0),p=1;p1?p-1:0),v=1;v1?f-1:0),p=1;p1?d-1:0),h=1;h1?d-1:0),h=1;h=u}),u>=f.length-1&&(p=d[d.length-1]);else{var v=Ob(f,["value",c]);p=Qa(d,v)?v:void 0}return(!p||p<0)&&(p=d[0]),p}var PO=function(t,r){return Be(t)?r:t},kO=function(t){return t&&t.map(function(r){return yE(r,["key","value"])})};function XM(e){var t=e.flag,r=e.image,n=e.text;return Vu(n)?n:{content:b.createElement(b.Fragment,null,GM.create(t),qt.create(r),n)}}var pr=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o=u||u===1){n.open(s);return}se(n.searchRef.current,"focus")},n.handleIconClick=function(s){var l=n.props.clearable,u=n.hasValue();se(n.props,"onClick",s,n.props),s.stopPropagation(),l&&u?n.clearValue(s):n.toggle(s)},n.handleItemClick=function(s,l){var u=n.props,c=u.multiple,f=u.search,d=n.state.value,p=l.value;if(s.stopPropagation(),(c||l.disabled)&&s.nativeEvent.stopImmediatePropagation(),!l.disabled){var h=l["data-additional"],v=c?TO(n.state.value,[p]):p,y=c?!!uO(v,d).length:v!==d;y&&(n.setState({value:v}),n.handleChange(s,v)),n.clearSearchQuery(),se(f?n.searchRef.current:n.ref.current,"focus"),n.closeOnChange(s),h&&se(n.props,"onAddItem",s,P({},n.props,{value:p}))}},n.handleFocus=function(s){var l=n.state.focus;l||(se(n.props,"onFocus",s,n.props),n.setState({focus:!0}))},n.handleBlur=function(s){var l=Ea(s,"currentTarget");if(!(l&&l.contains(document.activeElement))){var u=n.props,c=u.closeOnBlur,f=u.multiple,d=u.selectOnBlur;n.isMouseDown||(se(n.props,"onBlur",s,n.props),d&&!f&&(n.makeSelectedItemActive(s,n.state.selectedIndex),c&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}},n.handleSearchChange=function(s,l){var u=l.value;s.stopPropagation();var c=n.props.minCharacters,f=n.state.open,d=u;if(se(n.props,"onSearchChange",s,P({},n.props,{searchQuery:d})),n.setState({searchQuery:d,selectedIndex:0}),!f&&d.length>=c){n.open();return}f&&c!==1&&d.lengthc||d<0)?d=l:d>c?d=0:d<0&&(d=c),u[d].disabled?n.getSelectedIndexAfterMove(s,d):d}},n.handleIconOverrides=function(s){var l=n.props.clearable,u=z(l&&n.hasValue()&&"clear",s.className);return{className:u,onClick:function(f){se(s,"onClick",f,s),n.handleIconClick(f)}}},n.clearValue=function(s){var l=n.props.multiple,u=l?[]:"";n.setState({value:u}),n.handleChange(s,u)},n.computeSearchInputTabIndex=function(){var s=n.props,l=s.disabled,u=s.tabIndex;return Be(u)?l?-1:0:u},n.computeSearchInputWidth=function(){var s=n.state.searchQuery;if(n.sizerRef.current&&s){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=s;var l=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),l}},n.computeTabIndex=function(){var s=n.props,l=s.disabled,u=s.search,c=s.tabIndex;if(!u)return l?-1:Be(c)?0:c},n.handleSearchInputOverrides=function(s){return{onChange:function(u,c){se(s,"onChange",u,c),n.handleSearchChange(u,c)}}},n.hasValue=function(){var s=n.props.multiple,l=n.state.value;return s?!Nf(l):!Be(l)&&l!==""},n.scrollSelectedItemIntoView=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=s.querySelector(".item.selected");if(l){var u=l.offsetTops.scrollTop+s.clientHeight;u?s.scrollTop=l.offsetTop:c&&(s.scrollTop=l.offsetTop+l.clientHeight-s.clientHeight)}}}},n.setOpenDirection=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=n.ref.current.getBoundingClientRect(),u=s.clientHeight,c=document.documentElement.clientHeight-l.top-l.height-u,f=l.top-u,d=c<0&&f>c;!d!=!n.state.upward&&n.setState({upward:d})}}},n.open=function(s,l){s===void 0&&(s=null),l===void 0&&(l=!0);var u=n.props,c=u.disabled,f=u.search;c||(f&&se(n.searchRef.current,"focus"),se(n.props,"onOpen",s,n.props),l&&n.setState({open:!0}),n.scrollSelectedItemIntoView())},n.close=function(s,l){l===void 0&&(l=n.handleClose),n.state.open&&(se(n.props,"onClose",s,n.props),n.setState({open:!1},l))},n.handleClose=function(){var s=document.activeElement===n.searchRef.current;!s&&n.ref.current&&n.ref.current.blur();var l=document.activeElement===n.ref.current,u=s||l;n.setState({focus:u})},n.toggle=function(s){return n.state.open?n.close(s):n.open(s)},n.renderText=function(){var s=n.props,l=s.multiple,u=s.placeholder,c=s.search,f=s.text,d=n.state,p=d.searchQuery,h=d.selectedIndex,v=d.value,y=d.open,m=n.hasValue(),g=z(u&&!m&&"default","text",c&&p&&"filtered"),E=u,w;return f?E=f:y&&!l?w=n.getSelectedItem(h):m&&(w=n.getItemByValue(v)),Yo.create(w?XM(w):E,{defaultProps:{className:g}})},n.renderSearchInput=function(){var s=n.props,l=s.search,u=s.searchInput,c=n.state.searchQuery;return l&&b.createElement(jn,{innerRef:n.searchRef},qM.create(u,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:c},overrideProps:n.handleSearchInputOverrides}))},n.renderSearchSizer=function(){var s=n.props,l=s.search,u=s.multiple;return l&&u&&b.createElement("span",{className:"sizer",ref:n.sizerRef})},n.renderLabels=function(){var s=n.props,l=s.multiple,u=s.renderLabel,c=n.state,f=c.selectedLabel,d=c.value;if(!(!l||Nf(d))){var p=bn(d,n.getItemByValue);return bn(I5(p),function(h,v){var y={active:h.value===f,as:"a",key:PO(h.key,h.value),onClick:n.handleLabelClick,onRemove:n.handleLabelRemove,value:h.value};return Xt.create(u(h,v,y),{defaultProps:y})})}},n.renderOptions=function(){var s=n.props,l=s.lazyLoad,u=s.multiple,c=s.search,f=s.noResultsMessage,d=n.state,p=d.open,h=d.selectedIndex,v=d.value;if(l&&!p)return null;var y=ou({value:n.state.value,options:n.props.options,searchQuery:n.state.searchQuery,additionLabel:n.props.additionLabel,additionPosition:n.props.additionPosition,allowAdditions:n.props.allowAdditions,deburr:n.props.deburr,multiple:n.props.multiple,search:n.props.search});if(f!==null&&c&&Nf(y))return b.createElement("div",{className:"message"},f);var m=u?function(g){return Qa(v,g)}:function(g){return g===v};return bn(y,function(g,E){return KM.create(P({active:m(g.value),selected:h===E},g,{key:PO(g.key,g.value),style:P({},g.style,{pointerEvents:"all"})}),{generateKey:!1,overrideProps:function(C){return{onClick:function(O,D){C.onClick==null||C.onClick(O,D),n.handleItemClick(O,D)}}}})})},n.renderMenu=function(){var s=n.props,l=s.children,u=s.direction,c=s.header,f=n.state.open,d=n.getDropdownMenuAriaOptions();if(!re(l)){var p=x.Children.only(l),h=z(u,T(f,"visible"),p.props.className);return x.cloneElement(p,P({className:h},d))}return b.createElement(Zu,P({},d,{direction:u,open:f}),Vo.create(c,{autoGenerateKey:!1}),n.renderOptions())},n}var r=t.prototype;return r.getInitialAutoControlledState=function(){return{focus:!1,searchQuery:""}},t.getAutoControlledStateFromProps=function(a,i,o){var s={__options:a.options,__value:i.value},l=!ed(o.__value,i.value)||!S8(kO(a.options),kO(o.__options));return l&&(s.selectedIndex=DO({additionLabel:a.additionLabel,additionPosition:a.additionPosition,allowAdditions:a.allowAdditions,deburr:a.deburr,multiple:a.multiple,search:a.search,selectedIndex:i.selectedIndex,value:i.value,options:a.options,searchQuery:i.searchQuery})),s},r.componentDidMount=function(){var a=this.state.open;a&&this.open(null,!1)},r.shouldComponentUpdate=function(a,i){return!ed(a,this.props)||!ed(i,this.state)},r.componentDidUpdate=function(a,i){var o=this.props,s=o.closeOnBlur,l=o.minCharacters,u=o.openOnFocus,c=o.search;if(!i.focus&&this.state.focus){if(!this.isMouseDown){var f=!c||c&&l===1&&!this.state.open;u&&f&&this.open()}}else i.focus&&!this.state.focus&&!this.isMouseDown&&s&&this.close();!i.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):i.open&&this.state.open,i.selectedIndex!==this.state.selectedIndex&&this.scrollSelectedItemIntoView()},r.getDropdownMenuAriaOptions=function(){var a=this.props,i=a.search,o=a.multiple,s={};return i&&(s["aria-multiselectable"]=o,s.role="listbox"),s},r.render=function(){var a=this.props,i=a.basic,o=a.button,s=a.className,l=a.compact,u=a.disabled,c=a.error,f=a.fluid,d=a.floating,p=a.icon,h=a.inline,v=a.item,y=a.labeled,m=a.loading,g=a.multiple,E=a.pointing,w=a.search,C=a.selection,S=a.scrolling,O=a.simple,D=a.trigger,N=this.state,R=N.focus,j=N.open,U=N.upward,Q=z("ui",T(j,"active visible"),T(u,"disabled"),T(c,"error"),T(m,"loading"),T(i,"basic"),T(o,"button"),T(l,"compact"),T(f,"fluid"),T(d,"floating"),T(h,"inline"),T(y,"labeled"),T(v,"item"),T(g,"multiple"),T(w,"search"),T(C,"selection"),T(O,"simple"),T(S,"scrolling"),T(U,"upward"),Ct(E,"pointing"),"dropdown",s),X=V(t,this.props),J=q(t,this.props),te=this.getDropdownAriaOptions(J,this.props);return b.createElement(jn,{innerRef:this.ref},b.createElement(J,P({},X,te,{className:Q,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),D||this.renderText(),jt.create(p,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),j&&b.createElement(Ci,{name:"keydown",on:this.closeOnEscape}),j&&b.createElement(Ci,{name:"click",on:this.closeOnDocumentClick}),R&&b.createElement(Ci,{name:"keydown",on:this.removeItemOnBackspace})))},t}(Bc);pr.handledProps=["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"];pr.propTypes={};pr.defaultProps={additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:XM,searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0};pr.autoControlledProps=["open","searchQuery","selectedLabel","value","upward"];pr.Divider=Yd;pr.Header=Vo;pr.Item=KM;pr.Menu=Zu;pr.SearchInput=qM;pr.Text=Yo;function fs(e){return b.createElement(pr,P({},e,{selection:!0}))}fs.handledProps=["options"];fs.propTypes={};fs.Divider=pr.Divider;fs.Header=pr.Header;fs.Item=pr.Item;fs.Menu=pr.Menu;var ey=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?u-1:0),f=1;f1?r-1:0),a=1;a"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function R7(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!ia(i)||!li(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(o){var s=a[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function M7(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],i=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!ia(a)||!li(a)||(Object.assign(a.style,s),Object.keys(i).forEach(function(l){a.removeAttribute(l)}))})}}const I7={name:"applyStyles",enabled:!0,phase:"write",fn:R7,effect:M7,requires:["computeStyles"]};function ii(e){return e.split("-")[0]}var $s=Math.max,wm=Math.min,pc=Math.round;function $b(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rI(){return!/^((?!chrome|android).)*safari/i.test($b())}function hc(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&ia(e)&&(a=e.offsetWidth>0&&pc(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&pc(n.height)/e.offsetHeight||1);var o=ol(e)?Ln(e):window,s=o.visualViewport,l=!rI()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/a,c=(n.top+(l&&s?s.offsetTop:0))/i,f=n.width/a,d=n.height/i;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function DE(e){var t=hc(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function nI(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&TE(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Yi(e){return Ln(e).getComputedStyle(e)}function $7(e){return["table","td","th"].indexOf(li(e))>=0}function ds(e){return((ol(e)?e.ownerDocument:e.document)||window.document).documentElement}function ty(e){return li(e)==="html"?e:e.assignedSlot||e.parentNode||(TE(e)?e.host:null)||ds(e)}function MO(e){return!ia(e)||Yi(e).position==="fixed"?null:e.offsetParent}function j7(e){var t=/firefox/i.test($b()),r=/Trident/i.test($b());if(r&&ia(e)){var n=Yi(e);if(n.position==="fixed")return null}var a=ty(e);for(TE(a)&&(a=a.host);ia(a)&&["html","body"].indexOf(li(a))<0;){var i=Yi(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function nh(e){for(var t=Ln(e),r=MO(e);r&&$7(r)&&Yi(r).position==="static";)r=MO(r);return r&&(li(r)==="html"||li(r)==="body"&&Yi(r).position==="static")?t:r||j7(e)||t}function PE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function td(e,t,r){return $s(e,wm(t,r))}function L7(e,t,r){var n=td(e,t,r);return n>r?r:n}function aI(){return{top:0,right:0,bottom:0,left:0}}function iI(e){return Object.assign({},aI(),e)}function oI(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var F7=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,iI(typeof t!="number"?t:oI(t,rh))};function U7(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,s=ii(r.placement),l=PE(s),u=[En,fa].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!o)){var f=F7(a.padding,r),d=DE(i),p=l==="y"?_n:En,h=l==="y"?ca:fa,v=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],y=o[l]-r.rects.reference[l],m=nh(i),g=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,E=v/2-y/2,w=f[p],C=g-d[c]-f[h],S=g/2-d[c]/2+E,O=td(w,S,C),D=l;r.modifiersData[n]=(t={},t[D]=O,t.centerOffset=O-S,t)}}function B7(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||nI(t.elements.popper,a)&&(t.elements.arrow=a))}const z7={name:"arrow",enabled:!0,phase:"main",fn:U7,effect:B7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vc(e){return e.split("-")[1]}var W7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function H7(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:pc(r*a)/a||0,y:pc(n*a)/a||0}}function IO(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=o.x,p=d===void 0?0:d,h=o.y,v=h===void 0?0:h,y=typeof c=="function"?c({x:p,y:v}):{x:p,y:v};p=y.x,v=y.y;var m=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),E=En,w=_n,C=window;if(u){var S=nh(r),O="clientHeight",D="clientWidth";if(S===Ln(r)&&(S=ds(r),Yi(S).position!=="static"&&s==="absolute"&&(O="scrollHeight",D="scrollWidth")),S=S,a===_n||(a===En||a===fa)&&i===ip){w=ca;var N=f&&S===C&&C.visualViewport?C.visualViewport.height:S[O];v-=N-n.height,v*=l?1:-1}if(a===En||(a===_n||a===ca)&&i===ip){E=fa;var R=f&&S===C&&C.visualViewport?C.visualViewport.width:S[D];p-=R-n.width,p*=l?1:-1}}var j=Object.assign({position:s},u&&W7),U=c===!0?H7({x:p,y:v},Ln(r)):{x:p,y:v};if(p=U.x,v=U.y,l){var Q;return Object.assign({},j,(Q={},Q[w]=g?"0":"",Q[E]=m?"0":"",Q.transform=(C.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",Q))}return Object.assign({},j,(t={},t[w]=g?v+"px":"",t[E]=m?p+"px":"",t.transform="",t))}function V7(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,o=i===void 0?!0:i,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:ii(t.placement),variation:vc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,IO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,IO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Y7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:V7,data:{}};var Vh={passive:!0};function G7(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=a===void 0?!0:a,o=n.resize,s=o===void 0?!0:o,l=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",r.update,Vh)}),s&&l.addEventListener("resize",r.update,Vh),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Vh)}),s&&l.removeEventListener("resize",r.update,Vh)}}const K7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:G7,data:{}};var q7={left:"right",right:"left",bottom:"top",top:"bottom"};function xv(e){return e.replace(/left|right|bottom|top/g,function(t){return q7[t]})}var Q7={start:"end",end:"start"};function $O(e){return e.replace(/start|end/g,function(t){return Q7[t]})}function kE(e){var t=Ln(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function AE(e){return hc(ds(e)).left+kE(e).scrollLeft}function X7(e,t){var r=Ln(e),n=ds(e),a=r.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var u=rI();(u||!u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+AE(e),y:l}}function J7(e){var t,r=ds(e),n=kE(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=$s(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=$s(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+AE(e),l=-n.scrollTop;return Yi(a||r).direction==="rtl"&&(s+=$s(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function NE(e){var t=Yi(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function sI(e){return["html","body","#document"].indexOf(li(e))>=0?e.ownerDocument.body:ia(e)&&NE(e)?e:sI(ty(e))}function rd(e,t){var r;t===void 0&&(t=[]);var n=sI(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=Ln(n),o=a?[i].concat(i.visualViewport||[],NE(n)?n:[]):n,s=t.concat(o);return a?s:s.concat(rd(ty(o)))}function jb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Z7(e,t){var r=hc(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function jO(e,t,r){return t===eI?jb(X7(e,r)):ol(t)?Z7(t,r):jb(J7(ds(e)))}function eG(e){var t=rd(ty(e)),r=["absolute","fixed"].indexOf(Yi(e).position)>=0,n=r&&ia(e)?nh(e):e;return ol(n)?t.filter(function(a){return ol(a)&&nI(a,n)&&li(a)!=="body"}):[]}function tG(e,t,r,n){var a=t==="clippingParents"?eG(e):[].concat(t),i=[].concat(a,[r]),o=i[0],s=i.reduce(function(l,u){var c=jO(e,u,n);return l.top=$s(c.top,l.top),l.right=wm(c.right,l.right),l.bottom=wm(c.bottom,l.bottom),l.left=$s(c.left,l.left),l},jO(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function lI(e){var t=e.reference,r=e.element,n=e.placement,a=n?ii(n):null,i=n?vc(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(a){case _n:l={x:o,y:t.y-r.height};break;case ca:l={x:o,y:t.y+t.height};break;case fa:l={x:t.x+t.width,y:s};break;case En:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=a?PE(a):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case dc:l[u]=l[u]-(t[c]/2-r[c]/2);break;case ip:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function op(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,i=r.strategy,o=i===void 0?e.strategy:i,s=r.boundary,l=s===void 0?_7:s,u=r.rootBoundary,c=u===void 0?eI:u,f=r.elementContext,d=f===void 0?yf:f,p=r.altBoundary,h=p===void 0?!1:p,v=r.padding,y=v===void 0?0:v,m=iI(typeof y!="number"?y:oI(y,rh)),g=d===yf?E7:yf,E=e.rects.popper,w=e.elements[h?g:d],C=tG(ol(w)?w:w.contextElement||ds(e.elements.popper),l,c,o),S=hc(e.elements.reference),O=lI({reference:S,element:E,strategy:"absolute",placement:a}),D=jb(Object.assign({},E,O)),N=d===yf?D:S,R={top:C.top-N.top+m.top,bottom:N.bottom-C.bottom+m.bottom,left:C.left-N.left+m.left,right:N.right-C.right+m.right},j=e.modifiersData.offset;if(d===yf&&j){var U=j[a];Object.keys(R).forEach(function(Q){var X=[fa,ca].indexOf(Q)>=0?1:-1,J=[_n,ca].indexOf(Q)>=0?"y":"x";R[Q]+=U[J]*X})}return R}function rG(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?tI:l,c=vc(n),f=c?s?RO:RO.filter(function(h){return vc(h)===c}):rh,d=f.filter(function(h){return u.indexOf(h)>=0});d.length===0&&(d=f);var p=d.reduce(function(h,v){return h[v]=op(e,{placement:v,boundary:a,rootBoundary:i,padding:o})[ii(v)],h},{});return Object.keys(p).sort(function(h,v){return p[h]-p[v]})}function nG(e){if(ii(e)===OE)return[];var t=xv(e);return[$O(e),t,$O(t)]}function aG(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,v=r.allowedAutoPlacements,y=t.options.placement,m=ii(y),g=m===y,E=l||(g||!h?[xv(y)]:nG(y)),w=[y].concat(E).reduce(function(ye,Le){return ye.concat(ii(Le)===OE?rG(t,{placement:Le,boundary:c,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:v}):Le)},[]),C=t.rects.reference,S=t.rects.popper,O=new Map,D=!0,N=w[0],R=0;R=0,J=X?"width":"height",te=op(t,{placement:j,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),ge=X?Q?fa:En:Q?ca:_n;C[J]>S[J]&&(ge=xv(ge));var H=xv(ge),ee=[];if(i&&ee.push(te[U]<=0),s&&ee.push(te[ge]<=0,te[H]<=0),ee.every(function(ye){return ye})){N=j,D=!1;break}O.set(j,ee)}if(D)for(var ce=h?3:1,_e=function(Le){var He=w.find(function(lt){var Ce=O.get(lt);if(Ce)return Ce.slice(0,Le).every(function(xe){return xe})});if(He)return N=He,"break"},we=ce;we>0;we--){var rt=_e(we);if(rt==="break")break}t.placement!==N&&(t.modifiersData[n]._skip=!0,t.placement=N,t.reset=!0)}}const iG={name:"flip",enabled:!0,phase:"main",fn:aG,requiresIfExists:["offset"],data:{_skip:!1}};function LO(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function FO(e){return[_n,fa,ca,En].some(function(t){return e[t]>=0})}function oG(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=op(t,{elementContext:"reference"}),s=op(t,{altBoundary:!0}),l=LO(o,n),u=LO(s,a,i),c=FO(l),f=FO(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const sG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oG};function lG(e,t,r){var n=ii(e),a=[En,_n].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[En,fa].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function uG(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=a===void 0?[0,0]:a,o=tI.reduce(function(c,f){return c[f]=lG(f,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}const cG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uG};function fG(e){var t=e.state,r=e.name;t.modifiersData[r]=lI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dG={name:"popperOffsets",enabled:!0,phase:"read",fn:fG,data:{}};function pG(e){return e==="x"?"y":"x"}function hG(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,p=d===void 0?!0:d,h=r.tetherOffset,v=h===void 0?0:h,y=op(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),m=ii(t.placement),g=vc(t.placement),E=!g,w=PE(m),C=pG(w),S=t.modifiersData.popperOffsets,O=t.rects.reference,D=t.rects.popper,N=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(S){if(i){var Q,X=w==="y"?_n:En,J=w==="y"?ca:fa,te=w==="y"?"height":"width",ge=S[w],H=ge+y[X],ee=ge-y[J],ce=p?-D[te]/2:0,_e=g===dc?O[te]:D[te],we=g===dc?-D[te]:-O[te],rt=t.elements.arrow,ye=p&&rt?DE(rt):{width:0,height:0},Le=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aI(),He=Le[X],lt=Le[J],Ce=td(0,O[te],ye[te]),xe=E?O[te]/2-ce-Ce-He-R.mainAxis:_e-Ce-He-R.mainAxis,mt=E?-O[te]/2+ce+Ce+lt+R.mainAxis:we+Ce+lt+R.mainAxis,Nt=t.elements.arrow&&nh(t.elements.arrow),sr=Nt?w==="y"?Nt.clientTop||0:Nt.clientLeft||0:0,jr=(Q=j==null?void 0:j[w])!=null?Q:0,Je=ge+xe-jr-sr,er=ge+mt-jr,Ut=td(p?wm(H,Je):H,ge,p?$s(ee,er):ee);S[w]=Ut,U[w]=Ut-ge}if(s){var lr,Jr=w==="x"?_n:En,Lr=w==="x"?ca:fa,Ot=S[C],ln=C==="y"?"height":"width",I=Ot+y[Jr],ue=Ot-y[Lr],F=[_n,En].indexOf(m)!==-1,Y=(lr=j==null?void 0:j[C])!=null?lr:0,pe=F?I:Ot-O[ln]-D[ln]-Y+R.altAxis,be=F?Ot+O[ln]+D[ln]-Y-R.altAxis:ue,Ne=p&&F?L7(pe,Ot,be):td(p?pe:I,Ot,p?be:ue);S[C]=Ne,U[C]=Ne-Ot}t.modifiersData[n]=U}}const vG={name:"preventOverflow",enabled:!0,phase:"main",fn:hG,requiresIfExists:["offset"]};function mG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gG(e){return e===Ln(e)||!ia(e)?kE(e):mG(e)}function yG(e){var t=e.getBoundingClientRect(),r=pc(t.width)/e.offsetWidth||1,n=pc(t.height)/e.offsetHeight||1;return r!==1||n!==1}function wG(e,t,r){r===void 0&&(r=!1);var n=ia(t),a=ia(t)&&yG(t),i=ds(t),o=hc(e,a,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((li(t)!=="body"||NE(i))&&(s=gG(t)),ia(t)?(l=hc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=AE(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function bG(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function a(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&a(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||a(i)}),n}function _G(e){var t=bG(e);return N7.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function EG(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function SG(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var UO={placement:"bottom",modifiers:[],strategy:"absolute"};function BO(){for(var e=arguments.length,t=new Array(e),r=0;r=n&&(r.finalize(i.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,r9))}}),e}(),a9=typeof FinalizationRegistry<"u"?FinalizationRegistry:n9,Lb=new a9(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),dI={exports:{}},pI={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ec=x;function i9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var o9=typeof Object.is=="function"?Object.is:i9,s9=Ec.useState,l9=Ec.useEffect,u9=Ec.useLayoutEffect,c9=Ec.useDebugValue;function f9(e,t){var r=t(),n=s9({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return u9(function(){a.value=r,a.getSnapshot=t,R0(a)&&i({inst:a})},[e,r,t]),l9(function(){return R0(a)&&i({inst:a}),e(function(){R0(a)&&i({inst:a})})},[e]),c9(r),r}function R0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o9(e,r)}catch{return!0}}function d9(e,t){return t()}var p9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d9:f9;pI.useSyncExternalStore=Ec.useSyncExternalStore!==void 0?Ec.useSyncExternalStore:p9;dI.exports=pI;var h9=dI.exports,v9=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},m9=function(){},hI=typeof sN().stateVersion<"u";function WO(e){e.reaction=new Od("observer".concat(e.name),function(){var t;hI||(e.stateVersion=Symbol()),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function g9(e,t){t===void 0&&(t="observed");var r=b.useRef(null),n=v9(b.useState(),2),a=n[1];if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(u){return Lb.unregister(i),i.onStoreChange=u,i.reaction||(WO(i),a(Symbol())),function(){var c;i.onStoreChange=null,(c=i.reaction)===null||c===void 0||c.dispose(),i.reaction=null}},getSnapshot:function(){return hI?sN().stateVersion:i.stateVersion}};r.current=i}var o=r.current;o.reaction||(WO(o),Lb.register(r,o,o)),b.useDebugValue(o.reaction,e9),h9.useSyncExternalStore(o.subscribe,o.getSnapshot,m9);var s,l;if(o.reaction.track(function(){try{s=e()}catch(u){l=u}}),l)throw l;return s}var vI=typeof Symbol=="function"&&Symbol.for,HO=vI?Symbol.for("react.forward_ref"):typeof x.forwardRef=="function"&&x.forwardRef(function(e){return null}).$$typeof,VO=vI?Symbol.for("react.memo"):typeof x.memo=="function"&&x.memo(function(e){return null}).$$typeof;function wt(e,t){var r;if(VO&&e.$$typeof===VO)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=t==null?void 0:t.forwardRef)!==null&&r!==void 0?r:!1,a=e,i=e.displayName||e.name;if(HO&&e.$$typeof===HO&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,l){return g9(function(){return a(s,l)},i)};return o.displayName=e.displayName,Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=x.forwardRef(o)),o=x.memo(o),w9(e,o),o}var y9={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function w9(e,t){Object.keys(e).forEach(function(r){y9[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}globalThis&&globalThis.__read;var M0;ZG(Fo.unstable_batchedUpdates);M0=Lb.finalizeAllImmediately;const b9=wt(function(){const{userStore:{user:t,logout:r,isLoggedIn:n}}=Ft();return _.jsx(ba,{inverted:!0,fixed:"top",children:_.jsxs(Ko,{children:[_.jsxs(ba.Item,{as:Bh,to:"/",header:!0,children:[_.jsx("img",{src:"/assets/logo.png",alt:"logo",style:{marginRight:"10px"}}),"Reactivities"]}),n&&_.jsxs(_.Fragment,{children:[_.jsx(ba.Item,{as:Bh,to:"/activities",name:"Activities"}),_.jsx(ba.Item,{as:Bh,to:"/errors",name:"Errors"}),_.jsx(ba.Item,{children:_.jsx($e,{as:Bh,to:"/createActivity",positive:!0,content:"Create Activity"})}),_.jsxs(ba.Item,{position:"right",children:[_.jsx(qt,{src:(t==null?void 0:t.image)||"/assets/user.png",avatar:!0,spaced:"right"}),_.jsx(pr,{pointing:"top left",text:t==null?void 0:t.displayName,children:_.jsxs(pr.Menu,{children:[_.jsx(pr.Item,{as:an,to:`/profiles/${t==null?void 0:t.username}`,text:"My Profile",icon:"user"}),_.jsx(pr.Item,{onClick:r,text:"Logout",icon:"power"})]})})]})]})]})})});var _9=function(t){return E9(t)&&!S9(t)};function E9(e){return!!e&&typeof e=="object"}function S9(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||O9(e)}var x9=typeof Symbol=="function"&&Symbol.for,C9=x9?Symbol.for("react.element"):60103;function O9(e){return e.$$typeof===C9}function T9(e){return Array.isArray(e)?[]:{}}function bm(e,t){return t.clone!==!1&&t.isMergeableObject(e)?gp(T9(e),e,t):e}function D9(e,t,r){return e.concat(t).map(function(n){return bm(n,r)})}function P9(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(a){n[a]=bm(e[a],r)}),Object.keys(t).forEach(function(a){!r.isMergeableObject(t[a])||!e[a]?n[a]=bm(t[a],r):n[a]=gp(e[a],t[a],r)}),n}function gp(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||D9,r.isMergeableObject=r.isMergeableObject||_9;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):P9(e,t,r):bm(t,r)}gp.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return gp(n,a,r)},{})};var Fb=gp,YO=Array.isArray,GO=Object.keys,k9=Object.prototype.hasOwnProperty,A9=typeof Element<"u";function Ub(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=YO(e),n=YO(t),a,i,o;if(r&&n){if(i=e.length,i!=t.length)return!1;for(a=i;a--!==0;)if(!Ub(e[a],t[a]))return!1;return!0}if(r!=n)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var f=GO(e);if(i=f.length,i!==GO(t).length)return!1;for(a=i;a--!==0;)if(!k9.call(t,f[a]))return!1;if(A9&&e instanceof Element&&t instanceof Element)return e===t;for(a=i;a--!==0;)if(o=f[a],!(o==="_owner"&&e.$$typeof)&&!Ub(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var N9=function(t,r){try{return Ub(t,r)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||n.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}};const vo=Xr(N9);var R9=!0;function ry(e,t){if(!R9){if(e)return;var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}function ny(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i=0)&&(r[a]=e[a]);return r}function iT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hy=x.createContext(void 0);hy.displayName="FormikContext";var hq=hy.Provider,vq=hy.Consumer;function UE(){var e=x.useContext(hy);return e||ry(!1),e}var oT=function(t){return Array.isArray(t)&&t.length===0},zr=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},mq=function(t){return String(Math.floor(Number(t)))===t},I0=function(t){return Object.prototype.toString.call(t)==="[object String]"},OI=function(t){return x.Children.count(t)===0},$0=function(t){return Gc(t)&&zr(t.then)};function Mt(e,t,r,n){n===void 0&&(n=0);for(var a=bI(t);e&&n=0?[]:{}}}return(i===0?e:a)[o[i]]===r?e:(r===void 0?delete a[o[i]]:a[o[i]]=r,i===0&&r===void 0&&delete n[o[i]],n)}function TI(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var a=0,i=Object.keys(e);a0?ue.map(function(Y){return R(Y,Mt(I,Y))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(F).then(function(Y){return Y.reduce(function(pe,be,Ne){return be==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||be&&(pe=oi(pe,ue[Ne],be)),pe},{})})},[R]),U=x.useCallback(function(I){return Promise.all([j(I),d.validationSchema?N(I):{},d.validate?D(I):{}]).then(function(ue){var F=ue[0],Y=ue[1],pe=ue[2],be=Fb.all([F,Y,pe],{arrayMerge:_q});return be})},[d.validate,d.validationSchema,j,D,N]),Q=Hn(function(I){return I===void 0&&(I=S.values),O({type:"SET_ISVALIDATING",payload:!0}),U(I).then(function(ue){return m.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:ue})),ue})});x.useEffect(function(){o&&m.current===!0&&vo(p.current,d.initialValues)&&Q(p.current)},[o,Q]);var X=x.useCallback(function(I){var ue=I&&I.values?I.values:p.current,F=I&&I.errors?I.errors:h.current?h.current:d.initialErrors||{},Y=I&&I.touched?I.touched:v.current?v.current:d.initialTouched||{},pe=I&&I.status?I.status:y.current?y.current:d.initialStatus;p.current=ue,h.current=F,v.current=Y,y.current=pe;var be=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!I&&!!I.isSubmitting,errors:F,touched:Y,status:pe,values:ue,isValidating:!!I&&!!I.isValidating,submitCount:I&&I.submitCount&&typeof I.submitCount=="number"?I.submitCount:0}})};if(d.onReset){var Ne=d.onReset(S.values,jr);$0(Ne)?Ne.then(be):be()}else be()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);x.useEffect(function(){m.current===!0&&!vo(p.current,d.initialValues)&&u&&(p.current=d.initialValues,X(),o&&Q(p.current))},[u,d.initialValues,X,o,Q]),x.useEffect(function(){u&&m.current===!0&&!vo(h.current,d.initialErrors)&&(h.current=d.initialErrors||vs,O({type:"SET_ERRORS",payload:d.initialErrors||vs}))},[u,d.initialErrors]),x.useEffect(function(){u&&m.current===!0&&!vo(v.current,d.initialTouched)&&(v.current=d.initialTouched||Yh,O({type:"SET_TOUCHED",payload:d.initialTouched||Yh}))},[u,d.initialTouched]),x.useEffect(function(){u&&m.current===!0&&!vo(y.current,d.initialStatus)&&(y.current=d.initialStatus,O({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var J=Hn(function(I){if(g.current[I]&&zr(g.current[I].validate)){var ue=Mt(S.values,I),F=g.current[I].validate(ue);return $0(F)?(O({type:"SET_ISVALIDATING",payload:!0}),F.then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Y}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:I,value:F}}),Promise.resolve(F))}else if(d.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),N(S.values,I).then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Mt(Y,I)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),te=x.useCallback(function(I,ue){var F=ue.validate;g.current[I]={validate:F}},[]),ge=x.useCallback(function(I){delete g.current[I]},[]),H=Hn(function(I,ue){O({type:"SET_TOUCHED",payload:I});var F=ue===void 0?a:ue;return F?Q(S.values):Promise.resolve()}),ee=x.useCallback(function(I){O({type:"SET_ERRORS",payload:I})},[]),ce=Hn(function(I,ue){var F=zr(I)?I(S.values):I;O({type:"SET_VALUES",payload:F});var Y=ue===void 0?r:ue;return Y?Q(F):Promise.resolve()}),_e=x.useCallback(function(I,ue){O({type:"SET_FIELD_ERROR",payload:{field:I,value:ue}})},[]),we=Hn(function(I,ue,F){O({type:"SET_FIELD_VALUE",payload:{field:I,value:ue}});var Y=F===void 0?r:F;return Y?Q(oi(S.values,I,ue)):Promise.resolve()}),rt=x.useCallback(function(I,ue){var F=ue,Y=I,pe;if(!I0(I)){I.persist&&I.persist();var be=I.target?I.target:I.currentTarget,Ne=be.type,ur=be.name,Zr=be.id,un=be.value,da=be.checked,io=be.outerHTML,M=be.options,L=be.multiple;F=ue||ur||Zr,Y=/number|range/.test(Ne)?(pe=parseFloat(un),isNaN(pe)?"":pe):/checkbox/.test(Ne)?Sq(Mt(S.values,F),da,un):M&&L?Eq(M):un}F&&we(F,Y)},[we,S.values]),ye=Hn(function(I){if(I0(I))return function(ue){return rt(ue,I)};rt(I)}),Le=Hn(function(I,ue,F){ue===void 0&&(ue=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:I,value:ue}});var Y=F===void 0?a:F;return Y?Q(S.values):Promise.resolve()}),He=x.useCallback(function(I,ue){I.persist&&I.persist();var F=I.target,Y=F.name,pe=F.id,be=F.outerHTML,Ne=ue||Y||pe;Le(Ne,!0)},[Le]),lt=Hn(function(I){if(I0(I))return function(ue){return He(ue,I)};He(I)}),Ce=x.useCallback(function(I){zr(I)?O({type:"SET_FORMIK_STATE",payload:I}):O({type:"SET_FORMIK_STATE",payload:function(){return I}})},[]),xe=x.useCallback(function(I){O({type:"SET_STATUS",payload:I})},[]),mt=x.useCallback(function(I){O({type:"SET_ISSUBMITTING",payload:I})},[]),Nt=Hn(function(){return O({type:"SUBMIT_ATTEMPT"}),Q().then(function(I){var ue=I instanceof Error,F=!ue&&Object.keys(I).length===0;if(F){var Y;try{if(Y=Je(),Y===void 0)return}catch(pe){throw pe}return Promise.resolve(Y).then(function(pe){return m.current&&O({type:"SUBMIT_SUCCESS"}),pe}).catch(function(pe){if(m.current)throw O({type:"SUBMIT_FAILURE"}),pe})}else if(m.current&&(O({type:"SUBMIT_FAILURE"}),ue))throw I})}),sr=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),Nt().catch(function(ue){console.warn("Warning: An unhandled error was caught from submitForm()",ue)})}),jr={resetForm:X,validateForm:Q,validateField:J,setErrors:ee,setFieldError:_e,setFieldTouched:Le,setFieldValue:we,setStatus:xe,setSubmitting:mt,setTouched:H,setValues:ce,setFormikState:Ce,submitForm:Nt},Je=Hn(function(){return c(S.values,jr)}),er=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),X()}),Ut=x.useCallback(function(I){return{value:Mt(S.values,I),error:Mt(S.errors,I),touched:!!Mt(S.touched,I),initialValue:Mt(p.current,I),initialTouched:!!Mt(v.current,I),initialError:Mt(h.current,I)}},[S.errors,S.touched,S.values]),lr=x.useCallback(function(I){return{setValue:function(F,Y){return we(I,F,Y)},setTouched:function(F,Y){return Le(I,F,Y)},setError:function(F){return _e(I,F)}}},[we,Le,_e]),Jr=x.useCallback(function(I){var ue=Gc(I),F=ue?I.name:I,Y=Mt(S.values,F),pe={name:F,value:Y,onChange:ye,onBlur:lt};if(ue){var be=I.type,Ne=I.value,ur=I.as,Zr=I.multiple;be==="checkbox"?Ne===void 0?pe.checked=!!Y:(pe.checked=!!(Array.isArray(Y)&&~Y.indexOf(Ne)),pe.value=Ne):be==="radio"?(pe.checked=Y===Ne,pe.value=Ne):ur==="select"&&Zr&&(pe.value=pe.value||[],pe.multiple=!0)}return pe},[lt,ye,S.values]),Lr=x.useMemo(function(){return!vo(p.current,S.values)},[p.current,S.values]),Ot=x.useMemo(function(){return typeof s<"u"?Lr?S.errors&&Object.keys(S.errors).length===0:s!==!1&&zr(s)?s(d):s:S.errors&&Object.keys(S.errors).length===0},[s,Lr,S.errors,d]),ln=dt({},S,{initialValues:p.current,initialErrors:h.current,initialTouched:v.current,initialStatus:y.current,handleBlur:lt,handleChange:ye,handleReset:er,handleSubmit:sr,resetForm:X,setErrors:ee,setFormikState:Ce,setFieldTouched:Le,setFieldValue:we,setFieldError:_e,setStatus:xe,setSubmitting:mt,setTouched:H,setValues:ce,submitForm:Nt,validateForm:Q,validateField:J,isValid:Ot,dirty:Lr,unregisterField:ge,registerField:te,getFieldProps:Jr,getFieldMeta:Ut,getFieldHelpers:lr,validateOnBlur:a,validateOnChange:r,validateOnMount:o});return ln}function ah(e){var t=yq(e),r=e.component,n=e.children,a=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(hq,{value:t},r?x.createElement(r,t):a?a(t):n?zr(n)?n(t):OI(n)?null:x.Children.only(n):null)}function wq(e){var t={};if(e.inner){if(e.inner.length===0)return oi(t,e.path,e.message);for(var a=e.inner,r=Array.isArray(a),n=0,a=r?a:a[Symbol.iterator]();;){var i;if(r){if(n>=a.length)break;i=a[n++]}else{if(n=a.next(),n.done)break;i=n.value}var o=i;Mt(t,o.path)||(t=oi(t,o.path,o.message))}}return t}function bq(e,t,r,n){r===void 0&&(r=!1);var a=Bb(e);return t[r?"validateSync":"validate"](a,{abortEarly:!1,context:n||a})}function Bb(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(a){return Array.isArray(a)===!0||Ku(a)?Bb(a):a!==""?a:void 0}):Ku(e[n])?t[n]=Bb(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function _q(e,t,r){var n=e.slice();return t.forEach(function(i,o){if(typeof n[o]>"u"){var s=r.clone!==!1,l=s&&r.isMergeableObject(i);n[o]=l?Fb(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[o]=Fb(e[o],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function Eq(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Sq(e,t,r){if(typeof e=="boolean")return!!t;var n=[],a=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),a=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!a?n.concat(r):a?n.slice(0,i).concat(n.slice(i+1)):n}var xq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function Hn(e){var t=x.useRef(e);return xq(function(){t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;an?a:n},0);return Array.from(dt({},t,{length:r+1}))}else return[]},sT=function(t,r){var n=typeof t=="function"?t:r;return function(a){if(Array.isArray(a)||Gc(a)){var i=ul(a);return n(i)}return a}},kq=function(e){CI(t,e);function t(n){var a;return a=e.call(this,n)||this,a.updateArrayField=function(i,o,s){var l=a.props,u=l.name,c=l.formik.setFormikState;c(function(f){var d=sT(s,i),p=sT(o,i),h=oi(f.values,u,i(Mt(f.values,u))),v=s?d(Mt(f.errors,u)):void 0,y=o?p(Mt(f.touched,u)):void 0;return oT(v)&&(v=void 0),oT(y)&&(y=void 0),dt({},f,{values:h,errors:s?oi(f.errors,u,v):f.errors,touched:o?oi(f.touched,u,y):f.touched})})},a.push=function(i){return a.updateArrayField(function(o){return[].concat(ul(o),[pq(i)])},!1,!1)},a.handlePush=function(i){return function(){return a.push(i)}},a.swap=function(i,o){return a.updateArrayField(function(s){return Dq(s,i,o)},!0,!0)},a.handleSwap=function(i,o){return function(){return a.swap(i,o)}},a.move=function(i,o){return a.updateArrayField(function(s){return Tq(s,i,o)},!0,!0)},a.handleMove=function(i,o){return function(){return a.move(i,o)}},a.insert=function(i,o){return a.updateArrayField(function(s){return j0(s,i,o)},function(s){return j0(s,i,null)},function(s){return j0(s,i,null)})},a.handleInsert=function(i,o){return function(){return a.insert(i,o)}},a.replace=function(i,o){return a.updateArrayField(function(s){return Pq(s,i,o)},!1,!1)},a.handleReplace=function(i,o){return function(){return a.replace(i,o)}},a.unshift=function(i){var o=-1;return a.updateArrayField(function(s){var l=s?[i].concat(s):[i];return o=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),o},a.handleUnshift=function(i){return function(){return a.unshift(i)}},a.handleRemove=function(i){return function(){return a.remove(i)}},a.handlePop=function(){return function(){return a.pop()}},a.remove=a.remove.bind(iT(a)),a.pop=a.pop.bind(iT(a)),a}var r=t.prototype;return r.componentDidUpdate=function(a){this.props.validateOnChange&&this.props.formik.validateOnChange&&!vo(Mt(a.formik.values,a.name),Mt(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(a){var i;return this.updateArrayField(function(o){var s=o?ul(o):[];return i||(i=s[a]),zr(s.splice)&&s.splice(a,1),zr(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},r.pop=function(){var a;return this.updateArrayField(function(i){var o=i.slice();return a||(a=o&&o.pop&&o.pop()),o},!0,!0),a},r.render=function(){var a={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,o=i.component,s=i.render,l=i.children,u=i.name,c=i.formik,f=Eo(c,["validate","validationSchema"]),d=dt({},a,{form:f,name:u});return o?x.createElement(o,d):s?s(d):l?typeof l=="function"?l(d):OI(l)?null:x.Children.only(l):null},t}(x.Component);kq.defaultProps={validateOnChange:!0};var Aq=function(e){CI(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.shouldComponentUpdate=function(a){return Mt(this.props.formik.errors,this.props.name)!==Mt(a.formik.errors,this.props.name)||Mt(this.props.formik.touched,this.props.name)!==Mt(a.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(a).length},r.render=function(){var a=this.props,i=a.component,o=a.formik,s=a.render,l=a.children,u=a.name,c=Eo(a,["component","formik","render","children","name"]),f=Mt(o.touched,u),d=Mt(o.errors,u);return f&&d?s?zr(s)?s(d):null:l?zr(l)?l(d):null:i?x.createElement(i,c,d):d:null},t}(x.Component),DI=Oq(Aq);function Xa(e){const[t,r]=vy(e.name);return _.jsxs(Hc.Field,{error:r.touched&&!!r.error,children:[_.jsx("label",{children:e.label}),_.jsx("input",{...t,...e}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const PI=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.login(r).catch(a=>n({error:a.response.data})),children:({handleSubmit:r,isSubmitting:n,errors:a})=>_.jsxs(Hc,{className:"ui form",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Login to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(Xt,{style:{marginBottom:10},basic:!0,color:"red",content:a.error})}),_.jsx($e,{loading:n,positive:!0,content:"Login",type:"submit",fluid:!0})]})})});function Cl(e){this._maxSize=e,this.clear()}Cl.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Cl.prototype.get=function(e){return this._values[e]};Cl.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Nq=/[^.^\]^[]+|(?=\[\]|\.\.)/g,kI=/^\d+$/,Rq=/^\d/,Mq=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Iq=/^\s*(['"]?)(.*?)(\1)\s*$/,BE=512,lT=new Cl(BE),uT=new Cl(BE),cT=new Cl(BE),js={Cache:Cl,split:zb,normalizePath:L0,setter:function(e){var t=L0(e);return uT.get(e)||uT.set(e,function(n,a){for(var i=0,o=t.length,s=n;ie.match(Uq)||[],yy=e=>e[0].toUpperCase()+e.slice(1),WE=(e,t)=>gy(e).join(t).toLowerCase(),AI=e=>gy(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Bq=e=>yy(AI(e)),zq=e=>WE(e,"_"),Wq=e=>WE(e,"-"),Hq=e=>yy(WE(e," ")),Vq=e=>gy(e).map(yy).join(" ");var F0={words:gy,upperFirst:yy,camelCase:AI,pascalCase:Bq,snakeCase:zq,kebabCase:Wq,sentenceCase:Hq,titleCase:Vq},HE={exports:{}};HE.exports=function(e){return NI(Yq(e),e)};HE.exports.array=NI;function NI(e,t){var r=e.length,n=new Array(r),a={},i=r,o=Gq(t),s=Kq(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||l(e[i],i,new Set);return n;function l(u,c,f){if(f.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!a[c]){a[c]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),c=p.length){f.add(u);do{var h=p[--c];l(h,s.get(h),f)}while(c);f.delete(u)}n[--r]=u}}}function Yq(e){for(var t=new Set,r=0,n=e.length;r"",tQ=/^Symbol\((.*)\)(.*)$/;function rQ(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function fT(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return rQ(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return eQ.call(e).replace(tQ,"Symbol($1)");const n=Xq.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Jq.call(e)+"]":n==="RegExp"?Zq.call(e):null}function $o(e,t){let r=fT(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=fT(this[n],t);return i!==null?i:a},2)}function RI(e){return e==null?[]:[].concat(e)}let MI,nQ=/\$\{\s*(\w+)\s*\}/g;MI=Symbol.toStringTag;let _a=class Wb{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(nQ,(a,i)=>$o(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a,i){this.name=void 0,this.message=void 0,this.stack=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[MI]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],RI(t).forEach(o=>{if(Wb.isError(o)){this.errors.push(...o.errors);const s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,Wb)}},za={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const a=n!=null&&n!==r?` (cast from the value \`${$o(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${$o(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${$o(r,!0)}\``+a}},va={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},aQ={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Hb={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},iQ={isValue:"${path} field must be ${value}"},Vb={noUnknown:"${path} field has unspecified keys: ${unknown}"},oQ={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},sQ={notType:e=>{const{path:t,value:r,spec:n}=e,a=n.types.length;if(Array.isArray(r)){if(r.lengtha)return`${t} tuple value has too many items, expected a length of ${a} but got ${r.length} for value: \`${$o(r,!0)}\``}return _a.formatError(za.notType,e)}};Object.assign(Object.create(null),{mixed:za,string:va,number:aQ,date:Hb,object:Vb,array:oQ,boolean:iQ,tuple:sQ});const VE=e=>e&&e.__isYupSchema__;class _m{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:a,otherwise:i}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new _m(t,(s,l)=>{var u;let c=o(...s)?a:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!VE(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const Gh={context:"$",value:"."};let Ol=class{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Gh.context,this.isValue=this.key[0]===Gh.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Gh.context:this.isValue?Gh.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&js.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let a=this.isContext?n:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}};Ol.prototype.__isYupRef=!0;const As=e=>e==null;function Il(e){function t({value:r,path:n="",options:a,originalValue:i,schema:o},s,l){const{name:u,test:c,params:f,message:d,skipAbsent:p}=e;let{parent:h,context:v,abortEarly:y=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=a;function g(j){return Ol.isRef(j)?j.getValue(r,h,v):j}function E(j={}){var U;const Q=Object.assign({value:r,originalValue:i,label:o.spec.label,path:j.path||n,spec:o.spec},f,j.params);for(const J of Object.keys(Q))Q[J]=g(Q[J]);const X=new _a(_a.formatError(j.message||d,Q),r,Q.path,j.type||u,(U=j.disableStackTrace)!=null?U:m);return X.params=Q,X}const w=y?s:l;let C={path:n,parent:h,type:u,from:a.from,createError:E,resolve:g,options:a,originalValue:i,schema:o};const S=j=>{_a.isError(j)?w(j):j?l(null):w(E())},O=j=>{_a.isError(j)?w(j):s(j)};if(p&&As(r))return S(!0);let N;try{var R;if(N=c.call(C,r,C),typeof((R=N)==null?void 0:R.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,O)}}catch(j){O(j);return}S(N)}return t.OPTIONS=e,t}function lQ(e,t,r,n=r){let a,i,o;return t?(js.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:a,value:r});let f=e.type==="tuple",d=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[d],e=f?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);a=r,r=r&&r[c],e=e.fields[c]}i=c,o=l?"["+s+"]":"."+s}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Em extends Set{describe(){const t=[];for(const r of this.values())t.push(Ol.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Em(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function su(e,t=new Map){if(VE(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n{this.typeError(za.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=su(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const a=Object.assign({},r.spec,n.spec);return n.spec=a,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((a,i)=>i.resolve(a,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,a,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),a=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(a&&As(i))return i;let o=$o(t),s=$o(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". + +attempted value: ${o} +`+(s!==o?`result of cast: ${s}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:o,options:r,tests:u},n,c=>{if(c.length)return a(c,l);this.runTests({path:i,value:l,originalValue:o,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:o,originalValue:s,path:l,options:u}=t,c=v=>{a||(a=!0,r(v,o))},f=v=>{a||(a=!0,n(v,o))},d=i.length,p=[];if(!d)return f([]);let h={value:o,originalValue:s,path:l,options:u,schema:this};for(let v=0;vthis.resolve(c)._validate(u,c,d,p)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((o,s)=>a._validate(t,r,(l,u)=>{_a.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new _a(l,u,void 0,void 0,i)):o(u)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw _a.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new _a(s,t,void 0,void 0,o);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(_a.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(_a.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):su(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Il({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Il({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=za.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=za.notNull){return this.nullability(!1,t)}required(t=za.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=za.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Il(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(i||o.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=RI(t).map(i=>new Ol(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new _m(a,r):_m.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Il({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=za.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Il({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),n}notOneOf(t,r=za.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Il({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:o}=r.spec;return{meta:a,label:n,optional:i,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}ui.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ui.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:o}=lQ(this,t,r,n.context);return o[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])ui.prototype[e]=ui.prototype.oneOf;for(const e of["not","nope"])ui.prototype[e]=ui.prototype.notOneOf;let uQ=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cQ=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fQ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,dQ=e=>As(e)||e===e.trim(),pQ={}.toString();function Pn(){return new II}class II extends ui{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===pQ?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||za.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=va.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=va.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=va.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||va.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=va.email){return this.matches(uQ,{name:"email",message:t,excludeEmptyString:!0})}url(t=va.url){return this.matches(cQ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=va.uuid){return this.matches(fQ,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=va.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:dQ})}lowercase(t=va.lowercase){return this.transform(r=>As(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toLowerCase()})}uppercase(t=va.uppercase){return this.transform(r=>As(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toUpperCase()})}}Pn.prototype=II.prototype;const hQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _i(e,t=0){return Number(e)||t}function vQ(e){const t=hQ.exec(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;const r={year:_i(t[1]),month:_i(t[2],1)-1,day:_i(t[3],1),hour:_i(t[4]),minute:_i(t[5]),second:_i(t[6]),millisecond:t[7]?_i(t[7].substring(0,3)):0,z:t[8]||void 0,plusMinus:t[9]||void 0,hourOffset:_i(t[10]),minuteOffset:_i(t[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}let mQ=new Date(""),gQ=e=>Object.prototype.toString.call(e)==="[object Date]";class wy extends ui{constructor(){super({type:"date",check(t){return gQ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=vQ(t),isNaN(t)?wy.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ol.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=Hb.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=Hb.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}wy.INVALID_DATE=mQ;wy.prototype;function yQ(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([o,s])=>`${o}-${s}`));function i(o,s){let l=js.split(o)[0];n.add(l),a.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Ol.isRef(s)&&s.isSibling?i(s.path,o):VE(s)&&"deps"in s&&s.deps.forEach(l=>i(l,o))}return Qq.array(Array.from(n),r).reverse()}function dT(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function $I(e){return(t,r)=>dT(e,t)-dT(e,r)}const wQ=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ov(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ov(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ov(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ov)}):"optional"in e?e.optional():e}const bQ=(e,t)=>{const r=[...js.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=js.getter(js.join(r),!0)(e);return!!(a&&n in a)};let pT=e=>Object.prototype.toString.call(e)==="[object Object]";function _Q(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const EQ=$I([]);function ih(e){return new jI(e)}class jI extends ui{constructor(t){super({type:"object",check(r){return pT(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=EQ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(a).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of s){let d=i[f],p=f in a;if(d){let h,v=a[f];u.path=(r.path?`${r.path}.`:"")+f,d=d.resolve({value:v,context:r.context,parent:l});let y=d instanceof ui?d.spec:void 0,m=y==null?void 0:y.strict;if(y!=null&&y.strip){c=c||f in a;continue}h=!r.__validating||!m?d.cast(a[f],u):a[f],h!==void 0&&(l[f]=h)}else p&&!o&&(l[f]=a[f]);(p!==f in l||l[f]!==a[f])&&(c=!0)}return c?l:a}_validate(t,r={},n,a){let{from:i=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...i],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,u)=>{if(!s||!pT(u)){a(l,u);return}o=o||u;let c=[];for(let f of this._nodes){let d=this.fields[f];!d||Ol.isRef(d)||c.push(d.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:c,value:u,originalValue:o,options:r},n,f=>{a(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const o=n[a];n[a]=o===void 0?i:o}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=yQ(t,r),n._sortErrors=$I(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ov(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r)}omit(t){const r=Object.assign({},this.fields);for(const n of t)delete r[n];return this.setFields(r)}from(t,r,n){let a=js.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return bQ(i,t)&&(o=Object.assign({},i),n||delete o[t],o[r]=a(i)),o})}json(){return this.transform(wQ)}noUnknown(t=!0,r=Vb.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=_Q(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Vb.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(F0.camelCase)}snakeCase(){return this.transformKeys(F0.snakeCase)}constantCase(){return this.transformKeys(t=>F0.snakeCase(t).toUpperCase())}describe(t){let r=super.describe(t);r.fields={};for(const[a,i]of Object.entries(this.fields)){var n;let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),r.fields[a]=i.describe(o)}return r}}ih.prototype=jI.prototype;function LI({errors:e}){return _.jsx(Ri,{error:!0,children:e&&_.jsx(Ri.List,{children:e.map((t,r)=>_.jsx(Ri.Item,{children:t},r))})})}const SQ=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{displayName:"",username:"",email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.register(r).catch(a=>n({error:a})),validationSchema:ih({displayName:Pn().required(),username:Pn().required(),email:Pn().required(),password:Pn().required()}),children:({handleSubmit:r,isSubmitting:n,errors:a,isValid:i,dirty:o})=>_.jsxs(Hc,{className:"ui form error",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Sign up to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(Xa,{placeholder:"Username",name:"username"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(LI,{errors:a.error})}),_.jsx($e,{disabled:!i||!o||n,loading:n,positive:!0,content:"Register",type:"submit",fluid:!0})]})})});var FI={},Sm={},YE={},by={},_y={};Object.defineProperty(_y,"__esModule",{value:!0});_y.createScriptEle=void 0;const xQ=(e,t)=>new Promise(r=>{var n;const i=document.getElementsByTagName("script")[0];if(document.getElementById(e)){r(void 0);return}const o=document.createElement("script");if(o.id=e,o.src=t,o.onload=r,i)(n=i.parentNode)===null||n===void 0||n.insertBefore(o,i);else{const s=document.body.childNodes;document.body.insertBefore(o,s.item(s.length-1))}});_y.createScriptEle=xQ;var UI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.paramsToObject=e.objectToParams=e.isObject=void 0;const t=a=>Object.prototype.toString.call(a)==="[object Object]";e.isObject=t;const r=a=>!(0,e.isObject)(a)||Object.keys(a).length===0?"":"?"+Object.keys(a).map(i=>`${i}=${encodeURIComponent(a[i])}`).join("&");e.objectToParams=r;const n=a=>(a==null?void 0:a.replace(/^\?/,"").split("&").reduce((i,o)=>{if(!o)return i;const[s,l]=o.split("=");return Object.assign(Object.assign({},i),{[s]:decodeURIComponent(l)})},{}))||{};e.paramsToObject=n})(UI);var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.isFacebookApp=void 0;const CQ=()=>{if(typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return e.indexOf("FBAN")>-1||e.indexOf("FBAV")>-1||e.indexOf("Instagram")>-1};Ey.isFacebookApp=CQ;(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(_y,e),r(UI,e),r(Ey,e)})(by);(function(e){var t=et&&et.__awaiter||function(a,i,o,s){function l(u){return u instanceof o?u:new o(function(c){c(u)})}return new(o||(o=Promise))(function(u,c){function f(h){try{p(s.next(h))}catch(v){c(v)}}function d(h){try{p(s.throw(h))}catch(v){c(v)}}function p(h){h.done?u(h.value):l(h.value).then(f,d)}p((s=s.apply(a,i||[])).next())})},r=et&&et.__rest||function(a,i){var o={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.indexOf(s)<0&&(o[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(a);lwindow.FB?window.FB:(console.warn("FB not found"),null),getLoginStatus(a,i=!1){const o=this.getFB();if(!o){a({status:"unknown"});return}o.getLoginStatus(a,i)},getProfile(a,i){var o;(o=this.getFB())===null||o===void 0||o.api("me",i,a)},init(a){var i;(i=this.getFB())===null||i===void 0||i.init(a)},clear(){window.FB=null;const a=document.getElementById(e.SDK_SCRIPT_ELE_ID);a&&a.remove()},isRedirected(a){var i,o;const s=(0,n.paramsToObject)(window.location.search);return((i=s.state===(a==null?void 0:a.state))!==null&&i!==void 0?i:"facebookdirect")&&s[(o=a==null?void 0:a.response_type)!==null&&o!==void 0?o:""]!==void 0},loadSdk(a,i){return t(this,void 0,void 0,function*(){yield(0,n.createScriptEle)(e.SDK_SCRIPT_ELE_ID,`https://connect.facebook.net/${a}/sdk${i?"/xfbml.customerchat":""}.js`)})},redirectToDialog(a,i){var o=r(i,["ignoreSdkError"]);window.location.href=`https://www.facebook.com/dialog/oauth${(0,n.objectToParams)(Object.assign(Object.assign({},a),o))}`},login(a,i){var o,{ignoreSdkError:s}=i,l=r(i,["ignoreSdkError"]);try{(o=this.getFB())===null||o===void 0||o.login(a,l)}catch(u){if(s)return;throw u}},logout(a){this.getLoginStatus(i=>{var o;i.status==="connected"?(o=this.getFB())===null||o===void 0||o.logout(a):a()})}}})(YE);var OQ=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),TQ=et&&et.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DQ=et&&et.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&OQ(t,e,r);return TQ(t,e),t},PQ=et&&et.__awaiter||function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(Sm,"__esModule",{value:!0});const hT=DQ(x),ms=YE,kQ=by;function AQ(e){var t,r;const{appId:n,language:a="en_US",scope:i="public_profile, email",fields:o="name,email,picture",onSuccess:s,onFail:l,onProfileSuccess:u,className:c,style:f,children:d="Login with Facebook",render:p,autoLoad:h=!1,useRedirect:v=!1,useCustomerChat:y=!1}=e,m=Object.assign(Object.assign({version:"v9.0",xfbml:!1,cookie:!1,localStorage:!0},e.initParams),{appId:n}),g=Object.assign(Object.assign({redirect_uri:typeof window<"u"?location.origin+location.pathname:"/",state:"facebookdirect",response_type:"code"},e.dialogParams),{client_id:n}),E=Object.assign(Object.assign({return_scopes:!1,ignoreSdkError:!1},e.loginOptions),{auth_nonce:typeof((t=e.loginOptions)===null||t===void 0?void 0:t.auth_nonce)=="function"?e.loginOptions.auth_nonce():(r=e.loginOptions)===null||r===void 0?void 0:r.auth_nonce,scope:i});(0,hT.useEffect)(()=>{w()},[]);const w=()=>PQ(this,void 0,void 0,function*(){yield ms.FacebookLoginClient.loadSdk(a,y),window.fbAsyncInit=()=>{ms.FacebookLoginClient.init(m);const O=ms.FacebookLoginClient.isRedirected(g);if(O===!1&&h){S();return}O===!0&&v&&C()}}),C=()=>{ms.FacebookLoginClient.login(O=>{if(!O.authResponse){l&&l({status:"loginCancelled"});return}s&&s(O.authResponse),u&&ms.FacebookLoginClient.getProfile(u,{fields:o})},Object.assign(Object.assign({},E),{scope:i}))},S=()=>{if((0,kQ.isFacebookApp)()||v){ms.FacebookLoginClient.redirectToDialog(g,E);return}if(!window.FB){l&&l({status:"facebookNotLoaded"});return}C()};return p?p({onClick:S,logout:ms.FacebookLoginClient.logout}):hT.default.createElement("button",{type:"button",onClick:S,className:c,style:f},d)}Sm.default=AQ;var BI={},zI={};Object.defineProperty(zI,"__esModule",{value:!0});var WI={};Object.defineProperty(WI,"__esModule",{value:!0});var HI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LoginStatus=void 0,function(t){t.Connected="connected",t.NotAuthorized="not_authorized",t.Unknown="unknown"}(e.LoginStatus||(e.LoginStatus={}))})(HI);(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zI,e),r(WI,e),r(HI,e)})(BI);(function(e){var t=et&&et.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=et&&et.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,i,s)},n=et&&et.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0});const a=n(Sm);r(by,e),r(BI,e),r(Sm,e),r(YE,e),e.default=a.default})(FI);const NQ=Xr(FI),RQ=wt(function(){const{userStore:t,modalStore:r}=Ft();return _.jsx(je,{inverted:!0,textAlign:"center",vertical:!0,className:"masthead",children:_.jsxs(Ko,{text:!0,children:[_.jsxs(qe,{as:"h1",inverted:!0,children:[_.jsx(qt,{size:"massive",src:"/assets/logo.png",alt:"logo",style:{marginBottom:12}}),"Reactivities"]}),t.isLoggedIn?_.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h2",inverted:!0,content:"Welcome to Reactivities"}),_.jsx($e,{as:an,to:"/activities",size:"huge",inverted:!0,children:"Go to Activities!"})]}):_.jsxs(_.Fragment,{children:[_.jsx($e,{onClick:()=>r.openModal(_.jsx(PI,{})),size:"huge",inverted:!0,children:"Login!"}),_.jsx($e,{onClick:()=>r.openModal(_.jsx(SQ,{})),size:"huge",inverted:!0,children:"Register"}),_.jsx(cc,{horizontal:!0,inverted:!0,children:"Or"}),_.jsx(NQ,{appId:"859222439029599",onSuccess:n=>{t.facebookLogin(n.accessToken),console.log("Login Success!",n)},onFail:n=>{console.log("Login Failed!",n)},className:`ui button facebook huge inverted ${t.fbLoading&&"loading"}`})]})]})})});function Sy({inverted:e=!0,content:t="Loading..."}){return _.jsx(Uo,{active:!0,inverted:e,children:_.jsx(il,{content:t})})}const MQ=wt(function(){const{modalStore:t}=Ft();return _.jsx(_O,{open:t.modal.open,onClose:t.closeModal,size:"mini",children:_.jsx(_O.Content,{children:t.modal.body})})});function IQ(){const e=hi(),{commonStore:t,userStore:r}=Ft();return x.useEffect(()=>{t.token?r.getUser().finally(()=>t.setAppLoaded()):t.setAppLoaded()},[t,r]),t.appLoaded?_.jsxs(_.Fragment,{children:[_.jsx(M4,{}),_.jsx(MQ,{}),_.jsx(pb,{position:"bottom-right",hideProgressBar:!0,theme:"colored"}),e.pathname==="/"?_.jsx(RQ,{}):_.jsxs(_.Fragment,{children:[_.jsx(b9,{}),_.jsx(Ko,{style:{marginTop:"7em"},children:_.jsx(ER,{})})]})]}):_.jsx(Sy,{content:"Loading app ..."})}const $Q=wt(IQ);function Ge(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function le(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function fe(e){le(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ma(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Kc(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function qi(e,t){le(2,arguments);var r=fe(e),n=Ge(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function GE(e,t){le(2,arguments);var r=fe(e).getTime(),n=Ge(t);return new Date(r+n)}var jQ=36e5;function LQ(e,t){le(2,arguments);var r=Ge(t);return GE(e,r*jQ)}var FQ={};function wi(){return FQ}function yp(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getDay(),h=(pa||isNaN(a.getDate()))&&(r=a)}),r||new Date(NaN)}function Tv(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getTime()-n.getTime();return a<0?-1:a>0?1:a}var qE=6e4,QE=36e5,zQ=1e3;function WQ(e,t){le(2,arguments);var r=cl(e),n=cl(t);return r.getTime()===n.getTime()}function XE(e){return le(1,arguments),e instanceof Date||Ma(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VI(e){if(le(1,arguments),!XE(e)&&typeof e!="number")return!1;var t=fe(e);return!isNaN(Number(t))}function bp(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function Gb(e){le(1,arguments);var t=fe(e),r=Math.floor(t.getMonth()/3)+1;return r}function Cm(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()-n.getFullYear()}function HQ(e,t){return le(2,arguments),fe(e).getTime()-fe(t).getTime()}var gT={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},VQ="trunc";function YQ(e){return e?gT[e]:gT[VQ]}function YI(e){le(1,arguments);var t=fe(e);return t.setHours(23,59,59,999),t}function GQ(e){le(1,arguments);var t=fe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function KQ(e){le(1,arguments);var t=fe(e);return YI(t).getTime()===GQ(t).getTime()}function qQ(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=Tv(r,n),i=Math.abs(bp(r,n)),o;if(i<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*i);var s=Tv(r,n)===-a;KQ(fe(e))&&i===1&&Tv(e,n)===1&&(s=!1),o=a*(i-Number(s))}return o===0?0:o}function QQ(e,t,r){le(2,arguments);var n=HQ(e,t)/1e3;return YQ(r==null?void 0:r.roundingMethod)(n)}function Kb(e){le(1,arguments);var t=fe(e),r=t.getMonth(),n=r-r%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function XQ(e){le(1,arguments);var t=fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JQ(e){le(1,arguments);var t=fe(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function GI(e,t){le(2,arguments);var r=Ge(t);return GE(e,-r)}var ZQ=864e5;function eX(e){le(1,arguments);var t=fe(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/ZQ)+1}function xc(e){le(1,arguments);var t=1,r=fe(e),n=r.getUTCDay(),a=(n=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function tX(e){le(1,arguments);var t=KI(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=xc(r);return n}var rX=6048e5;function qI(e){le(1,arguments);var t=fe(e),r=xc(t).getTime()-tX(t).getTime();return Math.round(r/rX)+1}function fl(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getUTCDay(),h=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var v=fl(h,t),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var m=fl(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function nX(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=JE(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=fl(p,t);return h}var aX=6048e5;function QI(e,t){le(1,arguments);var r=fe(e),n=fl(r,t).getTime()-nX(r,t).getTime();return Math.round(n/aX)+1}function ft(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return ft(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):ft(n+1,2)},d:function(t,r){return ft(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return ft(t.getUTCHours()%12||12,r.length)},H:function(t,r){return ft(t.getUTCHours(),r.length)},m:function(t,r){return ft(t.getUTCMinutes(),r.length)},s:function(t,r){return ft(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ft(i,r.length)}};const co=iX;var $l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oX={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return co.y(t,r)},Y:function(t,r,n,a){var i=JE(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return ft(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):ft(o,r.length)},R:function(t,r){var n=KI(t);return ft(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return ft(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ft(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ft(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return co.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ft(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=QI(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):ft(i,r.length)},I:function(t,r,n){var a=qI(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ft(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):co.d(t,r)},D:function(t,r,n){var a=eX(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ft(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return ft(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return ft(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=$l.noon:a===0?i=$l.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=$l.evening:a>=12?i=$l.afternoon:a>=4?i=$l.morning:i=$l.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return co.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):co.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):co.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):co.s(t,r)},S:function(t,r){return co.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return wT(o);case"XXXX":case"XX":return Ss(o);case"XXXXX":case"XXX":default:return Ss(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return wT(o);case"xxxx":case"xx":return Ss(o);case"xxxxx":case"xxx":default:return Ss(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yT(o,":");case"OOOO":default:return"GMT"+Ss(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yT(o,":");case"zzzz":default:return"GMT"+Ss(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return ft(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return ft(o,r.length)}};function yT(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t||"";return r+String(a)+o+ft(i,2)}function wT(e,t){if(e%60===0){var r=e>0?"-":"+";return r+ft(Math.abs(e)/60,2)}return Ss(e,t)}function Ss(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=ft(Math.floor(a/60),2),o=ft(a%60,2);return n+i+r+o}const sX=oX;var bT=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},XI=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},lX=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return bT(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",bT(a,r)).replace("{{time}}",XI(i,r))},uX={p:XI,P:lX};const qb=uX;var cX=["D","DD"],fX=["YY","YYYY"];function JI(e){return cX.indexOf(e)!==-1}function ZI(e){return fX.indexOf(e)!==-1}function Om(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var dX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pX=function(t,r,n){var a,i=dX[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const hX=pX;function U0(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var vX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yX={date:U0({formats:vX,defaultWidth:"full"}),time:U0({formats:mX,defaultWidth:"full"}),dateTime:U0({formats:gX,defaultWidth:"full"})};const wX=yX;var bX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_X=function(t,r,n,a){return bX[t]};const EX=_X;function wf(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var SX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},PX=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kX={ordinalNumber:PX,era:wf({values:SX,defaultWidth:"wide"}),quarter:wf({values:xX,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wf({values:CX,defaultWidth:"wide"}),day:wf({values:OX,defaultWidth:"wide"}),dayPeriod:wf({values:TX,defaultWidth:"wide",formattingValues:DX,defaultFormattingWidth:"wide"})};const AX=kX;function bf(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?RX(s,function(f){return f.test(o)}):NX(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function NX(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function RX(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var IX=/^(\d+)(th|st|nd|rd)?/i,$X=/\d+/i,jX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LX={any:[/^b/i,/^(a|c)/i]},FX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UX={any:[/1/i,/2/i,/3/i,/4/i]},BX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},HX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},VX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},GX={ordinalNumber:MX({matchPattern:IX,parsePattern:$X,valueCallback:function(t){return parseInt(t,10)}}),era:bf({matchPatterns:jX,defaultMatchWidth:"wide",parsePatterns:LX,defaultParseWidth:"any"}),quarter:bf({matchPatterns:FX,defaultMatchWidth:"wide",parsePatterns:UX,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:bf({matchPatterns:BX,defaultMatchWidth:"wide",parsePatterns:zX,defaultParseWidth:"any"}),day:bf({matchPatterns:WX,defaultMatchWidth:"wide",parsePatterns:HX,defaultParseWidth:"any"}),dayPeriod:bf({matchPatterns:VX,defaultMatchWidth:"any",parsePatterns:YX,defaultParseWidth:"any"})};const KX=GX;var qX={code:"en-US",formatDistance:hX,formatLong:wX,formatRelative:EX,localize:AX,match:KX,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ZE=qX;var QX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JX=/^'([^]*?)'?$/,ZX=/''/g,eJ=/[a-zA-Z]/;function ci(e,t,r){var n,a,i,o,s,l,u,c,f,d,p,h,v,y,m,g,E,w;le(2,arguments);var C=String(t),S=wi(),O=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:ZE,D=Ge((i=(o=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=Ge((p=(h=(v=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(m=r.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:S.weekStartsOn)!==null&&h!==void 0?h:(E=S.locale)===null||E===void 0||(w=E.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var R=fe(e);if(!VI(R))throw new RangeError("Invalid time value");var j=Sc(R),U=GI(R,j),Q={firstWeekContainsDate:D,weekStartsOn:N,locale:O,_originalDate:R},X=C.match(XX).map(function(J){var te=J[0];if(te==="p"||te==="P"){var ge=qb[te];return ge(J,O.formatLong)}return J}).join("").match(QX).map(function(J){if(J==="''")return"'";var te=J[0];if(te==="'")return tJ(J);var ge=sX[te];if(ge)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ZI(J)&&Om(J,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&JI(J)&&Om(J,t,String(e)),ge(U,J,O.localize,Q);if(te.match(eJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return J}).join("");return X}function tJ(e){var t=e.match(JX);return t?t[1].replace(ZX,"'"):e}function eS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function rJ(e){return eS({},e)}var _T=1440,nJ=2520,B0=43200,aJ=86400;function iJ(e,t,r){var n,a;le(2,arguments);var i=wi(),o=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:i.locale)!==null&&n!==void 0?n:ZE;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Tv(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=eS(rJ(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=fe(t),c=fe(e)):(u=fe(e),c=fe(t));var f=QQ(c,u),d=(Sc(c)-Sc(u))/1e3,p=Math.round((f-d)/60),h;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p<_T){var v=Math.round(p/60);return o.formatDistance("aboutXHours",v,l)}else{if(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var v=yp(h,t),y=new Date(0);y.setFullYear(f,0,p),y.setHours(0,0,0,0);var m=yp(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function fJ(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=cJ(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=yp(p,t);return h}var dJ=6048e5;function pJ(e,t){le(1,arguments);var r=fe(e),n=yp(r,t).getTime()-fJ(r,t).getTime();return Math.round(n/dJ)+1}function xt(e){return le(1,arguments),fe(e).getFullYear()}function Qi(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()>n.getTime()}function Ls(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function Qe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dm(e,t)}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tm(e)}function mJ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gJ(e,t){if(t&&(Ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function Xe(e){var t=mJ();return function(){var n=Tm(e),a;if(t){var i=Tm(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return gJ(this,a)}}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t,r){return t=cI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yJ=10,e$=function(){function e(){Ve(this,e),ae(this,"priority",void 0),ae(this,"subPriority",0)}return We(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),wJ=function(e){Qe(r,e);var t=Xe(r);function r(n,a,i,o,s){var l;return Ve(this,r),l=t.call(this),l.value=n,l.validateValue=a,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return We(r,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),r}(e$),bJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function n$(e){return e%400===0||e%4===0&&e%100!==0}var EJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var l=r$(o.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var u=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),SJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o,s){var l=JE(a,s);if(o.isTwoDigitYear){var u=r$(o.year,l);return a.setUTCFullYear(u,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}}]),r}(ot),xJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),TJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),DJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),PJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function kJ(e,t,r){le(2,arguments);var n=fe(e),a=Ge(t),i=QI(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var AJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o,s){return fl(kJ(a,o,s),s)}}]),r}(ot);function NJ(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=qI(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var RJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o){return xc(NJ(a,o))}}]),r}(ot),MJ=[31,28,31,30,31,30,31,31,30,31,30,31],IJ=[31,29,31,30,31,30,31,31,30,31,30,31],$J=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=IJ[l]:i>=1&&i<=MJ[l]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),jJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function rS(e,t,r){var n,a,i,o,s,l,u,c;le(2,arguments);var f=wi(),d=Ge((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&a!==void 0?a:(u=f.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=fe(e),h=Ge(t),v=p.getUTCDay(),y=h%7,m=(y+7)%7,g=(m=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),FJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),UJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function BJ(e,t){le(2,arguments);var r=Ge(t);r%7===0&&(r=r-7);var n=1,a=fe(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(a,i,o){return a=BJ(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),WJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),GJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(ot),KJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),qJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(ot),QJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(ot),XJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(ot),JJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Ge((h=(v=(y=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(g=n.locale)===null||g===void 0||(E=g.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&y!==void 0?y:D.weekStartsOn)!==null&&v!==void 0?v:(w=D.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&h!==void 0?h:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return S===""?fe(r):new Date(NaN);var U={firstWeekContainsDate:R,weekStartsOn:j,locale:N},Q=[new bJ],X=O.match(iZ).map(function(Ce){var xe=Ce[0];if(xe in qb){var mt=qb[xe];return mt(Ce,N.formatLong)}return Ce}).join("").match(aZ),J=[],te=ST(X),ge;try{var H=function(){var xe=ge.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ZI(xe)&&Om(xe,O,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&JI(xe)&&Om(xe,O,e);var mt=xe[0],Nt=nZ[mt];if(Nt){var sr=Nt.incompatibleTokens;if(Array.isArray(sr)){var jr=J.find(function(er){return sr.includes(er.token)||er.token===mt});if(jr)throw new RangeError("The format string mustn't contain `".concat(jr.fullToken,"` and `").concat(xe,"` at the same time"))}else if(Nt.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(xe,"` and any other token at the same time"));J.push({token:mt,fullToken:xe});var Je=Nt.run(S,xe,N.match,U);if(!Je)return{v:new Date(NaN)};Q.push(Je.setter),S=Je.rest}else{if(mt.match(uZ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mt+"`");if(xe==="''"?xe="'":mt==="'"&&(xe=cZ(xe)),S.indexOf(xe)===0)S=S.slice(xe.length);else return{v:new Date(NaN)}}};for(te.s();!(ge=te.n()).done;){var ee=H();if(Ma(ee)==="object")return ee.v}}catch(Ce){te.e(Ce)}finally{te.f()}if(S.length>0&&lZ.test(S))return new Date(NaN);var ce=Q.map(function(Ce){return Ce.priority}).sort(function(Ce,xe){return xe-Ce}).filter(function(Ce,xe,mt){return mt.indexOf(Ce)===xe}).map(function(Ce){return Q.filter(function(xe){return xe.priority===Ce}).sort(function(xe,mt){return mt.subPriority-xe.subPriority})}).map(function(Ce){return Ce[0]}),_e=fe(r);if(isNaN(_e.getTime()))return new Date(NaN);var we=GI(_e,Sc(_e)),rt={},ye=ST(ce),Le;try{for(ye.s();!(Le=ye.n()).done;){var He=Le.value;if(!He.validate(we,U))return new Date(NaN);var lt=He.set(we,rt,U);Array.isArray(lt)?(we=lt[0],eS(rt,lt[1])):we=lt}}catch(Ce){ye.e(Ce)}finally{ye.f()}return we}function cZ(e){return e.match(oZ)[1].replace(sZ,"'")}function fZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function dZ(e,t){le(2,arguments);var r=Kb(e),n=Kb(t);return r.getTime()===n.getTime()}function pZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()}function a$(e,t){le(2,arguments);var r=fe(e).getTime(),n=fe(t.start).getTime(),a=fe(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function hZ(e,t){le(2,arguments);var r=Ge(t);return Kc(e,-r)}function vZ(e,t){var r;le(1,arguments);var n=Ge((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=wZ(e),i;if(a.date){var o=bZ(a.date,n);i=_Z(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),l=0,u;if(a.time&&(l=EZ(a.time),isNaN(l)))return new Date(NaN);if(a.timezone){if(u=SZ(a.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),f=new Date(0);return f.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),f.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),f}return new Date(s+l+u)}var qh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mZ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gZ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yZ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wZ(e){var t={},r=e.split(qh.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],qh.timeZoneDelimiter.test(t.date)&&(t.date=e.split(qh.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=qh.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function bZ(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function _Z(e,t){if(t===null)return new Date(NaN);var r=e.match(mZ);if(!r)return new Date(NaN);var n=!!r[4],a=_f(r[1]),i=_f(r[2])-1,o=_f(r[3]),s=_f(r[4]),l=_f(r[5])-1;if(n)return DZ(t,s,l)?xZ(t,s,l):new Date(NaN);var u=new Date(0);return!OZ(t,i,o)||!TZ(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}function _f(e){return e?parseInt(e):1}function EZ(e){var t=e.match(gZ);if(!t)return NaN;var r=W0(t[1]),n=W0(t[2]),a=W0(t[3]);return PZ(r,n,a)?r*QE+n*qE+a*1e3:NaN}function W0(e){return e&&parseFloat(e.replace(",","."))||0}function SZ(e){if(e==="Z")return 0;var t=e.match(yZ);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return kZ(n,a)?r*(n*QE+a*qE):NaN}function xZ(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var CZ=[31,null,31,30,31,30,31,31,30,31,30,31];function i$(e){return e%400===0||e%4===0&&e%100!==0}function OZ(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(CZ[t]||(i$(e)?29:28))}function TZ(e,t){return t>=1&&t<=(i$(e)?366:365)}function DZ(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function PZ(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function kZ(e,t){return t>=0&&t<=59}function Ya(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=lJ(o);return r.setMonth(n,Math.min(i,s)),r}function ad(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setHours(n),r}function id(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setMinutes(n),r}function Mf(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=Math.floor(r.getMonth()/3)+1,i=n-a;return Ya(r,r.getMonth()+i*3)}function AZ(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setSeconds(n),r}function Pm(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function _p(e,t){le(2,arguments);var r=Ge(t);return qi(e,-r)}function NZ(e,t){le(2,arguments);var r=Ge(t);return KE(e,-r)}function km(e,t){le(2,arguments);var r=Ge(t);return wp(e,-r)}const o$=wt(function({profile:t}){var s;const{profileStore:r,userStore:n}=Ft(),{updateFollowing:a,loading:i}=r;if(((s=n.user)==null?void 0:s.username)===t.username)return null;function o(l,u){l.preventDefault(),t.following?a(u,!1):a(u,!0)}return _.jsxs(Io,{animated:"move",children:[_.jsx(Io.Content,{visible:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,color:"teal",content:t.following?"Following":"Not following"})}),_.jsx(Io.Content,{hidden:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,basic:!0,color:t.following?"red":"green",content:t.following?"Unfollow":"Follow",loading:i,onClick:l=>o(l,t.username)})})]})}),s$=wt(function({profile:t}){function r(n){if(n)return n.length>40?n.substring(0,37)+"...":n}return _.jsxs(nr,{as:an,to:`/profiles/${t.username}`,children:[_.jsx(qt,{src:t.image||"/assets/user.png"}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{children:t.displayName}),_.jsx(nr.Description,{children:r(t.bio)})]}),_.jsxs(nr.Content,{extra:!0,children:[_.jsx(jt,{name:"users"}),t.followersCount," followers"]}),_.jsx(o$,{profile:t})]})}),RZ=wt(function({attendees:t}){const r={border:"orange 3px solid"};return _.jsx(Ib,{horizontal:!0,children:t.map(n=>_.jsx(Vc,{hoverable:!0,trigger:_.jsx(Ib.Item,{as:an,to:`/profiles/${n.username}`,children:_.jsx(qt,{size:"mini",circular:!0,src:n.image||"/assets/user.png",style:n.following?r:null})},n.username),children:_.jsx(Gi,{children:_.jsx(s$,{profile:n})})},n.username))})});function MZ({activity:e}){var t,r;return _.jsxs(je.Group,{children:[_.jsxs(je,{children:[e.isCancelled&&_.jsx(Xt,{attached:"top",color:"red",content:"Cancelled",style:{textAlign:"center"}}),_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{style:{marginBottom:3},size:"tiny",circular:!0,src:((t=e.host)==null?void 0:t.image)||"/assets/user.png"}),_.jsxs(nt.Content,{children:[_.jsx(nt.Header,{as:an,to:`/activities/${e.id}`,children:e.title}),_.jsxs(nt.Description,{children:["Hosted by ",_.jsx(an,{to:`/profiles/${e.hostUsername}`,children:(r=e.host)==null?void 0:r.displayName})]}),e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"orange",children:"You are hosting the activty"})}),e.isGoing&&!e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"green",children:"You are going to this activty"})})]})]})})]}),_.jsx(je,{children:_.jsxs("span",{children:[_.jsx(jt,{name:"clock"})," ",ci(e.date,"dd MMM yyyy h:mm aa"),_.jsx(jt,{name:"marker"})," ",e.venue]})}),_.jsx(je,{children:_.jsx(RZ,{attendees:e.attendees})}),_.jsxs(je,{clearing:!0,children:[_.jsx("span",{children:e.description}),_.jsx($e,{as:an,to:`/activities/${e.id}`,color:"teal",floated:"right",content:"View"})]})]})}const IZ=wt(function(){const{activityStore:t}=Ft(),{groupedAcivities:r}=t;return _.jsx(_.Fragment,{children:r.map(([n,a])=>_.jsxs(x.Fragment,{children:[_.jsx(qe,{sub:!0,color:"teal",children:n}),a.map(i=>_.jsx(MZ,{activity:i},i.id))]},n))})});function l$(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t-1}function oee(e,t){var r=this.__data__,n=Cy(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}qc.prototype.clear=ree;qc.prototype.delete=nee;qc.prototype.get=aee;qc.prototype.has=iee;qc.prototype.set=oee;function Tl(e){var t=-1,r=e?e.length:0;for(this.clear();++t0,ee=te!=="century",ce=Jee(te,t),_e=ee?Zee(te,t):void 0,we=P$(te,t),rt=ee?ete(te,t):void 0,ye=function(){if(ce.getFullYear()<0)return!0;var Je=tte(te,t);return u&&u>=Je}(),Le=ee&&function(){if(_e.getFullYear()<0)return!0;var Je=rte(te,t);return u&&u>=Je}(),He=l&&le?t:r&&r=e}function ute(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function M$(e,t){return xp(e[0],t)||xp(e[1],t)}function PT(e,t,r){var n=M$(t,e),a=[];if(n){a.push(r);var i=xp(e[0],t),o=xp(e[1],t);i&&a.push("".concat(r,"Start")),o&&a.push("".concat(r,"End")),i&&o&&a.push("".concat(r,"BothEnds"))}return a}function cte(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function fte(e){if(!e)throw new Error("args is required");var t=e.value,r=e.date,n=e.hover,a="react-calendar__tile",i=[a];if(!r)return i;var o=new Date,s=function(){if(Array.isArray(r))return r;var p=e.dateType;if(!p)throw new Error("dateType is required when date is not an array of two dates");return TT(p,r)}();if(xp(o,s)&&i.push("".concat(a,"--now")),!t||!cte(t))return i;var l=function(){if(Array.isArray(t))return t;var p=e.valueType;if(!p)throw new Error("valueType is required when value is not an array of two dates");return TT(p,t)}();ute(l,s)?i.push("".concat(a,"--active")):M$(l,s)&&i.push("".concat(a,"--hasActive"));var u=PT(l,s,"".concat(a,"--range"));i.push.apply(i,u);var c=Array.isArray(t)?t:[t];if(n&&c.length===1){var f=n>l[0]?[l[0],n]:[n,l[0]],d=PT(f,s,"".concat(a,"--hover"));i.push.apply(i,d)}return i}var dte=(jl={},jl[lu.ARABIC]=kt.ISLAMIC,jl[lu.HEBREW]=kt.HEBREW,jl[lu.ISO_8601]=kt.ISO_8601,jl[lu.US]=kt.GREGORY,jl);function pte(e){return e!==void 0&&e in lu}var kT=!1;function Ay(e){if(pte(e)){var t=dte[e];return ry(kT,'Specifying calendarType="'.concat(e,'" is deprecated. Use calendarType="').concat(t,'" instead.')),kT=!0,t}return e}function Ny(e){for(var t=e.className,r=e.count,n=r===void 0?3:r,a=e.dateTransform,i=e.dateType,o=e.end,s=e.hover,l=e.offset,u=e.renderTile,c=e.start,f=e.step,d=f===void 0?1:f,p=e.value,h=e.valueType,v=[],y=c;y<=o;y+=d){var m=a(y);v.push(u({classes:fte({date:m,dateType:i,hover:s,value:p,valueType:h}),date:m}))}return b.createElement(dS,{className:t,count:n,offset:l,wrap:!0},v)}function Ry(e){var t=e.activeStartDate,r=e.children,n=e.classes,a=e.date,i=e.formatAbbr,o=e.locale,s=e.maxDate,l=e.maxDateTransform,u=e.minDate,c=e.minDateTransform,f=e.onClick,d=e.onMouseOver,p=e.style,h=e.tileClassName,v=e.tileContent,y=e.tileDisabled,m=e.view,g=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof h=="function"?h(w):h},[t,a,h,m]),E=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof v=="function"?v(w):v},[t,a,v,m]);return b.createElement("button",{className:xy(n,g),disabled:u&&c(u)>a||s&&l(s)s?new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null},hS=function(t,r,n){var a=t,i=r,o=a[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, expected instance of `Date`."));var s=t.minDate;return s&&o0,ja=x.useCallback(function(De){var bt=function(){switch(er){case"start":return gS;case"end":return H$;case"range":return Kte;default:throw new Error("Invalid returnValue.")}}();return bt({maxDate:S,maxDetail:D,minDate:R,value:De})},[S,D,R,er]),bi=x.useCallback(function(De,bt){un(De);var Me={action:bt,activeStartDate:De,value:he,view:Re};ce&&!Jh(me,De)&&ce(Me)},[me,ce,he,Re]),oo=x.useCallback(function(De,bt){var Me=function(){switch(Re){case"century":return rt;case"decade":return He;case"year":return ye;case"month":return we;default:throw new Error("Invalid view: ".concat(Re,"."))}}();Me&&Me(De,bt)},[we,rt,ye,He,Re]),Cn=x.useCallback(function(De,bt){if(Tt){oo(De,bt);var Me=Ae[Ae.indexOf(Re)+1];if(!Me)throw new Error("Attempted to drill down from the lowest view.");un(De),Te(Me);var Fr={action:"drillDown",activeStartDate:De,value:he,view:Me};ce&&!Jh(me,De)&&ce(Fr),xe&&Re!==Me&&xe(Fr),lt&<(Fr)}},[me,Tt,ce,oo,lt,xe,he,Re,Ae]),On=x.useCallback(function(){if($a){var De=Ae[Ae.indexOf(Re)-1];if(!De)throw new Error("Attempted to drill up from the highest view.");var bt=Fs(De,me);un(bt),Te(De);var Me={action:"drillUp",activeStartDate:bt,value:he,view:De};ce&&!Jh(me,bt)&&ce(Me),xe&&Re!==De&&xe(Me),Ce&&Ce(Me)}},[me,$a,ce,Ce,xe,he,Re,Ae]),so=x.useCallback(function(De,bt){var Me=he;oo(De,bt);var Fr=Ut&&!G0(Me),cn;if(Ut)if(Fr)cn=Fs(gt,De);else{if(!Me)throw new Error("previousValue is required");if(Array.isArray(Me))throw new Error("previousValue must not be an array");cn=nte(gt,Me,De)}else cn=ja(De);var tf=!Ut||Fr||g?V$({maxDate:S,maxDetail:D,minDate:R,minDetail:U,value:cn,view:Re}):null;bt.persist(),un(tf),de(cn);var O2={action:"onChange",activeStartDate:tf,value:cn,view:Re};if(ce&&!Jh(me,tf)&&ce(O2),_e)if(Ut){var T2=G0(cn);if(!T2)_e(cn||null,bt);else if(a){if(Array.isArray(cn))throw new Error("value must not be an array");_e([cn||null,null],bt)}}else _e(cn||null,bt)},[me,a,ja,g,S,D,R,U,ce,_e,oo,Ut,he,gt,Re]);function ef(De){M(De)}function hs(){M(null)}x.useImperativeHandle(r,function(){return{activeStartDate:me,drillDown:Cn,drillUp:On,onChange:so,setActiveStartDate:bi,value:he,view:Re}},[me,Cn,On,so,bi,he,Re]);function Nl(De){var bt=De?P$(Re,me):Fs(Re,me),Me=Tt?Cn:so,Fr={activeStartDate:bt,hover:ut,locale:w,maxDate:S,minDate:R,onClick:Me,onMouseOver:Ut?ef:void 0,tileClassName:F,tileContent:Y,tileDisabled:pe,value:he,valueType:gt};switch(Re){case"century":return b.createElement(xte,cu({formatYear:y},Fr));case"decade":return b.createElement(Pte,cu({formatYear:y},Fr));case"year":return b.createElement(Mte,cu({formatMonth:d,formatMonthYear:p},Fr));case"month":return b.createElement(Wte,cu({calendarType:i,formatDay:c,formatLongDate:f,formatShortWeekday:h,formatWeekday:v,onClickWeekNumber:Le,onMouseLeave:Ut?hs:void 0,showFixedNumberOfWeeks:typeof Jr<"u"?Jr:lr,showNeighboringMonth:I,showWeekNumbers:ue},Fr));default:throw new Error("Invalid view: ".concat(Re,"."))}}function st(){return Ot?b.createElement(ote,{activeStartDate:me,drillUp:On,formatMonthYear:p,formatYear:y,locale:w,maxDate:S,minDate:R,navigationAriaLabel:Q,navigationAriaLive:X,navigationLabel:J,next2AriaLabel:te,next2Label:ge,nextAriaLabel:H,nextLabel:ee,prev2AriaLabel:mt,prev2Label:Nt,prevAriaLabel:sr,prevLabel:jr,setActiveStartDate:bi,showDoubleView:lr,view:Re,views:Ae}):null}var Tn=Array.isArray(he)?he:[he];return b.createElement("div",{className:xy(Xh,Ut&&Tn.length===1&&"".concat(Xh,"--selectRange"),lr&&"".concat(Xh,"--doubleView"),o),ref:E},st(),b.createElement("div",{className:"".concat(Xh,"__viewContainer"),onBlur:Ut?hs:void 0,onMouseLeave:Ut?hs:void 0},Nl(),lr?Nl(!0):null))}),BT=$.instanceOf(Date),zT=$.oneOfType([$.string,$.instanceOf(Date)]),WT=$.oneOfType([zT,Ste(zT)]);Y$.propTypes={activeStartDate:BT,allowPartialRange:$.bool,calendarType:I$,className:Am,defaultActiveStartDate:BT,defaultValue:WT,defaultView:Nm,formatDay:$.func,formatLongDate:$.func,formatMonth:$.func,formatMonthYear:$.func,formatShortWeekday:$.func,formatWeekday:$.func,formatYear:$.func,goToRangeStartOnSelect:$.bool,inputRef:bte,locale:$.string,maxDate:hS,maxDetail:$.oneOf(xu),minDate:pS,minDetail:$.oneOf(xu),navigationAriaLabel:$.string,navigationAriaLive:$.oneOf(["off","polite","assertive"]),navigationLabel:$.func,next2AriaLabel:$.string,next2Label:$.node,nextAriaLabel:$.string,nextLabel:$.node,onActiveStartDateChange:$.func,onChange:$.func,onClickDay:$.func,onClickDecade:$.func,onClickMonth:$.func,onClickWeekNumber:$.func,onClickYear:$.func,onDrillDown:$.func,onDrillUp:$.func,onViewChange:$.func,prev2AriaLabel:$.string,prev2Label:$.node,prevAriaLabel:$.string,prevLabel:$.node,returnValue:$.oneOf(["start","end","range"]),selectRange:$.bool,showDoubleView:$.bool,showFixedNumberOfWeeks:$.bool,showNavigation:$.bool,showNeighboringMonth:$.bool,showWeekNumbers:$.bool,tileClassName:$.oneOfType([$.func,Am]),tileContent:$.oneOfType([$.func,$.node]),tileDisabled:$.func,value:WT,view:Nm};const Qte=Y$,Xte=wt(function(){const{activityStore:{predicate:t,setPredicate:r}}=Ft();return _.jsxs(_.Fragment,{children:[_.jsxs(ba,{vertical:!0,size:"large",style:{width:"100%",marginTop:25},children:[_.jsx(qe,{icon:"filter",attached:!0,color:"teal",content:"Filters"}),_.jsx(ba.Item,{content:"All Activities",active:t.has("all"),onClick:()=>r("all","true")}),_.jsx(ba.Item,{content:"I'm going",active:t.has("isGoing"),onClick:()=>r("isGoing","true")}),_.jsx(ba.Item,{content:"I'm hosting",active:t.has("isHost"),onClick:()=>r("isHost","true")})]}),_.jsx(qe,{}),_.jsx(Qte,{onChange:n=>r("startDate",n),value:t.get("startDate")||new Date})]})});class Jte{constructor(t,r){Z(this,"data");Z(this,"pagination");this.data=t,this.pagination=r}}class l_{constructor(t=1,r=2){Z(this,"pageNumber");Z(this,"pageSize");this.pageNumber=t,this.pageSize=r}}class u_ extends x.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const r=this.props.getScrollParent&&this.props.getScrollParent();return r??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,r=window,n=this.getParentElement(t);let a;if(this.props.useWindow){const i=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:i.scrollTop;this.props.isReverse?a=o:a=this.calculateOffset(t,o)}else this.props.isReverse?a=n.scrollTop:a=t.scrollHeight-n.scrollTop-n.clientHeight;a{this.scrollComponent=m,c&&c(m)};const y=[r];return a&&(s?o?y.unshift(s):y.push(s):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),b.createElement(n,v,y)}}Z(u_,"propTypes",{children:$.node.isRequired,element:$.node,hasMore:$.bool,initialLoad:$.bool,isReverse:$.bool,loader:$.node,loadMore:$.func.isRequired,pageStart:$.number,ref:$.func,getScrollParent:$.func,threshold:$.number,useCapture:$.bool,useWindow:$.bool}),Z(u_,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});function HT(){return _.jsx(_.Fragment,{children:_.jsx(xr,{fluid:!0,style:{marginTop:25},children:_.jsxs(je.Group,{children:[_.jsx(je,{style:{minHeight:110},children:_.jsxs(xr,{children:[_.jsxs(xr.Header,{image:!0,children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]}),_.jsx(xr.Paragraph,{children:_.jsx(xr.Line,{})})]})}),_.jsx(je,{children:_.jsxs(xr,{children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]})}),_.jsx(je,{secondary:!0,style:{minHeight:70}}),_.jsx(je,{clearing:!0,children:_.jsx($e,{disabled:!0,color:"blue",floated:"right",content:"View"})})]})})})}const Zte=wt(function(){const{activityStore:t}=Ft(),{loadActivities:r,activityRegistry:n,setPagingParams:a,pagination:i}=t,[o,s]=x.useState(!1);function l(){s(!0),a(new l_(i.currentPage+1)),r().then(()=>s(!1))}return x.useEffect(()=>{n.size<=1&&r()},[r,n.size]),_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"10",children:t.loadingInitial&&n.size===0&&!o?_.jsxs(_.Fragment,{children:[_.jsx(HT,{}),_.jsx(HT,{})]}):_.jsx(u_,{pageStart:0,loadMore:l,hasMore:!o&&!!i&&i.currentPagen.setValue(i.value),onBlur:()=>n.setTouched(!0),placeholder:e.placeholder}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const ore=[{text:"Drinks",value:"drinks"},{text:"Culture",value:"culture"},{text:"Film",value:"film"},{text:"Food",value:"food"},{text:"Music",value:"music"},{text:"Travel",value:"travel"}];var K$={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a=0)&&(r[a]=e[a]);return r}function YT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cre(e,t,r){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(r):e.classList.contains(r)}function fre(e,t,r){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&cre(e,t,r))return!0;e=e.parentNode||e.host}return e}function dre(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var pre=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,r=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,r),window.removeEventListener("testPassiveEventSupport",n,r),t}};function hre(e){return e===void 0&&(e=0),function(){return++e}}var vre=hre(),f_,ev={},K0={},mre=["touchstart","touchmove"],gre="ignore-react-onclickoutside";function GT(e,t){var r={},n=mre.indexOf(t)!==-1;return n&&f_&&(r.passive=!e.props.preventDefault),r}function Iy(e,t){var r,n,a=e.displayName||e.name||"Component";return n=r=function(i){lre(o,i);function o(l){var u;return u=i.call(this,l)||this,u.__outsideClickHandler=function(c){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(c);return}var f=u.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(c);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(c);return}throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var c=u.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(c):typeof c.setClickOutsideRef=="function"?c.setClickOutsideRef():Fo.findDOMNode(c)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||K0[u._uid])){typeof f_>"u"&&(f_=pre()),K0[u._uid]=!0;var c=u.props.eventTypes;c.forEach||(c=[c]),ev[u._uid]=function(f){if(u.componentNode!==null&&(u.props.preventDefault&&f.preventDefault(),u.props.stopPropagation&&f.stopPropagation(),!(u.props.excludeScrollbar&&dre(f)))){var d=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;fre(d,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(f)}},c.forEach(function(f){document.addEventListener(f,ev[u._uid],GT(YT(u),f))})}},u.disableOnClickOutside=function(){delete K0[u._uid];var c=ev[u._uid];if(c&&typeof document<"u"){var f=u.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(d){return document.removeEventListener(d,c,GT(YT(u),d))}),delete ev[u._uid]}},u.getRef=function(c){return u.instanceRef=c},u._uid=vre(),u}var s=o.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var u=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(u),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+a+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var u=this.props;u.excludeScrollbar;var c=ure(u,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,x.createElement(e,c)},o}(x.Component),r.displayName="OnClickOutside("+a+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:gre,preventDefault:!1,stopPropagation:!1},r.getClass=function(){return e.getClass?e.getClass():e},n}var KT=Object.prototype.toString,q$=function(t){var r=KT.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&KT.call(t.callee)==="[object Function]"),n},q0,qT;function yre(){if(qT)return q0;qT=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=q$,a=Object.prototype.propertyIsEnumerable,i=!a.call({toString:null},"toString"),o=a.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",v=r.call(p)==="[object Function]",y=n(p),m=h&&r.call(p)==="[object String]",g=[];if(!h&&!v&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&v;if(m&&p.length>0&&!t.call(p,0))for(var w=0;w0)for(var C=0;C"u"||!Sr?Fe:Sr(Uint8Array),Bs={"%AggregateError%":typeof AggregateError>"u"?Fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Fe:ArrayBuffer,"%ArrayIteratorPrototype%":Ll&&Sr?Sr([][Symbol.iterator]()):Fe,"%AsyncFromSyncIteratorPrototype%":Fe,"%AsyncFunction%":Wl,"%AsyncGenerator%":Wl,"%AsyncGeneratorFunction%":Wl,"%AsyncIteratorPrototype%":Wl,"%Atomics%":typeof Atomics>"u"?Fe:Atomics,"%BigInt%":typeof BigInt>"u"?Fe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Fe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Fe:FinalizationRegistry,"%Function%":J$,"%GeneratorFunction%":Wl,"%Int8Array%":typeof Int8Array>"u"?Fe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Fe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ll&&Sr?Sr(Sr([][Symbol.iterator]())):Fe,"%JSON%":typeof JSON=="object"?JSON:Fe,"%Map%":typeof Map>"u"?Fe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ll||!Sr?Fe:Sr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Fe:Promise,"%Proxy%":typeof Proxy>"u"?Fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Fe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ll||!Sr?Fe:Sr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ll&&Sr?Sr(""[Symbol.iterator]()):Fe,"%Symbol%":Ll?Symbol:Fe,"%SyntaxError%":Cc,"%ThrowTypeError%":Rre,"%TypedArray%":Ire,"%TypeError%":Cu,"%Uint8Array%":typeof Uint8Array>"u"?Fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Fe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Fe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Fe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Fe:WeakSet};if(Sr)try{null.error}catch(e){var $re=Sr(Sr(e));Bs["%Error.prototype%"]=$re}var jre=function e(t){var r;if(t==="%AsyncFunction%")r=X0("async function () {}");else if(t==="%GeneratorFunction%")r=X0("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=X0("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Sr&&(r=Sr(a.prototype))}return Bs[t]=r,r},eD={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fh=wS,jm=Nre,Lre=fh.call(Function.call,Array.prototype.concat),Fre=fh.call(Function.apply,Array.prototype.splice),tD=fh.call(Function.call,String.prototype.replace),Lm=fh.call(Function.call,String.prototype.slice),Ure=fh.call(Function.call,RegExp.prototype.exec),Bre=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zre=/\\(\\)?/g,Wre=function(t){var r=Lm(t,0,1),n=Lm(t,-1);if(r==="%"&&n!=="%")throw new Cc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Cc("invalid intrinsic syntax, expected opening `%`");var a=[];return tD(t,Bre,function(i,o,s,l){a[a.length]=s?tD(l,zre,"$1"):o||i}),a},Hre=function(t,r){var n=t,a;if(jm(eD,n)&&(a=eD[n],n="%"+a[0]+"%"),jm(Bs,n)){var i=Bs[n];if(i===Wl&&(i=jre(n)),typeof i>"u"&&!r)throw new Cu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new Cc("intrinsic "+t+" does not exist!")},dh=function(t,r){if(typeof t!="string"||t.length===0)throw new Cu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Cu('"allowMissing" argument must be a boolean');if(Ure(/^%?[^%]*%?$/,t)===null)throw new Cc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wre(t),a=n.length>0?n[0]:"",i=Hre("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],Fre(n,Lre([0,1],u)));for(var c=1,f=!0;c=n.length){var v=Us(s,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[d]}else f=jm(s,d),s=s[d];f&&!l&&(Bs[o]=s)}}return s},Z$={exports:{}};(function(e){var t=wS,r=dh,n=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(a,n),o=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var d=i(t,a,arguments);if(o&&s){var p=o(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var u=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u})(Z$);var bS=Z$.exports,ej=dh,tj=bS,Vre=tj(ej("String.prototype.indexOf")),rj=function(t,r){var n=ej(t,!!r);return typeof n=="function"&&Vre(t,".prototype.")>-1?tj(n):n},Yre=yS(),Gre=rj,d_=Gre("Object.prototype.toString"),$y=function(t){return Yre&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:d_(t)==="[object Arguments]"},nj=function(t){return $y(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&d_(t)!=="[object Array]"&&d_(t.callee)==="[object Function]"},Kre=function(){return $y(arguments)}();$y.isLegacyArguments=nj;var qre=Kre?$y:nj,Qre=dh,p_=Qre("%Object.defineProperty%",!0),h_=function(){if(p_)try{return p_({},"a",{value:1}),!0}catch{return!1}return!1};h_.hasArrayLengthDefineBug=function(){if(!h_())return null;try{return p_([],"length",{value:1}).length!==1}catch{return!0}};var _S=h_,Z0,rD;function Xre(){if(rD)return Z0;rD=1;var e=dh,t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return Z0=t,Z0}var Jre=_S(),ES=dh,nD=Jre&&ES("%Object.defineProperty%",!0),Zre=ES("%SyntaxError%"),Fl=ES("%TypeError%"),aD=Xre(),aj=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Fl("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Fl("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Fl("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Fl("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Fl("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Fl("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!aD&&aD(t,r);if(nD)nD(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new Zre("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ene=Q$,tne=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",rne=Object.prototype.toString,nne=Array.prototype.concat,iD=aj,ane=function(e){return typeof e=="function"&&rne.call(e)==="[object Function]"},ij=_S(),ine=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!ane(n)||!n())return}ij?iD(e,t,r,!0):iD(e,t,r)},oj=function(e,t){var r=arguments.length>2?arguments[2]:{},n=ene(t);tne&&(n=nne.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a2&&!!arguments[2];return(!n||Ene)&&(_ne?sD(t,"name",r,!0,!0):sD(t,"name",r)),t},Cne=xne,One=Object,Tne=TypeError,hj=Cne(function(){if(this!=null&&this!==One(this))throw new Tne("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Dne=hj,Pne=ph.supportsDescriptors,kne=Object.getOwnPropertyDescriptor,vj=function(){if(Pne&&/a/mig.flags==="gim"){var t=kne(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return Dne},Ane=ph.supportsDescriptors,Nne=vj,Rne=Object.getOwnPropertyDescriptor,Mne=Object.defineProperty,Ine=TypeError,lD=Object.getPrototypeOf,$ne=/a/,jne=function(){if(!Ane||!lD)throw new Ine("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Nne(),r=lD($ne),n=Rne(r,"flags");return(!n||n.get!==t)&&Mne(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},Lne=ph,Fne=bS,Une=hj,mj=vj,Bne=jne,gj=Fne(mj());Lne(gj,{getPolyfill:mj,implementation:Une,shim:Bne});var zne=gj,Wne=Date.prototype.getDay,Hne=function(t){try{return Wne.call(t),!0}catch{return!1}},Vne=Object.prototype.toString,Yne="[object Date]",Gne=yS(),Kne=function(t){return typeof t!="object"||t===null?!1:Gne?Hne(t):Vne.call(t)===Yne},uD=Q$,cD=qre,fD=hne,dD=yne,pD=zne,hD=Kne,vD=Date.prototype.getTime;function yj(e,t,r){var n=r||{};return(n.strict?fD(e,t):e===t)?!0:!e||!t||typeof e!="object"&&typeof t!="object"?n.strict?fD(e,t):e==t:qne(e,t,n)}function mD(e){return e==null}function gD(e){return!(!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number")}function qne(e,t,r){var n,a;if(typeof e!=typeof t||mD(e)||mD(t)||e.prototype!==t.prototype||cD(e)!==cD(t))return!1;var i=dD(e),o=dD(t);if(i!==o)return!1;if(i||o)return e.source===t.source&&pD(e)===pD(t);if(hD(e)&&hD(t))return vD.call(e)===vD.call(t);var s=gD(e),l=gD(t);if(s!==l)return!1;if(s||l){if(e.length!==t.length)return!1;for(n=0;n=0;n--)if(u[n]!=c[n])return!1;for(n=u.length-1;n>=0;n--)if(a=u[n],!yj(e[a],t[a],r))return!1;return!0}var Qne=yj;const Xne=Xr(Qne);/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1 + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */var hh=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Jne=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();function Zne(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function eae(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Jne))}}var tae=hh&&window.Promise,rae=tae?Zne:eae;function wj(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Al(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function SS(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function vh(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Al(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+n)?e:vh(SS(e))}function bj(e){return e&&e.referenceNode?e.referenceNode:e}var yD=hh&&!!(window.MSInputMethodContext&&document.documentMode),wD=hh&&/MSIE 10/.test(navigator.userAgent);function Xc(e){return e===11?yD:e===10?wD:yD||wD}function Oc(e){if(!e)return document.documentElement;for(var t=Xc(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Al(r,"position")==="static"?Oc(r):r}function nae(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Oc(e.firstElementChild)===e}function y_(e){return e.parentNode!==null?y_(e.parentNode):e}function Fm(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,a=r?t:e,i=document.createRange();i.setStart(n,0),i.setEnd(a,0);var o=i.commonAncestorContainer;if(e!==o&&t!==o||n.contains(a))return nae(o)?o:Oc(o);var s=y_(e);return s.host?Fm(s.host,t):Fm(e,y_(t).host)}function Tc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[r]}return e[r]}function aae(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Tc(t,"top"),a=Tc(t,"left"),i=r?-1:1;return e.top+=n*i,e.bottom+=n*i,e.left+=a*i,e.right+=a*i,e}function bD(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function _D(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Xc(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function _j(e){var t=e.body,r=e.documentElement,n=Xc(10)&&getComputedStyle(r);return{height:_D("Height",t,r,n),width:_D("Width",t,r,n)}}var iae=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},oae=function(){function e(t,r){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!1,n=Xc(10),a=t.nodeName==="HTML",i=w_(e),o=w_(t),s=vh(e),l=Al(t),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);r&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=ns({top:i.top-o.top-u,left:i.left-o.left-c,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!n&&a){var d=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(n&&!r?t.contains(s):t===s&&s.nodeName!=="BODY")&&(f=aae(f,t)),f}function sae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=xS(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),i=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:Tc(r),s=t?0:Tc(r,"left"),l={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:a,height:i};return ns(l)}function Ej(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Al(e,"position")==="fixed")return!0;var r=SS(e);return r?Ej(r):!1}function Sj(e){if(!e||!e.parentElement||Xc())return document.documentElement;for(var t=e.parentElement;t&&Al(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function CS(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},o=a?Sj(e):Fm(e,bj(t));if(n==="viewport")i=sae(o,a);else{var s=void 0;n==="scrollParent"?(s=vh(SS(t)),s.nodeName==="BODY"&&(s=e.ownerDocument.documentElement)):n==="window"?s=e.ownerDocument.documentElement:s=n;var l=xS(s,o,a);if(s.nodeName==="HTML"&&!Ej(o)){var u=_j(e.ownerDocument),c=u.height,f=u.width;i.top+=l.top-l.marginTop,i.bottom=c+l.top,i.left+=l.left-l.marginLeft,i.right=f+l.left}else i=l}r=r||0;var d=typeof r=="number";return i.left+=d?r:r.left||0,i.top+=d?r:r.top||0,i.right-=d?r:r.right||0,i.bottom-=d?r:r.bottom||0,i}function lae(e){var t=e.width,r=e.height;return t*r}function xj(e,t,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=CS(r,n,i,a),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(d){return ra({key:d},s[d],{area:lae(s[d])})}).sort(function(d,p){return p.area-d.area}),u=l.filter(function(d){var p=d.width,h=d.height;return p>=r.clientWidth&&h>=r.clientHeight}),c=u.length>0?u[0].key:l[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function Cj(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=n?Sj(t):Fm(t,bj(r));return xS(r,a,n)}function Oj(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+n};return i}function Um(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function Tj(e,t,r){r=r.split("-")[0];var n=Oj(e),a={width:n.width,height:n.height},i=["right","left"].indexOf(r)!==-1,o=i?"top":"left",s=i?"left":"top",l=i?"height":"width",u=i?"width":"height";return a[o]=t[o]+t[l]/2-n[l]/2,r===s?a[s]=t[s]-n[u]:a[s]=t[Um(s)],a}function mh(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function uae(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var n=mh(e,function(a){return a[t]===r});return e.indexOf(n)}function Dj(e,t,r){var n=r===void 0?e:e.slice(0,uae(e,"name",r));return n.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&wj(i)&&(t.offsets.popper=ns(t.offsets.popper),t.offsets.reference=ns(t.offsets.reference),t=i(t,a))}),t}function cae(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Cj(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=xj(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Tj(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Dj(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Pj(e,t){return e.some(function(r){var n=r.name,a=r.enabled;return a&&n===t})}function OS(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;no[p]&&(e.offsets.popper[f]+=s[f]+h-o[p]),e.offsets.popper=ns(e.offsets.popper);var v=s[f]+s[u]/2-h/2,y=Al(e.instance.popper),m=parseFloat(y["margin"+c]),g=parseFloat(y["border"+c+"Width"]),E=v-e.offsets.popper[f]-m-g;return E=Math.max(Math.min(o[u]-h,E),0),e.arrowElement=n,e.offsets.arrow=(r={},Dc(r,f,Math.round(E)),Dc(r,d,""),r),e}function Sae(e){return e==="end"?"start":e==="start"?"end":e}var Rj=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],tw=Rj.slice(3);function ED(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=tw.indexOf(e),n=tw.slice(r+1).concat(tw.slice(0,r));return t?n.reverse():n}var rw={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function xae(e,t){if(Pj(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=CS(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],a=Um(n),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case rw.FLIP:o=[n,a];break;case rw.CLOCKWISE:o=ED(n);break;case rw.COUNTERCLOCKWISE:o=ED(n,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(n!==s||o.length===l+1)return e;n=e.placement.split("-")[0],a=Um(n);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=n==="left"&&f(u.right)>f(c.left)||n==="right"&&f(u.left)f(c.top)||n==="bottom"&&f(u.top)f(r.right),v=f(u.top)f(r.bottom),m=n==="left"&&p||n==="right"&&h||n==="top"&&v||n==="bottom"&&y,g=["top","bottom"].indexOf(n)!==-1,E=!!t.flipVariations&&(g&&i==="start"&&p||g&&i==="end"&&h||!g&&i==="start"&&v||!g&&i==="end"&&y),w=!!t.flipVariationsByContent&&(g&&i==="start"&&h||g&&i==="end"&&p||!g&&i==="start"&&y||!g&&i==="end"&&v),C=E||w;(d||m||C)&&(e.flipped=!0,(d||m)&&(n=o[l+1]),C&&(i=Sae(i)),e.placement=n+(i?"-"+i:""),e.offsets.popper=ra({},e.offsets.popper,Tj(e.instance.popper,e.offsets.reference,e.placement)),e=Dj(e.instance.modifiers,e,"flip"))}),e}function Cae(e){var t=e.offsets,r=t.popper,n=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=["top","bottom"].indexOf(a)!==-1,s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return r[s]i(n[s])&&(e.offsets.popper[l]=i(n[s])),e}function Oae(e,t,r,n){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(o.indexOf("%")===0){var s=void 0;switch(o){case"%p":s=r;break;case"%":case"%r":default:s=n}var l=ns(s);return l[t]/100*i}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*i}else return i}function Tae(e,t,r,n){var a=[0,0],i=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(c){return c.trim()}),s=o.indexOf(mh(o,function(c){return c.search(/,|\s/)!==-1}));o[s]&&o[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=s!==-1?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return u=u.map(function(c,f){var d=(f===1?!i:i)?"height":"width",p=!1;return c.reduce(function(h,v){return h[h.length-1]===""&&["+","-"].indexOf(v)!==-1?(h[h.length-1]=v,p=!0,h):p?(h[h.length-1]+=v,p=!1,h):h.concat(v)},[]).map(function(h){return Oae(h,d,t,r)})}),u.forEach(function(c,f){c.forEach(function(d,p){TS(d)&&(a[f]+=d*(c[p-1]==="-"?-1:1))})}),a}function Dae(e,t){var r=t.offset,n=e.placement,a=e.offsets,i=a.popper,o=a.reference,s=n.split("-")[0],l=void 0;return TS(+r)?l=[+r,0]:l=Tae(r,i,o,s),s==="left"?(i.top+=l[0],i.left-=l[1]):s==="right"?(i.top+=l[0],i.left+=l[1]):s==="top"?(i.left+=l[0],i.top-=l[1]):s==="bottom"&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e}function Pae(e,t){var r=t.boundariesElement||Oc(e.instance.popper);e.instance.reference===r&&(r=Oc(r));var n=OS("transform"),a=e.instance.popper.style,i=a.top,o=a.left,s=a[n];a.top="",a.left="",a[n]="";var l=CS(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=i,a.left=o,a[n]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]l[p]&&!t.escapeWithReference&&(v=Math.min(c[h],l[p]-(p==="right"?c.width:c.height))),Dc({},h,v)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=ra({},c,f[p](d))}),e.offsets.popper=c,e}function kae(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var a=e.offsets,i=a.reference,o=a.popper,s=["bottom","top"].indexOf(r)!==-1,l=s?"left":"top",u=s?"width":"height",c={start:Dc({},l,i[l]),end:Dc({},l,i[l]+i[u]-o[u])};e.offsets.popper=ra({},o,c[n])}return e}function Aae(e){if(!Nj(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=mh(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottomr.right||t.top>r.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};iae(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=rae(this.update.bind(this)),this.options=ra({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ra({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){n.options.modifiers[o]=ra({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return ra({name:o},n.options.modifiers[o])}).sort(function(o,s){return o.order-s.order}),this.modifiers.forEach(function(o){o.enabled&&wj(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return oae(e,[{key:"update",value:function(){return cae.call(this)}},{key:"destroy",value:function(){return fae.call(this)}},{key:"enableEventListeners",value:function(){return pae.call(this)}},{key:"disableEventListeners",value:function(){return vae.call(this)}}]),e}();jy.Utils=(typeof window<"u"?window:global).PopperUtils;jy.placements=Rj;jy.Defaults=Mae;const Mj=jy;var __={exports:{}},E_={exports:{}},SD="__global_unique_id__",Iae=function(){return et[SD]=(et[SD]||0)+1};(function(e,t){t.__esModule=!0;var r=x;l(r);var n=LR,a=l(n),i=Iae,o=l(i),s=uI;l(s);function l(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function c(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function f(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var d=1073741823;function p(m,g){return m===g?m!==0||1/m===1/g:m!==m&&g!==g}function h(m){var g=[];return{on:function(w){g.push(w)},off:function(w){g=g.filter(function(C){return C!==w})},get:function(){return m},set:function(w,C){m=w,g.forEach(function(S){return S(m,C)})}}}function v(m){return Array.isArray(m)?m[0]:m}function y(m,g){var E,w,C="__create-react-context-"+(0,o.default)()+"__",S=function(D){f(N,D);function N(){var R,j,U;u(this,N);for(var Q=arguments.length,X=Array(Q),J=0;J1?r-1:0),a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,n=S_(e);if(t){var a=S_(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Hae(this,r)}}function TD(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function DD(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Vae={p:DD,P:function(e,t){var r,n=e.match(/(P+)(p+)?/),a=n[1],i=n[2];if(!i)return TD(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",TD(a,t)).replace("{{time}}",DD(i,t))}},Yae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Ar(e){var t=e?typeof e=="string"||e instanceof String?vZ(e):fe(e):new Date;return mo(t)?t:null}function Gae(e,t,r,n){var a=null,i=Hs(r)||Ws(),o=!0;return Array.isArray(t)?(t.forEach(function(s){var l=z0(e,s,new Date,{locale:i});n&&(o=mo(l)&&e===ci(l,s,{awareOfUnicodeTokens:!0})),mo(l)&&o&&(a=l)}),a):(a=z0(e,t,new Date,{locale:i}),n?o=mo(a)&&e===ci(a,t,{awareOfUnicodeTokens:!0}):mo(a)||(t=t.match(Yae).map(function(s){var l=s[0];return l==="p"||l==="P"?i?(0,Vae[l])(s,i.formatLong):l:s}).join(""),e.length>0&&(a=z0(e,t.slice(0,e.length),new Date)),mo(a)||(a=new Date(e))),mo(a)&&o?a:null)}function mo(e){return VI(e)&&Qi(e,new Date("1/1/1000"))}function wr(e,t,r){if(r==="en")return ci(e,t,{awareOfUnicodeTokens:!0});var n=Hs(r);return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),!n&&Ws()&&Hs(Ws())&&(n=Hs(Ws())),ci(e,t,{locale:n||null,awareOfUnicodeTokens:!0})}function PD(e,t){var r=t.hour,n=r===void 0?0:r,a=t.minute,i=a===void 0?0:a,o=t.second;return ad(id(AZ(e,o===void 0?0:o),i),n)}function Kae(e,t){var r=t&&Hs(t)||Ws()&&Hs(Ws());return pJ(e,r?{locale:r}:null)}function qae(e,t){return wr(e,"ddd",t)}function Qae(e){return cl(e)}function DS(e,t){var r=Hs(t||Ws());return yp(e,{locale:r})}function zs(e){return XQ(e)}function $f(e){return JQ(e)}function Xae(e){return Kb(e)}function Wj(e,t){return e&&t?pZ(e,t):!e&&!t}function So(e,t){return e&&t?fZ(e,t):!e&&!t}function zm(e,t){return e&&t?dZ(e,t):!e&&!t}function hn(e,t){return e&&t?WQ(e,t):!e&&!t}function Ou(e,t){return e&&t?hJ(e,t):!e&&!t}function Pv(e,t,r){var n,a=cl(t),i=YI(r);try{n=a$(e,{start:a,end:i})}catch{n=!1}return n}function Ws(){return(typeof window<"u"?window:global).__localeId__}function Hs(e){if(typeof e=="string"){var t=typeof window<"u"?window:global;return t.__localeData__?t.__localeData__[e]:null}return e}function Hj(e,t){return wr(Ya(Ar(),e),"LLLL",t)}function Vj(e,t){return wr(Ya(Ar(),e),"LLL",t)}function Jae(e,t){return wr(Mf(Ar(),e),"QQQ",t)}function PS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return hn(e,s)})||i&&!i.some(function(s){return hn(e,s)})||o&&!o(Ar(e))||!1}function Yj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeDates;return r&&r.some(function(n){return hn(e,n)})||!1}function Zae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return So(e,s)})||i&&!i.some(function(s){return So(e,s)})||o&&!o(Ar(e))||!1}function eie(e,t,r,n){var a=xt(e),i=Sa(e),o=xt(t),s=Sa(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function tie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return zm(e,s)})||i&&!i.some(function(s){return zm(e,s)})||o&&!o(Ar(e))||!1}function rie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=new Date(e,0,1);return Ly(a,{minDate:r,maxDate:n})||!1}function nie(e,t,r,n){var a=xt(e),i=Gb(e),o=xt(t),s=Gb(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function Ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate;return r&&xm(e,r)<0||n&&xm(e,n)>0}function kD(e,t){return t.some(function(r){return Pa(r)===Pa(e)&&ka(r)===ka(e)})}function AD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeTimes,n=t.includeTimes,a=t.filterTime;return r&&kD(e,r)||n&&!kD(e,n)||a&&!a(e)||!1}function ND(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var a,i=Ar(),o=ad(id(i,ka(e)),Pa(e)),s=ad(id(i,ka(r)),Pa(r)),l=ad(id(i,ka(n)),Pa(n));try{a=!a$(o,{start:s,end:l})}catch{a=!1}return a}function RD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=_p(e,1);return r&&bp(r,a)>0||n&&n.every(function(i){return bp(i,a)>0})||!1}function MD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=qi(e,1);return r&&bp(a,r)>0||n&&n.every(function(i){return bp(a,i)>0})||!1}function ID(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=km(e,1);return r&&Cm(r,a)>0||n&&n.every(function(i){return Cm(i,a)>0})||!1}function $D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=wp(e,1);return r&&Cm(a,r)>0||n&&n.every(function(i){return Cm(a,i)>0})||!1}function Gj(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)>=0});return mT(n)}return r?mT(r):t}function Kj(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)<=0});return vT(n)}return r?vT(r):t}function jD(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",r=new Map,n=0,a=e.length;n1&&arguments[1]!==void 0?arguments[1]:12,r=Math.ceil(xt(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function iie(e,t,r,n){for(var a=[],i=0;i<2*t+1;i++){var o=e+t-i,s=!0;r&&(s=xt(r)<=o),n&&s&&(s=xt(n)>=o),s&&a.push(o)}return a}var oie=Iy(function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;Mr(this,r),k(A(a=t.call(this,n)),"renderOptions",function(){var l=a.props.year,u=a.state.yearsList.map(function(d){return b.createElement("div",{className:l===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:a.onChange.bind(A(a),d)},l===d?b.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=a.props.minDate?xt(a.props.minDate):null,f=a.props.maxDate?xt(a.props.maxDate):null;return f&&a.state.yearsList.find(function(d){return d===f})||u.unshift(b.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),c&&a.state.yearsList.find(function(d){return d===c})||u.push(b.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u}),k(A(a),"onChange",function(l){a.props.onChange(l)}),k(A(a),"handleClickOutside",function(){a.props.onCancel()}),k(A(a),"shiftYears",function(l){var u=a.state.yearsList.map(function(c){return c+l});a.setState({yearsList:u})}),k(A(a),"incrementYears",function(){return a.shiftYears(1)}),k(A(a),"decrementYears",function(){return a.shiftYears(-1)});var i=n.yearDropdownItemNumber,o=n.scrollableYearDropdown,s=i||(o?10:5);return a.state={yearsList:iie(a.props.year,s,a.props.minDate,a.props.maxDate)},a}return or(r,[{key:"render",value:function(){var n=Sn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return b.createElement("div",{className:n},this.renderOptions())}}]),r}()),sie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},l=!1;n.getTabIndex()===0&&!s.isInputFocused&&n.isSameDay(n.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||n.props.inline||(l=!0),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&n.dayEl.current.focus({preventScroll:!0})}),k(A(n),"renderDayContents",function(){return n.isOutsideMonth()&&(n.props.monthShowsDuplicateDaysEnd&&Kh(n.props.day)<10||n.props.monthShowsDuplicateDaysStart&&Kh(n.props.day)>20)?null:n.props.renderDayContents?n.props.renderDayContents(Kh(n.props.day),n.props.day):Kh(n.props.day)}),k(A(n),"render",function(){return b.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.handleMouseEnter,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"button","aria-disabled":n.isDisabled()},n.renderDayContents())}),n}return or(r,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(n){this.handleFocusDay(n)}}]),r}(),hie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=6,p=!l&&!n.isWeekInMonth(u);if(d||p){if(!n.props.peekNextMonth)break;f=!0}}return s}),k(A(n),"onMonthClick",function(s,l){n.handleDayClick(zs(Ya(n.props.day,l)),s)}),k(A(n),"handleMonthNavigation",function(s,l){n.isDisabled(l)||n.isExcluded(l)||(n.props.setPreSelection(l),n.MONTH_REFS[s].current&&n.MONTH_REFS[s].current.focus())}),k(A(n),"onMonthKeyDown",function(s,l){var u=s.key;if(!n.props.disabledKeyboardNavigation)switch(u){case"Enter":n.onMonthClick(s,l),n.props.setPreSelection(n.props.selected);break;case"ArrowRight":n.handleMonthNavigation(l===11?0:l+1,qi(n.props.preSelection,1));break;case"ArrowLeft":n.handleMonthNavigation(l===0?11:l-1,_p(n.props.preSelection,1))}}),k(A(n),"onQuarterClick",function(s,l){n.handleDayClick(Xae(Mf(n.props.day,l)),s)}),k(A(n),"getMonthClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate,v=l.preSelection;return Sn("react-datepicker__month-text","react-datepicker__month-".concat(s),{"react-datepicker__month--disabled":(p||h)&&Zae(Ya(u,s),n.props),"react-datepicker__month--selected":Sa(u)===s&&xt(u)===xt(d),"react-datepicker__month-text--keyboard-selected":Sa(v)===s,"react-datepicker__month--in-range":eie(c,f,s,u),"react-datepicker__month--range-start":n.isRangeStartMonth(s),"react-datepicker__month--range-end":n.isRangeEndMonth(s)})}),k(A(n),"getTabIndex",function(s){var l=Sa(n.props.preSelection);return n.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),k(A(n),"getAriaLabel",function(s){var l=n.props,u=l.ariaLabelPrefix,c=u===void 0?"Choose":u,f=l.disabledDayAriaLabelPrefix,d=f===void 0?"Not available":f,p=l.day,h=Ya(p,s),v=n.isDisabled(h)||n.isExcluded(h)?d:c;return"".concat(v," ").concat(wr(h,"MMMM yyyy"))}),k(A(n),"getQuarterClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate;return Sn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter--disabled":(p||h)&&tie(Mf(u,s),n.props),"react-datepicker__quarter--selected":Gb(u)===s&&xt(u)===xt(d),"react-datepicker__quarter--in-range":nie(c,f,s,u),"react-datepicker__quarter--range-start":n.isRangeStartQuarter(s),"react-datepicker__quarter--range-end":n.isRangeEndQuarter(s)})}),k(A(n),"renderMonths",function(){var s=n.props,l=s.showFullMonthYearPicker,u=s.showTwoColumnMonthYearPicker,c=s.locale;return(u?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(f,d){return b.createElement("div",{className:"react-datepicker__month-wrapper",key:d},f.map(function(p,h){return b.createElement("div",{ref:n.MONTH_REFS[p],key:h,onClick:function(v){n.onMonthClick(v,p)},onKeyDown:function(v){n.onMonthKeyDown(v,p)},tabIndex:n.getTabIndex(p),className:n.getMonthClassNames(p),role:"button","aria-label":n.getAriaLabel(p)},l?Hj(p,c):Vj(p,c))}))})}),k(A(n),"renderQuarters",function(){return b.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(s,l){return b.createElement("div",{key:l,onClick:function(u){n.onQuarterClick(u,s)},className:n.getQuarterClassNames(s)},Jae(s,n.props.locale))}))}),k(A(n),"getClassNames",function(){var s=n.props,l=s.day,u=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,d=s.showMonthYearPicker,p=s.showQuarterYearPicker,h=s.monthClassName,v=h?h(l):void 0;return Sn("react-datepicker__month",v,{"react-datepicker__month--selecting-range":u&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),n}return or(r,[{key:"render",value:function(){var n=this.props,a=n.showMonthYearPicker,i=n.showQuarterYearPicker,o=n.day,s=n.ariaLabelPrefix,l=s===void 0?"month ":s;return b.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(wr(o,"yyyy-MM"))},a?this.renderMonths():i?this.renderQuarters():this.renderWeeks())}}]),r}(),qj=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},s=(o.className||"").split(/\s+/);return bie.some(function(l){return s.indexOf(l)>=0})})(i.target)&&a.props.onDropdownFocus()}),k(A(a),"getDateInView",function(){var i=a.props,o=i.preSelection,s=i.selected,l=i.openToDate,u=Gj(a.props),c=Kj(a.props),f=Ar(),d=l||s||o;return d||(u&&Ls(f,u)?u:c&&Qi(f,c)?c:f)}),k(A(a),"increaseMonth",function(){a.setState(function(i){var o=i.date;return{date:qi(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"decreaseMonth",function(){a.setState(function(i){var o=i.date;return{date:_p(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"handleDayClick",function(i,o,s){a.props.onSelect(i,o,s),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleDayMouseEnter",function(i){a.setState({selectingDate:i}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(i)}),k(A(a),"handleMonthMouseLeave",function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()}),k(A(a),"handleYearChange",function(i){a.props.onYearChange&&a.props.onYearChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthChange",function(i){a.props.onMonthChange&&a.props.onMonthChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthYearChange",function(i){a.handleYearChange(i),a.handleMonthChange(i)}),k(A(a),"changeYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(s,i)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"changeMonth",function(i){a.setState(function(o){var s=o.date;return{date:Ya(s,i)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"changeMonthYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(Ya(s,Sa(i)),xt(i))}},function(){return a.handleMonthYearChange(a.state.date)})}),k(A(a),"header",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=DS(i,a.props.locale),s=[];return a.props.showWeekNumbers&&s.push(b.createElement("div",{key:"W",className:"react-datepicker__day-name"},a.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(l){var u=Kc(o,l),c=a.formatWeekday(u,a.props.locale),f=a.props.weekDayClassName?a.props.weekDayClassName(u):void 0;return b.createElement("div",{key:l,className:Sn("react-datepicker__day-name",f)},c)}))}),k(A(a),"formatWeekday",function(i,o){return a.props.formatWeekDay?function(s,l,u){return l(wr(s,"EEEE",u))}(i,a.props.formatWeekDay,o):a.props.useWeekdaysShort?function(s,l){return wr(s,"EEE",l)}(i,o):function(s,l){return wr(s,"EEEEEE",l)}(i,o)}),k(A(a),"decreaseYear",function(){a.setState(function(i){var o=i.date;return{date:km(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderPreviousButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=ID(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.minDate,m=v.yearItemNumber,g=m===void 0?12:m,E=$f(km(h,g)),w=kv(E,g),C=w.endPeriod,S=y&&xt(y);return S&&S>C||!1}(a.state.date,a.props);break;default:i=RD(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!i)&&!a.props.showTimeSelectOnly){var o=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(s=a.decreaseYear),i&&a.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--previous--disabled"),s=null);var l=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,u=a.props,c=u.previousMonthAriaLabel,f=c===void 0?"Previous Month":c,d=u.previousYearAriaLabel,p=d===void 0?"Previous Year":d;return b.createElement("button",{type:"button",className:o.join(" "),onClick:s,"aria-label":l?p:f},l?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel)}}}),k(A(a),"increaseYear",function(){a.setState(function(i){var o=i.date;return{date:wp(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderNextButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=$D(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.maxDate,m=v.yearItemNumber,g=m===void 0?12:m,E=wp(h,g),w=kv(E,g),C=w.startPeriod,S=y&&xt(y);return S&&S0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=["react-datepicker__current-month"];return a.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),a.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),a.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),b.createElement("div",{className:o.join(" ")},wr(i,a.props.dateFormat,a.props.locale))}),k(A(a),"renderYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showYearDropdown&&!i)return b.createElement(sie,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:xt(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})}),k(A(a),"renderMonthDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthDropdown&&!i)return b.createElement(uie,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:Sa(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})}),k(A(a),"renderMonthYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthYearDropdown&&!i)return b.createElement(die,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})}),k(A(a),"renderTodayButton",function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return b.createElement("div",{className:"react-datepicker__today-button",onClick:function(i){return a.props.onSelect(cl(Ar()),i)}},a.props.todayButton)}),k(A(a),"renderDefaultHeader",function(i){var o=i.monthDate,s=i.i;return b.createElement("div",{className:"react-datepicker__header ".concat(a.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},a.renderCurrentMonth(o),b.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(s!==0),a.renderMonthYearDropdown(s!==0),a.renderYearDropdown(s!==0)),b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderCustomHeader",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.monthDate,s=i.i;if(s!==0&&s!==void 0)return null;var l=RD(a.state.date,a.props),u=MD(a.state.date,a.props),c=ID(a.state.date,a.props),f=$D(a.state.date,a.props),d=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return b.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(OD(OD({},a.state),{},{changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:u,prevYearButtonDisabled:c,nextYearButtonDisabled:f})),d&&b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderYearHeader",function(){var i=a.state.date,o=a.props,s=o.showYearPicker,l=kv(i,o.yearItemNumber),u=l.startPeriod,c=l.endPeriod;return b.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(u," - ").concat(c):xt(i))}),k(A(a),"renderHeader",function(i){switch(!0){case a.props.renderCustomHeader!==void 0:return a.renderCustomHeader(i);case(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker):return a.renderYearHeader(i);default:return a.renderDefaultHeader(i)}}),k(A(a),"renderMonths",function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var i=[],o=a.props.showPreviousMonths?a.props.monthsShown-1:0,s=_p(a.state.date,o),l=0;l0;i.push(b.createElement("div",{key:f,ref:function(h){a.monthContainer=h},className:"react-datepicker__month-container"},a.renderHeader({monthDate:c,i:l}),b.createElement(mie,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,onChange:a.changeMonthYear,day:c,dayClassName:a.props.dayClassName,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,inline:a.props.inline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:d,monthShowsDuplicateDaysStart:p})))}return i}}),k(A(a),"renderYears",function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?b.createElement("div",{className:"react-datepicker__year--container"},a.renderHeader(),b.createElement(gie,Tp({onDayClick:a.handleDayClick,date:a.state.date},a.props))):void 0}),k(A(a),"renderTimeSection",function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return b.createElement(qj,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,showTimeSelectOnly:a.props.showTimeSelectOnly})}),k(A(a),"renderInputTimeSection",function(){var i=new Date(a.props.selected),o=mo(i)&&a.props.selected?"".concat(LD(i.getHours()),":").concat(LD(i.getMinutes())):"";if(a.props.showTimeInput)return b.createElement(yie,{date:i,timeString:o,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})}),a.containerRef=b.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null},a}return or(r,null,[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),or(r,[{key:"componentDidMount",value:function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=void n.setState({monthContainer:n.monthContainer}))}},{key:"componentDidUpdate",value:function(n){this.props.preSelection&&!hn(this.props.preSelection,n.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!hn(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var n=this.props.container||wie;return b.createElement("div",{ref:this.containerRef},b.createElement(n,{className:Sn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}]),r}(),Eie=function(e){return!e.disabled&&e.tabIndex!==-1},Sie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getTabChildren",function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Eie)}),k(A(a),"handleFocusStart",function(i){var o=a.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),k(A(a),"handleFocusEnd",function(i){var o=a.getTabChildren();o&&o.length>1&&o[0].focus()}),a.tabLoopRef=b.createRef(),a}return or(r,null,[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),or(r,[{key:"render",value:function(){return this.props.enableTabLoop?b.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},b.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,b.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}]),r}(),xie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),(a=t.call(this,n)).el=document.createElement("div"),a}return or(r,[{key:"componentDidMount",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return nU.createPortal(this.props.children,this.el)}}]),r}(),Cie=function(e){Ir(r,b.Component);var t=$r(r);function r(){return Mr(this,r),t.apply(this,arguments)}return or(r,[{key:"render",value:function(){var n,a=this.props,i=a.className,o=a.wrapperClassName,s=a.hidePopper,l=a.popperComponent,u=a.popperModifiers,c=a.popperPlacement,f=a.popperProps,d=a.targetComponent,p=a.enableTabLoop,h=a.popperOnKeyDown,v=a.portalId;if(!s){var y=Sn("react-datepicker-popper",i);n=b.createElement(Bae,Tp({modifiers:u,placement:c},f),function(g){var E=g.ref,w=g.style,C=g.placement,S=g.arrowProps;return b.createElement(Sie,{enableTabLoop:p},b.createElement("div",Tp({ref:E,style:w},{className:y,"data-placement":C,onKeyDown:h}),b.cloneElement(l,{arrowProps:S})))})}this.props.popperContainer&&(n=b.createElement(this.props.popperContainer,{},n)),v&&!s&&(n=b.createElement(xie,{portalId:v},n));var m=Sn("react-datepicker-wrapper",o);return b.createElement(Lae,{className:"react-datepicker-manager"},b.createElement(Wae,null,function(g){var E=g.ref;return b.createElement("div",{ref:E,className:m},d)}),n)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),r}(),Oie=Iy(_ie),Tie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getPreSelection",function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:Ar()}),k(A(a),"calcInitialState",function(){var i=a.getPreSelection(),o=Gj(a.props),s=Kj(a.props),l=o&&Ls(i,o)?o:s&&Qi(i,s)?s:i;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:a.props.selected?a.props.selected:l,highlightDates:jD(a.props.highlightDates),focused:!1}}),k(A(a),"clearPreventFocusTimeout",function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)}),k(A(a),"setFocus",function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})}),k(A(a),"setBlur",function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()}),k(A(a),"setOpen",function(i){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.setState({open:i,preSelection:i&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:nw},function(){i||a.setState(function(s){return{focused:!!o&&s.focused}},function(){!o&&a.setBlur(),a.setState({inputValue:null})})})}),k(A(a),"inputOk",function(){return XE(a.state.preSelection)}),k(A(a),"isCalendarOpen",function(){return a.props.open===void 0?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open}),k(A(a),"handleFocus",function(i){a.state.preventFocus||(a.props.onFocus(i),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})}),k(A(a),"cancelFocusInput",function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null}),k(A(a),"deferFocusInput",function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout(function(){return a.setFocus()},1)}),k(A(a),"handleDropdownFocus",function(){a.cancelFocusInput()}),k(A(a),"handleBlur",function(i){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(i),a.setState({focused:!1})}),k(A(a),"handleCalendarClickOutside",function(i){a.props.inline||a.setOpen(!1),a.props.onClickOutside(i),a.props.withPortal&&i.preventDefault()}),k(A(a),"handleChange",function(){for(var i=arguments.length,o=new Array(i),s=0;sn.setValue(a)}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const FD=wt(function(){const{activityStore:t}=Ft(),{createActivity:r,updateActivity:n,loadActivity:a,loadingInitial:i}=t,{id:o}=eE(),s=Z1(),[l,u]=x.useState(new lC),c=ih({title:Pn().required("The activity title is required"),description:Pn().required("The activity description is required"),category:Pn().required(),date:Pn().required("date is required"),venue:Pn().required(),city:Pn().required()});x.useEffect(()=>{o&&a(o).then(d=>u(new lC(d)))},[o,a]);function f(d){d.id?n(d).then(()=>s(`/activities/${d.id}`)):(d.id=are(),r(d).then(()=>s(`/activities/${d.id}`)))}return i?_.jsx(Sy,{content:"Loading Activity ..."}):_.jsxs(je,{clearing:!0,children:[_.jsx(qe,{content:"Activity Details",sub:!0,color:"teal"}),_.jsx(ah,{validationSchema:c,enableReinitialize:!0,initialValues:l,onSubmit:d=>f(d),children:({handleSubmit:d,isValid:p,isSubmitting:h,dirty:v})=>_.jsxs(my,{className:"ui form",onSubmit:d,autoComplete:"off",children:[_.jsx(Xa,{name:"title",placeholder:"Title"}),_.jsx(G$,{rows:3,placeholder:"Description",name:"description"}),_.jsx(ire,{option:ore,placeholder:"Category",name:"category"}),_.jsx(kie,{placeholderText:"Date",name:"date",showTimeSelect:!0,timeCaption:"time",dateFormat:"MMMM d, yyyy h:mm aa"}),_.jsx(qe,{content:"Location Details",sub:!0,color:"teal"}),_.jsx(Xa,{placeholder:"City",name:"city"}),_.jsx(Xa,{placeholder:"Venue",name:"venue"}),_.jsx($e,{disabled:h||!v||!p,loading:h,floated:"right",positive:!0,type:"submit",content:"Submit"}),_.jsx($e,{as:an,to:"/activities",floated:"right",type:"button",content:"Cancel"})]})})]})}),Aie={filter:"brightness(30%)"},Nie={position:"absolute",bottom:"5%",left:"5%",width:"100%",height:"auto",color:"white"},Rie=wt(function({activity:t}){var i,o;const{activityStore:{updateAttendance:r,loading:n,cancelActivityToggle:a}}=Ft();return _.jsxs(je.Group,{children:[_.jsxs(je,{basic:!0,attached:"top",style:{padding:"0"},children:[t.isCancelled&&_.jsx(Xt,{style:{position:"absolute",zIndex:1e3,left:-14,top:20},ribbon:!0,color:"red",content:"Cancelled"}),_.jsx(qt,{src:`/assets/categoryImages/${t.category}.jpg`,fluid:!0,style:Aie}),_.jsx(je,{style:Nie,basic:!0,children:_.jsx(nt.Group,{children:_.jsx(nt,{children:_.jsxs(nt.Content,{children:[_.jsx(qe,{size:"huge",content:t.title,style:{color:"white"}}),_.jsx("p",{children:ci(t.date,"dd MMM yyyy")}),_.jsxs("p",{children:["Hosted by ",_.jsx("strong",{children:_.jsx(an,{to:`/profiles/${(i=t.host)==null?void 0:i.username}`,children:(o=t.host)==null?void 0:o.displayName})})]})]})})})})]}),_.jsx(je,{clearing:!0,attached:"bottom",children:t.isHost?_.jsxs(_.Fragment,{children:[_.jsx($e,{color:t.isCancelled?"green":"red",floated:"left",basic:!0,content:t.isCancelled?"Re-activate Activity":"Cancel Activity",onClick:a,loading:n}),_.jsx($e,{as:an,to:`/manage/${t.id}`,color:"orange",floated:"right",disabled:t.isCancelled,children:"Manage Event"})]}):t.isGoing?_.jsx($e,{loading:n,onClick:r,children:"Cancel attendance"}):_.jsx($e,{loading:n,color:"teal",onClick:r,disabled:t.isCancelled,children:"Join Activity"})})]})}),Mie=wt(function({activity:t}){return _.jsxs(je.Group,{children:[_.jsx(je,{attached:"top",children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{size:"large",color:"teal",name:"info"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("p",{children:t.description})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"calendar",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("span",{children:ci(t.date,"dd MMM yyyy h:mm aa")})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"marker",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:11,children:_.jsxs("span",{children:[t.venue,", ",t.city]})})]})})]})}),Iie=wt(function({activityId:t}){const{commentStore:r}=Ft();return x.useEffect(()=>(t&&r.createHubConnection(t),()=>{r.clearComments()}),[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(je,{textAlign:"center",attached:"top",inverted:!0,color:"teal",style:{border:"none"},children:_.jsx(qe,{children:"Chat about this event"})}),_.jsxs(je,{attached:!0,clearing:!0,children:[_.jsx(ah,{onSubmit:(n,{resetForm:a})=>r.addComment(n).then(()=>a()),initialValues:{body:""},validationSchema:ih({body:Pn().required()}),children:({isSubmitting:n,isValid:a,handleSubmit:i})=>_.jsx(my,{className:"ui form",children:_.jsx(Cq,{name:"body",children:o=>_.jsxs("div",{style:{position:"relative"},children:[_.jsx(il,{active:n}),_.jsx("textarea",{placeholder:"Enter your comment (Enter to submit, SHIFT + Enter for new line)",rows:2,...o.field,onKeyDown:s=>{s.key==="Enter"&&s.shiftKey||s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a&&i())}})]})})})}),_.jsx(mr.Group,{children:r.comments.map(n=>_.jsxs(mr,{children:[_.jsx(mr.Avatar,{src:n.image||"/assets/user.png"}),_.jsxs(mr.Content,{children:[_.jsx(mr.Author,{as:an,to:`/profiles/${n.username}`,children:n.displayName}),_.jsx(mr.Metadata,{children:_.jsxs("div",{children:[oJ(n.createdAt)," ago"]})}),_.jsx(mr.Text,{style:{whiteSpace:"pre-wrap"},children:n.body})]})]},n.id))})]})]})}),$ie=wt(function({activity:{attendees:t,host:r}}){return t?_.jsxs(_.Fragment,{children:[_.jsxs(je,{textAlign:"center",style:{border:"none"},attached:"top",secondary:!0,inverted:!0,color:"teal",children:[t.length," ",t.length===1?"Person":"People"," going"]}),_.jsx(je,{attached:!0,children:_.jsx(Ib,{relaxed:!0,divided:!0,children:t.map(n=>_.jsxs(nt,{style:{position:"relative"},children:[n.username===(r==null?void 0:r.username)&&_.jsx(Xt,{style:{position:"absolute"},color:"orange",ribbon:"right",children:"Host"}),_.jsx(qt,{size:"tiny",src:n.image||"/assets/user.png"}),_.jsxs(nt.Content,{verticalAlign:"middle",children:[_.jsx(nt.Header,{as:"h3",children:_.jsx(an,{to:`/profiles/${n.username}`,children:n.displayName})}),n.following&&_.jsx(nt.Extra,{style:{color:"orange"},children:"Following"})]})]},n.username))})})]}):null}),jie=wt(function(){const{activityStore:t}=Ft(),{selectedActivity:r,loadActivity:n,loadingInitial:a,clearSelectedActivity:i}=t,{id:o}=eE();return x.useEffect(()=>(o&&n(o),()=>i()),[o,n,i]),a||!r?_.jsx(Sy,{}):_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:10,children:[_.jsx(Rie,{activity:r}),_.jsx(Mie,{activity:r}),_.jsx(Iie,{activityId:r.id})]}),_.jsx(Oe.Column,{width:6,children:_.jsx($ie,{activity:r})})]})});function Lie(){const e="/api/",[t,r]=x.useState(null);function n(){tn.get(e+"buggy/not-found").catch(u=>console.log(u.response))}function a(){tn.get(e+"buggy/bad-request").catch(u=>console.log(u.response))}function i(){tn.get(e+"buggy/server-error").catch(u=>console.log(u.response))}function o(){tn.get(e+"buggy/unauthorised").catch(u=>console.log(u.response))}function s(){tn.get(e+"activities/notaguid").catch(u=>console.log(u.response))}function l(){tn.post(e+"activities",{}).catch(u=>r(u))}return _.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h1",content:"Test Error component"}),_.jsx(je,{children:_.jsxs($e.Group,{widths:"7",children:[_.jsx($e,{onClick:n,content:"Not Found",basic:!0,primary:!0}),_.jsx($e,{onClick:a,content:"Bad Request",basic:!0,primary:!0}),_.jsx($e,{onClick:l,content:"Validation Error",basic:!0,primary:!0}),_.jsx($e,{onClick:i,content:"Server Error",basic:!0,primary:!0}),_.jsx($e,{onClick:o,content:"Unauthorised",basic:!0,primary:!0}),_.jsx($e,{onClick:s,content:"Bad Guid",basic:!0,primary:!0})]})}),t&&_.jsx(LI,{errors:t})]})}function Fie(){return _.jsxs(je,{placeholder:!0,children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"search"}),"Oops -we've looked everywhere but could not find what you are looking for!"]}),_.jsx(je.Inline,{children:_.jsx($e,{as:an,to:"/activities",children:"Return to activities page"})})]})}const Uie=wt(function(){var r,n;const{commonStore:t}=Ft();return _.jsxs(Ko,{children:[_.jsx(qe,{as:"h1",content:"Server Error"}),_.jsx(qe,{sub:!0,as:"h5",color:"red",content:(r=t.error)==null?void 0:r.message}),((n=t.error)==null?void 0:n.details)&&_.jsxs(je,{children:[_.jsx(qe,{as:"h4",content:"Stack trace",color:"teal"}),_.jsx("code",{style:{marginTop:"10px"},children:t.error.details})]})]})}),Bie=wt(function({profile:t}){return _.jsx(je,{children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:12,children:_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{avatar:!0,size:"small",src:t.image||"/assets/user.png"}),_.jsx(nt.Content,{verticalAlign:"middle",children:_.jsx(qe,{as:"h1",content:t.displayName})})]})})}),_.jsxs(Oe.Column,{width:4,children:[_.jsxs(In.Group,{widths:2,children:[_.jsx(In,{label:"Followers",value:t.followersCount}),_.jsx(In,{label:"Following",value:t.followingCount})]}),_.jsx(cc,{}),_.jsx(o$,{profile:t})]})]})})});function Jc(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function Zc(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function BD(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function Wie(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),a=zie.get(n);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var Hie=[".DS_Store","Thumbs.db"];function Vie(e){return Jc(this,void 0,void 0,function(){return Zc(this,function(t){return Wm(e)&&Yie(e.dataTransfer)?[2,Qie(e.dataTransfer,e.type)]:Gie(e)?[2,Kie(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,qie(e)]:[2,[]]})})}function Yie(e){return Wm(e)}function Gie(e){return Wm(e)&&Wm(e.target)}function Wm(e){return typeof e=="object"&&e!==null}function Kie(e){return x_(e.target.files).map(function(t){return gh(t)})}function qie(e){return Jc(this,void 0,void 0,function(){var t;return Zc(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return gh(n)})]}})})}function Qie(e,t){return Jc(this,void 0,void 0,function(){var r,n;return Zc(this,function(a){switch(a.label){case 0:return e.items?(r=x_(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Xie))]):[3,2];case 1:return n=a.sent(),[2,zD(Qj(n))];case 2:return[2,zD(x_(e.files).map(function(i){return gh(i)}))]}})})}function zD(e){return e.filter(function(t){return Hie.indexOf(t.name)===-1})}function x_(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,GD(r)];if(e.sizer)return[!1,GD(r)]}return[!0,null]}function xs(e){return e!=null}function poe(e){var t=e.files,r=e.accept,n=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&o>=1&&t.length>o?!1:t.every(function(l){var u=e2(l,r),c=Dp(u,1),f=c[0],d=t2(l,n,a),p=Dp(d,1),h=p[0],v=s?s(l):null;return f&&h&&!v})}function Hm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function tv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function qD(e){e.preventDefault()}function hoe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function voe(e){return e.indexOf("Edge/")!==-1}function moe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hoe(e)||voe(e)}function Ua(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),o=1;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Roe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var kS=x.forwardRef(function(e,t){var r=e.children,n=Vm(e,Eoe),a=o2(n),i=a.open,o=Vm(a,Soe);return x.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(x.Fragment,null,r(zt(zt({},o),{},{open:i})))});kS.displayName="Dropzone";var i2={disabled:!1,getFilesFromEvent:Vie,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};kS.defaultProps=i2;kS.propTypes={children:$.func,accept:$.objectOf($.arrayOf($.string)),multiple:$.bool,preventDropOnDocument:$.bool,noClick:$.bool,noKeyboard:$.bool,noDrag:$.bool,noDragEventsBubbling:$.bool,minSize:$.number,maxSize:$.number,maxFiles:$.number,disabled:$.bool,getFilesFromEvent:$.func,onFileDialogCancel:$.func,onFileDialogOpen:$.func,useFsAccessApi:$.bool,autoFocus:$.bool,onDragEnter:$.func,onDragLeave:$.func,onDragOver:$.func,onDrop:$.func,onDropAccepted:$.func,onDropRejected:$.func,onError:$.func,validator:$.func};var D_={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function o2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=zt(zt({},i2),e),r=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,y=t.onFileDialogOpen,m=t.useFsAccessApi,g=t.autoFocus,E=t.preventDropOnDocument,w=t.noClick,C=t.noKeyboard,S=t.noDrag,O=t.noDragEventsBubbling,D=t.onError,N=t.validator,R=x.useMemo(function(){return woe(r)},[r]),j=x.useMemo(function(){return yoe(r)},[r]),U=x.useMemo(function(){return typeof y=="function"?y:XD},[y]),Q=x.useMemo(function(){return typeof v=="function"?v:XD},[v]),X=x.useRef(null),J=x.useRef(null),te=x.useReducer(Moe,D_),ge=aw(te,2),H=ge[0],ee=ge[1],ce=H.isFocused,_e=H.isFileDialogActive,we=x.useRef(typeof window<"u"&&window.isSecureContext&&m&&goe()),rt=function(){!we.current&&_e&&setTimeout(function(){if(J.current){var Y=J.current.files;Y.length||(ee({type:"closeDialog"}),Q())}},300)};x.useEffect(function(){return window.addEventListener("focus",rt,!1),function(){window.removeEventListener("focus",rt,!1)}},[J,_e,Q,we]);var ye=x.useRef([]),Le=function(Y){X.current&&X.current.contains(Y.target)||(Y.preventDefault(),ye.current=[])};x.useEffect(function(){return E&&(document.addEventListener("dragover",qD,!1),document.addEventListener("drop",Le,!1)),function(){E&&(document.removeEventListener("dragover",qD),document.removeEventListener("drop",Le))}},[X,E]),x.useEffect(function(){return!n&&g&&X.current&&X.current.focus(),function(){}},[X,g,n]);var He=x.useCallback(function(F){D?D(F):console.error(F)},[D]),lt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[].concat(Ooe(ye.current),[F.target]),tv(F)&&Promise.resolve(a(F)).then(function(Y){if(!(Hm(F)&&!O)){var pe=Y.length,be=pe>0&&poe({files:Y,accept:R,minSize:o,maxSize:i,multiple:s,maxFiles:l,validator:N}),Ne=pe>0&&!be;ee({isDragAccept:be,isDragReject:Ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(F)}}).catch(function(Y){return He(Y)})},[a,u,He,O,R,o,i,s,l,N]),Ce=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=tv(F);if(Y&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return Y&&f&&f(F),!1},[f,O]),xe=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=ye.current.filter(function(be){return X.current&&X.current.contains(be)}),pe=Y.indexOf(F.target);pe!==-1&&Y.splice(pe,1),ye.current=Y,!(Y.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),tv(F)&&c&&c(F))},[X,c,O]),mt=x.useCallback(function(F,Y){var pe=[],be=[];F.forEach(function(Ne){var ur=e2(Ne,R),Zr=aw(ur,2),un=Zr[0],da=Zr[1],io=t2(Ne,o,i),M=aw(io,2),L=M[0],G=M[1],de=N?N(Ne):null;if(un&&L&&!de)pe.push(Ne);else{var Ee=[da,G];de&&(Ee=Ee.concat(de)),be.push({file:Ne,errors:Ee.filter(function(Se){return Se})})}}),(!s&&pe.length>1||s&&l>=1&&pe.length>l)&&(pe.forEach(function(Ne){be.push({file:Ne,errors:[doe]})}),pe.splice(0)),ee({acceptedFiles:pe,fileRejections:be,type:"setFiles"}),d&&d(pe,be,Y),be.length>0&&h&&h(be,Y),pe.length>0&&p&&p(pe,Y)},[ee,s,R,o,i,l,d,p,h,N]),Nt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[],tv(F)&&Promise.resolve(a(F)).then(function(Y){Hm(F)&&!O||mt(Y,F)}).catch(function(Y){return He(Y)}),ee({type:"reset"})},[a,mt,He,O]),sr=x.useCallback(function(){if(we.current){ee({type:"openDialog"}),U();var F={multiple:s,types:j};window.showOpenFilePicker(F).then(function(Y){return a(Y)}).then(function(Y){mt(Y,null),ee({type:"closeDialog"})}).catch(function(Y){boe(Y)?(Q(Y),ee({type:"closeDialog"})):_oe(Y)?(we.current=!1,J.current?(J.current.value=null,J.current.click()):He(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):He(Y)});return}J.current&&(ee({type:"openDialog"}),U(),J.current.value=null,J.current.click())},[ee,U,Q,m,mt,He,j,s]),jr=x.useCallback(function(F){!X.current||!X.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),sr())},[X,sr]),Je=x.useCallback(function(){ee({type:"focus"})},[]),er=x.useCallback(function(){ee({type:"blur"})},[]),Ut=x.useCallback(function(){w||(moe()?setTimeout(sr,0):sr())},[w,sr]),lr=function(Y){return n?null:Y},Jr=function(Y){return C?null:lr(Y)},Lr=function(Y){return S?null:lr(Y)},Ot=function(Y){O&&Y.stopPropagation()},ln=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.role,Ne=F.onKeyDown,ur=F.onFocus,Zr=F.onBlur,un=F.onClick,da=F.onDragEnter,io=F.onDragOver,M=F.onDragLeave,L=F.onDrop,G=Vm(F,xoe);return zt(zt(T_({onKeyDown:Jr(Ua(Ne,jr)),onFocus:Jr(Ua(ur,Je)),onBlur:Jr(Ua(Zr,er)),onClick:lr(Ua(un,Ut)),onDragEnter:Lr(Ua(da,lt)),onDragOver:Lr(Ua(io,Ce)),onDragLeave:Lr(Ua(M,xe)),onDrop:Lr(Ua(L,Nt)),role:typeof be=="string"&&be!==""?be:"presentation"},pe,X),!n&&!C?{tabIndex:0}:{}),G)}},[X,jr,Je,er,Ut,lt,Ce,xe,Nt,C,S,n]),I=x.useCallback(function(F){F.stopPropagation()},[]),ue=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.onChange,Ne=F.onClick,ur=Vm(F,Coe),Zr=T_({accept:R,multiple:s,type:"file",style:{display:"none"},onChange:lr(Ua(be,Nt)),onClick:lr(Ua(Ne,I)),tabIndex:-1},pe,J);return zt(zt({},Zr),ur)}},[J,r,s,Nt,n]);return zt(zt({},H),{},{isFocused:ce&&!n,getRootProps:ln,getInputProps:ue,rootRef:X,inputRef:J,open:lr(sr)})}function Moe(e,t){switch(t.type){case"focus":return zt(zt({},e),{},{isFocused:!0});case"blur":return zt(zt({},e),{},{isFocused:!1});case"openDialog":return zt(zt({},D_),{},{isFileDialogActive:!0});case"closeDialog":return zt(zt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return zt(zt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return zt(zt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return zt({},D_);default:return e}}function XD(){}function Ioe({setFiles:e}){const t={border:"dashed 3px #eee",borderColor:"#eee",borderRadius:"5px",paddingTop:"30px",textAlign:"center",height:"200px"},r={borderColor:"green"},n=x.useCallback(s=>{e(s.map(l=>Object.assign(l,{preview:URL.createObjectURL(l)})))},[e]),{getRootProps:a,getInputProps:i,isDragActive:o}=o2({onDrop:n});return _.jsxs("div",{...a(),style:o?{...t,...r}:t,children:[_.jsx("input",{...i()}),_.jsx(jt,{name:"upload",size:"huge"}),_.jsx(qe,{content:"Drop image here"})]})}/*! + * Cropper.js v1.6.1 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:44:19.860Z + */function JD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function s2(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r
',Zoe=Number.isNaN||fi.isNaN;function Ue(e){return typeof e=="number"&&!Zoe(e)}var fP=function(t){return t>0&&t<1/0};function iw(e){return typeof e>"u"}function pl(e){return P_(e)==="object"&&e!==null}var ese=Object.prototype.hasOwnProperty;function fu(e){if(!pl(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&ese.call(r,"isPrototypeOf")}catch{return!1}}function fn(e){return typeof e=="function"}var tse=Array.prototype.slice;function g2(e){return Array.from?Array.from(e):tse.call(e)}function dr(e,t){return e&&fn(t)&&(Array.isArray(e)||Ue(e.length)?g2(e).forEach(function(r,n){t.call(e,r,n,e)}):pl(e)&&Object.keys(e).forEach(function(r){t.call(e,e[r],r,e)})),e}var It=Object.assign||function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a0&&n.forEach(function(i){pl(i)&&Object.keys(i).forEach(function(o){t[o]=i[o]})}),t},rse=/\.\d*(?:0|9){12}\d*$/;function Tu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return rse.test(e)?Math.round(e*t)/t:e}var nse=/^width|height|left|top|marginLeft|marginTop$/;function xo(e,t){var r=e.style;dr(t,function(n,a){nse.test(a)&&Ue(n)&&(n="".concat(n,"px")),r[a]=n})}function ase(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Cr(e,t){if(t){if(Ue(e.length)){dr(e,function(n){Cr(n,t)});return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function si(e,t){if(t){if(Ue(e.length)){dr(e,function(r){si(r,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function du(e,t,r){if(t){if(Ue(e.length)){dr(e,function(n){du(n,t,r)});return}r?Cr(e,t):si(e,t)}}var ise=/([a-z\d])([A-Z])/g;function IS(e){return e.replace(ise,"$1-$2").toLowerCase()}function L_(e,t){return pl(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(IS(t)))}function kp(e,t,r){pl(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(IS(t)),r)}function ose(e,t){if(pl(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(IS(t)))}var y2=/\s\s*/,w2=function(){var e=!1;if(Fy){var t=!1,r=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(i){t=i}});fi.addEventListener("test",r,n),fi.removeEventListener("test",r,n)}return e}();function ha(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(!w2){var o=e.listeners;o&&o[i]&&o[i][r]&&(a=o[i][r],delete o[i][r],Object.keys(o[i]).length===0&&delete o[i],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(i,a,n)})}function Vn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(n.once&&!w2){var o=e.listeners,s=o===void 0?{}:o;a=function(){delete s[i][r],e.removeEventListener(i,a,n);for(var u=arguments.length,c=new Array(u),f=0;fMath.abs(r)&&(r=d)})}),r}function nv(e,t){var r=e.pageX,n=e.pageY,a={endX:r,endY:n};return t?a:s2({startX:r,startY:n},a)}function use(e){var t=0,r=0,n=0;return dr(e,function(a){var i=a.startX,o=a.startY;t+=i,r+=o,n+=1}),t/=n,r/=n,{pageX:t,pageY:r}}function Co(e){var t=e.aspectRatio,r=e.height,n=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=fP(n),o=fP(r);if(i&&o){var s=r*t;a==="contain"&&s>n||a==="cover"&&s90?{width:l,height:s}:{width:s,height:l}}function fse(e,t,r,n){var a=t.aspectRatio,i=t.naturalWidth,o=t.naturalHeight,s=t.rotate,l=s===void 0?0:s,u=t.scaleX,c=u===void 0?1:u,f=t.scaleY,d=f===void 0?1:f,p=r.aspectRatio,h=r.naturalWidth,v=r.naturalHeight,y=n.fillColor,m=y===void 0?"transparent":y,g=n.imageSmoothingEnabled,E=g===void 0?!0:g,w=n.imageSmoothingQuality,C=w===void 0?"low":w,S=n.maxWidth,O=S===void 0?1/0:S,D=n.maxHeight,N=D===void 0?1/0:D,R=n.minWidth,j=R===void 0?0:R,U=n.minHeight,Q=U===void 0?0:U,X=document.createElement("canvas"),J=X.getContext("2d"),te=Co({aspectRatio:p,width:O,height:N}),ge=Co({aspectRatio:p,width:j,height:Q},"cover"),H=Math.min(te.width,Math.max(ge.width,h)),ee=Math.min(te.height,Math.max(ge.height,v)),ce=Co({aspectRatio:a,width:O,height:N}),_e=Co({aspectRatio:a,width:j,height:Q},"cover"),we=Math.min(ce.width,Math.max(_e.width,i)),rt=Math.min(ce.height,Math.max(_e.height,o)),ye=[-we/2,-rt/2,we,rt];return X.width=Tu(H),X.height=Tu(ee),J.fillStyle=m,J.fillRect(0,0,H,ee),J.save(),J.translate(H/2,ee/2),J.rotate(l*Math.PI/180),J.scale(c,d),J.imageSmoothingEnabled=E,J.imageSmoothingQuality=C,J.drawImage.apply(J,[e].concat(l2(ye.map(function(Le){return Math.floor(Tu(Le))})))),J.restore(),X}var _2=String.fromCharCode;function dse(e,t,r){var n="";r+=t;for(var a=t;a0;)r.push(_2.apply(null,g2(a.subarray(0,n)))),a=a.subarray(n);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}function mse(e){var t=new DataView(e),r;try{var n,a,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(i=u+f)}}}if(i){var d=t.getUint16(i,n),p,h;for(h=0;h=0?i:v2),height:Math.max(n.offsetHeight,o>=0?o:m2)};this.containerData=s,xo(a,{width:s.width,height:s.height}),Cr(t,dn),si(a,dn)},initCanvas:function(){var t=this.containerData,r=this.imageData,n=this.options.viewMode,a=Math.abs(r.rotate)%180===90,i=a?r.naturalHeight:r.naturalWidth,o=a?r.naturalWidth:r.naturalHeight,s=i/o,l=t.width,u=t.height;t.height*s>t.width?n===3?l=t.height*s:u=t.width/s:n===3?u=t.width/s:l=t.height*s;var c={aspectRatio:s,naturalWidth:i,naturalHeight:o,width:l,height:u};this.canvasData=c,this.limited=n===1||n===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=It({},c)},limitCanvas:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=n.viewMode,l=i.aspectRatio,u=this.cropped&&o;if(t){var c=Number(n.minCanvasWidth)||0,f=Number(n.minCanvasHeight)||0;s>1?(c=Math.max(c,a.width),f=Math.max(f,a.height),s===3&&(f*l>c?c=f*l:f=c/l)):s>0&&(c?c=Math.max(c,u?o.width:0):f?f=Math.max(f,u?o.height:0):u&&(c=o.width,f=o.height,f*l>c?c=f*l:f=c/l));var d=Co({aspectRatio:l,width:c,height:f});c=d.width,f=d.height,i.minWidth=c,i.minHeight=f,i.maxWidth=1/0,i.maxHeight=1/0}if(r)if(s>(u?0:1)){var p=a.width-i.width,h=a.height-i.height;i.minLeft=Math.min(0,p),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,p),i.maxTop=Math.max(0,h),u&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,s===2&&(i.width>=a.width&&(i.minLeft=Math.min(0,p),i.maxLeft=Math.max(0,p)),i.height>=a.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=a.width,i.maxTop=a.height},renderCanvas:function(t,r){var n=this.canvasData,a=this.imageData;if(r){var i=cse({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=i.width,s=i.height,l=n.width*(o/n.naturalWidth),u=n.height*(s/n.naturalHeight);n.left-=(l-n.width)/2,n.top-=(u-n.height)/2,n.width=l,n.height=u,n.aspectRatio=o/s,n.naturalWidth=o,n.naturalHeight=s,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightr.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*a),i.height=Math.max(i.minHeight,i.height*a),i.left=r.left+(r.width-i.width)/2,i.top=r.top+(r.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=It({},i)},limitCropBox:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=this.limited,l=n.aspectRatio;if(t){var u=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,f=s?Math.min(a.width,i.width,i.width+i.left,a.width-i.left):a.width,d=s?Math.min(a.height,i.height,i.height+i.top,a.height-i.top):a.height;u=Math.min(u,a.width),c=Math.min(c,a.height),l&&(u&&c?c*l>u?c=u/l:u=c*l:u?c=u/l:c&&(u=c*l),d*l>f?d=f/l:f=d*l),o.minWidth=Math.min(u,f),o.minHeight=Math.min(c,d),o.maxWidth=f,o.maxHeight=d}r&&(s?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(a.width,i.left+i.width)-o.width,o.maxTop=Math.min(a.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,r=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=r.width&&n.height>=r.height?f2:RS),xo(this.cropBox,It({width:n.width,height:n.height},sd({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Du(this.element,R_,this.getData())}},wse={initPreview:function(){var t=this.element,r=this.crossOrigin,n=this.options.preview,a=r?this.crossOriginUrl:this.url,i=t.alt||"The image to preview",o=document.createElement("img");if(r&&(o.crossOrigin=r),o.src=a,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,!!n){var s=n;typeof n=="string"?s=t.ownerDocument.querySelectorAll(n):n.querySelector&&(s=[n]),this.previews=s,dr(s,function(l){var u=document.createElement("img");kp(l,rv,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),r&&(u.crossOrigin=r),u.src=a,u.alt=i,u.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(u)})}},resetPreview:function(){dr(this.previews,function(t){var r=L_(t,rv);xo(t,{width:r.width,height:r.height}),t.innerHTML=r.html,ose(t,rv)})},preview:function(){var t=this.imageData,r=this.canvasData,n=this.cropBoxData,a=n.width,i=n.height,o=t.width,s=t.height,l=n.left-r.left-t.left,u=n.top-r.top-t.top;!this.cropped||this.disabled||(xo(this.viewBoxImage,It({width:o,height:s},sd(It({translateX:-l,translateY:-u},t)))),dr(this.previews,function(c){var f=L_(c,rv),d=f.width,p=f.height,h=d,v=p,y=1;a&&(y=d/a,v=i*y),i&&v>p&&(y=p/i,h=a*y,v=p),xo(c,{width:h,height:v}),xo(c.getElementsByTagName("img")[0],It({width:o*y,height:s*y},sd(It({translateX:-l*y,translateY:-u*y},t))))}))}},bse={bind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&Vn(t,$_,r.cropstart),fn(r.cropmove)&&Vn(t,I_,r.cropmove),fn(r.cropend)&&Vn(t,M_,r.cropend),fn(r.crop)&&Vn(t,R_,r.crop),fn(r.zoom)&&Vn(t,j_,r.zoom),Vn(n,nP,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&Vn(n,lP,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&Vn(n,rP,this.onDblclick=this.dblclick.bind(this)),Vn(t.ownerDocument,aP,this.onCropMove=this.cropMove.bind(this)),Vn(t.ownerDocument,iP,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&Vn(window,sP,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&ha(t,$_,r.cropstart),fn(r.cropmove)&&ha(t,I_,r.cropmove),fn(r.cropend)&&ha(t,M_,r.cropend),fn(r.crop)&&ha(t,R_,r.crop),fn(r.zoom)&&ha(t,j_,r.zoom),ha(n,nP,this.onCropStart),r.zoomable&&r.zoomOnWheel&&ha(n,lP,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&ha(n,rP,this.onDblclick),ha(t.ownerDocument,aP,this.onCropMove),ha(t.ownerDocument,iP,this.onCropEnd),r.responsive&&ha(window,sP,this.onResize)}},_se={resize:function(){if(!this.disabled){var t=this.options,r=this.container,n=this.containerData,a=r.offsetWidth/n.width,i=r.offsetHeight/n.height,o=Math.abs(a-1)>Math.abs(i-1)?a:i;if(o!==1){var s,l;t.restore&&(s=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(dr(s,function(u,c){s[c]=u*o})),this.setCropBoxData(dr(l,function(u,c){l[c]=u*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===h2||this.setDragMode(ase(this.dragBox,A_)?p2:MS)},wheel:function(t){var r=this,n=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*n,t)))},cropStart:function(t){var r=t.buttons,n=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Ue(r)&&r!==1||Ue(n)&&n!==0||t.ctrlKey))){var a=this.options,i=this.pointers,o;t.changedTouches?dr(t.changedTouches,function(s){i[s.identifier]=nv(s)}):i[t.pointerId||0]=nv(t),Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?o=d2:o=L_(t.target,Pp),Koe.test(o)&&Du(this.element,$_,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===c2&&(this.cropping=!0,Cr(this.dragBox,Ym)))}},cropMove:function(t){var r=this.action;if(!(this.disabled||!r)){var n=this.pointers;t.preventDefault(),Du(this.element,I_,{originalEvent:t,action:r})!==!1&&(t.changedTouches?dr(t.changedTouches,function(a){It(n[a.identifier]||{},nv(a,!0))}):It(n[t.pointerId||0]||{},nv(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var r=this.action,n=this.pointers;t.changedTouches?dr(t.changedTouches,function(a){delete n[a.identifier]}):delete n[t.pointerId||0],r&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,du(this.dragBox,Ym,this.cropped&&this.options.modal)),Du(this.element,M_,{originalEvent:t,action:r}))}}},Ese={change:function(t){var r=this.options,n=this.canvasData,a=this.containerData,i=this.cropBoxData,o=this.pointers,s=this.action,l=r.aspectRatio,u=i.left,c=i.top,f=i.width,d=i.height,p=u+f,h=c+d,v=0,y=0,m=a.width,g=a.height,E=!0,w;!l&&t.shiftKey&&(l=f&&d?f/d:1),this.limited&&(v=i.minLeft,y=i.minTop,m=v+Math.min(a.width,n.width,n.left+n.width),g=y+Math.min(a.height,n.height,n.top+n.height));var C=o[Object.keys(o)[0]],S={x:C.endX-C.startX,y:C.endY-C.startY},O=function(N){switch(N){case gs:p+S.x>m&&(S.x=m-p);break;case ys:u+S.xg&&(S.y=g-h);break}};switch(s){case RS:u+=S.x,c+=S.y;break;case gs:if(S.x>=0&&(p>=m||l&&(c<=y||h>=g))){E=!1;break}O(gs),f+=S.x,f<0&&(s=ys,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case fo:if(S.y<=0&&(c<=y||l&&(u<=v||p>=m))){E=!1;break}O(fo),d-=S.y,c+=S.y,d<0&&(s=Ul,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case ys:if(S.x<=0&&(u<=v||l&&(c<=y||h>=g))){E=!1;break}O(ys),f-=S.x,u+=S.x,f<0&&(s=gs,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case Ul:if(S.y>=0&&(h>=g||l&&(u<=v||p>=m))){E=!1;break}O(Ul),d+=S.y,d<0&&(s=fo,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case Sf:if(l){if(S.y<=0&&(c<=y||p>=m)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l}else O(fo),O(gs),S.x>=0?py&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Of,d=-d,f=-f,c-=d,u-=f):f<0?(s=xf,f=-f,u-=f):d<0&&(s=Cf,d=-d,c-=d);break;case xf:if(l){if(S.y<=0&&(c<=y||u<=v)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l,u+=i.width-f}else O(fo),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y<=0&&c<=y&&(E=!1):(f-=S.x,u+=S.x),S.y<=0?c>y&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Cf,d=-d,f=-f,c-=d,u-=f):f<0?(s=Sf,f=-f,u-=f):d<0&&(s=Of,d=-d,c-=d);break;case Of:if(l){if(S.x<=0&&(u<=v||h>=g)){E=!1;break}O(ys),f-=S.x,u+=S.x,d=f/l}else O(Ul),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y>=0&&h>=g&&(E=!1):(f-=S.x,u+=S.x),S.y>=0?h=0&&(p>=m||h>=g)){E=!1;break}O(gs),f+=S.x,d=f/l}else O(Ul),O(gs),S.x>=0?p=0&&h>=g&&(E=!1):f+=S.x,S.y>=0?h0?s=S.y>0?Cf:Sf:S.x<0&&(u-=f,s=S.y>0?Of:xf),S.y<0&&(c-=d),this.cropped||(si(this.cropBox,dn),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}E&&(i.width=f,i.height=d,i.left=u,i.top=c,this.action=s,this.renderCropBox()),dr(o,function(D){D.startX=D.endX,D.startY=D.endY})}},Sse={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Cr(this.dragBox,Ym),si(this.cropBox,dn),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=It({},this.initialImageData),this.canvasData=It({},this.initialCanvasData),this.cropBoxData=It({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(It(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),si(this.dragBox,Ym),Cr(this.cropBox,dn)),this},replace:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),r?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,dr(this.previews,function(n){n.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,si(this.cropper,eP)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Cr(this.cropper,eP)),this},destroy:function(){var t=this.element;return t[Rt]?(t[Rt]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=n.left,i=n.top;return this.moveTo(iw(t)?t:a+Number(t),iw(r)?r:i+Number(r))},moveTo:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&(Ue(t)&&(n.left=t,a=!0),Ue(r)&&(n.top=r,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,r){var n=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(n.width*t/n.naturalWidth,null,r)},zoomTo:function(t,r,n){var a=this.options,i=this.canvasData,o=i.width,s=i.height,l=i.naturalWidth,u=i.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var c=l*t,f=u*t;if(Du(this.element,j_,{ratio:t,oldRatio:o/l,originalEvent:n})===!1)return this;if(n){var d=this.pointers,p=b2(this.cropper),h=d&&Object.keys(d).length?use(d):{pageX:n.pageX,pageY:n.pageY};i.left-=(c-o)*((h.pageX-p.left-i.left)/o),i.top-=(f-s)*((h.pageY-p.top-i.top)/s)}else fu(r)&&Ue(r.x)&&Ue(r.y)?(i.left-=(c-o)*((r.x-i.left)/o),i.top-=(f-s)*((r.y-i.top)/s)):(i.left-=(c-o)/2,i.top-=(f-s)/2);i.width=c,i.height=f,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Ue(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var r=this.imageData.scaleY;return this.scale(t,Ue(r)?r:1)},scaleY:function(t){var r=this.imageData.scaleX;return this.scale(Ue(r)?r:1,t)},scale:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&(Ue(t)&&(n.scaleX=t,a=!0),Ue(r)&&(n.scaleY=r,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,n=this.imageData,a=this.canvasData,i=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:i.left-a.left,y:i.top-a.top,width:i.width,height:i.height};var s=n.width/n.naturalWidth;if(dr(o,function(c,f){o[f]=c/s}),t){var l=Math.round(o.y+o.height),u=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=u-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return r.rotatable&&(o.rotate=n.rotate||0),r.scalable&&(o.scaleX=n.scaleX||1,o.scaleY=n.scaleY||1),o},setData:function(t){var r=this.options,n=this.imageData,a=this.canvasData,i={};if(this.ready&&!this.disabled&&fu(t)){var o=!1;r.rotatable&&Ue(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),r.scalable&&(Ue(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),Ue(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=n.width/n.naturalWidth;Ue(t.x)&&(i.left=t.x*s+a.left),Ue(t.y)&&(i.top=t.y*s+a.top),Ue(t.width)&&(i.width=t.width*s),Ue(t.height)&&(i.height=t.height*s),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?It({},this.containerData):{}},getImageData:function(){return this.sized?It({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,r={};return this.ready&&dr(["left","top","width","height","naturalWidth","naturalHeight"],function(n){r[n]=t[n]}),r},setCanvasData:function(t){var r=this.canvasData,n=r.aspectRatio;return this.ready&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)?(r.width=t.width,r.height=t.width/n):Ue(t.height)&&(r.height=t.height,r.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:t.left,top:t.top,width:t.width,height:t.height}),r||{}},setCropBoxData:function(t){var r=this.cropBoxData,n=this.options.aspectRatio,a,i;return this.ready&&this.cropped&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)&&t.width!==r.width&&(a=!0,r.width=t.width),Ue(t.height)&&t.height!==r.height&&(i=!0,r.height=t.height),n&&(a?r.height=r.width/n:i&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,n=fse(this.image,this.imageData,r,t);if(!this.cropped)return n;var a=this.getData(t.rounded),i=a.x,o=a.y,s=a.width,l=a.height,u=n.width/Math.floor(r.naturalWidth);u!==1&&(i*=u,o*=u,s*=u,l*=u);var c=s/l,f=Co({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Co({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=Co({aspectRatio:c,width:t.width||(u!==1?n.width:s),height:t.height||(u!==1?n.height:l)}),h=p.width,v=p.height;h=Math.min(f.width,Math.max(d.width,h)),v=Math.min(f.height,Math.max(d.height,v));var y=document.createElement("canvas"),m=y.getContext("2d");y.width=Tu(h),y.height=Tu(v),m.fillStyle=t.fillColor||"transparent",m.fillRect(0,0,h,v);var g=t.imageSmoothingEnabled,E=g===void 0?!0:g,w=t.imageSmoothingQuality;m.imageSmoothingEnabled=E,w&&(m.imageSmoothingQuality=w);var C=n.width,S=n.height,O=i,D=o,N,R,j,U,Q,X;O<=-s||O>C?(O=0,N=0,j=0,Q=0):O<=0?(j=-O,O=0,N=Math.min(C,s+O),Q=N):O<=C&&(j=0,N=Math.min(s,C-O),Q=N),N<=0||D<=-l||D>S?(D=0,R=0,U=0,X=0):D<=0?(U=-D,D=0,R=Math.min(S,l+D),X=R):D<=S&&(U=0,R=Math.min(l,S-D),X=R);var J=[O,D,N,R];if(Q>0&&X>0){var te=h/s;J.push(j*te,U*te,Q*te,X*te)}return m.drawImage.apply(m,[n].concat(l2(J.map(function(ge){return Math.floor(Tu(ge))})))),y},setAspectRatio:function(t){var r=this.options;return!this.disabled&&!iw(t)&&(r.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var r=this.options,n=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var i=t===MS,o=r.movable&&t===p2;t=i||o?t:h2,r.dragMode=t,kp(n,Pp,t),du(n,A_,i),du(n,N_,o),r.cropBoxMovable||(kp(a,Pp,t),du(a,A_,i),du(a,N_,o))}return this}},xse=fi.Cropper,E2=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if($oe(this,e),!t||!Xoe.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=It({},cP,fu(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return joe(e,[{key:"init",value:function(){var r=this.element,n=r.tagName.toLowerCase(),a;if(!r[Rt]){if(r[Rt]=this,n==="img"){if(this.isImg=!0,a=r.getAttribute("src")||"",this.originalUrl=a,!a)return;a=r.src}else n==="canvas"&&window.HTMLCanvasElement&&(a=r.toDataURL());this.load(a)}}},{key:"load",value:function(r){var n=this;if(r){this.url=r,this.imageData={};var a=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(qoe.test(r)){Qoe.test(r)?this.read(hse(r)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==uP&&o.abort()},o.onload=function(){n.read(o.response)},o.onloadend=function(){n.reloading=!1,n.xhr=null},i.checkCrossOrigin&&dP(r)&&a.crossOrigin&&(r=pP(r)),o.open("GET",r,!0),o.responseType="arraybuffer",o.withCredentials=a.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(r){var n=this.options,a=this.imageData,i=mse(r),o=0,s=1,l=1;if(i>1){this.url=vse(r,uP);var u=gse(i);o=u.rotate,s=u.scaleX,l=u.scaleY}n.rotatable&&(a.rotate=o),n.scalable&&(a.scaleX=s,a.scaleY=l),this.clone()}},{key:"clone",value:function(){var r=this.element,n=this.url,a=r.crossOrigin,i=n;this.options.checkCrossOrigin&&dP(n)&&(a||(a="anonymous"),i=pP(n)),this.crossOrigin=a,this.crossOriginUrl=i;var o=document.createElement("img");a&&(o.crossOrigin=a),o.src=i||n,o.alt=r.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),Cr(o,tP),r.parentNode.insertBefore(o,r.nextSibling)}},{key:"start",value:function(){var r=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var a=fi.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(fi.navigator.userAgent),i=function(u,c){It(r.imageData,{naturalWidth:u,naturalHeight:c,aspectRatio:u/c}),r.initialImageData=It({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(n.naturalWidth&&!a){i(n.naturalWidth,n.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){i(o.width,o.height),a||s.removeChild(o)},o.src=n.src,a||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(o))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,n=this.options,a=this.image,i=r.parentNode,o=document.createElement("div");o.innerHTML=Joe;var s=o.querySelector(".".concat(Rt,"-container")),l=s.querySelector(".".concat(Rt,"-canvas")),u=s.querySelector(".".concat(Rt,"-drag-box")),c=s.querySelector(".".concat(Rt,"-crop-box")),f=c.querySelector(".".concat(Rt,"-face"));this.container=i,this.cropper=s,this.canvas=l,this.dragBox=u,this.cropBox=c,this.viewBox=s.querySelector(".".concat(Rt,"-view-box")),this.face=f,l.appendChild(a),Cr(r,dn),i.insertBefore(s,r.nextSibling),si(a,tP),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,Cr(c,dn),n.guides||Cr(c.getElementsByClassName("".concat(Rt,"-dashed")),dn),n.center||Cr(c.getElementsByClassName("".concat(Rt,"-center")),dn),n.background&&Cr(s,"".concat(Rt,"-bg")),n.highlight||Cr(f,Hoe),n.cropBoxMovable&&(Cr(f,N_),kp(f,Pp,RS)),n.cropBoxResizable||(Cr(c.getElementsByClassName("".concat(Rt,"-line")),dn),Cr(c.getElementsByClassName("".concat(Rt,"-point")),dn)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),fn(n.ready)&&Vn(r,oP,n.ready,{once:!0}),Du(r,oP)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),si(this.element,dn)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=xse,e}},{key:"setDefaults",value:function(r){It(cP,fu(r)&&r)}}]),e}();It(E2.prototype,yse,wse,bse,_se,Ese,Sse);var Cs=function(){return Cs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&D.zoomTo(ge)}(O.currentTarget.cropper,E),y&&y(O)}}));m&&m(S)}return function(){var O,D;(D=(O=w.current)===null||O===void 0?void 0:O.cropper)===null||D===void 0||D.destroy()}},[w]);var C=function(S){return Cse.reduce(function(O,D){var N=O,R=D;return N[R],sw(N,[typeof R=="symbol"?R:R+""])},S)}(Cs(Cs({},g),{crossOrigin:l,src:i,alt:v}));return b.createElement("div",{style:o,className:s},b.createElement("img",Cs({},C,{style:Ose,ref:w})))});function Dse({imagePreview:e,setCropper:t}){return _.jsx(Tse,{src:e,style:{height:200,width:"100%"},initialAspectRatio:1,aspectRatio:1,preview:".img-preview",guides:!1,viewMode:1,autoCropArea:1,background:!1,onInitialized:r=>t(r)})}function Pse({loading:e,uploadPhoto:t}){const[r,n]=x.useState([]),[a,i]=x.useState();function o(){a&&a.getCroppedCanvas().toBlob(s=>t(s))}return x.useEffect(()=>()=>{r.forEach(s=>URL.revokeObjectURL(s.preview))},[r]),_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 1 - Add Photo"}),_.jsx(Ioe,{setFiles:n})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 2 - Resize Image"}),r&&r.length>0&&_.jsx(Dse,{setCropper:i,imagePreview:r[0].preview})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 3 - preview & Upload"}),r&&r.length>0&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"img-preview",style:{minHeight:200,overflow:"hidden"}}),_.jsxs($e.Group,{widths:2,children:[_.jsx($e,{loading:e,onClick:o,positive:!0,icon:"check"}),_.jsx($e,{disabled:e,onClick:()=>n([]),icon:"close"})]})]})]})]})}const kse=wt(function({profile:t}){var v;const{profileStore:{isCurrentUser:r,uploadPhoto:n,uploading:a,loading:i,setMainPhoto:o,deletePhoto:s}}=Ft(),[l,u]=x.useState(!1),[c,f]=x.useState("");function d(y){n(y).then(()=>u(!1))}function p(y,m){f(m.currentTarget.name),o(y)}function h(y,m){f(m.currentTarget.name),s(y)}return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:16,children:[_.jsx(qe,{floated:"left",icon:"image",content:"Photos"}),r&&_.jsx($e,{floated:"right",basic:!0,content:l?"Cancel":"Add Photo",onClick:()=>u(!l)})]}),_.jsx(Oe.Column,{width:16,children:l?_.jsx(Pse,{uploadPhoto:d,loading:a}):_.jsx(nr.Group,{itemsPerRow:5,children:(v=t.photos)==null?void 0:v.map(y=>_.jsxs(nr,{children:[_.jsx(qt,{src:y.url||"/assets/user.png"}),r&&_.jsxs($e.Group,{fluid:!0,widths:2,children:[_.jsx($e,{basic:!0,color:"green",content:"Main",name:"main"+y.id,disabled:y.isMain,loading:c==="main"+y.id&&i,onClick:m=>p(y,m)}),_.jsx($e,{basic:!0,color:"red",icon:"trash",name:y.id,loading:c===y.id&&i,onClick:m=>h(y,m),disabled:y.isMain})]})]},y.id))})})]})})}),Ase=wt(function({setEditMode:t}){const{profileStore:{profile:r,updateProfile:n}}=Ft();return _.jsx(ah,{initialValues:{displayName:r==null?void 0:r.displayName,bio:(r==null?void 0:r.bio)||""},onSubmit:a=>{n(a).then(()=>{t(!1)})},validationSchema:ih({displayName:Pn().required()}),children:({isSubmitting:a,isValid:i,dirty:o})=>_.jsxs(my,{className:"ui form",children:[_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(G$,{rows:3,placeholder:"Add your bio",name:"bio"}),_.jsx($e,{positive:!0,type:"submit",loading:a,content:"Update profile",floated:"right",disabled:!i||!o})]})})}),Nse=wt(function(){const{profileStore:t}=Ft(),{isCurrentUser:r,profile:n}=t,[a,i]=x.useState(!1);return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:"16",children:[_.jsx(qe,{floated:"left",icon:"user",content:`About ${n==null?void 0:n.displayName}`}),r&&_.jsx($e,{floated:"right",basic:!0,content:a?"Cancel":"Edit Profile",onClick:()=>i(!a)})]}),_.jsx(Oe.Column,{width:"16",children:a?_.jsx(Ase,{setEditMode:i}):_.jsx("span",{style:{whiteSpace:"pre-wrap"},children:n==null?void 0:n.bio})})]})})}),hP=wt(function(){const{profileStore:t}=Ft(),{profile:r,followings:n,loadingFollowings:a,activeTab:i}=t;return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"16",children:_.jsx(qe,{floated:"left",icon:"user",content:i===3?`People following ${r.displayName}`:`People ${r==null?void 0:r.displayName} is following`})}),_.jsx(Oe.Column,{width:16,children:_.jsx(nr.Group,{itemsPerRow:4,children:n.map(o=>_.jsx(s$,{profile:o},o.username))})})]})})}),vP=[{menuItem:"Future Events",pane:{key:"future"}},{menuItem:"Past Events",pane:{key:"past"}},{menuItem:"Hosting",pane:{key:"hosting"}}],Rse=wt(function(){const{profileStore:t}=Ft(),{loadUserActivities:r,profile:n,loadingActivities:a,userActivities:i}=t;x.useEffect(()=>{r(n.username)},[r,n]);const o=(s,l)=>{r(n.username,vP[l.activeIndex].pane.key)};return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:16,children:_.jsx(qe,{floated:"left",icon:"calendar",content:"Activities"})}),_.jsxs(Oe.Column,{width:16,children:[_.jsx(mc,{panes:vP,menu:{secondary:!0,pointing:!0},onTabChange:(s,l)=>o(s,l)}),_.jsx("br",{}),_.jsx(nr.Group,{itemsPerRow:4,children:i.map(s=>_.jsxs(nr,{as:an,to:`/activities/${s.id}`,children:[_.jsx(qt,{src:`/assets/categoryImages/${s.category}.jpg`,style:{minHeight:100,objectFit:"cover"}}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{textAlign:"center",children:s.title}),_.jsxs(nr.Meta,{textAlign:"center",children:[_.jsx("div",{children:ci(new Date(s.date),"do LLL")}),_.jsx("div",{children:ci(new Date(s.date),"h:mm a")})]})]})]},s.id))})]})]})})}),Mse=wt(function({profile:t}){const{profileStore:r}=Ft(),n=[{menuItem:"About",render:()=>_.jsx(Nse,{})},{menuItem:"Photos",render:()=>_.jsx(kse,{profile:t})},{menuItem:"Events",render:()=>_.jsx(Rse,{})},{menuItem:"Followers",render:()=>_.jsx(hP,{})},{menuItem:"Following",render:()=>_.jsx(hP,{})}];return _.jsx(mc,{menu:{fluid:!0,vertical:!0},menuPosition:"right",panes:n,onTabChange:(a,i)=>r.setActiveTab(i.activeIndex)})}),Ise=wt(function(){const{username:t}=eE(),{profileStore:r}=Ft(),{loadProfile:n,loadingProfile:a,profile:i,setActiveTab:o}=r;return x.useEffect(()=>(t&&n(t),()=>{o(0)}),[n,t]),a?_.jsx(Sy,{content:"Loading Profile..."}):_.jsx(Oe,{children:_.jsx(Oe.Column,{width:16,children:i&&_.jsxs(_.Fragment,{children:[_.jsx(Bie,{profile:i}),_.jsx(Mse,{profile:i})]})})})});function $se(){const{userStore:{isLoggedIn:e}}=Ft(),t=hi();return e?_.jsx(ER,{}):_.jsx(_R,{to:"/",state:{from:t}})}function F_(){return new URLSearchParams(hi().search)}function jse(){const e=F_().get("email");function t(){Vt.Account.resendEmailConfirm(e).then(()=>{ct.success("verification email resent - please check your email")}).catch(r=>console.log(r))}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,color:"green",children:[_.jsx(jt,{name:"check"}),"Successfully registered!"]}),_.jsx("p",{children:"Please check your email (including junk email) fot the verification email"}),e&&_.jsxs(_.Fragment,{children:[_.jsx("p",{children:"Didn't receive the email? Click the below button to resend"}),_.jsx($e,{primary:!0,onClick:t,content:"Resend Email",size:"huge"})]})]})}function Lse(){const{modalStore:e}=Ft(),t=F_().get("email"),r=F_().get("token"),n={Verifying:"Verifying",Failed:"Failed",Success:"Success"},[a,i]=x.useState(n.Verifying);function o(){Vt.Account.resendEmailConfirm(t).then(()=>{ct.success("verification email resent - please check your email")}).catch(l=>console.log(l))}x.useEffect(()=>{Vt.Account.verifyEmail(r,t).then(()=>{i(n.Success)}).catch(()=>{i(n.Failed)})},[n.Verifying,n.Failed,n.Success,r,t]);function s(){switch(a){case n.Verifying:return _.jsx("p",{children:"Verifying..."});case n.Failed:return _.jsxs("div",{children:[_.jsx("p",{children:"Verification failed. You can try resending the verify link to your email"}),_.jsx($e,{primary:!0,onClick:o,size:"huge",content:"Resend email"})]});case n.Success:return _.jsxs("div",{children:[_.jsx("p",{children:"Email has been verified - you can now login"}),_.jsx($e,{primary:!0,onClick:()=>e.openModal(_.jsx(PI,{})),size:"huge",content:"Login"})]})}}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"envelope"}),"Email verification"]}),_.jsx(je.Inline,{children:s()})]})}const Fse=[{path:"/",element:_.jsx($Q,{}),children:[{element:_.jsx($se,{}),children:[{path:"activities",element:_.jsx(Zte,{})},{path:"activities/:id",element:_.jsx(jie,{})},{path:"createActivity",element:_.jsx(FD,{},"create")},{path:"manage/:id",element:_.jsx(FD,{},"manage")},{path:"profiles/:username",element:_.jsx(Ise,{})},{path:"errors",element:_.jsx(Lie,{})}]},{path:"not-found",element:_.jsx(Fie,{})},{path:"server-error",element:_.jsx(Uie,{})},{path:"account/userRegisterSuccess",element:_.jsx(jse,{})},{path:"account/verifyEmail",element:_.jsx(Lse,{})},{path:"*",element:_.jsx(_R,{replace:!0,to:"/not-found"})}]}],Oo=P4(Fse);tn.defaults.baseURL="/api";tn.interceptors.request.use(e=>{const t=yt.commonStore.token;return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e});tn.interceptors.response.use(async e=>{const t=e.headers.pagination;return t&&(e.data=new Jte(e.data,JSON.parse(t))),e},e=>{var i;console.log(e);const{data:t,status:r,config:n,headers:a}=e.response;switch(r){case 400:if(n.method==="get"&&Object.prototype.hasOwnProperty.call(t.errors,"id")&&Oo.navigate("/not-found"),t.errors){const o=[];for(const s in t.errors)t.errors[s]&&o.push(t.errors[s]);throw o.flat()}else ct.error(t);break;case 401:r===401&&((i=a["www-authenticate"])!=null&&i.startsWith('Bearer error="invalid_token"'))?(yt.userStore.logout(),ct.error("Session expired - please login again")):ct.error("unauthorized");break;case 403:ct.error("forbiddent");break;case 404:Oo.navigate("/not-found");break;case 500:yt.commonStore.setServerError(t),Oo.navigate("/server-error");break}return Promise.reject(e)});const jf=e=>e.data,gr={get:e=>tn.get(e).then(jf),post:(e,t)=>tn.post(e,t).then(jf),put:(e,t)=>tn.put(e,t).then(jf),del:e=>tn.delete(e).then(jf)},Use={list:e=>tn.get("/activities",{params:e}).then(jf),details:e=>gr.get(`/activities/${e}`),create:e=>gr.post("/activities",e),update:e=>gr.put(`/activities/${e.id}`,e),delete:e=>gr.del(`/activities/${e}`),attend:e=>gr.post(`/activities/${e}/attend`,{})},Bse={current:()=>gr.get("/account"),login:e=>gr.post("/account/login",e),register:e=>gr.post("/account/register",e),fbLogin:e=>gr.post(`/account/fbLogin?accessToken=${e}`,{}),refreshToken:()=>gr.post("/account/refreshToken",{}),verifyEmail:(e,t)=>gr.post(`/account/verifyEmail?token=${e}&email=${t}`,{}),resendEmailConfirm:e=>gr.get(`/account/resendEmailConfirmationLink?email=${e}`)},zse={get:e=>gr.get(`/profiles/${e}`),uploadPhoto:e=>{let t=new FormData;return t.append("File",e),tn.post("photos",t,{headers:{"Content-Type":"multipart/form-data"}})},setMainPhoto:e=>gr.post(`/photos/${e}/setMain`,{}),deletePhoto:e=>gr.del(`/photos/${e}`),updateProfile:e=>gr.put("/profiles",e),updateFollowing:e=>gr.post(`/follow/${e}`,{}),listFollowings:(e,t)=>gr.get(`/follow/${e}?predicate=${t}`),listActivities:(e,t)=>gr.get(`/profiles/${e}/activities?predicate=${t}`)},Vt={Activities:Use,Account:Bse,Profiles:zse};class mP{constructor(t){Z(this,"username");Z(this,"displayName");Z(this,"image");Z(this,"bio");Z(this,"followersCount",0);Z(this,"followingCount",0);Z(this,"following",!1);Z(this,"photos");this.username=t.username,this.displayName=t.displayName,this.image=t.image}}class Wse{constructor(){Z(this,"activityRegistry",new Map);Z(this,"selectedActivity");Z(this,"editMode",!1);Z(this,"loading",!1);Z(this,"loadingInitial",!1);Z(this,"pagination",null);Z(this,"pagingParams",new l_);Z(this,"predicate",new Map().set("all",!0));Z(this,"setPredicate",(t,r)=>{const n=()=>{this.predicate.forEach((a,i)=>{i!=="startDate"&&this.predicate.delete(i)})};switch(t){case"all":n(),this.predicate.set("all",!0);break;case"isGoing":n(),this.predicate.set("isGoing",!0);break;case"isHost":n(),this.predicate.set("isHost",!0);break;case"startDate":this.predicate.delete("startDate"),this.predicate.set("startDate",r);break}});Z(this,"setPagingParams",t=>{this.pagingParams=t});Z(this,"loadActivities",async()=>{this.setLoadingInitial(!0);try{const t=await Vt.Activities.list(this.axiosParams);t.data.forEach(r=>{this.setActivity(r)}),this.setPagination(t.pagination),this.setLoadingInitial(!1)}catch(t){console.log(t),this.setLoadingInitial(!1)}});Z(this,"setPagination",t=>{this.pagination=t});Z(this,"loadActivity",async t=>{let r=this.getActivity(t);if(r)return this.selectedActivity=r,r;this.setLoadingInitial(!0);try{return r=await Vt.Activities.details(t),this.setActivity(r),Ze(()=>this.selectedActivity=r),this.setLoadingInitial(!1),r}catch(n){console.log(n),this.setLoadingInitial(!1)}});Z(this,"getActivity",t=>this.activityRegistry.get(t));Z(this,"setActivity",t=>{var n;const r=yt.userStore.user;r&&(t.isGoing=t.attendees.some(a=>a.username===r.username),t.isHost=t.hostUsername===r.username,t.host=(n=t.attendees)==null?void 0:n.find(a=>a.username===t.hostUsername)),t.date=new Date(t.date),this.activityRegistry.set(t.id,t)});Z(this,"setLoadingInitial",t=>{this.loadingInitial=t});Z(this,"createActivity",async t=>{const r=yt.userStore.user,n=new mP(r);try{await Vt.Activities.create(t);const a=new H3(t);a.hostUsername=r==null?void 0:r.username,a.attendees=[n],this.setActivity(a),Ze(()=>{this.selectedActivity=a})}catch(a){console.log(a)}});Z(this,"updateActivity",async t=>{try{await Vt.Activities.update(t),Ze(()=>{if(t.id){const r={...this.getActivity(t.id),...t};this.activityRegistry.set(t.id,r),this.selectedActivity=r}})}catch(r){console.log(r)}});Z(this,"deleteActivity",async t=>{this.loading=!0;try{await Vt.Activities.delete(t),Ze(()=>{this.activityRegistry.delete(t),this.loading=!1})}catch(r){console.log(r),Ze(()=>{this.loading=!1})}});Z(this,"updateAttendance",async()=>{const t=yt.userStore.user;this.loading=!0;try{await Vt.Activities.attend(this.selectedActivity.id),Ze(()=>{var r,n,a,i;if((r=this.selectedActivity)!=null&&r.isGoing)this.selectedActivity.attendees=(n=this.selectedActivity.attendees)==null?void 0:n.filter(o=>o.username!==(t==null?void 0:t.username)),this.selectedActivity.isGoing=!1;else{const o=new mP(t);(i=(a=this.selectedActivity)==null?void 0:a.attendees)==null||i.push(o),this.selectedActivity.isGoing=!0}this.activityRegistry.set(this.selectedActivity.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>this.loading=!1)}});Z(this,"cancelActivityToggle",async()=>{var t;this.loading=!0;try{await Vt.Activities.attend((t=this.selectedActivity)==null?void 0:t.id),Ze(()=>{var r,n;this.selectedActivity.isCancelled=!((r=this.selectedActivity)!=null&&r.isCancelled),this.activityRegistry.set((n=this.selectedActivity)==null?void 0:n.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"clearSelectedActivity",()=>{this.selectedActivity=void 0});Z(this,"updateAttendeeFollowing",t=>{this.activityRegistry.forEach(r=>{r.attendees.forEach(n=>{n.username==t&&(n.following?n.followersCount--:n.followersCount++,n.following=!n.following)})})});Ic(this),B1(()=>this.predicate.keys(),()=>{this.pagingParams=new l_,this.activityRegistry.clear(),this.loadActivities()})}get axiosParams(){const t=new URLSearchParams;return t.append("pageNumber",this.pagingParams.pageNumber.toString()),t.append("pageSize",this.pagingParams.pageSize.toString()),this.predicate.forEach((r,n)=>{n==="startDate"?t.append(n,r.toISOString()):t.append(n,r)}),t}get activitiesByDate(){return Array.from(this.activityRegistry.values()).sort((t,r)=>t.date.getTime()-r.date.getTime())}get groupedAcivities(){return Object.entries(this.activitiesByDate.reduce((t,r)=>{const n=ci(r.date,"dd MMM yyyy");return t[n]=t[n]?[...t[n],r]:[r],t},{}))}}class Hse{constructor(){Z(this,"error",null);Z(this,"token",localStorage.getItem("jwt"));Z(this,"appLoaded",!1);Z(this,"setToken",t=>{this.token=t});Z(this,"setAppLoaded",()=>{this.appLoaded=!0});Ic(this),B1(()=>this.token,t=>{t?localStorage.setItem("jwt",t):localStorage.removeItem("jwt")})}setServerError(t){this.error=t}}class Vse{constructor(){Z(this,"user",null);Z(this,"fbLoading",!1);Z(this,"refreshTokenTimeout");Z(this,"login",async t=>{const r=await Vt.Account.login(t);yt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>this.user=r),Oo.navigate("/activities"),yt.modalStore.closeModal()});Z(this,"register",async t=>{await Vt.Account.register(t),Oo.navigate(`/account/registerSuccess?email=${t.email}`),yt.modalStore.closeModal()});Z(this,"logout",()=>{yt.commonStore.setToken(null),this.user=null,Oo.navigate("/")});Z(this,"getUser",async()=>{try{const t=await Vt.Account.current();yt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t),Ze(()=>{this.user=t})}catch(t){console.log(t)}});Z(this,"setImage",t=>{this.user&&(this.user.image=t)});Z(this,"setDisplayName",t=>{this.user&&(this.user.displayName=t)});Z(this,"facebookLogin",async t=>{try{this.fbLoading=!0;const r=await Vt.Account.fbLogin(t);yt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>{this.user=r,this.fbLoading=!1}),Oo.navigate("/activities")}catch(r){console.log(r),Ze(()=>{this.fbLoading=!1})}});Z(this,"refreshToken",async()=>{this.stopRefreshTokenTimer();try{const t=await Vt.Account.refreshToken();Ze(()=>this.user=t),yt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t)}catch(t){console.log(t)}});Ic(this)}get isLoggedIn(){return!!this.user}startRefreshTokenTimer(t){const r=JSON.parse(atob(t.token.split(".")[1])),a=new Date(r.exp*1e3).getTime()-Date.now()-60*1e3;this.refreshTokenTimeout=setTimeout(this.refreshToken,a),console.log({refreshTimeout:this.refreshTokenTimeout})}stopRefreshTokenTimer(){clearTimeout(this.refreshTokenTimeout)}}class Yse{constructor(){Z(this,"modal",{open:!1,body:null});Z(this,"openModal",t=>{this.modal.open=!0,this.modal.body=t});Z(this,"closeModal",()=>{this.modal.open=!1,this.modal.body=null});Ic(this)}}class Gse{constructor(){Z(this,"profile",null);Z(this,"loadingProfile",!1);Z(this,"uploading",!1);Z(this,"loading",!1);Z(this,"followings",[]);Z(this,"loadingFollowings",!1);Z(this,"activeTab",0);Z(this,"userActivities",[]);Z(this,"loadingActivities",!1);Z(this,"setActiveTab",t=>{this.activeTab=t});Z(this,"loadProfile",async t=>{this.loadingProfile=!0;try{const r=await Vt.Profiles.get(t);Ze(()=>{this.profile=r})}catch(r){console.log(r)}finally{Ze(()=>{this.loadingProfile=!1})}});Z(this,"uploadPhoto",async t=>{this.uploading=!0;try{const n=(await Vt.Profiles.uploadPhoto(t)).data;Ze(()=>{var a;this.profile&&((a=this.profile.photos)==null||a.push(n),n.isMain&&yt.userStore.user&&(yt.userStore.setImage(n.url),this.profile.image=n.url))})}catch(r){console.log(r)}finally{Ze(()=>{this.uploading=!1})}});Z(this,"setMainPhoto",async t=>{this.loading=!0;try{await Vt.Profiles.setMainPhoto(t.id),yt.userStore.setImage(t.url),Ze(()=>{this.profile&&this.profile.photos&&(this.profile.photos.find(r=>r.isMain).isMain=!1,this.profile.photos.find(r=>r.id===t.id).isMain=!0,this.profile.image=t.url)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"deletePhoto",async t=>{this.loading=!0;try{await Vt.Profiles.deletePhoto(t.id),Ze(()=>{var r;this.profile&&(this.profile.photos=(r=this.profile.photos)==null?void 0:r.filter(n=>n.id!==t.id))})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"updateProfile",async t=>{this.loading=!0;try{await Vt.Profiles.updateProfile(t),Ze(()=>{var r;t.displayName&&t.displayName!==((r=yt.userStore.user)==null?void 0:r.displayName)&&yt.userStore.setDisplayName(t.displayName),this.profile={...this.profile,...t},this.loading=!1})}catch(r){console.log(r),Ze(()=>this.loading=!1)}});Z(this,"updateFollowing",async(t,r)=>{this.loading=!0;try{await Vt.Profiles.updateFollowing(t),yt.activityStore.updateAttendeeFollowing(t),Ze(()=>{var n,a;this.profile&&this.profile.username!==((n=yt.userStore.user)==null?void 0:n.username)&&this.profile.username===t&&(r?this.profile.followersCount++:this.profile.followersCount--,this.profile.following=!this.profile.following),this.profile&&this.profile.username===((a=yt.userStore.user)==null?void 0:a.username)&&(r?this.profile.followersCount++:this.profile.followersCount--),this.followings.forEach(i=>{i.username==t&&(i.following?i.followersCount--:i.followersCount++,i.following=!i.following)}),this.loading=!1})}catch(n){console.log(n),Ze(()=>this.loading=!1)}});Z(this,"loadFollowings",async t=>{this.loadingFollowings=!0;try{const r=await Vt.Profiles.listFollowings(this.profile.username,t);Ze(()=>{this.followings=r,this.loadingFollowings=!1})}catch(r){console.log(r),Ze(()=>this.loadingFollowings=!1)}});Z(this,"loadUserActivities",async(t,r)=>{this.loadingActivities=!0;try{const n=await Vt.Profiles.listActivities(t,r);Ze(()=>{this.userActivities=n,this.loadingActivities=!1})}catch(n){console.log(n),Ze(()=>{this.loadingActivities=!1})}});Ic(this),B1(()=>this.activeTab,t=>{if(t===3||t===4){const r=t===3?"followers":"following";this.loadFollowings(r)}else this.followings=[]})}get isCurrentUser(){return yt.userStore.user&&this.profile?yt.userStore.user.username===this.profile.username:!1}}class Pc extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class $S extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class xa extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Kse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Xse extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Jse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class S2{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Uy{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var B;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(B||(B={}));class Ap{constructor(){}log(t,r){}}Ap.instance=new Ap;const Zse="7.0.12";class Dr{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class Tr{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Np(e,t){let r="";return yh(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${ele(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function ele(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const a=n<16?"0":"";r+=`0x${a}${n.toString(16)} `}),r.substr(0,r.length-1)}function yh(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function x2(e,t,r,n,a,i){const o={},[s,l]=kc();o[s]=l,e.log(B.Trace,`(${t} transport) sending data. ${Np(a,i.logMessageContent)}.`);const u=yh(a)?"arraybuffer":"text",c=await r.post(n,{content:a,headers:{...o,...i.headers},responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});e.log(B.Trace,`(${t} transport) request complete. Response status: ${c.statusCode}.`)}function tle(e){return e===void 0?new Gm(B.Information):e===null?Ap.instance:e.log!==void 0?e:new Gm(e)}class rle{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class Gm{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${B[t]}: ${r}`;switch(t){case B.Critical:case B.Error:this.out.error(n);break;case B.Warning:this.out.warn(n);break;case B.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function kc(){let e="X-SignalR-User-Agent";return Tr.isNode&&(e="User-Agent"),[e,nle(Zse,ale(),ole(),ile())]}function nle(e,t,r,n){let a="Microsoft SignalR/";const i=e.split(".");return a+=`${i[0]}.${i[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${r}`,n?a+=`; ${n}`:a+="; Unknown Runtime Version",a+=")",a}function ale(){if(Tr.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function ile(){if(Tr.isNode)return process.versions.node}function ole(){return Tr.isNode?"NodeJS":"Browser"}function gP(e){return e.stack?e.stack:e.message?e.message:`${e}`}function sle(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class lle extends Uy{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,this._fetchType=r("node-fetch"),this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(sle());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new xa;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new xa});let a=null;if(t.timeout){const l=t.timeout;a=setTimeout(()=>{r.abort(),this._logger.log(B.Warning,"Timeout from HTTP request."),n=new $S},l)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},yh(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(l){throw n||(this._logger.log(B.Warning,`Error from HTTP request. ${l}.`),l)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!i.ok){const l=await yP(i,"text");throw new Pc(l||i.statusText,i.status)}const s=await yP(i,t.responseType);return new S2(i.status,i.statusText,s)}getCookieString(t){let r="";return Tr.isNode&&this._jar&&this._jar.getCookies(t,(n,a)=>r=a.join("; ")),r}}function yP(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class ule extends Uy{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?new Promise((r,n)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(yh(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(o=>{a.setRequestHeader(o,i[o])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),n(new xa)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?r(new S2(a.status,a.statusText,a.response||a.responseText)):n(new Pc(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(B.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),n(new Pc(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(B.Warning,"Timeout from HTTP request."),n(new $S)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class cle extends Uy{constructor(t){if(super(),typeof fetch<"u"||Tr.isNode)this._httpClient=new lle(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new ule(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class An{static write(t){return`${t}${An.RecordSeparator}`}static parse(t){if(t[t.length-1]!==An.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(An.RecordSeparator);return r.pop(),r}}An.RecordSeparatorCode=30;An.RecordSeparator=String.fromCharCode(An.RecordSeparatorCode);class fle{writeHandshakeRequest(t){return An.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(yh(t)){const s=new Uint8Array(t),l=s.indexOf(An.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),n=s.byteLength>u?s.slice(u).buffer:null}else{const s=t,l=s.indexOf(An.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=s.substring(0,u),n=s.length>u?s.substring(u):null}const a=An.parse(r),i=JSON.parse(a[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[n,i]}}var Et;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(Et||(Et={}));class dle{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new rle(this,t)}}const ple=30*1e3,hle=15*1e3;var Bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Bt||(Bt={}));class jS{constructor(t,r,n,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(B.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Dr.isRequired(t,"connection"),Dr.isRequired(r,"logger"),Dr.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=ple,this.keepAliveIntervalInMilliseconds=hle,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new fle,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Et.Ping})}static create(t,r,n,a){return new jS(t,r,n,a)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Bt.Disconnected&&this._connectionState!==Bt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Bt.Connecting,this._logger.log(B.Debug,"Starting HubConnection.");try{await this._startInternal(),Tr.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Bt.Connected,this._connectionStarted=!0,this._logger.log(B.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Bt.Disconnected,this._logger.log(B.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{const r={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(B.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(B.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(B.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===Bt.Disconnected?(this._logger.log(B.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===Bt.Disconnecting?(this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=Bt.Disconnecting,this._logger.log(B.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(B.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new xa("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createStreamInvocation(t,r,a);let o;const s=new dle;return s.cancelCallback=()=>{const l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],o.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){s.error(u);return}else l&&(l.type===Et.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},o=this._sendWithProtocol(i).catch(l=>{s.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(n,o),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._sendWithProtocol(this._createInvocation(t,r,!0,a));return this._launchStreams(n,i),i}invoke(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createInvocation(t,r,!1,a);return new Promise((s,l)=>{this._callbacks[i.invocationId]=(c,f)=>{if(f){l(f);return}else c&&(c.type===Et.Completion?c.error?l(new Error(c.error)):s(c.result):l(new Error(`Unexpected message type: ${c.type}`)))};const u=this._sendWithProtocol(i).catch(c=>{l(c),delete this._callbacks[i.invocationId]});this._launchStreams(n,u)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const a=n.indexOf(r);a!==-1&&(n.splice(a,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)switch(n.type){case Et.Invocation:this._invokeClientMethod(n);break;case Et.StreamItem:case Et.Completion:{const a=this._callbacks[n.invocationId];if(a){n.type===Et.Completion&&delete this._callbacks[n.invocationId];try{a(n)}catch(i){this._logger.log(B.Error,`Stream callback threw error: ${gP(i)}`)}}break}case Et.Ping:break;case Et.Close:{this._logger.log(B.Information,"Close message received from server.");const a=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}default:this._logger.log(B.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const i="Error parsing handshake response: "+a;this._logger.log(B.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}if(r.error){const a="Server returned handshake error: "+r.error;this._logger.log(B.Error,a);const i=new Error(a);throw this._handshakeRejecter(i),i}else this._logger.log(B.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===Bt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(B.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=n.slice(),i=!!t.invocationId;let o,s,l;for(const u of a)try{const c=o;o=await u.apply(this,t.arguments),i&&o&&c&&(this._logger.log(B.Error,`Multiple results provided for '${r}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(c){s=c,this._logger.log(B.Error,`A callback for the method '${r}' threw error '${c}'.`)}l?await this._sendWithProtocol(l):i?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):o!==void 0?l=this._createCompletionMessage(t.invocationId,null,o):(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):o&&this._logger.log(B.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(B.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new xa("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Bt.Disconnecting?this._completeClose(t):this._connectionState===Bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Bt.Disconnected,this._connectionStarted=!1,Tr.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(B.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(n++,0,a);if(i===null){this._logger.log(B.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Bt.Reconnecting,t?this._logger.log(B.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(B.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(o=>o.apply(this,[t]))}catch(o){this._logger.log(B.Error,`An onreconnecting callback called with error '${t}' threw error '${o}'.`)}if(this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(B.Information,`Reconnect attempt number ${n} will start in ${i} ms.`),await new Promise(o=>{this._reconnectDelayHandle=setTimeout(o,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Bt.Connected,this._logger.log(B.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(o=>o.apply(this,[this.connection.connectionId]))}catch(o){this._logger.log(B.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${o}'.`)}return}catch(o){if(this._logger.log(B.Information,`Reconnect attempt failed because of error '${o}'.`),this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Bt.Disconnecting&&this._completeClose();return}a=o instanceof Error?o:new Error(o.toString()),i=this._getNextRetryDelay(n++,Date.now()-r,a)}}this._logger.log(B.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(a){return this._logger.log(B.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const a=r[n];try{a(null,t)}catch(i){this._logger.log(B.Error,`Stream 'error' callback called with '${t}' threw error: ${gP(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,a){if(n)return a.length!==0?{arguments:r,streamIds:a,target:t,type:Et.Invocation}:{arguments:r,target:t,type:Et.Invocation};{const i=this._invocationId;return this._invocationId++,a.length!==0?{arguments:r,invocationId:i.toString(),streamIds:a,target:t,type:Et.Invocation}:{arguments:r,invocationId:i.toString(),target:t,type:Et.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:a=>{let i;a instanceof Error?i=a.message:a&&a.toString?i=a.toString():i="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,i)))},next:a=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,a)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let a=0;a0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Vs.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Vs.Authorization]&&delete t.headers[Vs.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Er;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Er||(Er={}));var qr;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(qr||(qr={}));let gle=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class bP{constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new gle,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,r){if(Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._url=t,this._logger.log(B.Trace,"(LongPolling transport) Connecting."),r===qr.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,a]=kc(),i={[n]:a,...this._options.headers},o={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};r===qr.Binary&&(o.responseType="arraybuffer");const s=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${s}.`);const l=await this._httpClient.get(s,o);l.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new Pc(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,o)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${n}.`);const a=await this._httpClient.get(n,r);a.statusCode===204?(this._logger.log(B.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Pc(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(B.Trace,`(LongPolling transport) data received. ${Np(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $S?this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(B.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(B.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?x2(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(B.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(B.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=kc();t[r]=n;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,a),this._logger.log(B.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(B.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(B.Trace,t),this.onclose(this._closeError)}}}class yle{constructor(t,r,n,a){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,r){return Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,a)=>{let i=!1;if(r!==qr.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let o;if(Tr.isBrowser||Tr.isWebWorker)o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const s=this._httpClient.getCookieString(t),l={};l.Cookie=s;const[u,c]=kc();l[u]=c,o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...l,...this._options.headers}})}try{o.onmessage=s=>{if(this.onreceive)try{this._logger.log(B.Trace,`(SSE transport) data received. ${Np(s.data,this._options.logMessageContent)}.`),this.onreceive(s.data)}catch(l){this._close(l);return}},o.onerror=s=>{i?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(B.Information,`SSE connected to ${this._url}`),this._eventSource=o,i=!0,n()}}catch(s){a(s);return}})}async send(t){return this._eventSource?x2(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class wle{constructor(t,r,n,a,i,o){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=a,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=o}async connect(t,r){Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((a,i)=>{t=t.replace(/^http/,"ws");let o;const s=this._httpClient.getCookieString(t);let l=!1;if(Tr.isNode||Tr.isReactNative){const u={},[c,f]=kc();u[c]=f,n&&(u[Vs.Authorization]=`Bearer ${n}`),s&&(u[Vs.Cookie]=s),o=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);o||(o=new this._webSocketConstructor(t)),r===qr.Binary&&(o.binaryType="arraybuffer"),o.onopen=u=>{this._logger.log(B.Information,`WebSocket connected to ${t}.`),this._webSocket=o,l=!0,a()},o.onerror=u=>{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="There was an error with the transport",this._logger.log(B.Information,`(WebSockets transport) ${c}.`)},o.onmessage=u=>{if(this._logger.log(B.Trace,`(WebSockets transport) data received. ${Np(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(c){this._close(c);return}},o.onclose=u=>{if(l)this._close(u);else{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(c))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(B.Trace,`(WebSockets transport) sending data. ${Np(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(B.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const _P=100;class ble{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Dr.isRequired(t,"url"),this._logger=tle(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,a=null;if(Tr.isNode&&typeof require<"u"){const i=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=i("ws"),a=i("eventsource")}!Tr.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Tr.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Tr.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Tr.isNode&&!r.EventSource&&typeof a<"u"&&(r.EventSource=a),this._httpClient=new mle(r.httpClient||new cle(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||qr.Binary,Dr.isIn(t,qr,"transferFormat"),this._logger.log(B.Debug,`Starting connection with transfer format '${qr[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(B.Error,r),await this._stopPromise,Promise.reject(new xa(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(B.Error,r),Promise.reject(new xa(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new LS(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(B.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(B.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Er.WebSockets)this.transport=this._constructTransport(Er.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,a=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xa("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const i=n.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}a++}while(n.url&&a<_P);if(a===_P&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof bP&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(B.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(B.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,a]=kc();r[n]=a;const i=this._resolveNegotiateUrl(t);this._logger.log(B.Debug,`Sending negotiation request: ${i}.`);try{const o=await this._httpClient.post(i,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(o.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${o.statusCode}'`));const s=JSON.parse(o.content);return(!s.negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),s}catch(o){let s="Failed to complete negotiation with the server: "+o;return o instanceof Pc&&o.statusCode===404&&(s=s+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(B.Error,s),Promise.reject(new Xse(s))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,a){let i=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(B.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(i,a),this.connectionId=n.connectionId;return}const o=[],s=n.availableTransports||[];let l=n;for(const u of s){const c=this._resolveTransportOrError(u,r,a);if(c instanceof Error)o.push(`${u.transport} failed:`),o.push(c);else if(this._isITransport(c)){if(this.transport=c,!l){try{l=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}i=this._createConnectUrl(t,l.connectionToken)}try{await this._startTransport(i,a),this.connectionId=l.connectionId;return}catch(f){if(this._logger.log(B.Error,`Failed to start the transport '${u.transport}': ${f}`),l=void 0,o.push(new Qse(`${u.transport} failed: ${f}`,Er[u.transport])),this._connectionState!=="Connecting"){const d="Failed to select transport before stop() was called.";return this._logger.log(B.Debug,d),Promise.reject(new xa(d))}}}}return o.length>0?Promise.reject(new Jse(`Unable to connect to the server with any of the available transports. ${o.join(" ")}`,o)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Er.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new wle(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Er.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new yle(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Er.LongPolling:return new bP(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n){const a=Er[t.transport];if(a==null)return this._logger.log(B.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(_le(r,a))if(t.transferFormats.map(o=>qr[o]).indexOf(n)>=0){if(a===Er.WebSockets&&!this._options.WebSocket||a===Er.ServerSentEvents&&!this._options.EventSource)return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it is not supported in your environment.'`),new Kse(`'${Er[a]}' is not supported in your environment.`,a);this._logger.log(B.Debug,`Selecting transport '${Er[a]}'.`);try{return this._constructTransport(a)}catch(o){return o}}else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it does not support the requested transfer format '${qr[n]}'.`),new Error(`'${Er[a]}' does not support ${qr[n]}.`);else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it was disabled by the client.`),new qse(`'${Er[a]}' is disabled by the client.`,a)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(B.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(B.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(B.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(B.Error,`Connection disconnected with error '${t}'.`):this._logger.log(B.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(B.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(B.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Tr.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(B.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=t.indexOf("?");let n=t.substring(0,r===-1?t.length:r);return n[n.length-1]!=="/"&&(n+="/"),n+="negotiate",n+=r===-1?"":t.substring(r),n.indexOf("negotiateVersion")===-1&&(n+=r===-1?"?":"&",n+="negotiateVersion="+this._negotiateVersion),n}}function _le(e,t){return!e||(t&e)!==0}class LS{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new av,this._transportResult=new av,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new av),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new av;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):LS._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(i=>i.byteLength).reduce((i,o)=>i+o),n=new Uint8Array(r);let a=0;for(const i of t)n.set(new Uint8Array(i),a),a+=i.byteLength;return n.buffer}}class av{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const Ele="json";class Sle{constructor(){this.name=Ele,this.version=1,this.transferFormat=qr.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ap.instance);const n=An.parse(t),a=[];for(const i of n){const o=JSON.parse(i);if(typeof o.type!="number")throw new Error("Invalid payload.");switch(o.type){case Et.Invocation:this._isInvocationMessage(o);break;case Et.StreamItem:this._isStreamItemMessage(o);break;case Et.Completion:this._isCompletionMessage(o);break;case Et.Ping:break;case Et.Close:break;default:r.log(B.Information,"Unknown message type '"+o.type+"' ignored.");continue}a.push(o)}return a}writeMessage(t){return An.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const xle={trace:B.Trace,debug:B.Debug,info:B.Information,information:B.Information,warn:B.Warning,warning:B.Warning,error:B.Error,critical:B.Critical,none:B.None};function Cle(e){const t=xle[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class Ole{configureLogging(t){if(Dr.isRequired(t,"logging"),Tle(t))this.logger=t;else if(typeof t=="string"){const r=Cle(t);this.logger=new Gm(r)}else this.logger=new Gm(t);return this}withUrl(t,r){return Dr.isRequired(t,"url"),Dr.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Dr.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new wP(t):this.reconnectPolicy=t:this.reconnectPolicy=new wP,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new ble(this.url,t);return jS.create(r,this.logger||Ap.instance,this.protocol||new Sle,this.reconnectPolicy)}}function Tle(e){return e.log!==void 0}class Dle{constructor(){Z(this,"comments",[]);Z(this,"hubConnection",null);Z(this,"createHubConnection",t=>{yt.activityStore.selectedActivity&&(this.hubConnection=new Ole().withUrl(`/chat?activityId=${t}`,{accessTokenFactory:()=>{var r;return(r=yt.userStore.user)==null?void 0:r.token}}).withAutomaticReconnect().configureLogging(B.Information).build(),this.hubConnection.start().catch(r=>console.log("Error establishing the connection: "+r)),this.hubConnection.on("LoadComments",r=>{Ze(()=>{r.forEach(n=>{n.createdAt=new Date(n.createdAt)}),this.comments=r})}),this.hubConnection.on("ReceiveComment",r=>{Ze(()=>{r.createdAt=new Date(r.createdAt),this.comments.unshift(r)})}))});Z(this,"stopHubConnection",()=>{var t;(t=this.hubConnection)==null||t.stop().catch(r=>console.log("Error stopping connection: ",r))});Z(this,"clearComments",()=>{this.comments=[],this.stopHubConnection()});Z(this,"addComment",async t=>{var r,n;t.activityId=(r=yt.activityStore.selectedActivity)==null?void 0:r.id;try{await((n=this.hubConnection)==null?void 0:n.invoke("SendComment",t))}catch(a){console.log(a)}});Ic(this)}}const yt={activityStore:new Wse,commonStore:new Hse,userStore:new Vse,modalStore:new Yse,profileStore:new Gse,commentStore:new Dle},C2=x.createContext(yt);function Ft(){return x.useContext(C2)}lw.createRoot(document.getElementById("root")).render(_.jsx(b.StrictMode,{children:_.jsx(C2.Provider,{value:yt,children:_.jsx(_4,{router:Oo})})}))});export default Ple(); diff --git a/API/wwwroot/assets/index-afd03f0f.js b/API/wwwroot/assets/index-afd03f0f.js new file mode 100644 index 0000000..891d8bc --- /dev/null +++ b/API/wwwroot/assets/index-afd03f0f.js @@ -0,0 +1,143 @@ +var D2=Object.defineProperty;var P2=(e,t,r)=>t in e?D2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var k2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z=(e,t,r)=>(P2(e,typeof t!="symbol"?t+"":t,r),r);var Ple=k2((Nn,Rn)=>{function A2(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EP={exports:{}},Km={},SP={exports:{}},ze={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rp=Symbol.for("react.element"),N2=Symbol.for("react.portal"),R2=Symbol.for("react.fragment"),M2=Symbol.for("react.strict_mode"),I2=Symbol.for("react.profiler"),$2=Symbol.for("react.provider"),j2=Symbol.for("react.context"),L2=Symbol.for("react.forward_ref"),F2=Symbol.for("react.suspense"),U2=Symbol.for("react.memo"),B2=Symbol.for("react.lazy"),FS=Symbol.iterator;function z2(e){return e===null||typeof e!="object"?null:(e=FS&&e[FS]||e["@@iterator"],typeof e=="function"?e:null)}var xP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CP=Object.assign,OP={};function Ac(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}Ac.prototype.isReactComponent={};Ac.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ac.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function TP(){}TP.prototype=Ac.prototype;function U_(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}var B_=U_.prototype=new TP;B_.constructor=U_;CP(B_,Ac.prototype);B_.isPureReactComponent=!0;var US=Array.isArray,DP=Object.prototype.hasOwnProperty,z_={current:null},PP={key:!0,ref:!0,__self:!0,__source:!0};function kP(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)DP.call(t,n)&&!PP.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1>>1,we=H[_e];if(0>>1;_ea(Le,ce))Hea(lt,Le)?(H[_e]=lt,H[He]=ce,_e=He):(H[_e]=Le,H[ye]=ce,_e=ye);else if(Hea(lt,ce))H[_e]=lt,H[He]=ce,_e=He;else break e}}return ee}function a(H,ee){var ce=H.sortIndex-ee.sortIndex;return ce!==0?ce:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,h=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var ee=r(u);ee!==null;){if(ee.callback===null)n(u);else if(ee.startTime<=H)n(u),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=r(u)}}function w(H){if(v=!1,E(H),!h)if(r(l)!==null)h=!0,te(C);else{var ee=r(u);ee!==null&&ge(w,ee.startTime-H)}}function C(H,ee){h=!1,v&&(v=!1,m(D),D=-1),p=!0;var ce=d;try{for(E(ee),f=r(l);f!==null&&(!(f.expirationTime>ee)||H&&!j());){var _e=f.callback;if(typeof _e=="function"){f.callback=null,d=f.priorityLevel;var we=_e(f.expirationTime<=ee);ee=e.unstable_now(),typeof we=="function"?f.callback=we:f===r(l)&&n(l),E(ee)}else n(l);f=r(l)}if(f!==null)var rt=!0;else{var ye=r(u);ye!==null&&ge(w,ye.startTime-ee),rt=!1}return rt}finally{f=null,d=ce,p=!1}}var S=!1,O=null,D=-1,N=5,R=-1;function j(){return!(e.unstable_now()-RH||125_e?(H.sortIndex=ce,t(u,H),r(l)===null&&H===r(u)&&(v?(m(D),D=-1):v=!0,ge(w,ce-_e))):(H.sortIndex=we,t(l,H),h||p||(h=!0,te(C))),H},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(H){var ee=d;return function(){var ce=d;d=ee;try{return H.apply(this,arguments)}finally{d=ce}}}})(MP);RP.exports=MP;var eL=RP.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IP=x,$n=eL;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uw=Object.prototype.hasOwnProperty,tL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zS={},WS={};function rL(e){return uw.call(WS,e)?!0:uw.call(zS,e)?!1:tL.test(e)?WS[e]=!0:(zS[e]=!0,!1)}function nL(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aL(e,t,r,n){if(t===null||typeof t>"u"||nL(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vr[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vr[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vr[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vr[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vr[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vr[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vr[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vr[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vr[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var H_=/[\-:]([a-z])/g;function V_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Vr.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y_(e,t,r,n){var a=Vr.hasOwnProperty(t)?Vr[t]:null;(a!==null?a.type!==0:n||!(2s||a[o]!==i[s]){var l=` +`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{Wy=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Tf(e):""}function iL(e){switch(e.tag){case 5:return Tf(e.type);case 16:return Tf("Lazy");case 13:return Tf("Suspense");case 19:return Tf("SuspenseList");case 0:case 2:case 15:return e=Hy(e.type,!1),e;case 11:return e=Hy(e.type.render,!1),e;case 1:return e=Hy(e.type,!0),e;default:return""}}function pw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vl:return"Fragment";case Hl:return"Portal";case cw:return"Profiler";case G_:return"StrictMode";case fw:return"Suspense";case dw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case LP:return(e.displayName||"Context")+".Consumer";case jP:return(e._context.displayName||"Context")+".Provider";case K_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q_:return t=e.displayName||null,t!==null?t:pw(e.type)||"Memo";case po:t=e._payload,e=e._init;try{return pw(e(t))}catch{}}return null}function oL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pw(t);case 8:return t===G_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sL(e){var t=UP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _h(e){e._valueTracker||(e._valueTracker=sL(e))}function BP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=UP(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Av(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hw(e,t){var r=t.checked;return Kt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function VS(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=jo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zP(e,t){t=t.checked,t!=null&&Y_(e,"checked",t,!1)}function vw(e,t){zP(e,t);var r=jo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mw(e,t.type,r):t.hasOwnProperty("defaultValue")&&mw(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YS(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mw(e,t,r){(t!=="number"||Av(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Df=Array.isArray;function pu(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Eh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ud(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Lf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lL=["Webkit","ms","Moz","O"];Object.keys(Lf).forEach(function(e){lL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lf[t]=Lf[e]})});function YP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Lf.hasOwnProperty(e)&&Lf[e]?(""+t).trim():t+"px"}function GP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=YP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var uL=Kt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ww(e,t){if(t){if(uL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function bw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _w=null;function Q_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ew=null,hu=null,vu=null;function qS(e){if(e=$p(e)){if(typeof Ew!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Zm(t),Ew(e.stateNode,e.type,t))}}function KP(e){hu?vu?vu.push(e):vu=[e]:hu=e}function qP(){if(hu){var e=hu,t=vu;if(vu=hu=null,qS(e),t)for(e=0;e>>=0,e===0?32:31-(bL(e)/_L|0)|0}var Sh=64,xh=4194304;function Pf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Iv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=Pf(s):(i&=o,i!==0&&(n=Pf(i)))}else o=r&~a,o!==0?n=Pf(o):i!==0&&(n=Pf(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Mp(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ca(t),e[t]=r}function CL(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Uf),ax=String.fromCharCode(32),ix=!1;function vk(e,t){switch(e){case"keyup":return ZL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yl=!1;function tF(e,t){switch(e){case"compositionend":return mk(t);case"keypress":return t.which!==32?null:(ix=!0,ax);case"textInput":return e=t.data,e===ax&&ix?null:e;default:return null}}function rF(e,t){if(Yl)return e==="compositionend"||!a1&&vk(e,t)?(e=pk(),lv=t1=wo=null,Yl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ux(r)}}function bk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _k(){for(var e=window,t=Av();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Av(e.document)}return t}function i1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fF(e){var t=_k(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bk(r.ownerDocument.documentElement,r)){if(n!==null&&i1(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=cx(r,i);var o=cx(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Gl=null,Dw=null,zf=null,Pw=!1;function fx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Pw||Gl==null||Gl!==Av(n)||(n=Gl,"selectionStart"in n&&i1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zf&&vd(zf,n)||(zf=n,n=Lv(Dw,"onSelect"),0Ql||(e.current=Iw[Ql],Iw[Ql]=null,Ql--)}function St(e,t){Ql++,Iw[Ql]=e.current,e.current=t}var Lo={},Qr=is(Lo),gn=is(!1),Ys=Lo;function ku(e,t){var r=e.type.contextTypes;if(!r)return Lo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yn(e){return e=e.childContextTypes,e!=null}function Uv(){At(gn),At(Qr)}function yx(e,t,r){if(Qr.current!==Lo)throw Error(ne(168));St(Qr,t),St(gn,r)}function kk(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(ne(108,oL(e)||"Unknown",a));return Kt({},r,n)}function Bv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,Ys=Qr.current,St(Qr,e),St(gn,gn.current),!0}function wx(e,t,r){var n=e.stateNode;if(!n)throw Error(ne(169));r?(e=kk(e,t,Ys),n.__reactInternalMemoizedMergedChildContext=e,At(gn),At(Qr),St(Qr,e)):At(gn),St(gn,r)}var Si=null,eg=!1,a0=!1;function Ak(e){Si===null?Si=[e]:Si.push(e)}function SF(e){eg=!0,Ak(e)}function os(){if(!a0&&Si!==null){a0=!0;var e=0,t=pt;try{var r=Si;for(pt=1;e>=o,a-=o,Oi=1<<32-Ca(t)+a|r<D?(N=O,O=null):N=O.sibling;var R=d(m,O,E[D],w);if(R===null){O===null&&(O=N);break}e&&O&&R.alternate===null&&t(m,O),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R,O=N}if(D===E.length)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;DD?(N=O,O=null):N=O.sibling;var j=d(m,O,R.value,w);if(j===null){O===null&&(O=N);break}e&&O&&j.alternate===null&&t(m,O),g=i(j,g,D),S===null?C=j:S.sibling=j,S=j,O=N}if(R.done)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;!R.done;D++,R=E.next())R=f(m,R.value,w),R!==null&&(g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return $t&&ws(m,D),C}for(O=n(m,O);!R.done;D++,R=E.next())R=p(O,m,D,R.value,w),R!==null&&(e&&R.alternate!==null&&O.delete(R.key===null?D:R.key),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return e&&O.forEach(function(U){return t(m,U)}),$t&&ws(m,D),C}function y(m,g,E,w){if(typeof E=="object"&&E!==null&&E.type===Vl&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case bh:e:{for(var C=E.key,S=g;S!==null;){if(S.key===C){if(C=E.type,C===Vl){if(S.tag===7){r(m,S.sibling),g=a(S,E.props.children),g.return=m,m=g;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===po&&Ox(C)===S.type){r(m,S.sibling),g=a(S,E.props),g.ref=lf(m,S,E),g.return=m,m=g;break e}r(m,S);break}else t(m,S);S=S.sibling}E.type===Vl?(g=Rs(E.props.children,m.mode,w,E.key),g.return=m,m=g):(w=mv(E.type,E.key,E.props,null,m.mode,w),w.ref=lf(m,g,E),w.return=m,m=w)}return o(m);case Hl:e:{for(S=E.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===E.containerInfo&&g.stateNode.implementation===E.implementation){r(m,g.sibling),g=a(g,E.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=d0(E,m.mode,w),g.return=m,m=g}return o(m);case po:return S=E._init,y(m,g,S(E._payload),w)}if(Df(E))return h(m,g,E,w);if(rf(E))return v(m,g,E,w);Ah(m,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,g!==null&&g.tag===6?(r(m,g.sibling),g=a(g,E),g.return=m,m=g):(r(m,g),g=f0(E,m.mode,w),g.return=m,m=g),o(m)):r(m,g)}return y}var Nu=Fk(!0),Uk=Fk(!1),jp={},Za=is(jp),wd=is(jp),bd=is(jp);function Ds(e){if(e===jp)throw Error(ne(174));return e}function h1(e,t){switch(St(bd,t),St(wd,e),St(Za,jp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yw(t,e)}At(Za),St(Za,t)}function Ru(){At(Za),At(wd),At(bd)}function Bk(e){Ds(bd.current);var t=Ds(Za.current),r=yw(t,e.type);t!==r&&(St(wd,e),St(Za,r))}function v1(e){wd.current===e&&(At(Za),At(wd))}var Ht=is(0);function Gv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var i0=[];function m1(){for(var e=0;er?r:4,e(!0);var n=o0.transition;o0.transition={};try{e(!1),t()}finally{pt=r,o0.transition=n}}function nA(){return sa().memoizedState}function TF(e,t,r){var n=Ro(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},aA(e))iA(t,r);else if(r=Ik(e,t,r,n),r!==null){var a=nn();Oa(r,e,n,a),oA(r,t,n)}}function DF(e,t,r){var n=Ro(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(aA(e))iA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,Aa(s,o)){var l=t.interleaved;l===null?(a.next=a,d1(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=Ik(e,t,a,n),r!==null&&(a=nn(),Oa(r,e,n,a),oA(r,t,n))}}function aA(e){var t=e.alternate;return e===Gt||t!==null&&t===Gt}function iA(e,t){Wf=Kv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function oA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,J_(e,r)}}var qv={readContext:oa,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useInsertionEffect:Yr,useLayoutEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useDeferredValue:Yr,useTransition:Yr,useMutableSource:Yr,useSyncExternalStore:Yr,useId:Yr,unstable_isNewReconciler:!1},PF={readContext:oa,useCallback:function(e,t){return Ba().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:Dx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,dv(4194308,4,Jk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return dv(4194308,4,e,t)},useInsertionEffect:function(e,t){return dv(4,2,e,t)},useMemo:function(e,t){var r=Ba();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ba();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=TF.bind(null,Gt,e),[n.memoizedState,e]},useRef:function(e){var t=Ba();return e={current:e},t.memoizedState=e},useState:Tx,useDebugValue:_1,useDeferredValue:function(e){return Ba().memoizedState=e},useTransition:function(){var e=Tx(!1),t=e[0];return e=OF.bind(null,e[1]),Ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Gt,a=Ba();if($t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=t(),Pr===null)throw Error(ne(349));Ks&30||Hk(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,Dx(Yk.bind(null,n,i,e),[e]),n.flags|=2048,Sd(9,Vk.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ba(),t=Pr.identifierPrefix;if($t){var r=Ti,n=Oi;r=(n&~(1<<32-Ca(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=_d++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Wa]=t,e[yd]=n,vA(e,t,!1,!1),t.stateNode=e;e:{switch(o=bw(r,n),r){case"dialog":Dt("cancel",e),Dt("close",e),a=n;break;case"iframe":case"object":case"embed":Dt("load",e),a=n;break;case"video":case"audio":for(a=0;aIu&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304)}else{if(!n)if(e=Gv(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),uf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$t)return Gr(t),null}else 2*rr()-i.renderingStartTime>Iu&&r!==1073741824&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=rr(),t.sibling=null,r=Ht.current,St(Ht,n?r&1|2:r&1),t):(Gr(t),null);case 22:case 23:return T1(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dn&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function jF(e,t){switch(s1(t),t.tag){case 1:return yn(t.type)&&Uv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ru(),At(gn),At(Qr),m1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return v1(t),null;case 13:if(At(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Au()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(Ht),null;case 4:return Ru(),null;case 10:return f1(t.type._context),null;case 22:case 23:return T1(),null;case 24:return null;default:return null}}var Rh=!1,Kr=!1,LF=typeof WeakSet=="function"?WeakSet:Set,ve=null;function eu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qt(e,t,n)}else r.current=null}function Gw(e,t,r){try{r()}catch(n){Qt(e,t,n)}}var jx=!1;function FF(e,t){if(kw=$v,e=_k(),i1(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===a&&(s=o),d===i&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Aw={focusedElem:e,selectionRange:r},$v=!1,ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){t=ve;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,y=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:ma(t.type,v),y);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){Qt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}return h=jx,jx=!1,h}function Hf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Gw(t,r,i)}a=a.next}while(a!==n)}}function ng(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Kw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function yA(e){var t=e.alternate;t!==null&&(e.alternate=null,yA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wa],delete t[yd],delete t[Mw],delete t[_F],delete t[EF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wA(e){return e.tag===5||e.tag===3||e.tag===4}function Lx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Fv));else if(n!==4&&(e=e.child,e!==null))for(qw(e,t,r),e=e.sibling;e!==null;)qw(e,t,r),e=e.sibling}function Qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Qw(e,t,r),e=e.sibling;e!==null;)Qw(e,t,r),e=e.sibling}var Br=null,ga=!1;function lo(e,t,r){for(r=r.child;r!==null;)bA(e,t,r),r=r.sibling}function bA(e,t,r){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount(qm,r)}catch{}switch(r.tag){case 5:Kr||eu(r,t);case 6:var n=Br,a=ga;Br=null,lo(e,t,r),Br=n,ga=a,Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Br.removeChild(r.stateNode));break;case 18:Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?n0(e.parentNode,r):e.nodeType===1&&n0(e,r),pd(e)):n0(Br,r.stateNode));break;case 4:n=Br,a=ga,Br=r.stateNode.containerInfo,ga=!0,lo(e,t,r),Br=n,ga=a;break;case 0:case 11:case 14:case 15:if(!Kr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Gw(r,t,o),a=a.next}while(a!==n)}lo(e,t,r);break;case 1:if(!Kr&&(eu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Qt(r,t,s)}lo(e,t,r);break;case 21:lo(e,t,r);break;case 22:r.mode&1?(Kr=(n=Kr)||r.memoizedState!==null,lo(e,t,r),Kr=n):lo(e,t,r);break;default:lo(e,t,r)}}function Fx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new LF),t.forEach(function(n){var a=KF.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function pa(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=o),n&=~i}if(n=a,n=rr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BF(n/1960))-n,10e?16:e,bo===null)var n=!1;else{if(e=bo,bo=null,Jv=0,Ke&6)throw Error(ne(331));var a=Ke;for(Ke|=4,ve=e.current;ve!==null;){var i=ve,o=i.child;if(ve.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lrr()-C1?Ns(e,0):x1|=r),wn(e,t)}function DA(e,t){t===0&&(e.mode&1?(t=xh,xh<<=1,!(xh&130023424)&&(xh=4194304)):t=1);var r=nn();e=$i(e,t),e!==null&&(Mp(e,t,r),wn(e,r))}function GF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),DA(e,r)}function KF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(t),DA(e,r)}var PA;PA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)vn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return vn=!1,IF(e,t,r);vn=!!(e.flags&131072)}else vn=!1,$t&&t.flags&1048576&&Nk(t,Wv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;pv(e,t),e=t.pendingProps;var a=ku(t,Qr.current);gu(t,r),a=y1(null,t,n,e,a,r);var i=w1();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(i=!0,Bv(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,p1(t),a.updater=tg,t.stateNode=a,a._reactInternals=t,Uw(t,n,e,r),t=Ww(null,t,n,!0,i,r)):(t.tag=0,$t&&i&&o1(t),en(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(pv(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=QF(n),e=ma(n,e),a){case 0:t=zw(null,t,n,e,r);break e;case 1:t=Mx(null,t,n,e,r);break e;case 11:t=Nx(null,t,n,e,r);break e;case 14:t=Rx(null,t,n,ma(n.type,e),r);break e}throw Error(ne(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),zw(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Mx(e,t,n,a,r);case 3:e:{if(dA(t),e===null)throw Error(ne(387));n=t.pendingProps,i=t.memoizedState,a=i.element,$k(e,t),Yv(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Mu(Error(ne(423)),t),t=Ix(e,t,n,r,a);break e}else if(n!==a){a=Mu(Error(ne(424)),t),t=Ix(e,t,n,r,a);break e}else for(kn=ko(t.stateNode.containerInfo.firstChild),Mn=t,$t=!0,wa=null,r=Uk(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Au(),n===a){t=ji(e,t,r);break e}en(e,t,n,r)}t=t.child}return t;case 5:return Bk(t),e===null&&jw(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Nw(n,a)?o=null:i!==null&&Nw(n,i)&&(t.flags|=32),fA(e,t),en(e,t,o,r),t.child;case 6:return e===null&&jw(t),null;case 13:return pA(e,t,r);case 4:return h1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Nu(t,null,n,r):en(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Nx(e,t,n,a,r);case 7:return en(e,t,t.pendingProps,r),t.child;case 8:return en(e,t,t.pendingProps.children,r),t.child;case 12:return en(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,St(Hv,n._currentValue),n._currentValue=o,i!==null)if(Aa(i.value,o)){if(i.children===a.children&&!gn.current){t=ji(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Di(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Lw(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Lw(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}en(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,gu(t,r),a=oa(a),n=n(a),t.flags|=1,en(e,t,n,r),t.child;case 14:return n=t.type,a=ma(n,t.pendingProps),a=ma(n.type,a),Rx(e,t,n,a,r);case 15:return uA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),pv(e,t),t.tag=1,yn(n)?(e=!0,Bv(t)):e=!1,gu(t,r),Lk(t,n,a),Uw(t,n,a,r),Ww(null,t,n,!0,e,r);case 19:return hA(e,t,r);case 22:return cA(e,t,r)}throw Error(ne(156,t.tag))};function kA(e,t){return rk(e,t)}function qF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(e,t,r,n){return new qF(e,t,r,n)}function P1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QF(e){if(typeof e=="function")return P1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===K_)return 11;if(e===q_)return 14}return 2}function Mo(e,t){var r=e.alternate;return r===null?(r=Jn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function mv(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")P1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Vl:return Rs(r.children,a,i,t);case G_:o=8,a|=8;break;case cw:return e=Jn(12,r,t,a|2),e.elementType=cw,e.lanes=i,e;case fw:return e=Jn(13,r,t,a),e.elementType=fw,e.lanes=i,e;case dw:return e=Jn(19,r,t,a),e.elementType=dw,e.lanes=i,e;case FP:return ig(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jP:o=10;break e;case LP:o=9;break e;case K_:o=11;break e;case q_:o=14;break e;case po:o=16,n=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Jn(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Rs(e,t,r,n){return e=Jn(7,e,n,t),e.lanes=r,e}function ig(e,t,r,n){return e=Jn(22,e,n,t),e.elementType=FP,e.lanes=r,e.stateNode={isHidden:!1},e}function f0(e,t,r){return e=Jn(6,e,null,t),e.lanes=r,e}function d0(e,t,r){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XF(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yy(0),this.expirationTimes=Yy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yy(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function k1(e,t,r,n,a,i,o,s,l){return e=new XF(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},p1(i),e}function JF(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MA)}catch(e){console.error(e)}}MA(),NP.exports=Fn;var Fo=NP.exports;const nU=Xr(Fo);var Gx=Fo;lw.createRoot=Gx.createRoot,lw.hydrateRoot=Gx.hydrateRoot;function at(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cU(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fU(e){var t=cU(e,"string");return typeof t=="symbol"?t:String(t)}var Ga=Symbol("mobx-stored-annotations");function ti(e){function t(r,n){Up(r,n,e)}return Object.assign(t,e)}function Up(e,t,r){Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),bU(r)||(e[Ga][t]=r)}function dU(e){return Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),e[Ga]}var Pe=Symbol("mobx administration"),Bp=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.batchId_=void 0,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=tt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r,this.batchId_=ie.inBatch?ie.batchId:NaN}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return cN(this)},t.reportChanged=function(){(!ie.inBatch||this.batchId_!==ie.batchId)&&(ie.stateVersion=ie.stateVersionn&&(n=s.dependenciesState_)}for(r.length=a,e.newObserving_=null,i=t.length;i--;){var l=t[i];l.diffValue_===0&&lN(l,e),l.diffValue_=0}for(;a--;){var u=r[a];u.diffValue_===1&&(u.diffValue_=0,r3(u,e))}n!==tt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function ab(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)lN(t[r],e);e.dependenciesState_=tt.NOT_TRACKING_}function aN(e){var t=gl();try{return e()}finally{ki(t)}}function gl(){var e=ie.trackingDerivation;return ie.trackingDerivation=null,e}function ki(e){ie.trackingDerivation=e}function F1(e){var t=ie.allowStateReads;return ie.allowStateReads=e,t}function Gf(e){ie.allowStateReads=e}function iN(e){if(e.dependenciesState_!==tt.UP_TO_DATE_){e.dependenciesState_=tt.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=tt.UP_TO_DATE_}}var yv=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.batchId=Number.MIN_SAFE_INTEGER,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0,this.stateVersion=Number.MIN_SAFE_INTEGER},wv=!0,oN=!1,ie=function(){var e=M1();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(wv=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new yv().version&&(wv=!1),wv?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new yv):(setTimeout(function(){oN||at(35)},1),new yv)}();function t3(){if((ie.pendingReactions.length||ie.inBatch||ie.isRunningReactions)&&at(36),oN=!0,wv){var e=M1();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),ie=new yv}}function sN(){return ie}function r3(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lN(e,t){e.observers_.delete(t),e.observers_.size===0&&uN(e)}function uN(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,ie.pendingUnobservations.push(e))}function Zn(){ie.inBatch===0&&(ie.batchId=ie.batchId0&&uN(e),!1)}function fN(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=tt.STALE_}))}function n3(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.POSSIBLY_STALE_?t.dependenciesState_=tt.STALE_:t.dependenciesState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.UP_TO_DATE_)}))}function a3(e){e.lowestObserverState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&(t.dependenciesState_=tt.POSSIBLY_STALE_,t.onBecomeStale_())}))}var Od=function(){function e(r,n,a,i){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=tt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=nm.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ie.pendingReactions.push(this),dN())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){Zn(),this.isScheduled_=!1;var n=ie.trackingContext;if(ie.trackingContext=this,nb(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}ie.trackingContext=n,ea()}},t.track=function(n){if(!this.isDisposed_){Zn(),this.isRunning_=!0;var a=ie.trackingContext;ie.trackingContext=this;var i=nN(this,n,void 0);ie.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&ab(this),gv(i)&&this.reportExceptionInDerivation_(i.cause),ea()}},t.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(ie.disableErrorBoundaries)throw n;var i="[mobx] uncaught error in '"+this+"'";ie.suppressReactionErrors||console.error(i,n),ie.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(Zn(),ab(this),ea()))},t.getDisposer_=function(n){var a=this,i=function o(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[Pe]=this,i},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}(),i3=100,ib=function(t){return t()};function dN(){ie.inBatch>0||ie.isRunningReactions||ib(o3)}function o3(){ie.isRunningReactions=!0;for(var e=ie.pendingReactions,t=0;e.length>0;){++t===i3&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,a=r.length;n0&&(t.dependencies=S3(e.observing_).map(SN)),t}function S3(e){return Array.from(new Set(e))}var x3=0;function xN(){this.message="FLOW_CANCELLED"}xN.prototype=Object.create(Error.prototype);var Zx=VA("flow"),C3=VA("flow.bound",{bound:!0}),Dd=Object.assign(function(t,r){if(Xs(r))return Up(t,r,Zx);var n=t,a=n.name||"",i=function(){var s=this,l=arguments,u=++x3,c=Ps(a+" - runid: "+u+" - init",n).apply(s,l),f,d=void 0,p=new Promise(function(h,v){var y=0;f=v;function m(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.next).call(c,w)}catch(S){return v(S)}E(C)}function g(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.throw).call(c,w)}catch(S){return v(S)}E(C)}function E(w){if(Na(w==null?void 0:w.then)){w.then(E,v);return}return w.done?h(w.value):(d=Promise.resolve(w.value),d.then(m,g))}m(void 0)});return p.cancel=Ps(a+" - runid: "+u+" - cancel",function(){try{d&&eC(d);var h=c.return(void 0),v=Promise.resolve(h.value);v.then(ru,ru),eC(v),f(new xN)}catch(y){f(y)}}),p};return i.isMobXFlow=!0,i},Zx);Dd.bound=ti(C3);function eC(e){Na(e.cancel)&&e.cancel()}function om(e){return(e==null?void 0:e.isMobXFlow)===!0}function O3(e,t){return e?t!==void 0?Pd(e)?e[Pe].values_.has(t):!1:Pd(e)||!!e[Pe]||j1(e)||im(e)||gg(e):!1}function CN(e){return O3(e)}function xi(e,t){t===void 0&&(t=void 0),Zn();try{return e.apply(t)}finally{ea()}}function Ml(e){return e[Pe]}var T3={has:function(t,r){return Ml(t).has_(r)},get:function(t,r){return Ml(t).get_(r)},set:function(t,r,n){var a;return Xs(r)?(a=Ml(t).set_(r,n,!0))!=null?a:!0:!1},deleteProperty:function(t,r){var n;return Xs(r)?(n=Ml(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var a;return(a=Ml(t).defineProperty_(r,n))!=null?a:!0},ownKeys:function(t){return Ml(t).ownKeys_()},preventExtensions:function(t){at(13)}};function D3(e,t){var r,n;return $A(),e=Vp(e,t),(n=(r=e[Pe]).proxy_)!=null?n:r.proxy_=new Proxy(e,T3)}function Qn(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Wp(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Xn(e,t){var r=gl();try{for(var n=[].concat(e.interceptors_||[]),a=0,i=n.length;a0}function Hp(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Da(e,t){var r=gl(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,i=n.length;a0?n.map(this.dehancer):n},t.intercept_=function(n){return Wp(this,n)},t.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Hp(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&at("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var i=new Array(n-a),o=0;o0&&$N(n+a+1)},t.spliceWithArray_=function(n,a,i){var o=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?a=s-n:a==null?a=0:a=Math.max(0,Math.min(a,s-n)),i===void 0&&(i=tb),Qn(this)){var l=Xn(this,{object:this.proxy_,type:tC,index:n,removedCount:a,added:i});if(!l)return tb;a=l.removedCount,i=l.added}if(i=i.length===0?i:i.map(function(f){return o.enhancer_(f,void 0)}),this.legacyMode_){var u=i.length-a;this.updateArrayLength_(s,u)}var c=this.spliceItemsIntoValues_(n,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(n,i,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(n,a,i){if(i.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,a){var i=this.values_;if(this.legacyMode_&&n>i.length&&at(17,n,i.length),n2?n-2:0),i=2;i-1?(this.splice(n,1),!0):!1}};br("concat",Ji);br("flat",Ji);br("includes",Ji);br("indexOf",Ji);br("join",Ji);br("lastIndexOf",Ji);br("slice",Ji);br("toString",Ji);br("toLocaleString",Ji);br("every",ss);br("filter",ss);br("find",ss);br("findIndex",ss);br("flatMap",ss);br("forEach",ss);br("map",ss);br("some",ss);br("reduce",ON);br("reduceRight",ON);function br(e,t){typeof Array.prototype[e]=="function"&&(sm[e]=t(e))}function Ji(e){return function(){var t=this[Pe];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function ss(e){return function(t,r){var n=this,a=this[Pe];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,s){return t.call(r,o,s,n)})}}function ON(e){return function(){var t=this,r=this[Pe];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(i,o,s){return a(i,o,s,t)},n[e].apply(n,arguments)}}var R3=ml("ObservableArrayAdministration",z1);function yg(e){return fg(e)&&R3(e[Pe])}var TN,DN,M3={},_o="add",lm="delete";TN=Symbol.iterator;DN=Symbol.toStringTag;var PN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Pe]=M3,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=a,Na(Map)||at(18),ls(function(){i.keysAtom_=WA("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,r&&i.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var a=this;if(!ie.trackingDerivation)return this.has_(n);var i=this.hasMap_.get(n);if(!i){var o=i=new wu(this.has_(n),dg,"ObservableMap.key?",!1);this.hasMap_.set(n,o),bN(o,function(){return a.hasMap_.delete(n)})}return i.get()},t.set=function(n,a){var i=this.has_(n);if(Qn(this)){var o=Xn(this,{type:i?ri:_o,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return i?this.updateValue_(n,a):this.addValue_(n,a),this},t.delete=function(n){var a=this;if(this.keysAtom_,Qn(this)){var i=Xn(this,{type:lm,object:this,name:n});if(!i)return!1}if(this.has_(n)){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:lm,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return xi(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(n))==null||u.setNewValue_(!1);var c=a.data_.get(n);c.setNewValue_(void 0),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.updateValue_=function(n,a){var i=this.data_.get(n);if(a=i.prepareNewValue_(a),a!==ie.UNCHANGED){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:ri,object:this,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),s&&Da(this,l)}},t.addValue_=function(n,a){var i=this;this.keysAtom_,xi(function(){var u,c=new wu(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(n,c),a=c.value_,(u=i.hasMap_.get(n))==null||u.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:_o,object:this,name:n,newValue:a}:null;s&&Da(this,l)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:n.get(l)}}})},t.entries=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:[l,n.get(l)]}}})},t[TN]=function(){return this.entries()},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value,l=s[0],u=s[1];n.call(a,u,l,this)}},t.merge=function(n){var a=this;return yl(n)&&(n=new Map(n)),xi(function(){Li(n)?sU(n).forEach(function(i){return a.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var o=i[0],s=i[1];return a.set(o,s)}):Mc(n)?(n.constructor!==Map&&at(19,n),n.forEach(function(i,o){return a.set(o,i)})):n!=null&&at(20,n)}),this},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.keys()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.replace=function(n){var a=this;return xi(function(){for(var i=I3(n),o=new Map,s=!1,l=nu(a.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!i.has(c)){var f=a.delete(c);if(f)s=!0;else{var d=a.data_.get(c);o.set(c,d)}}}for(var p=nu(i.entries()),h;!(h=p()).done;){var v=h.value,y=v[0],m=v[1],g=a.data_.has(y);if(a.set(y,m),a.data_.has(y)){var E=a.data_.get(y);o.set(y,E),g||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var w=a.data_.keys(),C=o.keys(),S=w.next(),O=C.next();!S.done;){if(S.value!==O.value){a.keysAtom_.reportChanged();break}S=w.next(),O=C.next()}a.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,a){return Hp(this,n)},t.intercept_=function(n){return Wp(this,n)},$1(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:DN,get:function(){return"Map"}}]),e}(),yl=ml("ObservableMap",PN);function I3(e){if(Mc(e)||yl(e))return e;if(Array.isArray(e))return new Map(e);if(Li(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return at(21,e)}var kN,AN,$3={};kN=Symbol.iterator;AN=Symbol.toStringTag;var NN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[Pe]=$3,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Na(Set)||at(22),this.enhancer_=function(o,s){return n(o,s,a)},ls(function(){i.atom_=WA(i.name_),r&&i.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.data_.values()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value;n.call(a,s,s,this)}},t.add=function(n){var a=this;if(this.atom_,Qn(this)){var i=Xn(this,{type:_o,object:this,newValue:n});if(!i)return this}if(!this.has(n)){xi(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:_o,object:this,newValue:n}:null;s&&Da(this,l)}return this},t.delete=function(n){var a=this;if(Qn(this)){var i=Xn(this,{type:lm,object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:lm,object:this,oldValue:n}:null;return xi(function(){a.atom_.reportChanged(),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,a=Array.from(this.keys()),i=Array.from(this.values());return kd({next:function(){var s=n;return n+=1,sv0){for(var t=v0;t=0&&r++;break}e=sC(e),t=sC(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Na(l)&&l instanceof l&&Na(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],a=a||[];for(var c=n.length;c--;)if(n[c]===e)return a[c]===t;if(n.push(e),a.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!sb(e[c],t[c],r-1,n,a))return!1}else{var f=Object.keys(e),d;if(c=f.length,Object.keys(t).length!==c)return!1;for(;c--;)if(d=f[c],!(Pi(t,d)&&sb(e[d],t[d],r-1,n,a)))return!1}return n.pop(),a.pop(),!0}function sC(e){return yg(e)?e.slice():Mc(e)||yl(e)||Fp(e)||$c(e)?Array.from(e.entries()):e}function kd(e){return e[Symbol.iterator]=W3,e}function W3(){return this}["Symbol","Map","Set"].forEach(function(e){var t=M1();typeof t[e]>"u"&&at("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:l3,extras:{getDebugName:ob},$mobx:Pe});class H3{constructor(t){Z(this,"id");Z(this,"title");Z(this,"date");Z(this,"description");Z(this,"category");Z(this,"city");Z(this,"venue");Z(this,"hostUsername","");Z(this,"isCancelled",!1);Z(this,"isGoing",!1);Z(this,"isHost",!1);Z(this,"host");Z(this,"attendees",[]);this.id=t==null?void 0:t.id,this.title=t==null?void 0:t.title,this.date=t==null?void 0:t.date,this.description=t==null?void 0:t.description,this.category=t==null?void 0:t.category,this.venue=t==null?void 0:t.venue,this.city=t==null?void 0:t.city}}class lC{constructor(t){Z(this,"id");Z(this,"title","");Z(this,"date",null);Z(this,"description","");Z(this,"category","");Z(this,"city","");Z(this,"venue","");t&&(this.id=t.id,this.title=t.title,this.category=t.category,this.description=t.description,this.date=t.date,this.city=t.city,this.venue=t.venue)}}function LN(e,t){return function(){return e.apply(t,arguments)}}const{toString:V3}=Object.prototype,{getPrototypeOf:V1}=Object,wg=(e=>t=>{const r=V3.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>wg(t)===e),bg=e=>t=>typeof t===e,{isArray:jc}=Array,Ad=bg("undefined");function Y3(e){return e!==null&&!Ad(e)&&e.constructor!==null&&!Ad(e.constructor)&&aa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const FN=di("ArrayBuffer");function G3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FN(e.buffer),t}const K3=bg("string"),aa=bg("function"),UN=bg("number"),_g=e=>e!==null&&typeof e=="object",q3=e=>e===!0||e===!1,bv=e=>{if(wg(e)!=="object")return!1;const t=V1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Q3=di("Date"),X3=di("File"),J3=di("Blob"),Z3=di("FileList"),eB=e=>_g(e)&&aa(e.pipe),tB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||aa(e.append)&&((t=wg(e))==="formdata"||t==="object"&&aa(e.toString)&&e.toString()==="[object FormData]"))},rB=di("URLSearchParams"),nB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yp(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),jc(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}const zN=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WN=e=>!Ad(e)&&e!==zN;function lb(){const{caseless:e}=WN(this)&&this||{},t={},r=(n,a)=>{const i=e&&BN(t,a)||a;bv(t[i])&&bv(n)?t[i]=lb(t[i],n):bv(n)?t[i]=lb({},n):jc(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(Yp(t,(a,i)=>{r&&aa(a)?e[i]=LN(a,r):e[i]=a},{allOwnKeys:n}),e),iB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oB=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},sB=(e,t,r,n)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&V1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lB=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},uB=e=>{if(!e)return null;if(jc(e))return e;let t=e.length;if(!UN(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&V1(Uint8Array)),fB=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},dB=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pB=di("HTMLFormElement"),hB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),uC=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),vB=di("RegExp"),HN=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yp(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},mB=e=>{HN(e,(t,r)=>{if(aa(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(aa(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},gB=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return jc(e)?n(e):n(String(e).split(t)),r},yB=()=>{},wB=(e,t)=>(e=+e,Number.isFinite(e)?e:t),m0="abcdefghijklmnopqrstuvwxyz",cC="0123456789",VN={DIGIT:cC,ALPHA:m0,ALPHA_DIGIT:m0+m0.toUpperCase()+cC},bB=(e=16,t=VN.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function _B(e){return!!(e&&aa(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const EB=e=>{const t=new Array(10),r=(n,a)=>{if(_g(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=jc(n)?[]:{};return Yp(n,(o,s)=>{const l=r(o,a+1);!Ad(l)&&(i[s]=l)}),t[a]=void 0,i}}return n};return r(e,0)},SB=di("AsyncFunction"),xB=e=>e&&(_g(e)||aa(e))&&aa(e.then)&&aa(e.catch),W={isArray:jc,isArrayBuffer:FN,isBuffer:Y3,isFormData:tB,isArrayBufferView:G3,isString:K3,isNumber:UN,isBoolean:q3,isObject:_g,isPlainObject:bv,isUndefined:Ad,isDate:Q3,isFile:X3,isBlob:J3,isRegExp:vB,isFunction:aa,isStream:eB,isURLSearchParams:rB,isTypedArray:cB,isFileList:Z3,forEach:Yp,merge:lb,extend:aB,trim:nB,stripBOM:iB,inherits:oB,toFlatObject:sB,kindOf:wg,kindOfTest:di,endsWith:lB,toArray:uB,forEachEntry:fB,matchAll:dB,isHTMLForm:pB,hasOwnProperty:uC,hasOwnProp:uC,reduceDescriptors:HN,freezeMethods:mB,toObjectSet:gB,toCamelCase:hB,noop:yB,toFiniteNumber:wB,findKey:BN,global:zN,isContextDefined:WN,ALPHABET:VN,generateString:bB,isSpecCompliantForm:_B,toJSONObject:EB,isAsyncFn:SB,isThenable:xB};function Ye(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}W.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const YN=Ye.prototype,GN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GN[e]={value:e}});Object.defineProperties(Ye,GN);Object.defineProperty(YN,"isAxiosError",{value:!0});Ye.from=(e,t,r,n,a,i)=>{const o=Object.create(YN);return W.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ye.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const CB=null;function ub(e){return W.isPlainObject(e)||W.isArray(e)}function KN(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function fC(e,t,r){return e?e.concat(t).map(function(a,i){return a=KN(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function OB(e){return W.isArray(e)&&!e.some(ub)}const TB=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Eg(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!W.isUndefined(y[v])});const n=r.metaTokens,a=r.visitor||c,i=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(a))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(W.isDate(h))return h.toISOString();if(!l&&W.isBlob(h))throw new Ye("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(h)||W.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,y){let m=h;if(h&&!y&&typeof h=="object"){if(W.endsWith(v,"{}"))v=n?v:v.slice(0,-2),h=JSON.stringify(h);else if(W.isArray(h)&&OB(h)||(W.isFileList(h)||W.endsWith(v,"[]"))&&(m=W.toArray(h)))return v=KN(v),m.forEach(function(E,w){!(W.isUndefined(E)||E===null)&&t.append(o===!0?fC([v],w,i):o===null?v:v+"[]",u(E))}),!1}return ub(h)?!0:(t.append(fC(y,v,i),u(h)),!1)}const f=[],d=Object.assign(TB,{defaultVisitor:c,convertValue:u,isVisitable:ub});function p(h,v){if(!W.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),W.forEach(h,function(m,g){(!(W.isUndefined(m)||m===null)&&a.call(t,m,W.isString(g)?g.trim():g,v,d))===!0&&p(m,v?v.concat(g):[g])}),f.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return p(e),t}function dC(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Y1(e,t){this._pairs=[],e&&Eg(e,this,t)}const qN=Y1.prototype;qN.append=function(t,r){this._pairs.push([t,r])};qN.toString=function(t){const r=t?function(n){return t.call(this,n,dC)}:dC;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function DB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QN(e,t,r){if(!t)return e;const n=r&&r.encode||DB,a=r&&r.serialize;let i;if(a?i=a(t,r):i=W.isURLSearchParams(t)?t.toString():new Y1(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class PB{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(n){n!==null&&t(n)})}}const pC=PB,XN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kB=typeof URLSearchParams<"u"?URLSearchParams:Y1,AB=typeof FormData<"u"?FormData:null,NB=typeof Blob<"u"?Blob:null,RB={isBrowser:!0,classes:{URLSearchParams:kB,FormData:AB,Blob:NB},protocols:["http","https","file","blob","url","data"]},JN=typeof window<"u"&&typeof document<"u",MB=(e=>JN&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),IB=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$B=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:JN,hasStandardBrowserEnv:MB,hasStandardBrowserWebWorkerEnv:IB},Symbol.toStringTag,{value:"Module"})),Ka={...$B,...RB};function jB(e,t){return Eg(e,new Ka.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Ka.isNode&&W.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function LB(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function FB(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n=r.length;return o=!o&&W.isArray(a)?a.length:o,l?(W.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!W.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&W.isArray(a[o])&&(a[o]=FB(a[o])),!s)}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(n,a)=>{t(LB(n),a,r,0)}),r}return null}function UB(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const G1={transitional:XN,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return a&&a?JSON.stringify(ZN(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jB(t,this.formSerializer).toString();if((s=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Eg(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),UB(t)):t}],transformResponse:[function(t){const r=this.transitional||G1.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&W.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ye.from(s,Ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ka.classes.FormData,Blob:Ka.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{G1.headers[e]={}});const K1=G1,BB=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zB=e=>{const t={};let r,n,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&BB[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},hC=Symbol("internals");function ff(e){return e&&String(e).trim().toLowerCase()}function _v(e){return e===!1||e==null?e:W.isArray(e)?e.map(_v):String(e)}function WB(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const HB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function g0(e,t,r,n,a){if(W.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!W.isString(t)){if(W.isString(n))return t.indexOf(n)!==-1;if(W.isRegExp(n))return n.test(t)}}function VB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function YB(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class Sg{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(s,l,u){const c=ff(l);if(!c)throw new Error("header name must be a non-empty string");const f=W.findKey(a,c);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||l]=_v(s))}const o=(s,l)=>W.forEach(s,(u,c)=>i(u,c,l));return W.isPlainObject(t)||t instanceof this.constructor?o(t,r):W.isString(t)&&(t=t.trim())&&!HB(t)?o(zB(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=ff(t),t){const n=W.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return WB(a);if(W.isFunction(r))return r.call(this,a,n);if(W.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ff(t),t){const n=W.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||g0(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=ff(o),o){const s=W.findKey(n,o);s&&(!r||g0(n,n[s],s,r))&&(delete n[s],a=!0)}}return W.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||g0(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return W.forEach(this,(a,i)=>{const o=W.findKey(n,i);if(o){r[o]=_v(a),delete r[i];return}const s=t?VB(i):String(i).trim();s!==i&&delete r[i],r[s]=_v(a),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return W.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&W.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[hC]=this[hC]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=ff(o);n[s]||(YB(a,o),n[s]=!0)}return W.isArray(t)?t.forEach(i):i(t),this}}Sg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(Sg.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});W.freezeMethods(Sg);const Ai=Sg;function y0(e,t){const r=this||K1,n=t||r,a=Ai.from(n.headers);let i=n.data;return W.forEach(e,function(s){i=s.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function eR(e){return!!(e&&e.__CANCEL__)}function Gp(e,t,r){Ye.call(this,e??"canceled",Ye.ERR_CANCELED,t,r),this.name="CanceledError"}W.inherits(Gp,Ye,{__CANCEL__:!0});function GB(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ye("Request failed with status code "+r.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const KB=Ka.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const o=[e+"="+encodeURIComponent(t)];W.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),W.isString(n)&&o.push("path="+n),W.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QB(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function tR(e,t){return e&&!qB(t)?QB(e,t):t}const XB=Ka.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const s=W.isString(o)?a(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function JB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ZB(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];o||(o=u),r[a]=l,n[a]=u;let f=i,d=0;for(;f!==a;)d+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o{const i=a.loaded,o=a.lengthComputable?a.total:void 0,s=i-r,l=n(s),u=i<=o;r=i;const c={loaded:i,total:o,progress:o?i/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const ez=typeof XMLHttpRequest<"u",tz=ez&&function(e){return new Promise(function(r,n){let a=e.data;const i=Ai.from(e.headers).normalize();let{responseType:o,withXSRFToken:s}=e,l;function u(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let c;if(W.isFormData(a)){if(Ka.hasStandardBrowserEnv||Ka.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[v,...y]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([v||"multipart/form-data",...y].join("; "))}}let f=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(v+":"+y))}const d=tR(e.baseURL,e.url);f.open(e.method.toUpperCase(),QN(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function p(){if(!f)return;const v=Ai.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:e,request:f};GB(function(E){r(E),u()},function(E){n(E),u()},m),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new Ye("Request aborted",Ye.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Ye("Network Error",Ye.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||XN;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(new Ye(y,m.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,e,f)),f=null},Ka.hasStandardBrowserEnv&&(s&&W.isFunction(s)&&(s=s(e)),s||s!==!1&&XB(d))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&KB.read(e.xsrfCookieName);v&&i.set(e.xsrfHeaderName,v)}a===void 0&&i.setContentType(null),"setRequestHeader"in f&&W.forEach(i.toJSON(),function(y,m){f.setRequestHeader(m,y)}),W.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",vC(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",vC(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=v=>{f&&(n(!v||v.type?new Gp(null,e,f):v),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const h=JB(d);if(h&&Ka.protocols.indexOf(h)===-1){n(new Ye("Unsupported protocol "+h+":",Ye.ERR_BAD_REQUEST,e));return}f.send(a||null)})},cb={http:CB,xhr:tz};W.forEach(cb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mC=e=>`- ${e}`,rz=e=>W.isFunction(e)||e===null||e===!1,rR={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(mC).join(` +`):" "+mC(i[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:cb};function w0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gp(null,e)}function gC(e){return w0(e),e.headers=Ai.from(e.headers),e.data=y0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rR.getAdapter(e.adapter||K1.adapter)(e).then(function(n){return w0(e),n.data=y0.call(e,e.transformResponse,n),n.headers=Ai.from(n.headers),n},function(n){return eR(n)||(w0(e),n&&n.response&&(n.response.data=y0.call(e,e.transformResponse,n.response),n.response.headers=Ai.from(n.response.headers))),Promise.reject(n)})}const yC=e=>e instanceof Ai?e.toJSON():e;function zu(e,t){t=t||{};const r={};function n(u,c,f){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:f},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function a(u,c,f){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u,f)}else return n(u,c,f)}function i(u,c){if(!W.isUndefined(c))return n(void 0,c)}function o(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>a(yC(u),yC(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||a,d=f(e[c],t[c],c);W.isUndefined(d)&&f!==s||(r[c]=d)}),r}const nR="1.6.2",q1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{q1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wC={};q1.transitional=function(t,r,n){function a(i,o){return"[Axios v"+nR+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(t===!1)throw new Ye(a(o," has been removed"+(r?" in "+r:"")),Ye.ERR_DEPRECATED);return r&&!wC[o]&&(wC[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,s):!0}};function nz(e,t,r){if(typeof e!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const s=e[i],l=s===void 0||o(s,i,e);if(l!==!0)throw new Ye("option "+i+" must be "+l,Ye.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ye("Unknown option "+i,Ye.ERR_BAD_OPTION)}}const fb={assertOptions:nz,validators:q1},uo=fb.validators;class um{constructor(t){this.defaults=t,this.interceptors={request:new pC,response:new pC}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=zu(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&fb.assertOptions(n,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),a!=null&&(W.isFunction(a)?r.paramsSerializer={serialize:a}:fb.assertOptions(a,{encode:uo.function,serialize:uo.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[r.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Ai.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,d;if(!l){const h=[gC.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,s){n.reason||(n.reason=new Gp(i,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Q1(function(a){t=a}),cancel:t}}}const az=Q1;function iz(e){return function(r){return e.apply(null,r)}}function oz(e){return W.isObject(e)&&e.isAxiosError===!0}const db={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(db).forEach(([e,t])=>{db[t]=e});const sz=db;function aR(e){const t=new Ev(e),r=LN(Ev.prototype.request,t);return W.extend(r,Ev.prototype,t,{allOwnKeys:!0}),W.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return aR(zu(e,a))},r}const hr=aR(K1);hr.Axios=Ev;hr.CanceledError=Gp;hr.CancelToken=az;hr.isCancel=eR;hr.VERSION=nR;hr.toFormData=Eg;hr.AxiosError=Ye;hr.Cancel=hr.CanceledError;hr.all=function(t){return Promise.all(t)};hr.spread=iz;hr.isAxiosError=oz;hr.mergeConfig=zu;hr.AxiosHeaders=Ai;hr.formToJSON=e=>ZN(W.isHTMLForm(e)?new FormData(e):e);hr.getAdapter=rR.getAdapter;hr.HttpStatusCode=sz;hr.default=hr;const tn=hr;function iR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Js=e=>typeof e=="string",mn=e=>typeof e=="function",Sv=e=>Js(e)||mn(e)?e:null,b0=e=>x.isValidElement(e)||Js(e)||mn(e)||qf(e);function lz(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=n+"px",a.transition=`all ${r}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,r)})})}function xg(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:a=!0,collapseDuration:i=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:f,isIn:d}=o;const p=n?`${t}--${l}`:t,h=n?`${r}--${l}`:r,v=x.useRef(0);return x.useLayoutEffect(()=>{const y=f.current,m=p.split(" "),g=E=>{E.target===f.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",g),y.removeEventListener("animationcancel",g),v.current===0&&E.type!=="animationcancel"&&y.classList.remove(...m))};y.classList.add(...m),y.addEventListener("animationend",g),y.addEventListener("animationcancel",g)},[]),x.useEffect(()=>{const y=f.current,m=()=>{y.removeEventListener("animationend",m),a?lz(y,c,i):c()};d||(u?m():(v.current=1,y.className+=` ${h}`,y.addEventListener("animationend",m)))},[d]),b.createElement(b.Fragment,null,s)}}function bC(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Gn={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Fh=e=>{let{theme:t,type:r,...n}=e;return b.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},_0={info:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return b.createElement("div",{className:"Toastify__spinner"})}};function uz(e){const[,t]=x.useReducer(p=>p+1,0),[r,n]=x.useState([]),a=x.useRef(null),i=x.useRef(new Map).current,o=p=>r.indexOf(p)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:p=>i.get(p)}).current;function l(p){let{containerId:h}=p;const{limit:v}=s.props;!v||h&&s.containerId!==h||(s.count-=s.queue.length,s.queue=[])}function u(p){n(h=>p==null?[]:h.filter(v=>v!==p))}function c(){const{toastContent:p,toastProps:h,staleId:v}=s.queue.shift();d(p,h,v)}function f(p,h){let{delay:v,staleId:y,...m}=h;if(!b0(p)||function(U){return!a.current||s.props.enableMultiContainer&&U.containerId!==s.props.containerId||i.has(U.toastId)&&U.updateId==null}(m))return;const{toastId:g,updateId:E,data:w}=m,{props:C}=s,S=()=>u(g),O=E==null;O&&s.count++;const D={...C,style:C.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(m).filter(U=>{let[Q,X]=U;return X!=null})),toastId:g,updateId:E,data:w,closeToast:S,isIn:!1,className:Sv(m.className||C.toastClassName),bodyClassName:Sv(m.bodyClassName||C.bodyClassName),progressClassName:Sv(m.progressClassName||C.progressClassName),autoClose:!m.isLoading&&(N=m.autoClose,R=C.autoClose,N===!1||qf(N)&&N>0?N:R),deleteToast(){const U=bC(i.get(g),"removed");i.delete(g),Gn.emit(4,U);const Q=s.queue.length;if(s.count=g==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),Q>0){const X=g==null?s.props.limit:1;if(Q===1||X===1)s.displayedToast++,c();else{const J=X>Q?Q:X;s.displayedToast=J;for(let te=0;teee in _0)(X)&&(ge=_0[X](H))),ge}(D),mn(m.onOpen)&&(D.onOpen=m.onOpen),mn(m.onClose)&&(D.onClose=m.onClose),D.closeButton=C.closeButton,m.closeButton===!1||b0(m.closeButton)?D.closeButton=m.closeButton:m.closeButton===!0&&(D.closeButton=!b0(C.closeButton)||C.closeButton);let j=p;x.isValidElement(p)&&!Js(p.type)?j=x.cloneElement(p,{closeToast:S,toastProps:D,data:w}):mn(p)&&(j=p({closeToast:S,toastProps:D,data:w})),C.limit&&C.limit>0&&s.count>C.limit&&O?s.queue.push({toastContent:j,toastProps:D,staleId:y}):qf(v)?setTimeout(()=>{d(j,D,y)},v):d(j,D,y)}function d(p,h,v){const{toastId:y}=h;v&&i.delete(v);const m={content:p,props:h};i.set(y,m),n(g=>[...g,y].filter(E=>E!==v)),Gn.emit(4,bC(m,m.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,Gn.cancelEmit(3).on(0,f).on(1,p=>a.current&&u(p)).on(5,l).emit(2,s),()=>{i.clear(),Gn.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=o,s.displayedToast=r.length}),{getToastToRender:function(p){const h=new Map,v=Array.from(i.values());return e.newestOnTop&&v.reverse(),v.forEach(y=>{const{position:m}=y.props;h.has(m)||h.set(m,[]),h.get(m).push(y)}),Array.from(h,y=>p(y[0],y[1]))},containerRef:a,isToastActive:o}}function _C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function EC(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function cz(e){const[t,r]=x.useState(!1),[n,a]=x.useState(!1),i=x.useRef(null),o=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:l,pauseOnHover:u,closeToast:c,onClick:f,closeOnClick:d}=e;function p(w){if(e.draggable){w.nativeEvent.type==="touchstart"&&w.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g),document.addEventListener("touchmove",m),document.addEventListener("touchend",g);const C=i.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=C.getBoundingClientRect(),C.style.transition="",o.x=_C(w.nativeEvent),o.y=EC(w.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(w){if(o.boundingRect){const{top:C,bottom:S,left:O,right:D}=o.boundingRect;w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&o.x>=O&&o.x<=D&&o.y>=C&&o.y<=S?y():v()}}function v(){r(!0)}function y(){r(!1)}function m(w){const C=i.current;o.canDrag&&C&&(o.didMove=!0,t&&y(),o.x=_C(w),o.y=EC(w),o.delta=e.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",g);const w=i.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return a(!0),void e.closeToast();w.style.transition="transform 0.2s, opacity 0.2s",w.style.transform=`translate${e.draggableDirection}(0)`,w.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(i.current&&i.current.addEventListener("d",v,{once:!0}),mn(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const w=s.current;mn(w.onClose)&&w.onClose(x.isValidElement(w.children)&&w.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",v),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const E={onMouseDown:p,onTouchStart:p,onMouseUp:h,onTouchEnd:h};return l&&u&&(E.onMouseEnter=y,E.onMouseLeave=v),d&&(E.onClick=w=>{f&&f(w),o.canCloseOnClick&&c()}),{playToast:v,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:E}}function oR(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return b.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:a=>{a.stopPropagation(),t(a)},"aria-label":n},b.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},b.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function fz(e){let{delay:t,isRunning:r,closeToast:n,type:a="default",hide:i,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:f,theme:d}=e;const p=i||l&&u===0,h={...s,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:p?0:1};l&&(h.transform=`scaleX(${u})`);const v=z("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":c}),y=mn(o)?o({rtl:c,type:a,defaultClassName:v}):z(v,o);return b.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:h,[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{f&&n()}})}const dz=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:a}=cz(e),{closeButton:i,children:o,autoClose:s,onClick:l,type:u,hideProgressBar:c,closeToast:f,transition:d,position:p,className:h,style:v,bodyClassName:y,bodyStyle:m,progressClassName:g,progressStyle:E,updateId:w,role:C,progress:S,rtl:O,toastId:D,deleteToast:N,isIn:R,isLoading:j,iconOut:U,closeOnClick:Q,theme:X}=e,J=z("Toastify__toast",`Toastify__toast-theme--${X}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":Q}),te=mn(h)?h({rtl:O,position:p,type:u,defaultClassName:J}):z(J,h),ge=!!S||!s,H={closeToast:f,type:u,theme:X};let ee=null;return i===!1||(ee=mn(i)?i(H):x.isValidElement(i)?x.cloneElement(i,H):oR(H)),b.createElement(d,{isIn:R,done:N,position:p,preventExitTransition:r,nodeRef:n},b.createElement("div",{id:D,onClick:l,className:te,...a,style:v,ref:n},b.createElement("div",{...R&&{role:C},className:mn(y)?y({type:u}):z("Toastify__toast-body",y),style:m},U!=null&&b.createElement("div",{className:z("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},U),b.createElement("div",null,o)),ee,b.createElement(fz,{...w&&!ge?{key:`pb-${w}`}:{},rtl:O,theme:X,delay:s,isRunning:t,isIn:R,closeToast:f,hide:c,type:u,style:E,className:g,controlledProgress:ge,progress:S||0})))},Cg=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},pz=xg(Cg("bounce",!0));xg(Cg("slide",!0));xg(Cg("zoom"));xg(Cg("flip"));const pb=x.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:a}=uz(e),{className:i,style:o,rtl:s,containerId:l}=e;function u(c){const f=z("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":s});return mn(i)?i({position:c,rtl:s,defaultClassName:f}):z(f,Sv(i))}return x.useEffect(()=>{t&&(t.current=n.current)},[]),b.createElement("div",{ref:n,className:"Toastify",id:l},r((c,f)=>{const d=f.length?{...o}:{...o,pointerEvents:"none"};return b.createElement("div",{className:u(c),style:d,key:`container-${c}`},f.map((p,h)=>{let{content:v,props:y}=p;return b.createElement(dz,{...y,isIn:a(y.toastId),style:{...y.style,"--nth":h+1,"--len":f.length},key:`toast-${y.key}`},v)}))}))});pb.displayName="ToastContainer",pb.defaultProps={position:"top-right",transition:pz,autoClose:5e3,closeButton:oR,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let E0,_s=new Map,Af=[],hz=1;function sR(){return""+hz++}function vz(e){return e&&(Js(e.toastId)||qf(e.toastId))?e.toastId:sR()}function Qf(e,t){return _s.size>0?Gn.emit(0,e,t):Af.push({content:e,options:t}),t.toastId}function cm(e,t){return{...t,type:t&&t.type||e,toastId:vz(t)}}function Uh(e){return(t,r)=>Qf(t,cm(e,r))}function ct(e,t){return Qf(e,cm("default",t))}ct.loading=(e,t)=>Qf(e,cm("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ct.promise=function(e,t,r){let n,{pending:a,error:i,success:o}=t;a&&(n=Js(a)?ct.loading(a,r):ct.loading(a.render,{...r,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,f,d)=>{if(f==null)return void ct.dismiss(n);const p={type:c,...s,...r,data:d},h=Js(f)?{render:f}:f;return n?ct.update(n,{...p,...h}):ct(h.render,{...p,...h}),d},u=mn(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",i,c)),u},ct.success=Uh("success"),ct.info=Uh("info"),ct.error=Uh("error"),ct.warning=Uh("warning"),ct.warn=ct.warning,ct.dark=(e,t)=>Qf(e,cm("default",{theme:"dark",...t})),ct.dismiss=e=>{_s.size>0?Gn.emit(1,e):Af=Af.filter(t=>e!=null&&t.options.toastId!==e)},ct.clearWaitingQueue=function(e){return e===void 0&&(e={}),Gn.emit(5,e)},ct.isActive=e=>{let t=!1;return _s.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},ct.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,a){let{containerId:i}=a;const o=_s.get(i||E0);return o&&o.getToast(n)}(e,t);if(r){const{props:n,content:a}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:sR()};i.toastId!==e&&(i.staleId=e);const o=i.render||a;delete i.render,Qf(o,i)}},0)},ct.done=e=>{ct.update(e,{progress:1})},ct.onChange=e=>(Gn.on(4,e),()=>{Gn.off(4,e)}),ct.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ct.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Gn.on(2,e=>{E0=e.containerId||e,_s.set(E0,e),Af.forEach(t=>{Gn.emit(0,t.content,t.options)}),Af=[]}).on(3,e=>{_s.delete(e.containerId||e),_s.size===0&&Gn.off(0).off(1).off(5)});/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gz(){return Math.random().toString(36).substr(2,8)}function xC(e,t){return{usr:e.state,key:e.key,idx:t}}function Nd(e,t,r,n){return r===void 0&&(r=null),Wt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Zi(t):t,{state:r,key:t&&t.key||n||gz()})}function Zs(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function yz(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s=cr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Wt({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=cr.Pop;let y=c(),m=y==null?null:y-u;u=y,l&&l({action:s,location:v.location,delta:m})}function d(y,m){s=cr.Push;let g=Nd(v.location,y,m);r&&r(g,y),u=c()+1;let E=xC(g,u),w=v.createHref(g);try{o.pushState(E,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(w)}i&&l&&l({action:s,location:v.location,delta:1})}function p(y,m){s=cr.Replace;let g=Nd(v.location,y,m);r&&r(g,y),u=c();let E=xC(g,u),w=v.createHref(g);o.replaceState(E,"",w),i&&l&&l({action:s,location:v.location,delta:0})}function h(y){let m=a.location.origin!=="null"?a.location.origin:a.location.href,g=typeof y=="string"?y:Zs(y);return Ie(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return s},get location(){return e(a,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(SC,f),l=y,()=>{a.removeEventListener(SC,f),l=null}},createHref(y){return t(a,y)},createURL:h,encodeLocation(y){let m=h(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:p,go(y){return o.go(y)}};return v}var tr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tr||(tr={}));const wz=new Set(["lazy","caseSensitive","path","id","index","children"]);function bz(e){return e.index===!0}function hb(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,i)=>{let o=[...r,i],s=typeof a.id=="string"?a.id:o.join("-");if(Ie(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ie(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),bz(a)){let l=Wt({},a,t(a),{id:s});return n[s]=l,l}else{let l=Wt({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=hb(a.children,t,o,n)),l}})}function au(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Zi(t):t,a=wl(n.pathname||"/",r);if(a==null)return null;let i=uR(e);_z(i);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ni([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),uR(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Dz(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of cR(i.path))a(i,o,l)}),t}function cR(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=cR(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function _z(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pz(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ez=/^:\w+$/,Sz=3,xz=2,Cz=1,Oz=10,Tz=-2,CC=e=>e==="*";function Dz(e,t){let r=e.split("/"),n=r.length;return r.some(CC)&&(n+=Tz),t&&(n+=xz),r.filter(a=>!CC(a)).reduce((a,i)=>a+(Ez.test(i)?Sz:i===""?Cz:Oz),n)}function Pz(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function kz(e,t){let{routesMeta:r}=e,n={},a="/",i=[];for(let o=0;o{if(c==="*"){let d=s[f]||"";o=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=Mz(s[f]||"",c),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Nz(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Wu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Rz(e){try{return decodeURI(e)}catch(t){return Wu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mz(e,t){try{return decodeURIComponent(e)}catch(r){return Wu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function wl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Iz(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Zi(e):e;return{pathname:r?r.startsWith("/")?r:$z(r,t):t,search:Lz(n),hash:Fz(a)}}function $z(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function S0(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Kp(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Og(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Zi(e):(a=Wt({},e),Ie(!a.pathname||!a.pathname.includes("?"),S0("?","pathname","search",a)),Ie(!a.pathname||!a.pathname.includes("#"),S0("#","pathname","hash",a)),Ie(!a.search||!a.search.includes("#"),S0("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(n||o==null)s=r;else{let f=t.length-1;if(o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;a.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=Iz(a,s),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ni=e=>e.join("/").replace(/\/\/+/g,"/"),jz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class X1{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function fR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dR=["post","put","patch","delete"],Uz=new Set(dR),Bz=["get",...dR],zz=new Set(Bz),Wz=new Set([301,302,303,307,308]),Hz=new Set([307,308]),x0={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},df={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yz=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Gz(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Ie(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;a=L=>({hasErrorBoundary:M(L)})}else a=Yz;let i={},o=hb(e.routes,a,void 0,i),s,l=e.basename||"/",u=Wt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,f=new Set,d=null,p=null,h=null,v=e.hydrationData!=null,y=au(o,e.history.location,l),m=null;if(y==null){let M=Yn(404,{pathname:e.history.location.pathname}),{matches:L,route:G}=RC(o);y=L,m={[G.id]:M}}let g=!y.some(M=>M.route.lazy)&&(!y.some(M=>M.route.loader)||e.hydrationData!=null),E,w={historyAction:e.history.action,location:e.history.location,matches:y,initialized:g,navigation:x0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},C=cr.Pop,S=!1,O,D=!1,N=!1,R=[],j=[],U=new Map,Q=0,X=-1,J=new Map,te=new Set,ge=new Map,H=new Map,ee=new Map,ce=!1;function _e(){return c=e.history.listen(M=>{let{action:L,location:G,delta:de}=M;if(ce){ce=!1;return}Wu(ee.size===0||de!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ee=be({currentLocation:w.location,nextLocation:G,historyAction:L});if(Ee&&de!=null){ce=!0,e.history.go(de*-1),pe(Ee,{state:"blocked",location:G,proceed(){pe(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(de)},reset(){let Se=new Map(w.blockers);Se.set(Ee,df),ye({blockers:Se})}});return}return Ce(L,G)}),w.initialized||Ce(cr.Pop,w.location),E}function we(){c&&c(),f.clear(),O&&O.abort(),w.fetchers.forEach((M,L)=>Lr(L)),w.blockers.forEach((M,L)=>Y(L))}function rt(M){return f.add(M),()=>f.delete(M)}function ye(M){w=Wt({},w,M),f.forEach(L=>L(w))}function Le(M,L){var G,de;let Ee=w.actionData!=null&&w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&w.navigation.state==="loading"&&((G=M.state)==null?void 0:G._isRedirect)!==!0,Se;L.actionData?Object.keys(L.actionData).length>0?Se=L.actionData:Se=null:Ee?Se=w.actionData:Se=null;let Te=L.loaderData?NC(w.loaderData,L.loaderData,L.matches||[],L.errors):w.loaderData,me=w.blockers;me.size>0&&(me=new Map(me),me.forEach((gt,Re)=>me.set(Re,df)));let he=S===!0||w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&((de=M.state)==null?void 0:de._isRedirect)!==!0;s&&(o=s,s=void 0),D||C===cr.Pop||(C===cr.Push?e.history.push(M,M.state):C===cr.Replace&&e.history.replace(M,M.state)),ye(Wt({},L,{actionData:Se,loaderData:Te,historyAction:C,location:M,initialized:!0,navigation:x0,revalidation:"idle",restoreScrollPosition:da(M,L.matches||w.matches),preventScrollReset:he,blockers:me})),C=cr.Pop,S=!1,D=!1,N=!1,R=[],j=[]}async function He(M,L){if(typeof M=="number"){e.history.go(M);return}let G=vb(w.location,w.matches,l,u.v7_prependBasename,M,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:de,submission:Ee,error:Se}=OC(u.v7_normalizeFormMethod,!1,G,L),Te=w.location,me=Nd(w.location,de,L&&L.state);me=Wt({},me,e.history.encodeLocation(me));let he=L&&L.replace!=null?L.replace:void 0,gt=cr.Push;he===!0?gt=cr.Replace:he===!1||Ee!=null&&ya(Ee.formMethod)&&Ee.formAction===w.location.pathname+w.location.search&&(gt=cr.Replace);let Re=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,Ae=be({currentLocation:Te,nextLocation:me,historyAction:gt});if(Ae){pe(Ae,{state:"blocked",location:me,proceed(){pe(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),He(M,L)},reset(){let ut=new Map(w.blockers);ut.set(Ae,df),ye({blockers:ut})}});return}return await Ce(gt,me,{submission:Ee,pendingError:Se,preventScrollReset:Re,replace:L&&L.replace})}function lt(){if(lr(),ye({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ce(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ce(C||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Ce(M,L,G){O&&O.abort(),O=null,C=M,D=(G&&G.startUninterruptedRevalidation)===!0,un(w.location,w.matches),S=(G&&G.preventScrollReset)===!0;let de=s||o,Ee=G&&G.overrideNavigation,Se=au(de,L,l);if(!Se){let ut=Yn(404,{pathname:L.pathname}),{matches:Tt,route:$a}=RC(de);Ne(),Le(L,{matches:Tt,loaderData:{},errors:{[$a.id]:ut}});return}if(w.initialized&&!N&&Jz(w.location,L)&&!(G&&G.submission&&ya(G.submission.formMethod))){Le(L,{matches:Se});return}O=new AbortController;let Te=hf(e.history,L,O.signal,G&&G.submission),me,he;if(G&&G.pendingError)he={[iu(Se).route.id]:G.pendingError};else if(G&&G.submission&&ya(G.submission.formMethod)){let ut=await xe(Te,L,G.submission,Se,{replace:G.replace});if(ut.shortCircuited)return;me=ut.pendingActionData,he=ut.pendingActionError,Ee=C0(L,G.submission),Te=new Request(Te.url,{signal:Te.signal})}let{shortCircuited:gt,loaderData:Re,errors:Ae}=await mt(Te,L,Se,Ee,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,me,he);gt||(O=null,Le(L,Wt({matches:Se},me?{actionData:me}:{},{loaderData:Re,errors:Ae})))}async function xe(M,L,G,de,Ee){Ee===void 0&&(Ee={}),lr();let Se=r4(L,G);ye({navigation:Se});let Te,me=gb(de,L);if(!me.route.action&&!me.route.lazy)Te={type:tr.error,error:Yn(405,{method:M.method,pathname:L.pathname,routeId:me.route.id})};else if(Te=await pf("action",M,me,de,i,a,l),M.signal.aborted)return{shortCircuited:!0};if(bu(Te)){let he;return Ee&&Ee.replace!=null?he=Ee.replace:he=Te.location===w.location.pathname+w.location.search,await er(w,Te,{submission:G,replace:he}),{shortCircuited:!0}}if(Xf(Te)){let he=iu(de,me.route.id);return(Ee&&Ee.replace)!==!0&&(C=cr.Push),{pendingActionData:{},pendingActionError:{[he.route.id]:Te.error}}}if(ks(Te))throw Yn(400,{type:"defer-action"});return{pendingActionData:{[me.route.id]:Te.data}}}async function mt(M,L,G,de,Ee,Se,Te,me,he){let gt=de||C0(L,Ee),Re=Ee||Se||$C(gt),Ae=s||o,[ut,Tt]=TC(e.history,w,G,Re,L,N,R,j,ge,te,Ae,l,me,he);if(Ne(st=>!(G&&G.some(Tn=>Tn.route.id===st))||ut&&ut.some(Tn=>Tn.route.id===st)),X=++Q,ut.length===0&&Tt.length===0){let st=I();return Le(L,Wt({matches:G,loaderData:{},errors:he||null},me?{actionData:me}:{},st?{fetchers:new Map(w.fetchers)}:{})),{shortCircuited:!0}}if(!D){Tt.forEach(Tn=>{let De=w.fetchers.get(Tn.key),bt=vf(void 0,De?De.data:void 0);w.fetchers.set(Tn.key,bt)});let st=me||w.actionData;ye(Wt({navigation:gt},st?Object.keys(st).length===0?{actionData:null}:{actionData:st}:{},Tt.length>0?{fetchers:new Map(w.fetchers)}:{}))}Tt.forEach(st=>{U.has(st.key)&&Ot(st.key),st.controller&&U.set(st.key,st.controller)});let $a=()=>Tt.forEach(st=>Ot(st.key));O&&O.signal.addEventListener("abort",$a);let{results:ja,loaderResults:bi,fetcherResults:oo}=await Ut(w.matches,G,ut,Tt,M);if(M.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",$a),Tt.forEach(st=>U.delete(st.key));let Cn=MC(ja);if(Cn){if(Cn.idx>=ut.length){let st=Tt[Cn.idx-ut.length].key;te.add(st)}return await er(w,Cn.result,{replace:Te}),{shortCircuited:!0}}let{loaderData:On,errors:so}=AC(w,G,ut,bi,he,Tt,oo,H);H.forEach((st,Tn)=>{st.subscribe(De=>{(De||st.done)&&H.delete(Tn)})});let ef=I(),hs=ue(X),Nl=ef||hs||Tt.length>0;return Wt({loaderData:On,errors:so},Nl?{fetchers:new Map(w.fetchers)}:{})}function Nt(M){return w.fetchers.get(M)||Vz}function sr(M,L,G,de){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");U.has(M)&&Ot(M);let Ee=s||o,Se=vb(w.location,w.matches,l,u.v7_prependBasename,G,L,de==null?void 0:de.relative),Te=au(Ee,Se,l);if(!Te){Jr(M,L,Yn(404,{pathname:Se}));return}let{path:me,submission:he,error:gt}=OC(u.v7_normalizeFormMethod,!0,Se,de);if(gt){Jr(M,L,gt);return}let Re=gb(Te,me);if(S=(de&&de.preventScrollReset)===!0,he&&ya(he.formMethod)){jr(M,L,me,Re,Te,he);return}ge.set(M,{routeId:L,path:me}),Je(M,L,me,Re,Te,he)}async function jr(M,L,G,de,Ee,Se){if(lr(),ge.delete(M),!de.route.action&&!de.route.lazy){let Me=Yn(405,{method:Se.formMethod,pathname:G,routeId:L});Jr(M,L,Me);return}let Te=w.fetchers.get(M),me=n4(Se,Te);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,gt=hf(e.history,G,he.signal,Se);U.set(M,he);let Re=Q,Ae=await pf("action",gt,de,Ee,i,a,l);if(gt.signal.aborted){U.get(M)===he&&U.delete(M);return}if(bu(Ae))if(U.delete(M),X>Re){let Me=Bl(void 0);w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M);let Me=vf(Se);return w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)}),er(w,Ae,{fetcherSubmission:Se})}if(Xf(Ae)){Jr(M,L,Ae.error);return}if(ks(Ae))throw Yn(400,{type:"defer-action"});let ut=w.navigation.location||w.location,Tt=hf(e.history,ut,he.signal),$a=s||o,ja=w.navigation.state!=="idle"?au($a,w.navigation.location,l):w.matches;Ie(ja,"Didn't find any matches after fetcher action");let bi=++Q;J.set(M,bi);let oo=vf(Se,Ae.data);w.fetchers.set(M,oo);let[Cn,On]=TC(e.history,w,ja,Se,ut,N,R,j,ge,te,$a,l,{[de.route.id]:Ae.data},void 0);On.filter(Me=>Me.key!==M).forEach(Me=>{let Fr=Me.key,cn=w.fetchers.get(Fr),tf=vf(void 0,cn?cn.data:void 0);w.fetchers.set(Fr,tf),U.has(Fr)&&Ot(Fr),Me.controller&&U.set(Fr,Me.controller)}),ye({fetchers:new Map(w.fetchers)});let so=()=>On.forEach(Me=>Ot(Me.key));he.signal.addEventListener("abort",so);let{results:ef,loaderResults:hs,fetcherResults:Nl}=await Ut(w.matches,ja,Cn,On,Tt);if(he.signal.aborted)return;he.signal.removeEventListener("abort",so),J.delete(M),U.delete(M),On.forEach(Me=>U.delete(Me.key));let st=MC(ef);if(st){if(st.idx>=Cn.length){let Me=On[st.idx-Cn.length].key;te.add(Me)}return er(w,st.result)}let{loaderData:Tn,errors:De}=AC(w,w.matches,Cn,hs,void 0,On,Nl,H);if(w.fetchers.has(M)){let Me=Bl(Ae.data);w.fetchers.set(M,Me)}let bt=ue(bi);w.navigation.state==="loading"&&bi>X?(Ie(C,"Expected pending action"),O&&O.abort(),Le(w.navigation.location,{matches:ja,loaderData:Tn,errors:De,fetchers:new Map(w.fetchers)})):(ye(Wt({errors:De,loaderData:NC(w.loaderData,Tn,ja,De)},bt||On.length>0?{fetchers:new Map(w.fetchers)}:{})),N=!1)}async function Je(M,L,G,de,Ee,Se){let Te=w.fetchers.get(M),me=vf(Se,Te?Te.data:void 0);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,gt=hf(e.history,G,he.signal);U.set(M,he);let Re=Q,Ae=await pf("loader",gt,de,Ee,i,a,l);if(ks(Ae)&&(Ae=await mR(Ae,gt.signal,!0)||Ae),U.get(M)===he&&U.delete(M),gt.signal.aborted)return;if(bu(Ae))if(X>Re){let Tt=Bl(void 0);w.fetchers.set(M,Tt),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M),await er(w,Ae);return}if(Xf(Ae)){let Tt=iu(w.matches,L);w.fetchers.delete(M),ye({fetchers:new Map(w.fetchers),errors:{[Tt.route.id]:Ae.error}});return}Ie(!ks(Ae),"Unhandled fetcher deferred data");let ut=Bl(Ae.data);w.fetchers.set(M,ut),ye({fetchers:new Map(w.fetchers)})}async function er(M,L,G){let{submission:de,fetcherSubmission:Ee,replace:Se}=G===void 0?{}:G;L.revalidate&&(N=!0);let Te=Nd(M.location,L.location,{_isRedirect:!0});if(Ie(Te,"Expected a location on the redirect navigation"),r){let ut=!1;if(L.reloadDocument)ut=!0;else if(pR.test(L.location)){const Tt=e.history.createURL(L.location);ut=Tt.origin!==t.location.origin||wl(Tt.pathname,l)==null}if(ut){Se?t.location.replace(L.location):t.location.assign(L.location);return}}O=null;let me=Se===!0?cr.Replace:cr.Push,{formMethod:he,formAction:gt,formEncType:Re}=M.navigation;!de&&!Ee&&he&>&&Re&&(de=$C(M.navigation));let Ae=de||Ee;if(Hz.has(L.status)&&Ae&&ya(Ae.formMethod))await Ce(me,Te,{submission:Wt({},Ae,{formAction:L.location}),preventScrollReset:S});else{let ut=C0(Te,de);await Ce(me,Te,{overrideNavigation:ut,fetcherSubmission:Ee,preventScrollReset:S})}}async function Ut(M,L,G,de,Ee){let Se=await Promise.all([...G.map(he=>pf("loader",Ee,he,L,i,a,l)),...de.map(he=>he.matches&&he.match&&he.controller?pf("loader",hf(e.history,he.path,he.controller.signal),he.match,he.matches,i,a,l):{type:tr.error,error:Yn(404,{pathname:he.path})})]),Te=Se.slice(0,G.length),me=Se.slice(G.length);return await Promise.all([IC(M,G,Te,Te.map(()=>Ee.signal),!1,w.loaderData),IC(M,de.map(he=>he.match),me,de.map(he=>he.controller?he.controller.signal:null),!0)]),{results:Se,loaderResults:Te,fetcherResults:me}}function lr(){N=!0,R.push(...Ne()),ge.forEach((M,L)=>{U.has(L)&&(j.push(L),Ot(L))})}function Jr(M,L,G){let de=iu(w.matches,L);Lr(M),ye({errors:{[de.route.id]:G},fetchers:new Map(w.fetchers)})}function Lr(M){let L=w.fetchers.get(M);U.has(M)&&!(L&&L.state==="loading"&&J.has(M))&&Ot(M),ge.delete(M),J.delete(M),te.delete(M),w.fetchers.delete(M)}function Ot(M){let L=U.get(M);Ie(L,"Expected fetch controller: "+M),L.abort(),U.delete(M)}function ln(M){for(let L of M){let G=Nt(L),de=Bl(G.data);w.fetchers.set(L,de)}}function I(){let M=[],L=!1;for(let G of te){let de=w.fetchers.get(G);Ie(de,"Expected fetcher: "+G),de.state==="loading"&&(te.delete(G),M.push(G),L=!0)}return ln(M),L}function ue(M){let L=[];for(let[G,de]of J)if(de0}function F(M,L){let G=w.blockers.get(M)||df;return ee.get(M)!==L&&ee.set(M,L),G}function Y(M){w.blockers.delete(M),ee.delete(M)}function pe(M,L){let G=w.blockers.get(M)||df;Ie(G.state==="unblocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="proceeding"||G.state==="blocked"&&L.state==="unblocked"||G.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+L.state);let de=new Map(w.blockers);de.set(M,L),ye({blockers:de})}function be(M){let{currentLocation:L,nextLocation:G,historyAction:de}=M;if(ee.size===0)return;ee.size>1&&Wu(!1,"A router only supports one blocker at a time");let Ee=Array.from(ee.entries()),[Se,Te]=Ee[Ee.length-1],me=w.blockers.get(Se);if(!(me&&me.state==="proceeding")&&Te({currentLocation:L,nextLocation:G,historyAction:de}))return Se}function Ne(M){let L=[];return H.forEach((G,de)=>{(!M||M(de))&&(G.cancel(),L.push(de),H.delete(de))}),L}function ur(M,L,G){if(d=M,h=L,p=G||null,!v&&w.navigation===x0){v=!0;let de=da(w.location,w.matches);de!=null&&ye({restoreScrollPosition:de})}return()=>{d=null,h=null,p=null}}function Zr(M,L){return p&&p(M,L.map(de=>lR(de,w.loaderData)))||M.key}function un(M,L){if(d&&h){let G=Zr(M,L);d[G]=h()}}function da(M,L){if(d){let G=Zr(M,L),de=d[G];if(typeof de=="number")return de}return null}function io(M){i={},s=hb(M,a,void 0,i)}return E={get basename(){return l},get state(){return w},get routes(){return o},initialize:_e,subscribe:rt,enableScrollRestoration:ur,navigate:He,fetch:sr,revalidate:lt,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:Nt,deleteFetcher:Lr,dispose:we,getBlocker:F,deleteBlocker:Y,_internalFetchControllers:U,_internalActiveDeferreds:H,_internalSetRoutes:io},E}function Kz(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vb(e,t,r,n,a,i,o){let s,l;if(i!=null&&o!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){l=c;break}}else s=t,l=t[t.length-1];let u=Og(a||".",Kp(s).map(c=>c.pathnameBase),wl(e.pathname,r)||e.pathname,o==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l&&l.route.index&&!J1(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Ni([r,u.pathname])),Zs(u)}function OC(e,t,r,n){if(!n||!Kz(n))return{path:r};if(n.formMethod&&!t4(n.formMethod))return{path:r,error:Yn(405,{method:n.formMethod})};let a=()=>({path:r,error:Yn(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),s=vR(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ya(o))return a();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,h)=>{let[v,y]=h;return""+p+v+"="+y+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!ya(o))return a();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return a()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=mb(n.formData),u=n.formData;else if(n.body instanceof FormData)l=mb(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=kC(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=kC(l)}catch{return a()}let c={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ya(c.formMethod))return{path:r,submission:c};let f=Zi(r);return t&&f.search&&J1(f.search)&&l.append("index",""),f.search="?"+l,{path:Zs(f),submission:c}}function qz(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function TC(e,t,r,n,a,i,o,s,l,u,c,f,d,p){let h=p?Object.values(p)[0]:d?Object.values(d)[0]:void 0,v=e.createURL(t.location),y=e.createURL(a),m=p?Object.keys(p)[0]:void 0,E=qz(r,m).filter((C,S)=>{if(C.route.lazy)return!0;if(C.route.loader==null)return!1;if(Qz(t.loaderData,t.matches[S],C)||o.some(N=>N===C.route.id))return!0;let O=t.matches[S],D=C;return DC(C,Wt({currentUrl:v,currentParams:O.params,nextUrl:y,nextParams:D.params},n,{actionResult:h,defaultShouldRevalidate:i||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||hR(O,D)}))}),w=[];return l.forEach((C,S)=>{if(!r.some(j=>j.route.id===C.routeId))return;let O=au(c,C.path,f);if(!O){w.push({key:S,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(S),N=gb(O,C.path),R=!1;u.has(S)?R=!1:s.includes(S)?R=!0:D&&D.state!=="idle"&&D.data===void 0?R=i:R=DC(N,Wt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:h,defaultShouldRevalidate:i})),R&&w.push({key:S,routeId:C.routeId,path:C.path,matches:O,match:N,controller:new AbortController})}),[E,w]}function Qz(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function hR(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function DC(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function PC(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];Ie(a,"No route found in manifest");let i={};for(let o in n){let l=a[o]!==void 0&&o!=="hasErrorBoundary";Wu(!l,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!wz.has(o)&&(i[o]=n[o])}Object.assign(a,i),Object.assign(a,Wt({},t(a),{lazy:void 0}))}async function pf(e,t,r,n,a,i,o,s){s===void 0&&(s={});let l,u,c,f=h=>{let v,y=new Promise((m,g)=>v=g);return c=()=>v(),t.signal.addEventListener("abort",c),Promise.race([h({request:t,params:r.params,context:s.requestContext}),y])};try{let h=r.route[e];if(r.route.lazy)if(h){let v,y=await Promise.all([f(h).catch(m=>{v=m}),PC(r.route,i,a)]);if(v)throw v;u=y[0]}else if(await PC(r.route,i,a),h=r.route[e],h)u=await f(h);else if(e==="action"){let v=new URL(t.url),y=v.pathname+v.search;throw Yn(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:tr.data,data:void 0};else if(h)u=await f(h);else{let v=new URL(t.url),y=v.pathname+v.search;throw Yn(404,{pathname:y})}Ie(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){l=tr.error,u=h}finally{c&&t.signal.removeEventListener("abort",c)}if(e4(u)){let h=u.status;if(Wz.has(h)){let m=u.headers.get("Location");if(Ie(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!pR.test(m))m=vb(new URL(t.url),n.slice(0,n.indexOf(r)+1),o,!0,m);else if(!s.isStaticRequest){let g=new URL(t.url),E=m.startsWith("//")?new URL(g.protocol+m):new URL(m),w=wl(E.pathname,o)!=null;E.origin===g.origin&&w&&(m=E.pathname+E.search+E.hash)}if(s.isStaticRequest)throw u.headers.set("Location",m),u;return{type:tr.redirect,status:h,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:l===tr.error?tr.error:tr.data,response:u};let v,y=u.headers.get("Content-Type");return y&&/\bapplication\/json\b/.test(y)?v=await u.json():v=await u.text(),l===tr.error?{type:l,error:new X1(h,u.statusText,v),headers:u.headers}:{type:tr.data,data:v,statusCode:u.status,headers:u.headers}}if(l===tr.error)return{type:l,error:u};if(Zz(u)){var d,p;return{type:tr.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((p=u.init)==null?void 0:p.headers)&&new Headers(u.init.headers)}}return{type:tr.data,data:u}}function hf(e,t,r,n){let a=e.createURL(vR(t)).toString(),i={signal:r};if(n&&ya(n.formMethod)){let{formMethod:o,formEncType:s}=n;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=mb(n.formData):i.body=n.formData}return new Request(a,i)}function mb(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function kC(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Xz(e,t,r,n,a){let i={},o=null,s,l=!1,u={};return r.forEach((c,f)=>{let d=t[f].route.id;if(Ie(!bu(c),"Cannot handle redirect results in processLoaderData"),Xf(c)){let p=iu(e,d),h=c.error;n&&(h=Object.values(n)[0],n=void 0),o=o||{},o[p.route.id]==null&&(o[p.route.id]=h),i[d]=void 0,l||(l=!0,s=fR(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else ks(c)?(a.set(d,c.deferredData),i[d]=c.deferredData.data):i[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!l&&(s=c.statusCode),c.headers&&(u[d]=c.headers)}),n&&(o=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:o,statusCode:s||200,loaderHeaders:u}}function AC(e,t,r,n,a,i,o,s){let{loaderData:l,errors:u}=Xz(t,r,n,a,s);for(let c=0;cn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function RC(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Yn(e,t){let{pathname:r,routeId:n,method:a,type:i}=t===void 0?{}:t,o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",s='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new X1(e||500,o,new Error(s),!0)}function MC(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(bu(r))return{result:r,idx:t}}}function vR(e){let t=typeof e=="string"?Zi(e):e;return Zs(Wt({},t,{hash:""}))}function Jz(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ks(e){return e.type===tr.deferred}function Xf(e){return e.type===tr.error}function bu(e){return(e&&e.type)===tr.redirect}function Zz(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function e4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function t4(e){return zz.has(e.toLowerCase())}function ya(e){return Uz.has(e.toLowerCase())}async function IC(e,t,r,n,a,i){for(let o=0;of.route.id===l.route.id),c=u!=null&&!hR(u,l)&&(i&&i[l.route.id])!==void 0;if(ks(s)&&(a||c)){let f=n[o];Ie(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await mR(s,f,a).then(d=>{d&&(r[o]=d||r[o])})}}}async function mR(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:tr.data,data:e.deferredData.unwrappedData}}catch(a){return{type:tr.error,error:a}}return{type:tr.data,data:e.deferredData.data}}}function J1(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gb(e,t){let r=typeof t=="string"?Zi(t).search:t.search;if(e[e.length-1].route.index&&J1(r||""))return e[e.length-1];let n=Kp(e);return n[n.length-1]}function $C(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function C0(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vf(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function n4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Bl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),o=x.useRef(!1);return yR(()=>{o.current=!0}),x.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){r.go(l);return}let c=Og(l,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ni([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,a,e])}const o4=x.createContext(null);function s4(e){let t=x.useContext(pi).outlet;return t&&x.createElement(o4.Provider,{value:e},t)}function eE(){let{matches:e}=x.useContext(pi),t=e[e.length-1];return t?t.params:{}}function tE(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=x.useContext(pi),{pathname:a}=hi(),i=JSON.stringify(Kp(n).map(o=>o.pathnameBase));return x.useMemo(()=>Og(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function l4(e,t,r){Lc()||Ie(!1);let{navigator:n}=x.useContext(us),{matches:a}=x.useContext(pi),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=hi(),u;if(t){var c;let v=typeof t=="string"?Zi(t):t;s==="/"||(c=v.pathname)!=null&&c.startsWith(s)||Ie(!1),u=v}else u=l;let f=u.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=au(e,{pathname:d}),h=p4(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:Ni([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Ni([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r);return t&&h?x.createElement(Dg.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cr.Pop}},h):h}function u4(){let e=y4(),t=fR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:a},r):null,i)}const c4=x.createElement(u4,null);class f4 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?x.createElement(pi.Provider,{value:this.props.routeContext},x.createElement(gR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function d4(e){let{routeContext:t,match:r,children:n}=e,a=x.useContext(qp);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(pi.Provider,{value:t},n)}function p4(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let i=e,o=(n=r)==null?void 0:n.errors;if(o!=null){let s=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));s>=0||Ie(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,u)=>{let c=l.route.id?o==null?void 0:o[l.route.id]:null,f=null;r&&(f=l.route.errorElement||c4);let d=t.concat(i.slice(0,u+1)),p=()=>{let h;return c?h=f:l.route.Component?h=x.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,x.createElement(d4,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?x.createElement(f4,{location:r.location,revalidation:r.revalidation,component:f,error:c,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var wR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wR||{}),Hu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Hu||{});function h4(e){let t=x.useContext(qp);return t||Ie(!1),t}function rE(e){let t=x.useContext(Tg);return t||Ie(!1),t}function v4(e){let t=x.useContext(pi);return t||Ie(!1),t}function bR(e){let t=v4(),r=t.matches[t.matches.length-1];return r.route.id||Ie(!1),r.route.id}function m4(){return rE(Hu.UseNavigation).navigation}function g4(){let{matches:e,loaderData:t}=rE(Hu.UseMatches);return x.useMemo(()=>e.map(r=>lR(r,t)),[e,t])}function y4(){var e;let t=x.useContext(gR),r=rE(Hu.UseRouteError),n=bR(Hu.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function w4(){let{router:e}=h4(wR.UseNavigateStable),t=bR(Hu.UseNavigateStable),r=x.useRef(!1);return yR(()=>{r.current=!0}),x.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,fm({fromRouteId:t},i)))},[e,t])}const b4="startTransition",jC=G2[b4];function _4(e){let{fallbackElement:t,router:r,future:n}=e,[a,i]=x.useState(r.state),{v7_startTransition:o}=n||{},s=x.useCallback(f=>{o&&jC?jC(()=>i(f)):i(f)},[i,o]);x.useLayoutEffect(()=>r.subscribe(s),[r,s]);let l=x.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:f=>r.navigate(f),push:(f,d,p)=>r.navigate(f,{state:d,preventScrollReset:p==null?void 0:p.preventScrollReset}),replace:(f,d,p)=>r.navigate(f,{replace:!0,state:d,preventScrollReset:p==null?void 0:p.preventScrollReset})}),[r]),u=r.basename||"/",c=x.useMemo(()=>({router:r,navigator:l,static:!1,basename:u}),[r,l,u]);return x.createElement(x.Fragment,null,x.createElement(qp.Provider,{value:c},x.createElement(Tg.Provider,{value:a},x.createElement(S4,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l},a.initialized?x.createElement(E4,{routes:r.routes,state:a}):t))),null)}function E4(e){let{routes:t,state:r}=e;return l4(t,void 0,r)}function _R(e){let{to:t,replace:r,state:n,relative:a}=e;Lc()||Ie(!1);let{matches:i}=x.useContext(pi),{pathname:o}=hi(),s=Z1(),l=Og(t,Kp(i).map(c=>c.pathnameBase),o,a==="path"),u=JSON.stringify(l);return x.useEffect(()=>s(JSON.parse(u),{replace:r,state:n,relative:a}),[s,u,a,r,n]),null}function ER(e){return s4(e.context)}function S4(e){let{basename:t="/",children:r=null,location:n,navigationType:a=cr.Pop,navigator:i,static:o=!1}=e;Lc()&&Ie(!1);let s=t.replace(/^\/*/,"/"),l=x.useMemo(()=>({basename:s,navigator:i,static:o}),[s,i,o]);typeof n=="string"&&(n=Zi(n));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:p="default"}=n,h=x.useMemo(()=>{let v=wl(u,s);return v==null?null:{location:{pathname:v,search:c,hash:f,state:d,key:p},navigationType:a}},[s,u,c,f,d,p,a]);return h==null?null:x.createElement(us.Provider,{value:l},x.createElement(Dg.Provider,{children:r,value:h}))}new Promise(()=>{});function x4(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:x.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function C4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function O4(e,t){return e.button===0&&(!t||t==="_self")&&!C4(e)}const T4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],D4=["aria-current","caseSensitive","className","end","style","to","children"];function P4(e,t){return Gz({basename:t==null?void 0:t.basename,future:el({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:mz({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||k4(),routes:e,mapRouteProperties:x4}).initialize()}function k4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=el({},t,{errors:A4(t.errors)})),t}function A4(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new X1(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let i=window[a.__subType];if(typeof i=="function")try{let o=new i(a.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(a.message);i.stack="",r[n]=i}}else r[n]=a;return r}const N4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",R4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,an=x.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:u,preventScrollReset:c}=t,f=SR(t,T4),{basename:d}=x.useContext(us),p,h=!1;if(typeof u=="string"&&R4.test(u)&&(p=u,N4))try{let g=new URL(window.location.href),E=u.startsWith("//")?new URL(g.protocol+u):new URL(u),w=wl(E.pathname,d);E.origin===g.origin&&w!=null?u=w+E.search+E.hash:h=!0}catch{}let v=a4(u,{relative:a}),y=j4(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:a});function m(g){n&&n(g),g.defaultPrevented||y(g)}return x.createElement("a",el({},f,{href:p||v,onClick:h||i?n:m,ref:r,target:l}))}),Bh=x.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:u}=t,c=SR(t,D4),f=tE(l,{relative:c.relative}),d=hi(),p=x.useContext(Tg),{navigator:h}=x.useContext(us),v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,y=d.pathname,m=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;a||(y=y.toLowerCase(),m=m?m.toLowerCase():null,v=v.toLowerCase());let g=y===v||!o&&y.startsWith(v)&&y.charAt(v.length)==="/",E=m!=null&&(m===v||!o&&m.startsWith(v)&&m.charAt(v.length)==="/"),w=g?n:void 0,C;typeof i=="function"?C=i({isActive:g,isPending:E}):C=[i,g?"active":null,E?"pending":null].filter(Boolean).join(" ");let S=typeof s=="function"?s({isActive:g,isPending:E}):s;return x.createElement(an,el({},c,{"aria-current":w,className:C,ref:r,style:S,to:l}),typeof u=="function"?u({isActive:g,isPending:E}):u)});function M4(e){let{getKey:t,storageKey:r}=e;return L4({getKey:t,storageKey:r}),null}var yb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(yb||(yb={}));var wb;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wb||(wb={}));function I4(e){let t=x.useContext(qp);return t||Ie(!1),t}function $4(e){let t=x.useContext(Tg);return t||Ie(!1),t}function j4(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o}=t===void 0?{}:t,s=Z1(),l=hi(),u=tE(e,{relative:o});return x.useCallback(c=>{if(O4(c,r)){c.preventDefault();let f=n!==void 0?n:Zs(l)===Zs(u);s(e,{replace:f,state:a,preventScrollReset:i,relative:o})}},[l,s,u,n,a,r,e,i,o])}const LC="react-router-scroll-positions";let zh={};function L4(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=I4(yb.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=$4(wb.UseScrollRestoration),{basename:o}=x.useContext(us),s=hi(),l=g4(),u=m4();x.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),F4(x.useCallback(()=>{if(u.state==="idle"){let c=(t?t(s,l):null)||s.key;zh[c]=window.scrollY}sessionStorage.setItem(r||LC,JSON.stringify(zh)),window.history.scrollRestoration="auto"},[r,t,u.state,s,l])),typeof document<"u"&&(x.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||LC);c&&(zh=JSON.parse(c))}catch{}},[r]),x.useLayoutEffect(()=>{let c=t&&o!=="/"?(d,p)=>t(el({},d,{pathname:wl(d.pathname,o)||d.pathname}),p):t,f=n==null?void 0:n.enableScrollRestoration(zh,()=>window.scrollY,c);return()=>f&&f()},[n,o,t]),x.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let c=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(c){c.scrollIntoView();return}}i!==!0&&window.scrollTo(0,0)}},[s,a,i]))}function F4(e,t){let{capture:r}=t||{};x.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Pg(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var xR={exports:{}},ht={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Nr=typeof Symbol=="function"&&Symbol.for,nE=Nr?Symbol.for("react.element"):60103,aE=Nr?Symbol.for("react.portal"):60106,kg=Nr?Symbol.for("react.fragment"):60107,Ag=Nr?Symbol.for("react.strict_mode"):60108,Ng=Nr?Symbol.for("react.profiler"):60114,Rg=Nr?Symbol.for("react.provider"):60109,Mg=Nr?Symbol.for("react.context"):60110,iE=Nr?Symbol.for("react.async_mode"):60111,Ig=Nr?Symbol.for("react.concurrent_mode"):60111,$g=Nr?Symbol.for("react.forward_ref"):60112,jg=Nr?Symbol.for("react.suspense"):60113,U4=Nr?Symbol.for("react.suspense_list"):60120,Lg=Nr?Symbol.for("react.memo"):60115,Fg=Nr?Symbol.for("react.lazy"):60116,B4=Nr?Symbol.for("react.block"):60121,z4=Nr?Symbol.for("react.fundamental"):60117,W4=Nr?Symbol.for("react.responder"):60118,H4=Nr?Symbol.for("react.scope"):60119;function Bn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case nE:switch(e=e.type,e){case iE:case Ig:case kg:case Ng:case Ag:case jg:return e;default:switch(e=e&&e.$$typeof,e){case Mg:case $g:case Fg:case Lg:case Rg:return e;default:return t}}case aE:return t}}}function CR(e){return Bn(e)===Ig}ht.AsyncMode=iE;ht.ConcurrentMode=Ig;ht.ContextConsumer=Mg;ht.ContextProvider=Rg;ht.Element=nE;ht.ForwardRef=$g;ht.Fragment=kg;ht.Lazy=Fg;ht.Memo=Lg;ht.Portal=aE;ht.Profiler=Ng;ht.StrictMode=Ag;ht.Suspense=jg;ht.isAsyncMode=function(e){return CR(e)||Bn(e)===iE};ht.isConcurrentMode=CR;ht.isContextConsumer=function(e){return Bn(e)===Mg};ht.isContextProvider=function(e){return Bn(e)===Rg};ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===nE};ht.isForwardRef=function(e){return Bn(e)===$g};ht.isFragment=function(e){return Bn(e)===kg};ht.isLazy=function(e){return Bn(e)===Fg};ht.isMemo=function(e){return Bn(e)===Lg};ht.isPortal=function(e){return Bn(e)===aE};ht.isProfiler=function(e){return Bn(e)===Ng};ht.isStrictMode=function(e){return Bn(e)===Ag};ht.isSuspense=function(e){return Bn(e)===jg};ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kg||e===Ig||e===Ng||e===Ag||e===jg||e===U4||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Lg||e.$$typeof===Rg||e.$$typeof===Mg||e.$$typeof===$g||e.$$typeof===z4||e.$$typeof===W4||e.$$typeof===H4||e.$$typeof===B4)};ht.typeOf=Bn;xR.exports=ht;var V4=xR.exports;function dm(e,t){return dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},dm(e,t)}function it(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dm(e,t)}var qa=function(t,r){if(typeof t=="function"){t(r);return}t!==null&&typeof t=="object"&&(t.current=r)},bb=function(t){return t!==null&&typeof t=="object"&&t.hasOwnProperty("current")},Y4=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o0?x.cloneElement(i,a):i;return x.createElement(o,{innerRef:n},s)};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}function YW(e,t){var r=this.__data__,n=Bg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function eo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=pH}var hH=1/0;function El(e){if(typeof e=="string"||Qp(e))return e;var t=e+"";return t=="0"&&1/e==-hH?"-0":t}function vH(e,t,r){t=Jp(t,e);for(var n=-1,a=t.length,i=!1;++na?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0){if(++t>=EH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OH=CH(_H);const MR=OH;function Gg(e,t){return MR(NR(e,t,Zp),e+"")}var TH=Gg(yH);const se=TH;var IR={exports:{}},DH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",PH=DH,kH=PH;function $R(){}function jR(){}jR.resetWarningCache=$R;var AH=function(){function e(n,a,i,o,s,l){if(l!==kH){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jR,resetWarningCache:$R};return r.PropTypes=r,r};IR.exports=AH();var LR=IR.exports;const $=Xr(LR);function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return e===void 0}var NH=/\s/;function RH(e){for(var t=e.length;t--&&NH.test(e.charAt(t)););return t}var MH=/^\s+/;function IH(e){return e&&e.slice(0,RH(e)+1).replace(MH,"")}var VC=0/0,$H=/^[-+]0x[0-9a-f]+$/i,jH=/^0b[01]+$/i,LH=/^0o[0-7]+$/i,FH=parseInt;function FR(e){if(typeof e=="number")return e;if(Qp(e))return VC;if(Ra(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ra(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IH(e);var r=jH.test(e);return r||LH.test(e)?FH(e.slice(2),r?2:8):$H.test(e)?VC:+e}var YC=1/0,UH=17976931348623157e292;function _b(e){if(!e)return e===0?e:0;if(e=FR(e),e===YC||e===-YC){var t=e<0?-1:1;return t*UH}return e===e?e:0}function uE(e){var t=_b(e),r=t%1;return t===t?r?t-r:t:0}function UR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++rs))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&W6?new Gu:void 0;for(i.set(e,t),i.set(t,e);++f-1}function nM(e,t,r){for(var n=-1,a=e==null?0:e.length;++n-1?a[i?t[o]:o]:void 0}}var KV=Math.max;function Ob(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:uE(r);return a<0&&(a=KV(n+a,0)),eM(e,Sl(t),a)}var qV=GV(Ob);const iM=qV;function QV(e,t){var r;return Uc(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}function oM(e,t,r){if(!Ra(r))return!1;var n=typeof t;return(n=="number"?gi(r)&&Vg(t,r.length):n=="string"&&t in r)?Ug(r[t],e):!1}function Zf(e,t,r){var n=Jt(e)?YR:QV;return r&&oM(e,t,r)&&(t=void 0),n(e,Sl(t))}var XV=function(t,r){return Zf(x.Children.toArray(t),{type:r})},re=function(t){return t==null||Array.isArray(t)&&t.length===0},JV={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function sO(e){var t=typeof e;return t==="string"||t==="number"?JV[e]||e:""}var T=function(t,r){return t&&r},kr=function(t,r){return t&&t!==!0&&t+" "+r},Ct=function(t,r){return t&&(t===!0?r:t+" "+r)},mm=function(t,r){return!t||t===!0?null:t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(n){return n.replace("-"," ")+" "+r}).join(" ")},Ia=function(t){return t==="justified"?"justified":kr(t,"aligned")},ro=function(t){return kr(t,"aligned")},rn=function(t,r,n){if(r===void 0&&(r=""),n===void 0&&(n=!1),n&&t==="equal")return"equal width";var a=typeof t;return(a==="string"||a==="number")&&r?sO(t)+" "+r:sO(t)},ZV=200;function sM(e,t,r,n){var a=-1,i=rM,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=Xp(t,qg(r))),n?(i=nM,o=!1):t.length>=ZV&&(i=dE,o=!1,t=new Gu(t));e:for(;++a0&&r(s)?t>1?Jg(s,t-1,r,n,a):hE(a,s):n||(a[a.length]=s)}return a}var tY=Gg(function(e,t){return vm(e)?sM(e,Jg(t,1,vm,!0)):[]});const uO=tY;function rY(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:lE(e,t,r)}function nY(e){return e.split("")}var aY="\\ud800-\\udfff",iY="\\u0300-\\u036f",oY="\\ufe20-\\ufe2f",sY="\\u20d0-\\u20ff",lY=iY+oY+sY,uY="\\ufe0e\\ufe0f",cY="\\u200d",fY=RegExp("["+cY+aY+lY+uY+"]");function mE(e){return fY.test(e)}var lM="\\ud800-\\udfff",dY="\\u0300-\\u036f",pY="\\ufe20-\\ufe2f",hY="\\u20d0-\\u20ff",vY=dY+pY+hY,mY="\\ufe0e\\ufe0f",gY="["+lM+"]",Tb="["+vY+"]",Db="\\ud83c[\\udffb-\\udfff]",yY="(?:"+Tb+"|"+Db+")",uM="[^"+lM+"]",cM="(?:\\ud83c[\\udde6-\\uddff]){2}",fM="[\\ud800-\\udbff][\\udc00-\\udfff]",wY="\\u200d",dM=yY+"?",pM="["+mY+"]?",bY="(?:"+wY+"(?:"+[uM,cM,fM].join("|")+")"+pM+dM+")*",_Y=pM+dM+bY,EY="(?:"+[uM+Tb+"?",Tb,cM,fM,gY].join("|")+")",SY=RegExp(Db+"(?="+Db+")|"+EY+_Y,"g");function xY(e){return e.match(SY)||[]}function CY(e){return mE(e)?xY(e):nY(e)}function hM(e,t,r){t=="__proto__"&&pm?pm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var OY=Object.prototype,TY=OY.hasOwnProperty;function gE(e,t,r){var n=e[t];(!(TY.call(e,t)&&Ug(n,r))||r===void 0&&!(t in e))&&hM(e,t,r)}function vM(e,t,r,n){if(!Ra(e))return e;t=Jp(t,e);for(var a=-1,i=t.length,o=i-1,s=e;s!=null&&++a=0;a-=1)this.handlers[a].called||(this.handlers[a].called=!0,this.handlers[a](t));for(var i=n;i>=0;i-=1)this.handlers[i].called=!1}else(0,this.handlers[n])(t)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var r=[],n=this.handlers.length,a=0;a0;var r=this.handlerSets.get(t);return!!r&&r.hasHandlers()}},{key:"removeHandlers",value:function(t,r){var n=dO(this.handlerSets);if(!n.has(t))return new e(this.poolName,n);var a=n.get(t).removeHandlers(r);return a.hasHandlers()?n.set(t,a):n.delete(t),new e(this.poolName,n)}}]),e}();ta(Pb,"createByType",function(e,t,r){var n=new Map;return n.set(t,new _M(r)),new Pb(e,n)});var YY=function(){function e(t){var r=this;eh(this,e),ta(this,"handlers",new Map),ta(this,"pools",new Map),ta(this,"target",void 0),ta(this,"createEmitter",function(n){return function(a){r.pools.forEach(function(i){i.dispatchEvent(n,a)})}}),this.target=t}return th(e,[{key:"addHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t);this.pools.set(t,a.addHandlers(r,n))}else this.pools.set(t,Pb.createByType(t,r,n));this.handlers.has(r)||this.addTargetHandler(r)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t).removeHandlers(r,n);a.hasHandlers()?this.pools.set(t,a):this.pools.delete(t);var i=!1;this.pools.forEach(function(o){return i=i||o.hasHandlers(r)}),i||this.removeTargetHandler(r)}}},{key:"addTargetHandler",value:function(t){var r=this.createEmitter(t);this.handlers.set(t,r),this.target.addEventListener(t,r,!0)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t),!0),this.handlers.delete(t))}}]),e}(),GY=function(){function e(){var t=this;eh(this,e),ta(this,"targets",new Map),ta(this,"getTarget",function(r){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=hO(r);if(t.targets.has(a))return t.targets.get(a);if(!n)return null;var i=new YY(a);return t.targets.set(a,i),i}),ta(this,"removeTarget",function(r){t.targets.delete(hO(r))})}return th(e,[{key:"sub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o;this.getTarget(i).addHandlers(s,t,pO(r))}}},{key:"unsub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o,l=this.getTarget(i,!1);l&&(l.removeHandlers(s,t,pO(r)),l.hasHandlers()||this.removeTarget(i))}}}]),e}(),kb=new GY,P0=function(e){function t(){return eh(this,t),HY(this,wM(t).apply(this,arguments))}return zY(t,BY.PureComponent),th(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(r){this.unsubscribe(r),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.sub(n,a,{pool:i,target:o})}},{key:"unsubscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.unsub(n,a,{pool:i,target:o})}},{key:"render",value:function(){return null}}]),t}();ta(P0,"defaultProps",{pool:"default",target:"document"}),P0.propTypes={},gm.instance=kb,gm.default=P0;var _E;_E=gm;bE.exports=_E.default;var Rf=bE.exports.instance=_E.instance,KY=bE.exports;const Ci=Xr(KY);function EM(){}var qY=1/0,QY=_u&&1/pE(new _u([,-0]))[1]==qY?function(e){return new _u(e)}:EM;const XY=QY;var JY=200;function SM(e,t,r){var n=-1,a=rM,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=nM;else if(i>=JY){var u=t?null:XY(e);if(u)return pE(u);o=!1,a=dE,l=new Gu}else l=t?[]:s;e:for(;++n-1:!!a&&tM(e,t,r)>-1}var xM=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],p8=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],h8=[].concat(xM,p8),CM=["alt","height","src","srcSet","width","loading"],Zg=function(t,r){r===void 0&&(r={});var n=r,a=n.htmlProps,i=a===void 0?h8:a,o=n.includeAria,s=o===void 0?!0:o,l={},u={};return HV(t,function(c,f){var d=s&&(/^aria-.*$/.test(f)||f==="role"),p=Qa(i,f)||d?l:u;p[f]=c}),[l,u]},v8=typeof document=="object"&&document!==null,m8=typeof window=="object"&&window!==null&&window.self===window,g8=function e(){return Be(e.override)?v8&&m8:e.override};const Ms=g8;var y8=Math.max,w8=Math.min;function b8(e,t,r){return e>=w8(t,r)&&e0&&a.indexOf(r)===n})):[]}function P8(e,t){return[t.filter(function(r){return e.indexOf(r)===-1}),e.filter(function(r){return t.indexOf(r)===-1})]}var yO=new Map,k0=function(t,r){var n=D8(r),a=P8(yO.get(t)||[],n),i=a[0],o=a[1];t&&(i.forEach(function(s){return t.classList.add(s)}),o.forEach(function(s){return t.classList.remove(s)})),yO.set(t,n)},k8=function(){var t=this;this.add=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);a.add(n);return}var i=new Set;i.add(n),t.nodes.set(r,i)},this.del=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);if(a.size===1){t.nodes.delete(r);return}a.delete(n)}},this.emit=function(r,n){n(r,t.nodes.get(r))},this.nodes=new Map},gf=new k8;function A8(e,t){var r=b.useRef(),n=b.useRef(!1);gO(function(){if(r.current=t,n.current){var a=bb(e)?e.current:e;gf.emit(a,k0)}n.current=!0},[t]),gO(function(){var a=bb(e)?e.current:e;return gf.add(a,r),gf.emit(a,k0),function(){gf.del(a,r),gf.emit(a,k0)}},[e])}var N8=Gg(function(e,t){return vm(e)?sM(e,t):[]});const R8=N8;function qu(e){var t=e.children,r=e.className,n=e.content,a=e.size,i=z(a,"icons",r),o=V(qu,e),s=q(qu,e);return b.createElement(s,P({},o,{className:i}),re(t)?n:t)}qu.handledProps=["as","children","className","content","size"];qu.propTypes={};qu.defaultProps={as:"i"};var nl=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};for(var Hh=0;Hh<24;Hh+=1)ym[112+Hh]="F"+(Hh+1);for(var A0=0;A0<26;A0+=1){var N0=A0+65;ym[N0]=[String.fromCharCode(N0+32),String.fromCharCode(N0)]}var oe={codes:ym,getCode:function(t){return wO(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var r=wO(t);if(r&&t.key)return t.key;var n=ym[r?t.keyCode||t.which:t];return Array.isArray(n)&&(r?n=n[t.shiftKey?1:0]:n=n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};oe.Spacebar=oe[" "];oe.Digit0=oe[0];oe.Digit1=oe[1];oe.Digit2=oe[2];oe.Digit3=oe[3];oe.Digit4=oe[4];oe.Digit5=oe[5];oe.Digit6=oe[6];oe.Digit7=oe[7];oe.Digit8=oe[8];oe.Digit9=oe[9];oe.Tilde=oe["~"];oe.GraveAccent=oe["`"];oe.ExclamationPoint=oe["!"];oe.AtSign=oe["@"];oe.PoundSign=oe["#"];oe.PercentSign=oe["%"];oe.Caret=oe["^"];oe.Ampersand=oe["&"];oe.PlusSign=oe["+"];oe.MinusSign=oe["-"];oe.EqualsSign=oe["="];oe.DivisionSign=oe["/"];oe.MultiplicationSign=oe["*"];oe.Comma=oe[","];oe.Decimal=oe["."];oe.Colon=oe[":"];oe.Semicolon=oe[";"];oe.Pipe=oe["|"];oe.BackSlash=oe["\\"];oe.QuestionMark=oe["?"];oe.SingleQuote=oe["'"];oe.DoubleQuote=oe['"'];oe.LeftCurlyBrace=oe["{"];oe.RightCurlyBrace=oe["}"];oe.LeftParenthesis=oe["("];oe.RightParenthesis=oe[")"];oe.LeftAngleBracket=oe["<"];oe.RightAngleBracket=oe[">"];oe.LeftSquareBracket=oe["["];oe.RightSquareBracket=oe["]"];var M8=oe;const _r=Xr(M8);var SE=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?f-1:0),p=1;p1?p-1:0),v=1;v1?f-1:0),p=1;p1?d-1:0),h=1;h1?d-1:0),h=1;h=u}),u>=f.length-1&&(p=d[d.length-1]);else{var v=Ob(f,["value",c]);p=Qa(d,v)?v:void 0}return(!p||p<0)&&(p=d[0]),p}var PO=function(t,r){return Be(t)?r:t},kO=function(t){return t&&t.map(function(r){return yE(r,["key","value"])})};function XM(e){var t=e.flag,r=e.image,n=e.text;return Vu(n)?n:{content:b.createElement(b.Fragment,null,GM.create(t),qt.create(r),n)}}var pr=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o=u||u===1){n.open(s);return}se(n.searchRef.current,"focus")},n.handleIconClick=function(s){var l=n.props.clearable,u=n.hasValue();se(n.props,"onClick",s,n.props),s.stopPropagation(),l&&u?n.clearValue(s):n.toggle(s)},n.handleItemClick=function(s,l){var u=n.props,c=u.multiple,f=u.search,d=n.state.value,p=l.value;if(s.stopPropagation(),(c||l.disabled)&&s.nativeEvent.stopImmediatePropagation(),!l.disabled){var h=l["data-additional"],v=c?TO(n.state.value,[p]):p,y=c?!!uO(v,d).length:v!==d;y&&(n.setState({value:v}),n.handleChange(s,v)),n.clearSearchQuery(),se(f?n.searchRef.current:n.ref.current,"focus"),n.closeOnChange(s),h&&se(n.props,"onAddItem",s,P({},n.props,{value:p}))}},n.handleFocus=function(s){var l=n.state.focus;l||(se(n.props,"onFocus",s,n.props),n.setState({focus:!0}))},n.handleBlur=function(s){var l=Ea(s,"currentTarget");if(!(l&&l.contains(document.activeElement))){var u=n.props,c=u.closeOnBlur,f=u.multiple,d=u.selectOnBlur;n.isMouseDown||(se(n.props,"onBlur",s,n.props),d&&!f&&(n.makeSelectedItemActive(s,n.state.selectedIndex),c&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}},n.handleSearchChange=function(s,l){var u=l.value;s.stopPropagation();var c=n.props.minCharacters,f=n.state.open,d=u;if(se(n.props,"onSearchChange",s,P({},n.props,{searchQuery:d})),n.setState({searchQuery:d,selectedIndex:0}),!f&&d.length>=c){n.open();return}f&&c!==1&&d.lengthc||d<0)?d=l:d>c?d=0:d<0&&(d=c),u[d].disabled?n.getSelectedIndexAfterMove(s,d):d}},n.handleIconOverrides=function(s){var l=n.props.clearable,u=z(l&&n.hasValue()&&"clear",s.className);return{className:u,onClick:function(f){se(s,"onClick",f,s),n.handleIconClick(f)}}},n.clearValue=function(s){var l=n.props.multiple,u=l?[]:"";n.setState({value:u}),n.handleChange(s,u)},n.computeSearchInputTabIndex=function(){var s=n.props,l=s.disabled,u=s.tabIndex;return Be(u)?l?-1:0:u},n.computeSearchInputWidth=function(){var s=n.state.searchQuery;if(n.sizerRef.current&&s){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=s;var l=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),l}},n.computeTabIndex=function(){var s=n.props,l=s.disabled,u=s.search,c=s.tabIndex;if(!u)return l?-1:Be(c)?0:c},n.handleSearchInputOverrides=function(s){return{onChange:function(u,c){se(s,"onChange",u,c),n.handleSearchChange(u,c)}}},n.hasValue=function(){var s=n.props.multiple,l=n.state.value;return s?!Nf(l):!Be(l)&&l!==""},n.scrollSelectedItemIntoView=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=s.querySelector(".item.selected");if(l){var u=l.offsetTops.scrollTop+s.clientHeight;u?s.scrollTop=l.offsetTop:c&&(s.scrollTop=l.offsetTop+l.clientHeight-s.clientHeight)}}}},n.setOpenDirection=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=n.ref.current.getBoundingClientRect(),u=s.clientHeight,c=document.documentElement.clientHeight-l.top-l.height-u,f=l.top-u,d=c<0&&f>c;!d!=!n.state.upward&&n.setState({upward:d})}}},n.open=function(s,l){s===void 0&&(s=null),l===void 0&&(l=!0);var u=n.props,c=u.disabled,f=u.search;c||(f&&se(n.searchRef.current,"focus"),se(n.props,"onOpen",s,n.props),l&&n.setState({open:!0}),n.scrollSelectedItemIntoView())},n.close=function(s,l){l===void 0&&(l=n.handleClose),n.state.open&&(se(n.props,"onClose",s,n.props),n.setState({open:!1},l))},n.handleClose=function(){var s=document.activeElement===n.searchRef.current;!s&&n.ref.current&&n.ref.current.blur();var l=document.activeElement===n.ref.current,u=s||l;n.setState({focus:u})},n.toggle=function(s){return n.state.open?n.close(s):n.open(s)},n.renderText=function(){var s=n.props,l=s.multiple,u=s.placeholder,c=s.search,f=s.text,d=n.state,p=d.searchQuery,h=d.selectedIndex,v=d.value,y=d.open,m=n.hasValue(),g=z(u&&!m&&"default","text",c&&p&&"filtered"),E=u,w;return f?E=f:y&&!l?w=n.getSelectedItem(h):m&&(w=n.getItemByValue(v)),Yo.create(w?XM(w):E,{defaultProps:{className:g}})},n.renderSearchInput=function(){var s=n.props,l=s.search,u=s.searchInput,c=n.state.searchQuery;return l&&b.createElement(jn,{innerRef:n.searchRef},qM.create(u,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:c},overrideProps:n.handleSearchInputOverrides}))},n.renderSearchSizer=function(){var s=n.props,l=s.search,u=s.multiple;return l&&u&&b.createElement("span",{className:"sizer",ref:n.sizerRef})},n.renderLabels=function(){var s=n.props,l=s.multiple,u=s.renderLabel,c=n.state,f=c.selectedLabel,d=c.value;if(!(!l||Nf(d))){var p=bn(d,n.getItemByValue);return bn(I5(p),function(h,v){var y={active:h.value===f,as:"a",key:PO(h.key,h.value),onClick:n.handleLabelClick,onRemove:n.handleLabelRemove,value:h.value};return Xt.create(u(h,v,y),{defaultProps:y})})}},n.renderOptions=function(){var s=n.props,l=s.lazyLoad,u=s.multiple,c=s.search,f=s.noResultsMessage,d=n.state,p=d.open,h=d.selectedIndex,v=d.value;if(l&&!p)return null;var y=ou({value:n.state.value,options:n.props.options,searchQuery:n.state.searchQuery,additionLabel:n.props.additionLabel,additionPosition:n.props.additionPosition,allowAdditions:n.props.allowAdditions,deburr:n.props.deburr,multiple:n.props.multiple,search:n.props.search});if(f!==null&&c&&Nf(y))return b.createElement("div",{className:"message"},f);var m=u?function(g){return Qa(v,g)}:function(g){return g===v};return bn(y,function(g,E){return KM.create(P({active:m(g.value),selected:h===E},g,{key:PO(g.key,g.value),style:P({},g.style,{pointerEvents:"all"})}),{generateKey:!1,overrideProps:function(C){return{onClick:function(O,D){C.onClick==null||C.onClick(O,D),n.handleItemClick(O,D)}}}})})},n.renderMenu=function(){var s=n.props,l=s.children,u=s.direction,c=s.header,f=n.state.open,d=n.getDropdownMenuAriaOptions();if(!re(l)){var p=x.Children.only(l),h=z(u,T(f,"visible"),p.props.className);return x.cloneElement(p,P({className:h},d))}return b.createElement(Zu,P({},d,{direction:u,open:f}),Vo.create(c,{autoGenerateKey:!1}),n.renderOptions())},n}var r=t.prototype;return r.getInitialAutoControlledState=function(){return{focus:!1,searchQuery:""}},t.getAutoControlledStateFromProps=function(a,i,o){var s={__options:a.options,__value:i.value},l=!ed(o.__value,i.value)||!S8(kO(a.options),kO(o.__options));return l&&(s.selectedIndex=DO({additionLabel:a.additionLabel,additionPosition:a.additionPosition,allowAdditions:a.allowAdditions,deburr:a.deburr,multiple:a.multiple,search:a.search,selectedIndex:i.selectedIndex,value:i.value,options:a.options,searchQuery:i.searchQuery})),s},r.componentDidMount=function(){var a=this.state.open;a&&this.open(null,!1)},r.shouldComponentUpdate=function(a,i){return!ed(a,this.props)||!ed(i,this.state)},r.componentDidUpdate=function(a,i){var o=this.props,s=o.closeOnBlur,l=o.minCharacters,u=o.openOnFocus,c=o.search;if(!i.focus&&this.state.focus){if(!this.isMouseDown){var f=!c||c&&l===1&&!this.state.open;u&&f&&this.open()}}else i.focus&&!this.state.focus&&!this.isMouseDown&&s&&this.close();!i.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):i.open&&this.state.open,i.selectedIndex!==this.state.selectedIndex&&this.scrollSelectedItemIntoView()},r.getDropdownMenuAriaOptions=function(){var a=this.props,i=a.search,o=a.multiple,s={};return i&&(s["aria-multiselectable"]=o,s.role="listbox"),s},r.render=function(){var a=this.props,i=a.basic,o=a.button,s=a.className,l=a.compact,u=a.disabled,c=a.error,f=a.fluid,d=a.floating,p=a.icon,h=a.inline,v=a.item,y=a.labeled,m=a.loading,g=a.multiple,E=a.pointing,w=a.search,C=a.selection,S=a.scrolling,O=a.simple,D=a.trigger,N=this.state,R=N.focus,j=N.open,U=N.upward,Q=z("ui",T(j,"active visible"),T(u,"disabled"),T(c,"error"),T(m,"loading"),T(i,"basic"),T(o,"button"),T(l,"compact"),T(f,"fluid"),T(d,"floating"),T(h,"inline"),T(y,"labeled"),T(v,"item"),T(g,"multiple"),T(w,"search"),T(C,"selection"),T(O,"simple"),T(S,"scrolling"),T(U,"upward"),Ct(E,"pointing"),"dropdown",s),X=V(t,this.props),J=q(t,this.props),te=this.getDropdownAriaOptions(J,this.props);return b.createElement(jn,{innerRef:this.ref},b.createElement(J,P({},X,te,{className:Q,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),D||this.renderText(),jt.create(p,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),j&&b.createElement(Ci,{name:"keydown",on:this.closeOnEscape}),j&&b.createElement(Ci,{name:"click",on:this.closeOnDocumentClick}),R&&b.createElement(Ci,{name:"keydown",on:this.removeItemOnBackspace})))},t}(Bc);pr.handledProps=["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"];pr.propTypes={};pr.defaultProps={additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:XM,searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0};pr.autoControlledProps=["open","searchQuery","selectedLabel","value","upward"];pr.Divider=Yd;pr.Header=Vo;pr.Item=KM;pr.Menu=Zu;pr.SearchInput=qM;pr.Text=Yo;function fs(e){return b.createElement(pr,P({},e,{selection:!0}))}fs.handledProps=["options"];fs.propTypes={};fs.Divider=pr.Divider;fs.Header=pr.Header;fs.Item=pr.Item;fs.Menu=pr.Menu;var ey=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?u-1:0),f=1;f1?r-1:0),a=1;a"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function R7(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!ia(i)||!li(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(o){var s=a[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function M7(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],i=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!ia(a)||!li(a)||(Object.assign(a.style,s),Object.keys(i).forEach(function(l){a.removeAttribute(l)}))})}}const I7={name:"applyStyles",enabled:!0,phase:"write",fn:R7,effect:M7,requires:["computeStyles"]};function ii(e){return e.split("-")[0]}var $s=Math.max,wm=Math.min,pc=Math.round;function $b(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rI(){return!/^((?!chrome|android).)*safari/i.test($b())}function hc(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&ia(e)&&(a=e.offsetWidth>0&&pc(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&pc(n.height)/e.offsetHeight||1);var o=ol(e)?Ln(e):window,s=o.visualViewport,l=!rI()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/a,c=(n.top+(l&&s?s.offsetTop:0))/i,f=n.width/a,d=n.height/i;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function DE(e){var t=hc(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function nI(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&TE(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Yi(e){return Ln(e).getComputedStyle(e)}function $7(e){return["table","td","th"].indexOf(li(e))>=0}function ds(e){return((ol(e)?e.ownerDocument:e.document)||window.document).documentElement}function ty(e){return li(e)==="html"?e:e.assignedSlot||e.parentNode||(TE(e)?e.host:null)||ds(e)}function MO(e){return!ia(e)||Yi(e).position==="fixed"?null:e.offsetParent}function j7(e){var t=/firefox/i.test($b()),r=/Trident/i.test($b());if(r&&ia(e)){var n=Yi(e);if(n.position==="fixed")return null}var a=ty(e);for(TE(a)&&(a=a.host);ia(a)&&["html","body"].indexOf(li(a))<0;){var i=Yi(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function nh(e){for(var t=Ln(e),r=MO(e);r&&$7(r)&&Yi(r).position==="static";)r=MO(r);return r&&(li(r)==="html"||li(r)==="body"&&Yi(r).position==="static")?t:r||j7(e)||t}function PE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function td(e,t,r){return $s(e,wm(t,r))}function L7(e,t,r){var n=td(e,t,r);return n>r?r:n}function aI(){return{top:0,right:0,bottom:0,left:0}}function iI(e){return Object.assign({},aI(),e)}function oI(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var F7=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,iI(typeof t!="number"?t:oI(t,rh))};function U7(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,s=ii(r.placement),l=PE(s),u=[En,fa].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!o)){var f=F7(a.padding,r),d=DE(i),p=l==="y"?_n:En,h=l==="y"?ca:fa,v=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],y=o[l]-r.rects.reference[l],m=nh(i),g=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,E=v/2-y/2,w=f[p],C=g-d[c]-f[h],S=g/2-d[c]/2+E,O=td(w,S,C),D=l;r.modifiersData[n]=(t={},t[D]=O,t.centerOffset=O-S,t)}}function B7(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||nI(t.elements.popper,a)&&(t.elements.arrow=a))}const z7={name:"arrow",enabled:!0,phase:"main",fn:U7,effect:B7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vc(e){return e.split("-")[1]}var W7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function H7(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:pc(r*a)/a||0,y:pc(n*a)/a||0}}function IO(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=o.x,p=d===void 0?0:d,h=o.y,v=h===void 0?0:h,y=typeof c=="function"?c({x:p,y:v}):{x:p,y:v};p=y.x,v=y.y;var m=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),E=En,w=_n,C=window;if(u){var S=nh(r),O="clientHeight",D="clientWidth";if(S===Ln(r)&&(S=ds(r),Yi(S).position!=="static"&&s==="absolute"&&(O="scrollHeight",D="scrollWidth")),S=S,a===_n||(a===En||a===fa)&&i===ip){w=ca;var N=f&&S===C&&C.visualViewport?C.visualViewport.height:S[O];v-=N-n.height,v*=l?1:-1}if(a===En||(a===_n||a===ca)&&i===ip){E=fa;var R=f&&S===C&&C.visualViewport?C.visualViewport.width:S[D];p-=R-n.width,p*=l?1:-1}}var j=Object.assign({position:s},u&&W7),U=c===!0?H7({x:p,y:v},Ln(r)):{x:p,y:v};if(p=U.x,v=U.y,l){var Q;return Object.assign({},j,(Q={},Q[w]=g?"0":"",Q[E]=m?"0":"",Q.transform=(C.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",Q))}return Object.assign({},j,(t={},t[w]=g?v+"px":"",t[E]=m?p+"px":"",t.transform="",t))}function V7(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,o=i===void 0?!0:i,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:ii(t.placement),variation:vc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,IO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,IO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Y7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:V7,data:{}};var Vh={passive:!0};function G7(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=a===void 0?!0:a,o=n.resize,s=o===void 0?!0:o,l=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",r.update,Vh)}),s&&l.addEventListener("resize",r.update,Vh),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Vh)}),s&&l.removeEventListener("resize",r.update,Vh)}}const K7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:G7,data:{}};var q7={left:"right",right:"left",bottom:"top",top:"bottom"};function xv(e){return e.replace(/left|right|bottom|top/g,function(t){return q7[t]})}var Q7={start:"end",end:"start"};function $O(e){return e.replace(/start|end/g,function(t){return Q7[t]})}function kE(e){var t=Ln(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function AE(e){return hc(ds(e)).left+kE(e).scrollLeft}function X7(e,t){var r=Ln(e),n=ds(e),a=r.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var u=rI();(u||!u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+AE(e),y:l}}function J7(e){var t,r=ds(e),n=kE(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=$s(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=$s(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+AE(e),l=-n.scrollTop;return Yi(a||r).direction==="rtl"&&(s+=$s(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function NE(e){var t=Yi(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function sI(e){return["html","body","#document"].indexOf(li(e))>=0?e.ownerDocument.body:ia(e)&&NE(e)?e:sI(ty(e))}function rd(e,t){var r;t===void 0&&(t=[]);var n=sI(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=Ln(n),o=a?[i].concat(i.visualViewport||[],NE(n)?n:[]):n,s=t.concat(o);return a?s:s.concat(rd(ty(o)))}function jb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Z7(e,t){var r=hc(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function jO(e,t,r){return t===eI?jb(X7(e,r)):ol(t)?Z7(t,r):jb(J7(ds(e)))}function eG(e){var t=rd(ty(e)),r=["absolute","fixed"].indexOf(Yi(e).position)>=0,n=r&&ia(e)?nh(e):e;return ol(n)?t.filter(function(a){return ol(a)&&nI(a,n)&&li(a)!=="body"}):[]}function tG(e,t,r,n){var a=t==="clippingParents"?eG(e):[].concat(t),i=[].concat(a,[r]),o=i[0],s=i.reduce(function(l,u){var c=jO(e,u,n);return l.top=$s(c.top,l.top),l.right=wm(c.right,l.right),l.bottom=wm(c.bottom,l.bottom),l.left=$s(c.left,l.left),l},jO(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function lI(e){var t=e.reference,r=e.element,n=e.placement,a=n?ii(n):null,i=n?vc(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(a){case _n:l={x:o,y:t.y-r.height};break;case ca:l={x:o,y:t.y+t.height};break;case fa:l={x:t.x+t.width,y:s};break;case En:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=a?PE(a):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case dc:l[u]=l[u]-(t[c]/2-r[c]/2);break;case ip:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function op(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,i=r.strategy,o=i===void 0?e.strategy:i,s=r.boundary,l=s===void 0?_7:s,u=r.rootBoundary,c=u===void 0?eI:u,f=r.elementContext,d=f===void 0?yf:f,p=r.altBoundary,h=p===void 0?!1:p,v=r.padding,y=v===void 0?0:v,m=iI(typeof y!="number"?y:oI(y,rh)),g=d===yf?E7:yf,E=e.rects.popper,w=e.elements[h?g:d],C=tG(ol(w)?w:w.contextElement||ds(e.elements.popper),l,c,o),S=hc(e.elements.reference),O=lI({reference:S,element:E,strategy:"absolute",placement:a}),D=jb(Object.assign({},E,O)),N=d===yf?D:S,R={top:C.top-N.top+m.top,bottom:N.bottom-C.bottom+m.bottom,left:C.left-N.left+m.left,right:N.right-C.right+m.right},j=e.modifiersData.offset;if(d===yf&&j){var U=j[a];Object.keys(R).forEach(function(Q){var X=[fa,ca].indexOf(Q)>=0?1:-1,J=[_n,ca].indexOf(Q)>=0?"y":"x";R[Q]+=U[J]*X})}return R}function rG(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?tI:l,c=vc(n),f=c?s?RO:RO.filter(function(h){return vc(h)===c}):rh,d=f.filter(function(h){return u.indexOf(h)>=0});d.length===0&&(d=f);var p=d.reduce(function(h,v){return h[v]=op(e,{placement:v,boundary:a,rootBoundary:i,padding:o})[ii(v)],h},{});return Object.keys(p).sort(function(h,v){return p[h]-p[v]})}function nG(e){if(ii(e)===OE)return[];var t=xv(e);return[$O(e),t,$O(t)]}function aG(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,v=r.allowedAutoPlacements,y=t.options.placement,m=ii(y),g=m===y,E=l||(g||!h?[xv(y)]:nG(y)),w=[y].concat(E).reduce(function(ye,Le){return ye.concat(ii(Le)===OE?rG(t,{placement:Le,boundary:c,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:v}):Le)},[]),C=t.rects.reference,S=t.rects.popper,O=new Map,D=!0,N=w[0],R=0;R=0,J=X?"width":"height",te=op(t,{placement:j,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),ge=X?Q?fa:En:Q?ca:_n;C[J]>S[J]&&(ge=xv(ge));var H=xv(ge),ee=[];if(i&&ee.push(te[U]<=0),s&&ee.push(te[ge]<=0,te[H]<=0),ee.every(function(ye){return ye})){N=j,D=!1;break}O.set(j,ee)}if(D)for(var ce=h?3:1,_e=function(Le){var He=w.find(function(lt){var Ce=O.get(lt);if(Ce)return Ce.slice(0,Le).every(function(xe){return xe})});if(He)return N=He,"break"},we=ce;we>0;we--){var rt=_e(we);if(rt==="break")break}t.placement!==N&&(t.modifiersData[n]._skip=!0,t.placement=N,t.reset=!0)}}const iG={name:"flip",enabled:!0,phase:"main",fn:aG,requiresIfExists:["offset"],data:{_skip:!1}};function LO(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function FO(e){return[_n,fa,ca,En].some(function(t){return e[t]>=0})}function oG(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=op(t,{elementContext:"reference"}),s=op(t,{altBoundary:!0}),l=LO(o,n),u=LO(s,a,i),c=FO(l),f=FO(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const sG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oG};function lG(e,t,r){var n=ii(e),a=[En,_n].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[En,fa].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function uG(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=a===void 0?[0,0]:a,o=tI.reduce(function(c,f){return c[f]=lG(f,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}const cG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uG};function fG(e){var t=e.state,r=e.name;t.modifiersData[r]=lI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dG={name:"popperOffsets",enabled:!0,phase:"read",fn:fG,data:{}};function pG(e){return e==="x"?"y":"x"}function hG(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,p=d===void 0?!0:d,h=r.tetherOffset,v=h===void 0?0:h,y=op(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),m=ii(t.placement),g=vc(t.placement),E=!g,w=PE(m),C=pG(w),S=t.modifiersData.popperOffsets,O=t.rects.reference,D=t.rects.popper,N=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(S){if(i){var Q,X=w==="y"?_n:En,J=w==="y"?ca:fa,te=w==="y"?"height":"width",ge=S[w],H=ge+y[X],ee=ge-y[J],ce=p?-D[te]/2:0,_e=g===dc?O[te]:D[te],we=g===dc?-D[te]:-O[te],rt=t.elements.arrow,ye=p&&rt?DE(rt):{width:0,height:0},Le=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aI(),He=Le[X],lt=Le[J],Ce=td(0,O[te],ye[te]),xe=E?O[te]/2-ce-Ce-He-R.mainAxis:_e-Ce-He-R.mainAxis,mt=E?-O[te]/2+ce+Ce+lt+R.mainAxis:we+Ce+lt+R.mainAxis,Nt=t.elements.arrow&&nh(t.elements.arrow),sr=Nt?w==="y"?Nt.clientTop||0:Nt.clientLeft||0:0,jr=(Q=j==null?void 0:j[w])!=null?Q:0,Je=ge+xe-jr-sr,er=ge+mt-jr,Ut=td(p?wm(H,Je):H,ge,p?$s(ee,er):ee);S[w]=Ut,U[w]=Ut-ge}if(s){var lr,Jr=w==="x"?_n:En,Lr=w==="x"?ca:fa,Ot=S[C],ln=C==="y"?"height":"width",I=Ot+y[Jr],ue=Ot-y[Lr],F=[_n,En].indexOf(m)!==-1,Y=(lr=j==null?void 0:j[C])!=null?lr:0,pe=F?I:Ot-O[ln]-D[ln]-Y+R.altAxis,be=F?Ot+O[ln]+D[ln]-Y-R.altAxis:ue,Ne=p&&F?L7(pe,Ot,be):td(p?pe:I,Ot,p?be:ue);S[C]=Ne,U[C]=Ne-Ot}t.modifiersData[n]=U}}const vG={name:"preventOverflow",enabled:!0,phase:"main",fn:hG,requiresIfExists:["offset"]};function mG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gG(e){return e===Ln(e)||!ia(e)?kE(e):mG(e)}function yG(e){var t=e.getBoundingClientRect(),r=pc(t.width)/e.offsetWidth||1,n=pc(t.height)/e.offsetHeight||1;return r!==1||n!==1}function wG(e,t,r){r===void 0&&(r=!1);var n=ia(t),a=ia(t)&&yG(t),i=ds(t),o=hc(e,a,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((li(t)!=="body"||NE(i))&&(s=gG(t)),ia(t)?(l=hc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=AE(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function bG(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function a(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&a(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||a(i)}),n}function _G(e){var t=bG(e);return N7.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function EG(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function SG(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var UO={placement:"bottom",modifiers:[],strategy:"absolute"};function BO(){for(var e=arguments.length,t=new Array(e),r=0;r=n&&(r.finalize(i.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,r9))}}),e}(),a9=typeof FinalizationRegistry<"u"?FinalizationRegistry:n9,Lb=new a9(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),dI={exports:{}},pI={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ec=x;function i9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var o9=typeof Object.is=="function"?Object.is:i9,s9=Ec.useState,l9=Ec.useEffect,u9=Ec.useLayoutEffect,c9=Ec.useDebugValue;function f9(e,t){var r=t(),n=s9({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return u9(function(){a.value=r,a.getSnapshot=t,R0(a)&&i({inst:a})},[e,r,t]),l9(function(){return R0(a)&&i({inst:a}),e(function(){R0(a)&&i({inst:a})})},[e]),c9(r),r}function R0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o9(e,r)}catch{return!0}}function d9(e,t){return t()}var p9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d9:f9;pI.useSyncExternalStore=Ec.useSyncExternalStore!==void 0?Ec.useSyncExternalStore:p9;dI.exports=pI;var h9=dI.exports,v9=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},m9=function(){},hI=typeof sN().stateVersion<"u";function WO(e){e.reaction=new Od("observer".concat(e.name),function(){var t;hI||(e.stateVersion=Symbol()),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function g9(e,t){t===void 0&&(t="observed");var r=b.useRef(null),n=v9(b.useState(),2),a=n[1];if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(u){return Lb.unregister(i),i.onStoreChange=u,i.reaction||(WO(i),a(Symbol())),function(){var c;i.onStoreChange=null,(c=i.reaction)===null||c===void 0||c.dispose(),i.reaction=null}},getSnapshot:function(){return hI?sN().stateVersion:i.stateVersion}};r.current=i}var o=r.current;o.reaction||(WO(o),Lb.register(r,o,o)),b.useDebugValue(o.reaction,e9),h9.useSyncExternalStore(o.subscribe,o.getSnapshot,m9);var s,l;if(o.reaction.track(function(){try{s=e()}catch(u){l=u}}),l)throw l;return s}var vI=typeof Symbol=="function"&&Symbol.for,HO=vI?Symbol.for("react.forward_ref"):typeof x.forwardRef=="function"&&x.forwardRef(function(e){return null}).$$typeof,VO=vI?Symbol.for("react.memo"):typeof x.memo=="function"&&x.memo(function(e){return null}).$$typeof;function wt(e,t){var r;if(VO&&e.$$typeof===VO)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=t==null?void 0:t.forwardRef)!==null&&r!==void 0?r:!1,a=e,i=e.displayName||e.name;if(HO&&e.$$typeof===HO&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,l){return g9(function(){return a(s,l)},i)};return o.displayName=e.displayName,Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=x.forwardRef(o)),o=x.memo(o),w9(e,o),o}var y9={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function w9(e,t){Object.keys(e).forEach(function(r){y9[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}globalThis&&globalThis.__read;var M0;ZG(Fo.unstable_batchedUpdates);M0=Lb.finalizeAllImmediately;const b9=wt(function(){const{userStore:{user:t,logout:r,isLoggedIn:n}}=Ft();return _.jsx(ba,{inverted:!0,fixed:"top",children:_.jsxs(Ko,{children:[_.jsxs(ba.Item,{as:Bh,to:"/",header:!0,children:[_.jsx("img",{src:"/assets/logo.png",alt:"logo",style:{marginRight:"10px"}}),"Reactivities"]}),n&&_.jsxs(_.Fragment,{children:[_.jsx(ba.Item,{as:Bh,to:"/activities",name:"Activities"}),_.jsx(ba.Item,{as:Bh,to:"/errors",name:"Errors"}),_.jsx(ba.Item,{children:_.jsx($e,{as:Bh,to:"/createActivity",positive:!0,content:"Create Activity"})}),_.jsxs(ba.Item,{position:"right",children:[_.jsx(qt,{src:(t==null?void 0:t.image)||"/assets/user.png",avatar:!0,spaced:"right"}),_.jsx(pr,{pointing:"top left",text:t==null?void 0:t.displayName,children:_.jsxs(pr.Menu,{children:[_.jsx(pr.Item,{as:an,to:`/profiles/${t==null?void 0:t.username}`,text:"My Profile",icon:"user"}),_.jsx(pr.Item,{onClick:r,text:"Logout",icon:"power"})]})})]})]})]})})});var _9=function(t){return E9(t)&&!S9(t)};function E9(e){return!!e&&typeof e=="object"}function S9(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||O9(e)}var x9=typeof Symbol=="function"&&Symbol.for,C9=x9?Symbol.for("react.element"):60103;function O9(e){return e.$$typeof===C9}function T9(e){return Array.isArray(e)?[]:{}}function bm(e,t){return t.clone!==!1&&t.isMergeableObject(e)?gp(T9(e),e,t):e}function D9(e,t,r){return e.concat(t).map(function(n){return bm(n,r)})}function P9(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(a){n[a]=bm(e[a],r)}),Object.keys(t).forEach(function(a){!r.isMergeableObject(t[a])||!e[a]?n[a]=bm(t[a],r):n[a]=gp(e[a],t[a],r)}),n}function gp(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||D9,r.isMergeableObject=r.isMergeableObject||_9;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):P9(e,t,r):bm(t,r)}gp.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return gp(n,a,r)},{})};var Fb=gp,YO=Array.isArray,GO=Object.keys,k9=Object.prototype.hasOwnProperty,A9=typeof Element<"u";function Ub(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=YO(e),n=YO(t),a,i,o;if(r&&n){if(i=e.length,i!=t.length)return!1;for(a=i;a--!==0;)if(!Ub(e[a],t[a]))return!1;return!0}if(r!=n)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var f=GO(e);if(i=f.length,i!==GO(t).length)return!1;for(a=i;a--!==0;)if(!k9.call(t,f[a]))return!1;if(A9&&e instanceof Element&&t instanceof Element)return e===t;for(a=i;a--!==0;)if(o=f[a],!(o==="_owner"&&e.$$typeof)&&!Ub(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var N9=function(t,r){try{return Ub(t,r)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||n.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}};const vo=Xr(N9);var R9=!0;function ry(e,t){if(!R9){if(e)return;var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}function ny(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i=0)&&(r[a]=e[a]);return r}function iT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hy=x.createContext(void 0);hy.displayName="FormikContext";var hq=hy.Provider,vq=hy.Consumer;function UE(){var e=x.useContext(hy);return e||ry(!1),e}var oT=function(t){return Array.isArray(t)&&t.length===0},zr=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},mq=function(t){return String(Math.floor(Number(t)))===t},I0=function(t){return Object.prototype.toString.call(t)==="[object String]"},OI=function(t){return x.Children.count(t)===0},$0=function(t){return Gc(t)&&zr(t.then)};function Mt(e,t,r,n){n===void 0&&(n=0);for(var a=bI(t);e&&n=0?[]:{}}}return(i===0?e:a)[o[i]]===r?e:(r===void 0?delete a[o[i]]:a[o[i]]=r,i===0&&r===void 0&&delete n[o[i]],n)}function TI(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var a=0,i=Object.keys(e);a0?ue.map(function(Y){return R(Y,Mt(I,Y))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(F).then(function(Y){return Y.reduce(function(pe,be,Ne){return be==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||be&&(pe=oi(pe,ue[Ne],be)),pe},{})})},[R]),U=x.useCallback(function(I){return Promise.all([j(I),d.validationSchema?N(I):{},d.validate?D(I):{}]).then(function(ue){var F=ue[0],Y=ue[1],pe=ue[2],be=Fb.all([F,Y,pe],{arrayMerge:_q});return be})},[d.validate,d.validationSchema,j,D,N]),Q=Hn(function(I){return I===void 0&&(I=S.values),O({type:"SET_ISVALIDATING",payload:!0}),U(I).then(function(ue){return m.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:ue})),ue})});x.useEffect(function(){o&&m.current===!0&&vo(p.current,d.initialValues)&&Q(p.current)},[o,Q]);var X=x.useCallback(function(I){var ue=I&&I.values?I.values:p.current,F=I&&I.errors?I.errors:h.current?h.current:d.initialErrors||{},Y=I&&I.touched?I.touched:v.current?v.current:d.initialTouched||{},pe=I&&I.status?I.status:y.current?y.current:d.initialStatus;p.current=ue,h.current=F,v.current=Y,y.current=pe;var be=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!I&&!!I.isSubmitting,errors:F,touched:Y,status:pe,values:ue,isValidating:!!I&&!!I.isValidating,submitCount:I&&I.submitCount&&typeof I.submitCount=="number"?I.submitCount:0}})};if(d.onReset){var Ne=d.onReset(S.values,jr);$0(Ne)?Ne.then(be):be()}else be()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);x.useEffect(function(){m.current===!0&&!vo(p.current,d.initialValues)&&u&&(p.current=d.initialValues,X(),o&&Q(p.current))},[u,d.initialValues,X,o,Q]),x.useEffect(function(){u&&m.current===!0&&!vo(h.current,d.initialErrors)&&(h.current=d.initialErrors||vs,O({type:"SET_ERRORS",payload:d.initialErrors||vs}))},[u,d.initialErrors]),x.useEffect(function(){u&&m.current===!0&&!vo(v.current,d.initialTouched)&&(v.current=d.initialTouched||Yh,O({type:"SET_TOUCHED",payload:d.initialTouched||Yh}))},[u,d.initialTouched]),x.useEffect(function(){u&&m.current===!0&&!vo(y.current,d.initialStatus)&&(y.current=d.initialStatus,O({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var J=Hn(function(I){if(g.current[I]&&zr(g.current[I].validate)){var ue=Mt(S.values,I),F=g.current[I].validate(ue);return $0(F)?(O({type:"SET_ISVALIDATING",payload:!0}),F.then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Y}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:I,value:F}}),Promise.resolve(F))}else if(d.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),N(S.values,I).then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Mt(Y,I)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),te=x.useCallback(function(I,ue){var F=ue.validate;g.current[I]={validate:F}},[]),ge=x.useCallback(function(I){delete g.current[I]},[]),H=Hn(function(I,ue){O({type:"SET_TOUCHED",payload:I});var F=ue===void 0?a:ue;return F?Q(S.values):Promise.resolve()}),ee=x.useCallback(function(I){O({type:"SET_ERRORS",payload:I})},[]),ce=Hn(function(I,ue){var F=zr(I)?I(S.values):I;O({type:"SET_VALUES",payload:F});var Y=ue===void 0?r:ue;return Y?Q(F):Promise.resolve()}),_e=x.useCallback(function(I,ue){O({type:"SET_FIELD_ERROR",payload:{field:I,value:ue}})},[]),we=Hn(function(I,ue,F){O({type:"SET_FIELD_VALUE",payload:{field:I,value:ue}});var Y=F===void 0?r:F;return Y?Q(oi(S.values,I,ue)):Promise.resolve()}),rt=x.useCallback(function(I,ue){var F=ue,Y=I,pe;if(!I0(I)){I.persist&&I.persist();var be=I.target?I.target:I.currentTarget,Ne=be.type,ur=be.name,Zr=be.id,un=be.value,da=be.checked,io=be.outerHTML,M=be.options,L=be.multiple;F=ue||ur||Zr,Y=/number|range/.test(Ne)?(pe=parseFloat(un),isNaN(pe)?"":pe):/checkbox/.test(Ne)?Sq(Mt(S.values,F),da,un):M&&L?Eq(M):un}F&&we(F,Y)},[we,S.values]),ye=Hn(function(I){if(I0(I))return function(ue){return rt(ue,I)};rt(I)}),Le=Hn(function(I,ue,F){ue===void 0&&(ue=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:I,value:ue}});var Y=F===void 0?a:F;return Y?Q(S.values):Promise.resolve()}),He=x.useCallback(function(I,ue){I.persist&&I.persist();var F=I.target,Y=F.name,pe=F.id,be=F.outerHTML,Ne=ue||Y||pe;Le(Ne,!0)},[Le]),lt=Hn(function(I){if(I0(I))return function(ue){return He(ue,I)};He(I)}),Ce=x.useCallback(function(I){zr(I)?O({type:"SET_FORMIK_STATE",payload:I}):O({type:"SET_FORMIK_STATE",payload:function(){return I}})},[]),xe=x.useCallback(function(I){O({type:"SET_STATUS",payload:I})},[]),mt=x.useCallback(function(I){O({type:"SET_ISSUBMITTING",payload:I})},[]),Nt=Hn(function(){return O({type:"SUBMIT_ATTEMPT"}),Q().then(function(I){var ue=I instanceof Error,F=!ue&&Object.keys(I).length===0;if(F){var Y;try{if(Y=Je(),Y===void 0)return}catch(pe){throw pe}return Promise.resolve(Y).then(function(pe){return m.current&&O({type:"SUBMIT_SUCCESS"}),pe}).catch(function(pe){if(m.current)throw O({type:"SUBMIT_FAILURE"}),pe})}else if(m.current&&(O({type:"SUBMIT_FAILURE"}),ue))throw I})}),sr=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),Nt().catch(function(ue){console.warn("Warning: An unhandled error was caught from submitForm()",ue)})}),jr={resetForm:X,validateForm:Q,validateField:J,setErrors:ee,setFieldError:_e,setFieldTouched:Le,setFieldValue:we,setStatus:xe,setSubmitting:mt,setTouched:H,setValues:ce,setFormikState:Ce,submitForm:Nt},Je=Hn(function(){return c(S.values,jr)}),er=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),X()}),Ut=x.useCallback(function(I){return{value:Mt(S.values,I),error:Mt(S.errors,I),touched:!!Mt(S.touched,I),initialValue:Mt(p.current,I),initialTouched:!!Mt(v.current,I),initialError:Mt(h.current,I)}},[S.errors,S.touched,S.values]),lr=x.useCallback(function(I){return{setValue:function(F,Y){return we(I,F,Y)},setTouched:function(F,Y){return Le(I,F,Y)},setError:function(F){return _e(I,F)}}},[we,Le,_e]),Jr=x.useCallback(function(I){var ue=Gc(I),F=ue?I.name:I,Y=Mt(S.values,F),pe={name:F,value:Y,onChange:ye,onBlur:lt};if(ue){var be=I.type,Ne=I.value,ur=I.as,Zr=I.multiple;be==="checkbox"?Ne===void 0?pe.checked=!!Y:(pe.checked=!!(Array.isArray(Y)&&~Y.indexOf(Ne)),pe.value=Ne):be==="radio"?(pe.checked=Y===Ne,pe.value=Ne):ur==="select"&&Zr&&(pe.value=pe.value||[],pe.multiple=!0)}return pe},[lt,ye,S.values]),Lr=x.useMemo(function(){return!vo(p.current,S.values)},[p.current,S.values]),Ot=x.useMemo(function(){return typeof s<"u"?Lr?S.errors&&Object.keys(S.errors).length===0:s!==!1&&zr(s)?s(d):s:S.errors&&Object.keys(S.errors).length===0},[s,Lr,S.errors,d]),ln=dt({},S,{initialValues:p.current,initialErrors:h.current,initialTouched:v.current,initialStatus:y.current,handleBlur:lt,handleChange:ye,handleReset:er,handleSubmit:sr,resetForm:X,setErrors:ee,setFormikState:Ce,setFieldTouched:Le,setFieldValue:we,setFieldError:_e,setStatus:xe,setSubmitting:mt,setTouched:H,setValues:ce,submitForm:Nt,validateForm:Q,validateField:J,isValid:Ot,dirty:Lr,unregisterField:ge,registerField:te,getFieldProps:Jr,getFieldMeta:Ut,getFieldHelpers:lr,validateOnBlur:a,validateOnChange:r,validateOnMount:o});return ln}function ah(e){var t=yq(e),r=e.component,n=e.children,a=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(hq,{value:t},r?x.createElement(r,t):a?a(t):n?zr(n)?n(t):OI(n)?null:x.Children.only(n):null)}function wq(e){var t={};if(e.inner){if(e.inner.length===0)return oi(t,e.path,e.message);for(var a=e.inner,r=Array.isArray(a),n=0,a=r?a:a[Symbol.iterator]();;){var i;if(r){if(n>=a.length)break;i=a[n++]}else{if(n=a.next(),n.done)break;i=n.value}var o=i;Mt(t,o.path)||(t=oi(t,o.path,o.message))}}return t}function bq(e,t,r,n){r===void 0&&(r=!1);var a=Bb(e);return t[r?"validateSync":"validate"](a,{abortEarly:!1,context:n||a})}function Bb(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(a){return Array.isArray(a)===!0||Ku(a)?Bb(a):a!==""?a:void 0}):Ku(e[n])?t[n]=Bb(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function _q(e,t,r){var n=e.slice();return t.forEach(function(i,o){if(typeof n[o]>"u"){var s=r.clone!==!1,l=s&&r.isMergeableObject(i);n[o]=l?Fb(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[o]=Fb(e[o],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function Eq(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Sq(e,t,r){if(typeof e=="boolean")return!!t;var n=[],a=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),a=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!a?n.concat(r):a?n.slice(0,i).concat(n.slice(i+1)):n}var xq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function Hn(e){var t=x.useRef(e);return xq(function(){t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;an?a:n},0);return Array.from(dt({},t,{length:r+1}))}else return[]},sT=function(t,r){var n=typeof t=="function"?t:r;return function(a){if(Array.isArray(a)||Gc(a)){var i=ul(a);return n(i)}return a}},kq=function(e){CI(t,e);function t(n){var a;return a=e.call(this,n)||this,a.updateArrayField=function(i,o,s){var l=a.props,u=l.name,c=l.formik.setFormikState;c(function(f){var d=sT(s,i),p=sT(o,i),h=oi(f.values,u,i(Mt(f.values,u))),v=s?d(Mt(f.errors,u)):void 0,y=o?p(Mt(f.touched,u)):void 0;return oT(v)&&(v=void 0),oT(y)&&(y=void 0),dt({},f,{values:h,errors:s?oi(f.errors,u,v):f.errors,touched:o?oi(f.touched,u,y):f.touched})})},a.push=function(i){return a.updateArrayField(function(o){return[].concat(ul(o),[pq(i)])},!1,!1)},a.handlePush=function(i){return function(){return a.push(i)}},a.swap=function(i,o){return a.updateArrayField(function(s){return Dq(s,i,o)},!0,!0)},a.handleSwap=function(i,o){return function(){return a.swap(i,o)}},a.move=function(i,o){return a.updateArrayField(function(s){return Tq(s,i,o)},!0,!0)},a.handleMove=function(i,o){return function(){return a.move(i,o)}},a.insert=function(i,o){return a.updateArrayField(function(s){return j0(s,i,o)},function(s){return j0(s,i,null)},function(s){return j0(s,i,null)})},a.handleInsert=function(i,o){return function(){return a.insert(i,o)}},a.replace=function(i,o){return a.updateArrayField(function(s){return Pq(s,i,o)},!1,!1)},a.handleReplace=function(i,o){return function(){return a.replace(i,o)}},a.unshift=function(i){var o=-1;return a.updateArrayField(function(s){var l=s?[i].concat(s):[i];return o=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),o},a.handleUnshift=function(i){return function(){return a.unshift(i)}},a.handleRemove=function(i){return function(){return a.remove(i)}},a.handlePop=function(){return function(){return a.pop()}},a.remove=a.remove.bind(iT(a)),a.pop=a.pop.bind(iT(a)),a}var r=t.prototype;return r.componentDidUpdate=function(a){this.props.validateOnChange&&this.props.formik.validateOnChange&&!vo(Mt(a.formik.values,a.name),Mt(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(a){var i;return this.updateArrayField(function(o){var s=o?ul(o):[];return i||(i=s[a]),zr(s.splice)&&s.splice(a,1),zr(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},r.pop=function(){var a;return this.updateArrayField(function(i){var o=i.slice();return a||(a=o&&o.pop&&o.pop()),o},!0,!0),a},r.render=function(){var a={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,o=i.component,s=i.render,l=i.children,u=i.name,c=i.formik,f=Eo(c,["validate","validationSchema"]),d=dt({},a,{form:f,name:u});return o?x.createElement(o,d):s?s(d):l?typeof l=="function"?l(d):OI(l)?null:x.Children.only(l):null},t}(x.Component);kq.defaultProps={validateOnChange:!0};var Aq=function(e){CI(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.shouldComponentUpdate=function(a){return Mt(this.props.formik.errors,this.props.name)!==Mt(a.formik.errors,this.props.name)||Mt(this.props.formik.touched,this.props.name)!==Mt(a.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(a).length},r.render=function(){var a=this.props,i=a.component,o=a.formik,s=a.render,l=a.children,u=a.name,c=Eo(a,["component","formik","render","children","name"]),f=Mt(o.touched,u),d=Mt(o.errors,u);return f&&d?s?zr(s)?s(d):null:l?zr(l)?l(d):null:i?x.createElement(i,c,d):d:null},t}(x.Component),DI=Oq(Aq);function Xa(e){const[t,r]=vy(e.name);return _.jsxs(Hc.Field,{error:r.touched&&!!r.error,children:[_.jsx("label",{children:e.label}),_.jsx("input",{...t,...e}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const PI=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.login(r).catch(a=>n({error:a.response.data})),children:({handleSubmit:r,isSubmitting:n,errors:a})=>_.jsxs(Hc,{className:"ui form",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Login to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(Xt,{style:{marginBottom:10},basic:!0,color:"red",content:a.error})}),_.jsx($e,{loading:n,positive:!0,content:"Login",type:"submit",fluid:!0})]})})});function Cl(e){this._maxSize=e,this.clear()}Cl.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Cl.prototype.get=function(e){return this._values[e]};Cl.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Nq=/[^.^\]^[]+|(?=\[\]|\.\.)/g,kI=/^\d+$/,Rq=/^\d/,Mq=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Iq=/^\s*(['"]?)(.*?)(\1)\s*$/,BE=512,lT=new Cl(BE),uT=new Cl(BE),cT=new Cl(BE),js={Cache:Cl,split:zb,normalizePath:L0,setter:function(e){var t=L0(e);return uT.get(e)||uT.set(e,function(n,a){for(var i=0,o=t.length,s=n;ie.match(Uq)||[],yy=e=>e[0].toUpperCase()+e.slice(1),WE=(e,t)=>gy(e).join(t).toLowerCase(),AI=e=>gy(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Bq=e=>yy(AI(e)),zq=e=>WE(e,"_"),Wq=e=>WE(e,"-"),Hq=e=>yy(WE(e," ")),Vq=e=>gy(e).map(yy).join(" ");var F0={words:gy,upperFirst:yy,camelCase:AI,pascalCase:Bq,snakeCase:zq,kebabCase:Wq,sentenceCase:Hq,titleCase:Vq},HE={exports:{}};HE.exports=function(e){return NI(Yq(e),e)};HE.exports.array=NI;function NI(e,t){var r=e.length,n=new Array(r),a={},i=r,o=Gq(t),s=Kq(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||l(e[i],i,new Set);return n;function l(u,c,f){if(f.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!a[c]){a[c]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),c=p.length){f.add(u);do{var h=p[--c];l(h,s.get(h),f)}while(c);f.delete(u)}n[--r]=u}}}function Yq(e){for(var t=new Set,r=0,n=e.length;r"",tQ=/^Symbol\((.*)\)(.*)$/;function rQ(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function fT(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return rQ(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return eQ.call(e).replace(tQ,"Symbol($1)");const n=Xq.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Jq.call(e)+"]":n==="RegExp"?Zq.call(e):null}function $o(e,t){let r=fT(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=fT(this[n],t);return i!==null?i:a},2)}function RI(e){return e==null?[]:[].concat(e)}let MI,nQ=/\$\{\s*(\w+)\s*\}/g;MI=Symbol.toStringTag;let _a=class Wb{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(nQ,(a,i)=>$o(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a,i){this.name=void 0,this.message=void 0,this.stack=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[MI]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],RI(t).forEach(o=>{if(Wb.isError(o)){this.errors.push(...o.errors);const s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,Wb)}},za={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const a=n!=null&&n!==r?` (cast from the value \`${$o(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${$o(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${$o(r,!0)}\``+a}},va={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},aQ={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Hb={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},iQ={isValue:"${path} field must be ${value}"},Vb={noUnknown:"${path} field has unspecified keys: ${unknown}"},oQ={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},sQ={notType:e=>{const{path:t,value:r,spec:n}=e,a=n.types.length;if(Array.isArray(r)){if(r.lengtha)return`${t} tuple value has too many items, expected a length of ${a} but got ${r.length} for value: \`${$o(r,!0)}\``}return _a.formatError(za.notType,e)}};Object.assign(Object.create(null),{mixed:za,string:va,number:aQ,date:Hb,object:Vb,array:oQ,boolean:iQ,tuple:sQ});const VE=e=>e&&e.__isYupSchema__;class _m{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:a,otherwise:i}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new _m(t,(s,l)=>{var u;let c=o(...s)?a:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!VE(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const Gh={context:"$",value:"."};let Ol=class{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Gh.context,this.isValue=this.key[0]===Gh.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Gh.context:this.isValue?Gh.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&js.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let a=this.isContext?n:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}};Ol.prototype.__isYupRef=!0;const As=e=>e==null;function Il(e){function t({value:r,path:n="",options:a,originalValue:i,schema:o},s,l){const{name:u,test:c,params:f,message:d,skipAbsent:p}=e;let{parent:h,context:v,abortEarly:y=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=a;function g(j){return Ol.isRef(j)?j.getValue(r,h,v):j}function E(j={}){var U;const Q=Object.assign({value:r,originalValue:i,label:o.spec.label,path:j.path||n,spec:o.spec},f,j.params);for(const J of Object.keys(Q))Q[J]=g(Q[J]);const X=new _a(_a.formatError(j.message||d,Q),r,Q.path,j.type||u,(U=j.disableStackTrace)!=null?U:m);return X.params=Q,X}const w=y?s:l;let C={path:n,parent:h,type:u,from:a.from,createError:E,resolve:g,options:a,originalValue:i,schema:o};const S=j=>{_a.isError(j)?w(j):j?l(null):w(E())},O=j=>{_a.isError(j)?w(j):s(j)};if(p&&As(r))return S(!0);let N;try{var R;if(N=c.call(C,r,C),typeof((R=N)==null?void 0:R.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,O)}}catch(j){O(j);return}S(N)}return t.OPTIONS=e,t}function lQ(e,t,r,n=r){let a,i,o;return t?(js.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:a,value:r});let f=e.type==="tuple",d=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[d],e=f?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);a=r,r=r&&r[c],e=e.fields[c]}i=c,o=l?"["+s+"]":"."+s}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Em extends Set{describe(){const t=[];for(const r of this.values())t.push(Ol.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Em(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function su(e,t=new Map){if(VE(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n{this.typeError(za.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=su(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const a=Object.assign({},r.spec,n.spec);return n.spec=a,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((a,i)=>i.resolve(a,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,a,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),a=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(a&&As(i))return i;let o=$o(t),s=$o(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". + +attempted value: ${o} +`+(s!==o?`result of cast: ${s}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:o,options:r,tests:u},n,c=>{if(c.length)return a(c,l);this.runTests({path:i,value:l,originalValue:o,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:o,originalValue:s,path:l,options:u}=t,c=v=>{a||(a=!0,r(v,o))},f=v=>{a||(a=!0,n(v,o))},d=i.length,p=[];if(!d)return f([]);let h={value:o,originalValue:s,path:l,options:u,schema:this};for(let v=0;vthis.resolve(c)._validate(u,c,d,p)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((o,s)=>a._validate(t,r,(l,u)=>{_a.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new _a(l,u,void 0,void 0,i)):o(u)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw _a.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new _a(s,t,void 0,void 0,o);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(_a.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(_a.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):su(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Il({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Il({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=za.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=za.notNull){return this.nullability(!1,t)}required(t=za.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=za.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Il(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(i||o.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=RI(t).map(i=>new Ol(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new _m(a,r):_m.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Il({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=za.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Il({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),n}notOneOf(t,r=za.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Il({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:o}=r.spec;return{meta:a,label:n,optional:i,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}ui.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ui.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:o}=lQ(this,t,r,n.context);return o[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])ui.prototype[e]=ui.prototype.oneOf;for(const e of["not","nope"])ui.prototype[e]=ui.prototype.notOneOf;let uQ=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cQ=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fQ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,dQ=e=>As(e)||e===e.trim(),pQ={}.toString();function Pn(){return new II}class II extends ui{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===pQ?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||za.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=va.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=va.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=va.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||va.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=va.email){return this.matches(uQ,{name:"email",message:t,excludeEmptyString:!0})}url(t=va.url){return this.matches(cQ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=va.uuid){return this.matches(fQ,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=va.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:dQ})}lowercase(t=va.lowercase){return this.transform(r=>As(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toLowerCase()})}uppercase(t=va.uppercase){return this.transform(r=>As(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toUpperCase()})}}Pn.prototype=II.prototype;const hQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _i(e,t=0){return Number(e)||t}function vQ(e){const t=hQ.exec(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;const r={year:_i(t[1]),month:_i(t[2],1)-1,day:_i(t[3],1),hour:_i(t[4]),minute:_i(t[5]),second:_i(t[6]),millisecond:t[7]?_i(t[7].substring(0,3)):0,z:t[8]||void 0,plusMinus:t[9]||void 0,hourOffset:_i(t[10]),minuteOffset:_i(t[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}let mQ=new Date(""),gQ=e=>Object.prototype.toString.call(e)==="[object Date]";class wy extends ui{constructor(){super({type:"date",check(t){return gQ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=vQ(t),isNaN(t)?wy.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ol.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=Hb.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=Hb.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}wy.INVALID_DATE=mQ;wy.prototype;function yQ(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([o,s])=>`${o}-${s}`));function i(o,s){let l=js.split(o)[0];n.add(l),a.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Ol.isRef(s)&&s.isSibling?i(s.path,o):VE(s)&&"deps"in s&&s.deps.forEach(l=>i(l,o))}return Qq.array(Array.from(n),r).reverse()}function dT(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function $I(e){return(t,r)=>dT(e,t)-dT(e,r)}const wQ=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ov(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ov(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ov(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ov)}):"optional"in e?e.optional():e}const bQ=(e,t)=>{const r=[...js.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=js.getter(js.join(r),!0)(e);return!!(a&&n in a)};let pT=e=>Object.prototype.toString.call(e)==="[object Object]";function _Q(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const EQ=$I([]);function ih(e){return new jI(e)}class jI extends ui{constructor(t){super({type:"object",check(r){return pT(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=EQ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(a).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of s){let d=i[f],p=f in a;if(d){let h,v=a[f];u.path=(r.path?`${r.path}.`:"")+f,d=d.resolve({value:v,context:r.context,parent:l});let y=d instanceof ui?d.spec:void 0,m=y==null?void 0:y.strict;if(y!=null&&y.strip){c=c||f in a;continue}h=!r.__validating||!m?d.cast(a[f],u):a[f],h!==void 0&&(l[f]=h)}else p&&!o&&(l[f]=a[f]);(p!==f in l||l[f]!==a[f])&&(c=!0)}return c?l:a}_validate(t,r={},n,a){let{from:i=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...i],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,u)=>{if(!s||!pT(u)){a(l,u);return}o=o||u;let c=[];for(let f of this._nodes){let d=this.fields[f];!d||Ol.isRef(d)||c.push(d.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:c,value:u,originalValue:o,options:r},n,f=>{a(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const o=n[a];n[a]=o===void 0?i:o}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=yQ(t,r),n._sortErrors=$I(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ov(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r)}omit(t){const r=Object.assign({},this.fields);for(const n of t)delete r[n];return this.setFields(r)}from(t,r,n){let a=js.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return bQ(i,t)&&(o=Object.assign({},i),n||delete o[t],o[r]=a(i)),o})}json(){return this.transform(wQ)}noUnknown(t=!0,r=Vb.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=_Q(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Vb.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(F0.camelCase)}snakeCase(){return this.transformKeys(F0.snakeCase)}constantCase(){return this.transformKeys(t=>F0.snakeCase(t).toUpperCase())}describe(t){let r=super.describe(t);r.fields={};for(const[a,i]of Object.entries(this.fields)){var n;let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),r.fields[a]=i.describe(o)}return r}}ih.prototype=jI.prototype;function LI({errors:e}){return _.jsx(Ri,{error:!0,children:e&&_.jsx(Ri.List,{children:e.map((t,r)=>_.jsx(Ri.Item,{children:t},r))})})}const SQ=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{displayName:"",username:"",email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.register(r).catch(a=>n({error:a})),validationSchema:ih({displayName:Pn().required(),username:Pn().required(),email:Pn().required(),password:Pn().required()}),children:({handleSubmit:r,isSubmitting:n,errors:a,isValid:i,dirty:o})=>_.jsxs(Hc,{className:"ui form error",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Sign up to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(Xa,{placeholder:"Username",name:"username"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(LI,{errors:a.error})}),_.jsx($e,{disabled:!i||!o||n,loading:n,positive:!0,content:"Register",type:"submit",fluid:!0})]})})});var FI={},Sm={},YE={},by={},_y={};Object.defineProperty(_y,"__esModule",{value:!0});_y.createScriptEle=void 0;const xQ=(e,t)=>new Promise(r=>{var n;const i=document.getElementsByTagName("script")[0];if(document.getElementById(e)){r(void 0);return}const o=document.createElement("script");if(o.id=e,o.src=t,o.onload=r,i)(n=i.parentNode)===null||n===void 0||n.insertBefore(o,i);else{const s=document.body.childNodes;document.body.insertBefore(o,s.item(s.length-1))}});_y.createScriptEle=xQ;var UI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.paramsToObject=e.objectToParams=e.isObject=void 0;const t=a=>Object.prototype.toString.call(a)==="[object Object]";e.isObject=t;const r=a=>!(0,e.isObject)(a)||Object.keys(a).length===0?"":"?"+Object.keys(a).map(i=>`${i}=${encodeURIComponent(a[i])}`).join("&");e.objectToParams=r;const n=a=>(a==null?void 0:a.replace(/^\?/,"").split("&").reduce((i,o)=>{if(!o)return i;const[s,l]=o.split("=");return Object.assign(Object.assign({},i),{[s]:decodeURIComponent(l)})},{}))||{};e.paramsToObject=n})(UI);var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.isFacebookApp=void 0;const CQ=()=>{if(typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return e.indexOf("FBAN")>-1||e.indexOf("FBAV")>-1||e.indexOf("Instagram")>-1};Ey.isFacebookApp=CQ;(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(_y,e),r(UI,e),r(Ey,e)})(by);(function(e){var t=et&&et.__awaiter||function(a,i,o,s){function l(u){return u instanceof o?u:new o(function(c){c(u)})}return new(o||(o=Promise))(function(u,c){function f(h){try{p(s.next(h))}catch(v){c(v)}}function d(h){try{p(s.throw(h))}catch(v){c(v)}}function p(h){h.done?u(h.value):l(h.value).then(f,d)}p((s=s.apply(a,i||[])).next())})},r=et&&et.__rest||function(a,i){var o={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.indexOf(s)<0&&(o[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(a);lwindow.FB?window.FB:(console.warn("FB not found"),null),getLoginStatus(a,i=!1){const o=this.getFB();if(!o){a({status:"unknown"});return}o.getLoginStatus(a,i)},getProfile(a,i){var o;(o=this.getFB())===null||o===void 0||o.api("me",i,a)},init(a){var i;(i=this.getFB())===null||i===void 0||i.init(a)},clear(){window.FB=null;const a=document.getElementById(e.SDK_SCRIPT_ELE_ID);a&&a.remove()},isRedirected(a){var i,o;const s=(0,n.paramsToObject)(window.location.search);return((i=s.state===(a==null?void 0:a.state))!==null&&i!==void 0?i:"facebookdirect")&&s[(o=a==null?void 0:a.response_type)!==null&&o!==void 0?o:""]!==void 0},loadSdk(a,i){return t(this,void 0,void 0,function*(){yield(0,n.createScriptEle)(e.SDK_SCRIPT_ELE_ID,`https://connect.facebook.net/${a}/sdk${i?"/xfbml.customerchat":""}.js`)})},redirectToDialog(a,i){var o=r(i,["ignoreSdkError"]);window.location.href=`https://www.facebook.com/dialog/oauth${(0,n.objectToParams)(Object.assign(Object.assign({},a),o))}`},login(a,i){var o,{ignoreSdkError:s}=i,l=r(i,["ignoreSdkError"]);try{(o=this.getFB())===null||o===void 0||o.login(a,l)}catch(u){if(s)return;throw u}},logout(a){this.getLoginStatus(i=>{var o;i.status==="connected"?(o=this.getFB())===null||o===void 0||o.logout(a):a()})}}})(YE);var OQ=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),TQ=et&&et.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DQ=et&&et.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&OQ(t,e,r);return TQ(t,e),t},PQ=et&&et.__awaiter||function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(Sm,"__esModule",{value:!0});const hT=DQ(x),ms=YE,kQ=by;function AQ(e){var t,r;const{appId:n,language:a="en_US",scope:i="public_profile, email",fields:o="name,email,picture",onSuccess:s,onFail:l,onProfileSuccess:u,className:c,style:f,children:d="Login with Facebook",render:p,autoLoad:h=!1,useRedirect:v=!1,useCustomerChat:y=!1}=e,m=Object.assign(Object.assign({version:"v9.0",xfbml:!1,cookie:!1,localStorage:!0},e.initParams),{appId:n}),g=Object.assign(Object.assign({redirect_uri:typeof window<"u"?location.origin+location.pathname:"/",state:"facebookdirect",response_type:"code"},e.dialogParams),{client_id:n}),E=Object.assign(Object.assign({return_scopes:!1,ignoreSdkError:!1},e.loginOptions),{auth_nonce:typeof((t=e.loginOptions)===null||t===void 0?void 0:t.auth_nonce)=="function"?e.loginOptions.auth_nonce():(r=e.loginOptions)===null||r===void 0?void 0:r.auth_nonce,scope:i});(0,hT.useEffect)(()=>{w()},[]);const w=()=>PQ(this,void 0,void 0,function*(){yield ms.FacebookLoginClient.loadSdk(a,y),window.fbAsyncInit=()=>{ms.FacebookLoginClient.init(m);const O=ms.FacebookLoginClient.isRedirected(g);if(O===!1&&h){S();return}O===!0&&v&&C()}}),C=()=>{ms.FacebookLoginClient.login(O=>{if(!O.authResponse){l&&l({status:"loginCancelled"});return}s&&s(O.authResponse),u&&ms.FacebookLoginClient.getProfile(u,{fields:o})},Object.assign(Object.assign({},E),{scope:i}))},S=()=>{if((0,kQ.isFacebookApp)()||v){ms.FacebookLoginClient.redirectToDialog(g,E);return}if(!window.FB){l&&l({status:"facebookNotLoaded"});return}C()};return p?p({onClick:S,logout:ms.FacebookLoginClient.logout}):hT.default.createElement("button",{type:"button",onClick:S,className:c,style:f},d)}Sm.default=AQ;var BI={},zI={};Object.defineProperty(zI,"__esModule",{value:!0});var WI={};Object.defineProperty(WI,"__esModule",{value:!0});var HI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LoginStatus=void 0,function(t){t.Connected="connected",t.NotAuthorized="not_authorized",t.Unknown="unknown"}(e.LoginStatus||(e.LoginStatus={}))})(HI);(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zI,e),r(WI,e),r(HI,e)})(BI);(function(e){var t=et&&et.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=et&&et.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,i,s)},n=et&&et.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0});const a=n(Sm);r(by,e),r(BI,e),r(Sm,e),r(YE,e),e.default=a.default})(FI);const NQ=Xr(FI),RQ=wt(function(){const{userStore:t,modalStore:r}=Ft();return _.jsx(je,{inverted:!0,textAlign:"center",vertical:!0,className:"masthead",children:_.jsxs(Ko,{text:!0,children:[_.jsxs(qe,{as:"h1",inverted:!0,children:[_.jsx(qt,{size:"massive",src:"/assets/logo.png",alt:"logo",style:{marginBottom:12}}),"Reactivities"]}),t.isLoggedIn?_.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h2",inverted:!0,content:"Welcome to Reactivities"}),_.jsx($e,{as:an,to:"/activities",size:"huge",inverted:!0,children:"Go to Activities!"})]}):_.jsxs(_.Fragment,{children:[_.jsx($e,{onClick:()=>r.openModal(_.jsx(PI,{})),size:"huge",inverted:!0,children:"Login!"}),_.jsx($e,{onClick:()=>r.openModal(_.jsx(SQ,{})),size:"huge",inverted:!0,children:"Register"}),_.jsx(cc,{horizontal:!0,inverted:!0,children:"Or"}),_.jsx(NQ,{appId:"859222439029599",onSuccess:n=>{t.facebookLogin(n.accessToken),console.log("Login Success!",n)},onFail:n=>{console.log("Login Failed!",n)},className:`ui button facebook huge inverted ${t.fbLoading&&"loading"}`})]})]})})});function Sy({inverted:e=!0,content:t="Loading..."}){return _.jsx(Uo,{active:!0,inverted:e,children:_.jsx(il,{content:t})})}const MQ=wt(function(){const{modalStore:t}=Ft();return _.jsx(_O,{open:t.modal.open,onClose:t.closeModal,size:"mini",children:_.jsx(_O.Content,{children:t.modal.body})})});function IQ(){const e=hi(),{commonStore:t,userStore:r}=Ft();return x.useEffect(()=>{t.token?r.getUser().finally(()=>t.setAppLoaded()):t.setAppLoaded()},[t,r]),t.appLoaded?_.jsxs(_.Fragment,{children:[_.jsx(M4,{}),_.jsx(MQ,{}),_.jsx(pb,{position:"bottom-right",hideProgressBar:!0,theme:"colored"}),e.pathname==="/"?_.jsx(RQ,{}):_.jsxs(_.Fragment,{children:[_.jsx(b9,{}),_.jsx(Ko,{style:{marginTop:"7em"},children:_.jsx(ER,{})})]})]}):_.jsx(Sy,{content:"Loading app ..."})}const $Q=wt(IQ);function Ge(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function le(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function fe(e){le(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ma(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Kc(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function qi(e,t){le(2,arguments);var r=fe(e),n=Ge(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function GE(e,t){le(2,arguments);var r=fe(e).getTime(),n=Ge(t);return new Date(r+n)}var jQ=36e5;function LQ(e,t){le(2,arguments);var r=Ge(t);return GE(e,r*jQ)}var FQ={};function wi(){return FQ}function yp(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getDay(),h=(pa||isNaN(a.getDate()))&&(r=a)}),r||new Date(NaN)}function Tv(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getTime()-n.getTime();return a<0?-1:a>0?1:a}var qE=6e4,QE=36e5,zQ=1e3;function WQ(e,t){le(2,arguments);var r=cl(e),n=cl(t);return r.getTime()===n.getTime()}function XE(e){return le(1,arguments),e instanceof Date||Ma(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VI(e){if(le(1,arguments),!XE(e)&&typeof e!="number")return!1;var t=fe(e);return!isNaN(Number(t))}function bp(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function Gb(e){le(1,arguments);var t=fe(e),r=Math.floor(t.getMonth()/3)+1;return r}function Cm(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()-n.getFullYear()}function HQ(e,t){return le(2,arguments),fe(e).getTime()-fe(t).getTime()}var gT={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},VQ="trunc";function YQ(e){return e?gT[e]:gT[VQ]}function YI(e){le(1,arguments);var t=fe(e);return t.setHours(23,59,59,999),t}function GQ(e){le(1,arguments);var t=fe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function KQ(e){le(1,arguments);var t=fe(e);return YI(t).getTime()===GQ(t).getTime()}function qQ(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=Tv(r,n),i=Math.abs(bp(r,n)),o;if(i<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*i);var s=Tv(r,n)===-a;KQ(fe(e))&&i===1&&Tv(e,n)===1&&(s=!1),o=a*(i-Number(s))}return o===0?0:o}function QQ(e,t,r){le(2,arguments);var n=HQ(e,t)/1e3;return YQ(r==null?void 0:r.roundingMethod)(n)}function Kb(e){le(1,arguments);var t=fe(e),r=t.getMonth(),n=r-r%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function XQ(e){le(1,arguments);var t=fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JQ(e){le(1,arguments);var t=fe(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function GI(e,t){le(2,arguments);var r=Ge(t);return GE(e,-r)}var ZQ=864e5;function eX(e){le(1,arguments);var t=fe(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/ZQ)+1}function xc(e){le(1,arguments);var t=1,r=fe(e),n=r.getUTCDay(),a=(n=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function tX(e){le(1,arguments);var t=KI(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=xc(r);return n}var rX=6048e5;function qI(e){le(1,arguments);var t=fe(e),r=xc(t).getTime()-tX(t).getTime();return Math.round(r/rX)+1}function fl(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getUTCDay(),h=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var v=fl(h,t),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var m=fl(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function nX(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=JE(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=fl(p,t);return h}var aX=6048e5;function QI(e,t){le(1,arguments);var r=fe(e),n=fl(r,t).getTime()-nX(r,t).getTime();return Math.round(n/aX)+1}function ft(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return ft(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):ft(n+1,2)},d:function(t,r){return ft(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return ft(t.getUTCHours()%12||12,r.length)},H:function(t,r){return ft(t.getUTCHours(),r.length)},m:function(t,r){return ft(t.getUTCMinutes(),r.length)},s:function(t,r){return ft(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ft(i,r.length)}};const co=iX;var $l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oX={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return co.y(t,r)},Y:function(t,r,n,a){var i=JE(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return ft(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):ft(o,r.length)},R:function(t,r){var n=KI(t);return ft(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return ft(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ft(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ft(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return co.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ft(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=QI(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):ft(i,r.length)},I:function(t,r,n){var a=qI(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ft(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):co.d(t,r)},D:function(t,r,n){var a=eX(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ft(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return ft(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return ft(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=$l.noon:a===0?i=$l.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=$l.evening:a>=12?i=$l.afternoon:a>=4?i=$l.morning:i=$l.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return co.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):co.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):co.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):co.s(t,r)},S:function(t,r){return co.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return wT(o);case"XXXX":case"XX":return Ss(o);case"XXXXX":case"XXX":default:return Ss(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return wT(o);case"xxxx":case"xx":return Ss(o);case"xxxxx":case"xxx":default:return Ss(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yT(o,":");case"OOOO":default:return"GMT"+Ss(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yT(o,":");case"zzzz":default:return"GMT"+Ss(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return ft(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return ft(o,r.length)}};function yT(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t||"";return r+String(a)+o+ft(i,2)}function wT(e,t){if(e%60===0){var r=e>0?"-":"+";return r+ft(Math.abs(e)/60,2)}return Ss(e,t)}function Ss(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=ft(Math.floor(a/60),2),o=ft(a%60,2);return n+i+r+o}const sX=oX;var bT=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},XI=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},lX=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return bT(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",bT(a,r)).replace("{{time}}",XI(i,r))},uX={p:XI,P:lX};const qb=uX;var cX=["D","DD"],fX=["YY","YYYY"];function JI(e){return cX.indexOf(e)!==-1}function ZI(e){return fX.indexOf(e)!==-1}function Om(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var dX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pX=function(t,r,n){var a,i=dX[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const hX=pX;function U0(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var vX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yX={date:U0({formats:vX,defaultWidth:"full"}),time:U0({formats:mX,defaultWidth:"full"}),dateTime:U0({formats:gX,defaultWidth:"full"})};const wX=yX;var bX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_X=function(t,r,n,a){return bX[t]};const EX=_X;function wf(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var SX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},PX=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kX={ordinalNumber:PX,era:wf({values:SX,defaultWidth:"wide"}),quarter:wf({values:xX,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wf({values:CX,defaultWidth:"wide"}),day:wf({values:OX,defaultWidth:"wide"}),dayPeriod:wf({values:TX,defaultWidth:"wide",formattingValues:DX,defaultFormattingWidth:"wide"})};const AX=kX;function bf(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?RX(s,function(f){return f.test(o)}):NX(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function NX(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function RX(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var IX=/^(\d+)(th|st|nd|rd)?/i,$X=/\d+/i,jX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LX={any:[/^b/i,/^(a|c)/i]},FX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UX={any:[/1/i,/2/i,/3/i,/4/i]},BX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},HX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},VX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},GX={ordinalNumber:MX({matchPattern:IX,parsePattern:$X,valueCallback:function(t){return parseInt(t,10)}}),era:bf({matchPatterns:jX,defaultMatchWidth:"wide",parsePatterns:LX,defaultParseWidth:"any"}),quarter:bf({matchPatterns:FX,defaultMatchWidth:"wide",parsePatterns:UX,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:bf({matchPatterns:BX,defaultMatchWidth:"wide",parsePatterns:zX,defaultParseWidth:"any"}),day:bf({matchPatterns:WX,defaultMatchWidth:"wide",parsePatterns:HX,defaultParseWidth:"any"}),dayPeriod:bf({matchPatterns:VX,defaultMatchWidth:"any",parsePatterns:YX,defaultParseWidth:"any"})};const KX=GX;var qX={code:"en-US",formatDistance:hX,formatLong:wX,formatRelative:EX,localize:AX,match:KX,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ZE=qX;var QX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JX=/^'([^]*?)'?$/,ZX=/''/g,eJ=/[a-zA-Z]/;function ci(e,t,r){var n,a,i,o,s,l,u,c,f,d,p,h,v,y,m,g,E,w;le(2,arguments);var C=String(t),S=wi(),O=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:ZE,D=Ge((i=(o=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=Ge((p=(h=(v=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(m=r.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:S.weekStartsOn)!==null&&h!==void 0?h:(E=S.locale)===null||E===void 0||(w=E.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var R=fe(e);if(!VI(R))throw new RangeError("Invalid time value");var j=Sc(R),U=GI(R,j),Q={firstWeekContainsDate:D,weekStartsOn:N,locale:O,_originalDate:R},X=C.match(XX).map(function(J){var te=J[0];if(te==="p"||te==="P"){var ge=qb[te];return ge(J,O.formatLong)}return J}).join("").match(QX).map(function(J){if(J==="''")return"'";var te=J[0];if(te==="'")return tJ(J);var ge=sX[te];if(ge)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ZI(J)&&Om(J,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&JI(J)&&Om(J,t,String(e)),ge(U,J,O.localize,Q);if(te.match(eJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return J}).join("");return X}function tJ(e){var t=e.match(JX);return t?t[1].replace(ZX,"'"):e}function eS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function rJ(e){return eS({},e)}var _T=1440,nJ=2520,B0=43200,aJ=86400;function iJ(e,t,r){var n,a;le(2,arguments);var i=wi(),o=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:i.locale)!==null&&n!==void 0?n:ZE;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Tv(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=eS(rJ(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=fe(t),c=fe(e)):(u=fe(e),c=fe(t));var f=QQ(c,u),d=(Sc(c)-Sc(u))/1e3,p=Math.round((f-d)/60),h;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p<_T){var v=Math.round(p/60);return o.formatDistance("aboutXHours",v,l)}else{if(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var v=yp(h,t),y=new Date(0);y.setFullYear(f,0,p),y.setHours(0,0,0,0);var m=yp(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function fJ(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=cJ(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=yp(p,t);return h}var dJ=6048e5;function pJ(e,t){le(1,arguments);var r=fe(e),n=yp(r,t).getTime()-fJ(r,t).getTime();return Math.round(n/dJ)+1}function xt(e){return le(1,arguments),fe(e).getFullYear()}function Qi(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()>n.getTime()}function Ls(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function Qe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dm(e,t)}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tm(e)}function mJ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gJ(e,t){if(t&&(Ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function Xe(e){var t=mJ();return function(){var n=Tm(e),a;if(t){var i=Tm(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return gJ(this,a)}}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t,r){return t=cI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yJ=10,e$=function(){function e(){Ve(this,e),ae(this,"priority",void 0),ae(this,"subPriority",0)}return We(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),wJ=function(e){Qe(r,e);var t=Xe(r);function r(n,a,i,o,s){var l;return Ve(this,r),l=t.call(this),l.value=n,l.validateValue=a,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return We(r,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),r}(e$),bJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function n$(e){return e%400===0||e%4===0&&e%100!==0}var EJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var l=r$(o.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var u=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),SJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o,s){var l=JE(a,s);if(o.isTwoDigitYear){var u=r$(o.year,l);return a.setUTCFullYear(u,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}}]),r}(ot),xJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),TJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),DJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),PJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function kJ(e,t,r){le(2,arguments);var n=fe(e),a=Ge(t),i=QI(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var AJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o,s){return fl(kJ(a,o,s),s)}}]),r}(ot);function NJ(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=qI(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var RJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o){return xc(NJ(a,o))}}]),r}(ot),MJ=[31,28,31,30,31,30,31,31,30,31,30,31],IJ=[31,29,31,30,31,30,31,31,30,31,30,31],$J=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=IJ[l]:i>=1&&i<=MJ[l]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),jJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function rS(e,t,r){var n,a,i,o,s,l,u,c;le(2,arguments);var f=wi(),d=Ge((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&a!==void 0?a:(u=f.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=fe(e),h=Ge(t),v=p.getUTCDay(),y=h%7,m=(y+7)%7,g=(m=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),FJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),UJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function BJ(e,t){le(2,arguments);var r=Ge(t);r%7===0&&(r=r-7);var n=1,a=fe(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(a,i,o){return a=BJ(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),WJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),GJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(ot),KJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),qJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(ot),QJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(ot),XJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(ot),JJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Ge((h=(v=(y=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(g=n.locale)===null||g===void 0||(E=g.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&y!==void 0?y:D.weekStartsOn)!==null&&v!==void 0?v:(w=D.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&h!==void 0?h:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return S===""?fe(r):new Date(NaN);var U={firstWeekContainsDate:R,weekStartsOn:j,locale:N},Q=[new bJ],X=O.match(iZ).map(function(Ce){var xe=Ce[0];if(xe in qb){var mt=qb[xe];return mt(Ce,N.formatLong)}return Ce}).join("").match(aZ),J=[],te=ST(X),ge;try{var H=function(){var xe=ge.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ZI(xe)&&Om(xe,O,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&JI(xe)&&Om(xe,O,e);var mt=xe[0],Nt=nZ[mt];if(Nt){var sr=Nt.incompatibleTokens;if(Array.isArray(sr)){var jr=J.find(function(er){return sr.includes(er.token)||er.token===mt});if(jr)throw new RangeError("The format string mustn't contain `".concat(jr.fullToken,"` and `").concat(xe,"` at the same time"))}else if(Nt.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(xe,"` and any other token at the same time"));J.push({token:mt,fullToken:xe});var Je=Nt.run(S,xe,N.match,U);if(!Je)return{v:new Date(NaN)};Q.push(Je.setter),S=Je.rest}else{if(mt.match(uZ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mt+"`");if(xe==="''"?xe="'":mt==="'"&&(xe=cZ(xe)),S.indexOf(xe)===0)S=S.slice(xe.length);else return{v:new Date(NaN)}}};for(te.s();!(ge=te.n()).done;){var ee=H();if(Ma(ee)==="object")return ee.v}}catch(Ce){te.e(Ce)}finally{te.f()}if(S.length>0&&lZ.test(S))return new Date(NaN);var ce=Q.map(function(Ce){return Ce.priority}).sort(function(Ce,xe){return xe-Ce}).filter(function(Ce,xe,mt){return mt.indexOf(Ce)===xe}).map(function(Ce){return Q.filter(function(xe){return xe.priority===Ce}).sort(function(xe,mt){return mt.subPriority-xe.subPriority})}).map(function(Ce){return Ce[0]}),_e=fe(r);if(isNaN(_e.getTime()))return new Date(NaN);var we=GI(_e,Sc(_e)),rt={},ye=ST(ce),Le;try{for(ye.s();!(Le=ye.n()).done;){var He=Le.value;if(!He.validate(we,U))return new Date(NaN);var lt=He.set(we,rt,U);Array.isArray(lt)?(we=lt[0],eS(rt,lt[1])):we=lt}}catch(Ce){ye.e(Ce)}finally{ye.f()}return we}function cZ(e){return e.match(oZ)[1].replace(sZ,"'")}function fZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function dZ(e,t){le(2,arguments);var r=Kb(e),n=Kb(t);return r.getTime()===n.getTime()}function pZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()}function a$(e,t){le(2,arguments);var r=fe(e).getTime(),n=fe(t.start).getTime(),a=fe(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function hZ(e,t){le(2,arguments);var r=Ge(t);return Kc(e,-r)}function vZ(e,t){var r;le(1,arguments);var n=Ge((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=wZ(e),i;if(a.date){var o=bZ(a.date,n);i=_Z(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),l=0,u;if(a.time&&(l=EZ(a.time),isNaN(l)))return new Date(NaN);if(a.timezone){if(u=SZ(a.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),f=new Date(0);return f.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),f.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),f}return new Date(s+l+u)}var qh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mZ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gZ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yZ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wZ(e){var t={},r=e.split(qh.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],qh.timeZoneDelimiter.test(t.date)&&(t.date=e.split(qh.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=qh.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function bZ(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function _Z(e,t){if(t===null)return new Date(NaN);var r=e.match(mZ);if(!r)return new Date(NaN);var n=!!r[4],a=_f(r[1]),i=_f(r[2])-1,o=_f(r[3]),s=_f(r[4]),l=_f(r[5])-1;if(n)return DZ(t,s,l)?xZ(t,s,l):new Date(NaN);var u=new Date(0);return!OZ(t,i,o)||!TZ(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}function _f(e){return e?parseInt(e):1}function EZ(e){var t=e.match(gZ);if(!t)return NaN;var r=W0(t[1]),n=W0(t[2]),a=W0(t[3]);return PZ(r,n,a)?r*QE+n*qE+a*1e3:NaN}function W0(e){return e&&parseFloat(e.replace(",","."))||0}function SZ(e){if(e==="Z")return 0;var t=e.match(yZ);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return kZ(n,a)?r*(n*QE+a*qE):NaN}function xZ(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var CZ=[31,null,31,30,31,30,31,31,30,31,30,31];function i$(e){return e%400===0||e%4===0&&e%100!==0}function OZ(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(CZ[t]||(i$(e)?29:28))}function TZ(e,t){return t>=1&&t<=(i$(e)?366:365)}function DZ(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function PZ(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function kZ(e,t){return t>=0&&t<=59}function Ya(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=lJ(o);return r.setMonth(n,Math.min(i,s)),r}function ad(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setHours(n),r}function id(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setMinutes(n),r}function Mf(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=Math.floor(r.getMonth()/3)+1,i=n-a;return Ya(r,r.getMonth()+i*3)}function AZ(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setSeconds(n),r}function Pm(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function _p(e,t){le(2,arguments);var r=Ge(t);return qi(e,-r)}function NZ(e,t){le(2,arguments);var r=Ge(t);return KE(e,-r)}function km(e,t){le(2,arguments);var r=Ge(t);return wp(e,-r)}const o$=wt(function({profile:t}){var s;const{profileStore:r,userStore:n}=Ft(),{updateFollowing:a,loading:i}=r;if(((s=n.user)==null?void 0:s.username)===t.username)return null;function o(l,u){l.preventDefault(),t.following?a(u,!1):a(u,!0)}return _.jsxs(Io,{animated:"move",children:[_.jsx(Io.Content,{visible:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,color:"teal",content:t.following?"Following":"Not following"})}),_.jsx(Io.Content,{hidden:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,basic:!0,color:t.following?"red":"green",content:t.following?"Unfollow":"Follow",loading:i,onClick:l=>o(l,t.username)})})]})}),s$=wt(function({profile:t}){function r(n){if(n)return n.length>40?n.substring(0,37)+"...":n}return _.jsxs(nr,{as:an,to:`/profiles/${t.username}`,children:[_.jsx(qt,{src:t.image||"/assets/user.png"}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{children:t.displayName}),_.jsx(nr.Description,{children:r(t.bio)})]}),_.jsxs(nr.Content,{extra:!0,children:[_.jsx(jt,{name:"users"}),t.followersCount," followers"]}),_.jsx(o$,{profile:t})]})}),RZ=wt(function({attendees:t}){const r={border:"orange 3px solid"};return _.jsx(Ib,{horizontal:!0,children:t.map(n=>_.jsx(Vc,{hoverable:!0,trigger:_.jsx(Ib.Item,{as:an,to:`/profiles/${n.username}`,children:_.jsx(qt,{size:"mini",circular:!0,src:n.image||"/assets/user.png",style:n.following?r:null})},n.username),children:_.jsx(Gi,{children:_.jsx(s$,{profile:n})})},n.username))})});function MZ({activity:e}){var t,r;return _.jsxs(je.Group,{children:[_.jsxs(je,{children:[e.isCancelled&&_.jsx(Xt,{attached:"top",color:"red",content:"Cancelled",style:{textAlign:"center"}}),_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{style:{marginBottom:3},size:"tiny",circular:!0,src:((t=e.host)==null?void 0:t.image)||"/assets/user.png"}),_.jsxs(nt.Content,{children:[_.jsx(nt.Header,{as:an,to:`/activities/${e.id}`,children:e.title}),_.jsxs(nt.Description,{children:["Hosted by ",_.jsx(an,{to:`/profiles/${e.hostUsername}`,children:(r=e.host)==null?void 0:r.displayName})]}),e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"orange",children:"You are hosting the activty"})}),e.isGoing&&!e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"green",children:"You are going to this activty"})})]})]})})]}),_.jsx(je,{children:_.jsxs("span",{children:[_.jsx(jt,{name:"clock"})," ",ci(e.date,"dd MMM yyyy h:mm aa"),_.jsx(jt,{name:"marker"})," ",e.venue]})}),_.jsx(je,{children:_.jsx(RZ,{attendees:e.attendees})}),_.jsxs(je,{clearing:!0,children:[_.jsx("span",{children:e.description}),_.jsx($e,{as:an,to:`/activities/${e.id}`,color:"teal",floated:"right",content:"View"})]})]})}const IZ=wt(function(){const{activityStore:t}=Ft(),{groupedAcivities:r}=t;return _.jsx(_.Fragment,{children:r.map(([n,a])=>_.jsxs(x.Fragment,{children:[_.jsx(qe,{sub:!0,color:"teal",children:n}),a.map(i=>_.jsx(MZ,{activity:i},i.id))]},n))})});function l$(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t-1}function oee(e,t){var r=this.__data__,n=Cy(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}qc.prototype.clear=ree;qc.prototype.delete=nee;qc.prototype.get=aee;qc.prototype.has=iee;qc.prototype.set=oee;function Tl(e){var t=-1,r=e?e.length:0;for(this.clear();++t0,ee=te!=="century",ce=Jee(te,t),_e=ee?Zee(te,t):void 0,we=P$(te,t),rt=ee?ete(te,t):void 0,ye=function(){if(ce.getFullYear()<0)return!0;var Je=tte(te,t);return u&&u>=Je}(),Le=ee&&function(){if(_e.getFullYear()<0)return!0;var Je=rte(te,t);return u&&u>=Je}(),He=l&&le?t:r&&r=e}function ute(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function M$(e,t){return xp(e[0],t)||xp(e[1],t)}function PT(e,t,r){var n=M$(t,e),a=[];if(n){a.push(r);var i=xp(e[0],t),o=xp(e[1],t);i&&a.push("".concat(r,"Start")),o&&a.push("".concat(r,"End")),i&&o&&a.push("".concat(r,"BothEnds"))}return a}function cte(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function fte(e){if(!e)throw new Error("args is required");var t=e.value,r=e.date,n=e.hover,a="react-calendar__tile",i=[a];if(!r)return i;var o=new Date,s=function(){if(Array.isArray(r))return r;var p=e.dateType;if(!p)throw new Error("dateType is required when date is not an array of two dates");return TT(p,r)}();if(xp(o,s)&&i.push("".concat(a,"--now")),!t||!cte(t))return i;var l=function(){if(Array.isArray(t))return t;var p=e.valueType;if(!p)throw new Error("valueType is required when value is not an array of two dates");return TT(p,t)}();ute(l,s)?i.push("".concat(a,"--active")):M$(l,s)&&i.push("".concat(a,"--hasActive"));var u=PT(l,s,"".concat(a,"--range"));i.push.apply(i,u);var c=Array.isArray(t)?t:[t];if(n&&c.length===1){var f=n>l[0]?[l[0],n]:[n,l[0]],d=PT(f,s,"".concat(a,"--hover"));i.push.apply(i,d)}return i}var dte=(jl={},jl[lu.ARABIC]=kt.ISLAMIC,jl[lu.HEBREW]=kt.HEBREW,jl[lu.ISO_8601]=kt.ISO_8601,jl[lu.US]=kt.GREGORY,jl);function pte(e){return e!==void 0&&e in lu}var kT=!1;function Ay(e){if(pte(e)){var t=dte[e];return ry(kT,'Specifying calendarType="'.concat(e,'" is deprecated. Use calendarType="').concat(t,'" instead.')),kT=!0,t}return e}function Ny(e){for(var t=e.className,r=e.count,n=r===void 0?3:r,a=e.dateTransform,i=e.dateType,o=e.end,s=e.hover,l=e.offset,u=e.renderTile,c=e.start,f=e.step,d=f===void 0?1:f,p=e.value,h=e.valueType,v=[],y=c;y<=o;y+=d){var m=a(y);v.push(u({classes:fte({date:m,dateType:i,hover:s,value:p,valueType:h}),date:m}))}return b.createElement(dS,{className:t,count:n,offset:l,wrap:!0},v)}function Ry(e){var t=e.activeStartDate,r=e.children,n=e.classes,a=e.date,i=e.formatAbbr,o=e.locale,s=e.maxDate,l=e.maxDateTransform,u=e.minDate,c=e.minDateTransform,f=e.onClick,d=e.onMouseOver,p=e.style,h=e.tileClassName,v=e.tileContent,y=e.tileDisabled,m=e.view,g=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof h=="function"?h(w):h},[t,a,h,m]),E=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof v=="function"?v(w):v},[t,a,v,m]);return b.createElement("button",{className:xy(n,g),disabled:u&&c(u)>a||s&&l(s)s?new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null},hS=function(t,r,n){var a=t,i=r,o=a[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, expected instance of `Date`."));var s=t.minDate;return s&&o0,ja=x.useCallback(function(De){var bt=function(){switch(er){case"start":return gS;case"end":return H$;case"range":return Kte;default:throw new Error("Invalid returnValue.")}}();return bt({maxDate:S,maxDetail:D,minDate:R,value:De})},[S,D,R,er]),bi=x.useCallback(function(De,bt){un(De);var Me={action:bt,activeStartDate:De,value:he,view:Re};ce&&!Jh(me,De)&&ce(Me)},[me,ce,he,Re]),oo=x.useCallback(function(De,bt){var Me=function(){switch(Re){case"century":return rt;case"decade":return He;case"year":return ye;case"month":return we;default:throw new Error("Invalid view: ".concat(Re,"."))}}();Me&&Me(De,bt)},[we,rt,ye,He,Re]),Cn=x.useCallback(function(De,bt){if(Tt){oo(De,bt);var Me=Ae[Ae.indexOf(Re)+1];if(!Me)throw new Error("Attempted to drill down from the lowest view.");un(De),Te(Me);var Fr={action:"drillDown",activeStartDate:De,value:he,view:Me};ce&&!Jh(me,De)&&ce(Fr),xe&&Re!==Me&&xe(Fr),lt&<(Fr)}},[me,Tt,ce,oo,lt,xe,he,Re,Ae]),On=x.useCallback(function(){if($a){var De=Ae[Ae.indexOf(Re)-1];if(!De)throw new Error("Attempted to drill up from the highest view.");var bt=Fs(De,me);un(bt),Te(De);var Me={action:"drillUp",activeStartDate:bt,value:he,view:De};ce&&!Jh(me,bt)&&ce(Me),xe&&Re!==De&&xe(Me),Ce&&Ce(Me)}},[me,$a,ce,Ce,xe,he,Re,Ae]),so=x.useCallback(function(De,bt){var Me=he;oo(De,bt);var Fr=Ut&&!G0(Me),cn;if(Ut)if(Fr)cn=Fs(gt,De);else{if(!Me)throw new Error("previousValue is required");if(Array.isArray(Me))throw new Error("previousValue must not be an array");cn=nte(gt,Me,De)}else cn=ja(De);var tf=!Ut||Fr||g?V$({maxDate:S,maxDetail:D,minDate:R,minDetail:U,value:cn,view:Re}):null;bt.persist(),un(tf),de(cn);var O2={action:"onChange",activeStartDate:tf,value:cn,view:Re};if(ce&&!Jh(me,tf)&&ce(O2),_e)if(Ut){var T2=G0(cn);if(!T2)_e(cn||null,bt);else if(a){if(Array.isArray(cn))throw new Error("value must not be an array");_e([cn||null,null],bt)}}else _e(cn||null,bt)},[me,a,ja,g,S,D,R,U,ce,_e,oo,Ut,he,gt,Re]);function ef(De){M(De)}function hs(){M(null)}x.useImperativeHandle(r,function(){return{activeStartDate:me,drillDown:Cn,drillUp:On,onChange:so,setActiveStartDate:bi,value:he,view:Re}},[me,Cn,On,so,bi,he,Re]);function Nl(De){var bt=De?P$(Re,me):Fs(Re,me),Me=Tt?Cn:so,Fr={activeStartDate:bt,hover:ut,locale:w,maxDate:S,minDate:R,onClick:Me,onMouseOver:Ut?ef:void 0,tileClassName:F,tileContent:Y,tileDisabled:pe,value:he,valueType:gt};switch(Re){case"century":return b.createElement(xte,cu({formatYear:y},Fr));case"decade":return b.createElement(Pte,cu({formatYear:y},Fr));case"year":return b.createElement(Mte,cu({formatMonth:d,formatMonthYear:p},Fr));case"month":return b.createElement(Wte,cu({calendarType:i,formatDay:c,formatLongDate:f,formatShortWeekday:h,formatWeekday:v,onClickWeekNumber:Le,onMouseLeave:Ut?hs:void 0,showFixedNumberOfWeeks:typeof Jr<"u"?Jr:lr,showNeighboringMonth:I,showWeekNumbers:ue},Fr));default:throw new Error("Invalid view: ".concat(Re,"."))}}function st(){return Ot?b.createElement(ote,{activeStartDate:me,drillUp:On,formatMonthYear:p,formatYear:y,locale:w,maxDate:S,minDate:R,navigationAriaLabel:Q,navigationAriaLive:X,navigationLabel:J,next2AriaLabel:te,next2Label:ge,nextAriaLabel:H,nextLabel:ee,prev2AriaLabel:mt,prev2Label:Nt,prevAriaLabel:sr,prevLabel:jr,setActiveStartDate:bi,showDoubleView:lr,view:Re,views:Ae}):null}var Tn=Array.isArray(he)?he:[he];return b.createElement("div",{className:xy(Xh,Ut&&Tn.length===1&&"".concat(Xh,"--selectRange"),lr&&"".concat(Xh,"--doubleView"),o),ref:E},st(),b.createElement("div",{className:"".concat(Xh,"__viewContainer"),onBlur:Ut?hs:void 0,onMouseLeave:Ut?hs:void 0},Nl(),lr?Nl(!0):null))}),BT=$.instanceOf(Date),zT=$.oneOfType([$.string,$.instanceOf(Date)]),WT=$.oneOfType([zT,Ste(zT)]);Y$.propTypes={activeStartDate:BT,allowPartialRange:$.bool,calendarType:I$,className:Am,defaultActiveStartDate:BT,defaultValue:WT,defaultView:Nm,formatDay:$.func,formatLongDate:$.func,formatMonth:$.func,formatMonthYear:$.func,formatShortWeekday:$.func,formatWeekday:$.func,formatYear:$.func,goToRangeStartOnSelect:$.bool,inputRef:bte,locale:$.string,maxDate:hS,maxDetail:$.oneOf(xu),minDate:pS,minDetail:$.oneOf(xu),navigationAriaLabel:$.string,navigationAriaLive:$.oneOf(["off","polite","assertive"]),navigationLabel:$.func,next2AriaLabel:$.string,next2Label:$.node,nextAriaLabel:$.string,nextLabel:$.node,onActiveStartDateChange:$.func,onChange:$.func,onClickDay:$.func,onClickDecade:$.func,onClickMonth:$.func,onClickWeekNumber:$.func,onClickYear:$.func,onDrillDown:$.func,onDrillUp:$.func,onViewChange:$.func,prev2AriaLabel:$.string,prev2Label:$.node,prevAriaLabel:$.string,prevLabel:$.node,returnValue:$.oneOf(["start","end","range"]),selectRange:$.bool,showDoubleView:$.bool,showFixedNumberOfWeeks:$.bool,showNavigation:$.bool,showNeighboringMonth:$.bool,showWeekNumbers:$.bool,tileClassName:$.oneOfType([$.func,Am]),tileContent:$.oneOfType([$.func,$.node]),tileDisabled:$.func,value:WT,view:Nm};const Qte=Y$,Xte=wt(function(){const{activityStore:{predicate:t,setPredicate:r}}=Ft();return _.jsxs(_.Fragment,{children:[_.jsxs(ba,{vertical:!0,size:"large",style:{width:"100%",marginTop:25},children:[_.jsx(qe,{icon:"filter",attached:!0,color:"teal",content:"Filters"}),_.jsx(ba.Item,{content:"All Activities",active:t.has("all"),onClick:()=>r("all","true")}),_.jsx(ba.Item,{content:"I'm going",active:t.has("isGoing"),onClick:()=>r("isGoing","true")}),_.jsx(ba.Item,{content:"I'm hosting",active:t.has("isHost"),onClick:()=>r("isHost","true")})]}),_.jsx(qe,{}),_.jsx(Qte,{onChange:n=>r("startDate",n),value:t.get("startDate")||new Date})]})});class Jte{constructor(t,r){Z(this,"data");Z(this,"pagination");this.data=t,this.pagination=r}}class l_{constructor(t=1,r=2){Z(this,"pageNumber");Z(this,"pageSize");this.pageNumber=t,this.pageSize=r}}class u_ extends x.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const r=this.props.getScrollParent&&this.props.getScrollParent();return r??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,r=window,n=this.getParentElement(t);let a;if(this.props.useWindow){const i=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:i.scrollTop;this.props.isReverse?a=o:a=this.calculateOffset(t,o)}else this.props.isReverse?a=n.scrollTop:a=t.scrollHeight-n.scrollTop-n.clientHeight;a{this.scrollComponent=m,c&&c(m)};const y=[r];return a&&(s?o?y.unshift(s):y.push(s):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),b.createElement(n,v,y)}}Z(u_,"propTypes",{children:$.node.isRequired,element:$.node,hasMore:$.bool,initialLoad:$.bool,isReverse:$.bool,loader:$.node,loadMore:$.func.isRequired,pageStart:$.number,ref:$.func,getScrollParent:$.func,threshold:$.number,useCapture:$.bool,useWindow:$.bool}),Z(u_,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});function HT(){return _.jsx(_.Fragment,{children:_.jsx(xr,{fluid:!0,style:{marginTop:25},children:_.jsxs(je.Group,{children:[_.jsx(je,{style:{minHeight:110},children:_.jsxs(xr,{children:[_.jsxs(xr.Header,{image:!0,children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]}),_.jsx(xr.Paragraph,{children:_.jsx(xr.Line,{})})]})}),_.jsx(je,{children:_.jsxs(xr,{children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]})}),_.jsx(je,{secondary:!0,style:{minHeight:70}}),_.jsx(je,{clearing:!0,children:_.jsx($e,{disabled:!0,color:"blue",floated:"right",content:"View"})})]})})})}const Zte=wt(function(){const{activityStore:t}=Ft(),{loadActivities:r,activityRegistry:n,setPagingParams:a,pagination:i}=t,[o,s]=x.useState(!1);function l(){s(!0),a(new l_(i.currentPage+1)),r().then(()=>s(!1))}return x.useEffect(()=>{n.size<=1&&r()},[r,n.size]),_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"10",children:t.loadingInitial&&n.size===0&&!o?_.jsxs(_.Fragment,{children:[_.jsx(HT,{}),_.jsx(HT,{})]}):_.jsx(u_,{pageStart:0,loadMore:l,hasMore:!o&&!!i&&i.currentPagen.setValue(i.value),onBlur:()=>n.setTouched(!0),placeholder:e.placeholder}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const ore=[{text:"Drinks",value:"drinks"},{text:"Culture",value:"culture"},{text:"Film",value:"film"},{text:"Food",value:"food"},{text:"Music",value:"music"},{text:"Travel",value:"travel"}];var K$={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a=0)&&(r[a]=e[a]);return r}function YT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cre(e,t,r){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(r):e.classList.contains(r)}function fre(e,t,r){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&cre(e,t,r))return!0;e=e.parentNode||e.host}return e}function dre(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var pre=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,r=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,r),window.removeEventListener("testPassiveEventSupport",n,r),t}};function hre(e){return e===void 0&&(e=0),function(){return++e}}var vre=hre(),f_,ev={},K0={},mre=["touchstart","touchmove"],gre="ignore-react-onclickoutside";function GT(e,t){var r={},n=mre.indexOf(t)!==-1;return n&&f_&&(r.passive=!e.props.preventDefault),r}function Iy(e,t){var r,n,a=e.displayName||e.name||"Component";return n=r=function(i){lre(o,i);function o(l){var u;return u=i.call(this,l)||this,u.__outsideClickHandler=function(c){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(c);return}var f=u.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(c);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(c);return}throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var c=u.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(c):typeof c.setClickOutsideRef=="function"?c.setClickOutsideRef():Fo.findDOMNode(c)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||K0[u._uid])){typeof f_>"u"&&(f_=pre()),K0[u._uid]=!0;var c=u.props.eventTypes;c.forEach||(c=[c]),ev[u._uid]=function(f){if(u.componentNode!==null&&(u.props.preventDefault&&f.preventDefault(),u.props.stopPropagation&&f.stopPropagation(),!(u.props.excludeScrollbar&&dre(f)))){var d=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;fre(d,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(f)}},c.forEach(function(f){document.addEventListener(f,ev[u._uid],GT(YT(u),f))})}},u.disableOnClickOutside=function(){delete K0[u._uid];var c=ev[u._uid];if(c&&typeof document<"u"){var f=u.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(d){return document.removeEventListener(d,c,GT(YT(u),d))}),delete ev[u._uid]}},u.getRef=function(c){return u.instanceRef=c},u._uid=vre(),u}var s=o.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var u=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(u),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+a+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var u=this.props;u.excludeScrollbar;var c=ure(u,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,x.createElement(e,c)},o}(x.Component),r.displayName="OnClickOutside("+a+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:gre,preventDefault:!1,stopPropagation:!1},r.getClass=function(){return e.getClass?e.getClass():e},n}var KT=Object.prototype.toString,q$=function(t){var r=KT.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&KT.call(t.callee)==="[object Function]"),n},q0,qT;function yre(){if(qT)return q0;qT=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=q$,a=Object.prototype.propertyIsEnumerable,i=!a.call({toString:null},"toString"),o=a.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",v=r.call(p)==="[object Function]",y=n(p),m=h&&r.call(p)==="[object String]",g=[];if(!h&&!v&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&v;if(m&&p.length>0&&!t.call(p,0))for(var w=0;w0)for(var C=0;C"u"||!Sr?Fe:Sr(Uint8Array),Bs={"%AggregateError%":typeof AggregateError>"u"?Fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Fe:ArrayBuffer,"%ArrayIteratorPrototype%":Ll&&Sr?Sr([][Symbol.iterator]()):Fe,"%AsyncFromSyncIteratorPrototype%":Fe,"%AsyncFunction%":Wl,"%AsyncGenerator%":Wl,"%AsyncGeneratorFunction%":Wl,"%AsyncIteratorPrototype%":Wl,"%Atomics%":typeof Atomics>"u"?Fe:Atomics,"%BigInt%":typeof BigInt>"u"?Fe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Fe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Fe:FinalizationRegistry,"%Function%":J$,"%GeneratorFunction%":Wl,"%Int8Array%":typeof Int8Array>"u"?Fe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Fe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ll&&Sr?Sr(Sr([][Symbol.iterator]())):Fe,"%JSON%":typeof JSON=="object"?JSON:Fe,"%Map%":typeof Map>"u"?Fe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ll||!Sr?Fe:Sr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Fe:Promise,"%Proxy%":typeof Proxy>"u"?Fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Fe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ll||!Sr?Fe:Sr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ll&&Sr?Sr(""[Symbol.iterator]()):Fe,"%Symbol%":Ll?Symbol:Fe,"%SyntaxError%":Cc,"%ThrowTypeError%":Rre,"%TypedArray%":Ire,"%TypeError%":Cu,"%Uint8Array%":typeof Uint8Array>"u"?Fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Fe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Fe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Fe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Fe:WeakSet};if(Sr)try{null.error}catch(e){var $re=Sr(Sr(e));Bs["%Error.prototype%"]=$re}var jre=function e(t){var r;if(t==="%AsyncFunction%")r=X0("async function () {}");else if(t==="%GeneratorFunction%")r=X0("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=X0("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Sr&&(r=Sr(a.prototype))}return Bs[t]=r,r},eD={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fh=wS,jm=Nre,Lre=fh.call(Function.call,Array.prototype.concat),Fre=fh.call(Function.apply,Array.prototype.splice),tD=fh.call(Function.call,String.prototype.replace),Lm=fh.call(Function.call,String.prototype.slice),Ure=fh.call(Function.call,RegExp.prototype.exec),Bre=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zre=/\\(\\)?/g,Wre=function(t){var r=Lm(t,0,1),n=Lm(t,-1);if(r==="%"&&n!=="%")throw new Cc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Cc("invalid intrinsic syntax, expected opening `%`");var a=[];return tD(t,Bre,function(i,o,s,l){a[a.length]=s?tD(l,zre,"$1"):o||i}),a},Hre=function(t,r){var n=t,a;if(jm(eD,n)&&(a=eD[n],n="%"+a[0]+"%"),jm(Bs,n)){var i=Bs[n];if(i===Wl&&(i=jre(n)),typeof i>"u"&&!r)throw new Cu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new Cc("intrinsic "+t+" does not exist!")},dh=function(t,r){if(typeof t!="string"||t.length===0)throw new Cu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Cu('"allowMissing" argument must be a boolean');if(Ure(/^%?[^%]*%?$/,t)===null)throw new Cc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wre(t),a=n.length>0?n[0]:"",i=Hre("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],Fre(n,Lre([0,1],u)));for(var c=1,f=!0;c=n.length){var v=Us(s,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[d]}else f=jm(s,d),s=s[d];f&&!l&&(Bs[o]=s)}}return s},Z$={exports:{}};(function(e){var t=wS,r=dh,n=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(a,n),o=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var d=i(t,a,arguments);if(o&&s){var p=o(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var u=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u})(Z$);var bS=Z$.exports,ej=dh,tj=bS,Vre=tj(ej("String.prototype.indexOf")),rj=function(t,r){var n=ej(t,!!r);return typeof n=="function"&&Vre(t,".prototype.")>-1?tj(n):n},Yre=yS(),Gre=rj,d_=Gre("Object.prototype.toString"),$y=function(t){return Yre&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:d_(t)==="[object Arguments]"},nj=function(t){return $y(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&d_(t)!=="[object Array]"&&d_(t.callee)==="[object Function]"},Kre=function(){return $y(arguments)}();$y.isLegacyArguments=nj;var qre=Kre?$y:nj,Qre=dh,p_=Qre("%Object.defineProperty%",!0),h_=function(){if(p_)try{return p_({},"a",{value:1}),!0}catch{return!1}return!1};h_.hasArrayLengthDefineBug=function(){if(!h_())return null;try{return p_([],"length",{value:1}).length!==1}catch{return!0}};var _S=h_,Z0,rD;function Xre(){if(rD)return Z0;rD=1;var e=dh,t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return Z0=t,Z0}var Jre=_S(),ES=dh,nD=Jre&&ES("%Object.defineProperty%",!0),Zre=ES("%SyntaxError%"),Fl=ES("%TypeError%"),aD=Xre(),aj=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Fl("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Fl("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Fl("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Fl("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Fl("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Fl("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!aD&&aD(t,r);if(nD)nD(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new Zre("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ene=Q$,tne=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",rne=Object.prototype.toString,nne=Array.prototype.concat,iD=aj,ane=function(e){return typeof e=="function"&&rne.call(e)==="[object Function]"},ij=_S(),ine=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!ane(n)||!n())return}ij?iD(e,t,r,!0):iD(e,t,r)},oj=function(e,t){var r=arguments.length>2?arguments[2]:{},n=ene(t);tne&&(n=nne.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a2&&!!arguments[2];return(!n||Ene)&&(_ne?sD(t,"name",r,!0,!0):sD(t,"name",r)),t},Cne=xne,One=Object,Tne=TypeError,hj=Cne(function(){if(this!=null&&this!==One(this))throw new Tne("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Dne=hj,Pne=ph.supportsDescriptors,kne=Object.getOwnPropertyDescriptor,vj=function(){if(Pne&&/a/mig.flags==="gim"){var t=kne(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return Dne},Ane=ph.supportsDescriptors,Nne=vj,Rne=Object.getOwnPropertyDescriptor,Mne=Object.defineProperty,Ine=TypeError,lD=Object.getPrototypeOf,$ne=/a/,jne=function(){if(!Ane||!lD)throw new Ine("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Nne(),r=lD($ne),n=Rne(r,"flags");return(!n||n.get!==t)&&Mne(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},Lne=ph,Fne=bS,Une=hj,mj=vj,Bne=jne,gj=Fne(mj());Lne(gj,{getPolyfill:mj,implementation:Une,shim:Bne});var zne=gj,Wne=Date.prototype.getDay,Hne=function(t){try{return Wne.call(t),!0}catch{return!1}},Vne=Object.prototype.toString,Yne="[object Date]",Gne=yS(),Kne=function(t){return typeof t!="object"||t===null?!1:Gne?Hne(t):Vne.call(t)===Yne},uD=Q$,cD=qre,fD=hne,dD=yne,pD=zne,hD=Kne,vD=Date.prototype.getTime;function yj(e,t,r){var n=r||{};return(n.strict?fD(e,t):e===t)?!0:!e||!t||typeof e!="object"&&typeof t!="object"?n.strict?fD(e,t):e==t:qne(e,t,n)}function mD(e){return e==null}function gD(e){return!(!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number")}function qne(e,t,r){var n,a;if(typeof e!=typeof t||mD(e)||mD(t)||e.prototype!==t.prototype||cD(e)!==cD(t))return!1;var i=dD(e),o=dD(t);if(i!==o)return!1;if(i||o)return e.source===t.source&&pD(e)===pD(t);if(hD(e)&&hD(t))return vD.call(e)===vD.call(t);var s=gD(e),l=gD(t);if(s!==l)return!1;if(s||l){if(e.length!==t.length)return!1;for(n=0;n=0;n--)if(u[n]!=c[n])return!1;for(n=u.length-1;n>=0;n--)if(a=u[n],!yj(e[a],t[a],r))return!1;return!0}var Qne=yj;const Xne=Xr(Qne);/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1 + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */var hh=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Jne=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();function Zne(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function eae(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Jne))}}var tae=hh&&window.Promise,rae=tae?Zne:eae;function wj(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Al(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function SS(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function vh(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Al(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+n)?e:vh(SS(e))}function bj(e){return e&&e.referenceNode?e.referenceNode:e}var yD=hh&&!!(window.MSInputMethodContext&&document.documentMode),wD=hh&&/MSIE 10/.test(navigator.userAgent);function Xc(e){return e===11?yD:e===10?wD:yD||wD}function Oc(e){if(!e)return document.documentElement;for(var t=Xc(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Al(r,"position")==="static"?Oc(r):r}function nae(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Oc(e.firstElementChild)===e}function y_(e){return e.parentNode!==null?y_(e.parentNode):e}function Fm(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,a=r?t:e,i=document.createRange();i.setStart(n,0),i.setEnd(a,0);var o=i.commonAncestorContainer;if(e!==o&&t!==o||n.contains(a))return nae(o)?o:Oc(o);var s=y_(e);return s.host?Fm(s.host,t):Fm(e,y_(t).host)}function Tc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[r]}return e[r]}function aae(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Tc(t,"top"),a=Tc(t,"left"),i=r?-1:1;return e.top+=n*i,e.bottom+=n*i,e.left+=a*i,e.right+=a*i,e}function bD(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function _D(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Xc(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function _j(e){var t=e.body,r=e.documentElement,n=Xc(10)&&getComputedStyle(r);return{height:_D("Height",t,r,n),width:_D("Width",t,r,n)}}var iae=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},oae=function(){function e(t,r){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!1,n=Xc(10),a=t.nodeName==="HTML",i=w_(e),o=w_(t),s=vh(e),l=Al(t),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);r&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=ns({top:i.top-o.top-u,left:i.left-o.left-c,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!n&&a){var d=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(n&&!r?t.contains(s):t===s&&s.nodeName!=="BODY")&&(f=aae(f,t)),f}function sae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=xS(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),i=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:Tc(r),s=t?0:Tc(r,"left"),l={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:a,height:i};return ns(l)}function Ej(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Al(e,"position")==="fixed")return!0;var r=SS(e);return r?Ej(r):!1}function Sj(e){if(!e||!e.parentElement||Xc())return document.documentElement;for(var t=e.parentElement;t&&Al(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function CS(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},o=a?Sj(e):Fm(e,bj(t));if(n==="viewport")i=sae(o,a);else{var s=void 0;n==="scrollParent"?(s=vh(SS(t)),s.nodeName==="BODY"&&(s=e.ownerDocument.documentElement)):n==="window"?s=e.ownerDocument.documentElement:s=n;var l=xS(s,o,a);if(s.nodeName==="HTML"&&!Ej(o)){var u=_j(e.ownerDocument),c=u.height,f=u.width;i.top+=l.top-l.marginTop,i.bottom=c+l.top,i.left+=l.left-l.marginLeft,i.right=f+l.left}else i=l}r=r||0;var d=typeof r=="number";return i.left+=d?r:r.left||0,i.top+=d?r:r.top||0,i.right-=d?r:r.right||0,i.bottom-=d?r:r.bottom||0,i}function lae(e){var t=e.width,r=e.height;return t*r}function xj(e,t,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=CS(r,n,i,a),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(d){return ra({key:d},s[d],{area:lae(s[d])})}).sort(function(d,p){return p.area-d.area}),u=l.filter(function(d){var p=d.width,h=d.height;return p>=r.clientWidth&&h>=r.clientHeight}),c=u.length>0?u[0].key:l[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function Cj(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=n?Sj(t):Fm(t,bj(r));return xS(r,a,n)}function Oj(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+n};return i}function Um(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function Tj(e,t,r){r=r.split("-")[0];var n=Oj(e),a={width:n.width,height:n.height},i=["right","left"].indexOf(r)!==-1,o=i?"top":"left",s=i?"left":"top",l=i?"height":"width",u=i?"width":"height";return a[o]=t[o]+t[l]/2-n[l]/2,r===s?a[s]=t[s]-n[u]:a[s]=t[Um(s)],a}function mh(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function uae(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var n=mh(e,function(a){return a[t]===r});return e.indexOf(n)}function Dj(e,t,r){var n=r===void 0?e:e.slice(0,uae(e,"name",r));return n.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&wj(i)&&(t.offsets.popper=ns(t.offsets.popper),t.offsets.reference=ns(t.offsets.reference),t=i(t,a))}),t}function cae(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Cj(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=xj(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Tj(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Dj(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Pj(e,t){return e.some(function(r){var n=r.name,a=r.enabled;return a&&n===t})}function OS(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;no[p]&&(e.offsets.popper[f]+=s[f]+h-o[p]),e.offsets.popper=ns(e.offsets.popper);var v=s[f]+s[u]/2-h/2,y=Al(e.instance.popper),m=parseFloat(y["margin"+c]),g=parseFloat(y["border"+c+"Width"]),E=v-e.offsets.popper[f]-m-g;return E=Math.max(Math.min(o[u]-h,E),0),e.arrowElement=n,e.offsets.arrow=(r={},Dc(r,f,Math.round(E)),Dc(r,d,""),r),e}function Sae(e){return e==="end"?"start":e==="start"?"end":e}var Rj=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],tw=Rj.slice(3);function ED(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=tw.indexOf(e),n=tw.slice(r+1).concat(tw.slice(0,r));return t?n.reverse():n}var rw={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function xae(e,t){if(Pj(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=CS(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],a=Um(n),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case rw.FLIP:o=[n,a];break;case rw.CLOCKWISE:o=ED(n);break;case rw.COUNTERCLOCKWISE:o=ED(n,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(n!==s||o.length===l+1)return e;n=e.placement.split("-")[0],a=Um(n);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=n==="left"&&f(u.right)>f(c.left)||n==="right"&&f(u.left)f(c.top)||n==="bottom"&&f(u.top)f(r.right),v=f(u.top)f(r.bottom),m=n==="left"&&p||n==="right"&&h||n==="top"&&v||n==="bottom"&&y,g=["top","bottom"].indexOf(n)!==-1,E=!!t.flipVariations&&(g&&i==="start"&&p||g&&i==="end"&&h||!g&&i==="start"&&v||!g&&i==="end"&&y),w=!!t.flipVariationsByContent&&(g&&i==="start"&&h||g&&i==="end"&&p||!g&&i==="start"&&y||!g&&i==="end"&&v),C=E||w;(d||m||C)&&(e.flipped=!0,(d||m)&&(n=o[l+1]),C&&(i=Sae(i)),e.placement=n+(i?"-"+i:""),e.offsets.popper=ra({},e.offsets.popper,Tj(e.instance.popper,e.offsets.reference,e.placement)),e=Dj(e.instance.modifiers,e,"flip"))}),e}function Cae(e){var t=e.offsets,r=t.popper,n=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=["top","bottom"].indexOf(a)!==-1,s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return r[s]i(n[s])&&(e.offsets.popper[l]=i(n[s])),e}function Oae(e,t,r,n){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(o.indexOf("%")===0){var s=void 0;switch(o){case"%p":s=r;break;case"%":case"%r":default:s=n}var l=ns(s);return l[t]/100*i}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*i}else return i}function Tae(e,t,r,n){var a=[0,0],i=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(c){return c.trim()}),s=o.indexOf(mh(o,function(c){return c.search(/,|\s/)!==-1}));o[s]&&o[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=s!==-1?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return u=u.map(function(c,f){var d=(f===1?!i:i)?"height":"width",p=!1;return c.reduce(function(h,v){return h[h.length-1]===""&&["+","-"].indexOf(v)!==-1?(h[h.length-1]=v,p=!0,h):p?(h[h.length-1]+=v,p=!1,h):h.concat(v)},[]).map(function(h){return Oae(h,d,t,r)})}),u.forEach(function(c,f){c.forEach(function(d,p){TS(d)&&(a[f]+=d*(c[p-1]==="-"?-1:1))})}),a}function Dae(e,t){var r=t.offset,n=e.placement,a=e.offsets,i=a.popper,o=a.reference,s=n.split("-")[0],l=void 0;return TS(+r)?l=[+r,0]:l=Tae(r,i,o,s),s==="left"?(i.top+=l[0],i.left-=l[1]):s==="right"?(i.top+=l[0],i.left+=l[1]):s==="top"?(i.left+=l[0],i.top-=l[1]):s==="bottom"&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e}function Pae(e,t){var r=t.boundariesElement||Oc(e.instance.popper);e.instance.reference===r&&(r=Oc(r));var n=OS("transform"),a=e.instance.popper.style,i=a.top,o=a.left,s=a[n];a.top="",a.left="",a[n]="";var l=CS(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=i,a.left=o,a[n]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]l[p]&&!t.escapeWithReference&&(v=Math.min(c[h],l[p]-(p==="right"?c.width:c.height))),Dc({},h,v)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=ra({},c,f[p](d))}),e.offsets.popper=c,e}function kae(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var a=e.offsets,i=a.reference,o=a.popper,s=["bottom","top"].indexOf(r)!==-1,l=s?"left":"top",u=s?"width":"height",c={start:Dc({},l,i[l]),end:Dc({},l,i[l]+i[u]-o[u])};e.offsets.popper=ra({},o,c[n])}return e}function Aae(e){if(!Nj(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=mh(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottomr.right||t.top>r.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};iae(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=rae(this.update.bind(this)),this.options=ra({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ra({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){n.options.modifiers[o]=ra({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return ra({name:o},n.options.modifiers[o])}).sort(function(o,s){return o.order-s.order}),this.modifiers.forEach(function(o){o.enabled&&wj(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return oae(e,[{key:"update",value:function(){return cae.call(this)}},{key:"destroy",value:function(){return fae.call(this)}},{key:"enableEventListeners",value:function(){return pae.call(this)}},{key:"disableEventListeners",value:function(){return vae.call(this)}}]),e}();jy.Utils=(typeof window<"u"?window:global).PopperUtils;jy.placements=Rj;jy.Defaults=Mae;const Mj=jy;var __={exports:{}},E_={exports:{}},SD="__global_unique_id__",Iae=function(){return et[SD]=(et[SD]||0)+1};(function(e,t){t.__esModule=!0;var r=x;l(r);var n=LR,a=l(n),i=Iae,o=l(i),s=uI;l(s);function l(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function c(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function f(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var d=1073741823;function p(m,g){return m===g?m!==0||1/m===1/g:m!==m&&g!==g}function h(m){var g=[];return{on:function(w){g.push(w)},off:function(w){g=g.filter(function(C){return C!==w})},get:function(){return m},set:function(w,C){m=w,g.forEach(function(S){return S(m,C)})}}}function v(m){return Array.isArray(m)?m[0]:m}function y(m,g){var E,w,C="__create-react-context-"+(0,o.default)()+"__",S=function(D){f(N,D);function N(){var R,j,U;u(this,N);for(var Q=arguments.length,X=Array(Q),J=0;J1?r-1:0),a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,n=S_(e);if(t){var a=S_(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Hae(this,r)}}function TD(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function DD(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Vae={p:DD,P:function(e,t){var r,n=e.match(/(P+)(p+)?/),a=n[1],i=n[2];if(!i)return TD(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",TD(a,t)).replace("{{time}}",DD(i,t))}},Yae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Ar(e){var t=e?typeof e=="string"||e instanceof String?vZ(e):fe(e):new Date;return mo(t)?t:null}function Gae(e,t,r,n){var a=null,i=Hs(r)||Ws(),o=!0;return Array.isArray(t)?(t.forEach(function(s){var l=z0(e,s,new Date,{locale:i});n&&(o=mo(l)&&e===ci(l,s,{awareOfUnicodeTokens:!0})),mo(l)&&o&&(a=l)}),a):(a=z0(e,t,new Date,{locale:i}),n?o=mo(a)&&e===ci(a,t,{awareOfUnicodeTokens:!0}):mo(a)||(t=t.match(Yae).map(function(s){var l=s[0];return l==="p"||l==="P"?i?(0,Vae[l])(s,i.formatLong):l:s}).join(""),e.length>0&&(a=z0(e,t.slice(0,e.length),new Date)),mo(a)||(a=new Date(e))),mo(a)&&o?a:null)}function mo(e){return VI(e)&&Qi(e,new Date("1/1/1000"))}function wr(e,t,r){if(r==="en")return ci(e,t,{awareOfUnicodeTokens:!0});var n=Hs(r);return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),!n&&Ws()&&Hs(Ws())&&(n=Hs(Ws())),ci(e,t,{locale:n||null,awareOfUnicodeTokens:!0})}function PD(e,t){var r=t.hour,n=r===void 0?0:r,a=t.minute,i=a===void 0?0:a,o=t.second;return ad(id(AZ(e,o===void 0?0:o),i),n)}function Kae(e,t){var r=t&&Hs(t)||Ws()&&Hs(Ws());return pJ(e,r?{locale:r}:null)}function qae(e,t){return wr(e,"ddd",t)}function Qae(e){return cl(e)}function DS(e,t){var r=Hs(t||Ws());return yp(e,{locale:r})}function zs(e){return XQ(e)}function $f(e){return JQ(e)}function Xae(e){return Kb(e)}function Wj(e,t){return e&&t?pZ(e,t):!e&&!t}function So(e,t){return e&&t?fZ(e,t):!e&&!t}function zm(e,t){return e&&t?dZ(e,t):!e&&!t}function hn(e,t){return e&&t?WQ(e,t):!e&&!t}function Ou(e,t){return e&&t?hJ(e,t):!e&&!t}function Pv(e,t,r){var n,a=cl(t),i=YI(r);try{n=a$(e,{start:a,end:i})}catch{n=!1}return n}function Ws(){return(typeof window<"u"?window:global).__localeId__}function Hs(e){if(typeof e=="string"){var t=typeof window<"u"?window:global;return t.__localeData__?t.__localeData__[e]:null}return e}function Hj(e,t){return wr(Ya(Ar(),e),"LLLL",t)}function Vj(e,t){return wr(Ya(Ar(),e),"LLL",t)}function Jae(e,t){return wr(Mf(Ar(),e),"QQQ",t)}function PS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return hn(e,s)})||i&&!i.some(function(s){return hn(e,s)})||o&&!o(Ar(e))||!1}function Yj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeDates;return r&&r.some(function(n){return hn(e,n)})||!1}function Zae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return So(e,s)})||i&&!i.some(function(s){return So(e,s)})||o&&!o(Ar(e))||!1}function eie(e,t,r,n){var a=xt(e),i=Sa(e),o=xt(t),s=Sa(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function tie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return zm(e,s)})||i&&!i.some(function(s){return zm(e,s)})||o&&!o(Ar(e))||!1}function rie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=new Date(e,0,1);return Ly(a,{minDate:r,maxDate:n})||!1}function nie(e,t,r,n){var a=xt(e),i=Gb(e),o=xt(t),s=Gb(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function Ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate;return r&&xm(e,r)<0||n&&xm(e,n)>0}function kD(e,t){return t.some(function(r){return Pa(r)===Pa(e)&&ka(r)===ka(e)})}function AD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeTimes,n=t.includeTimes,a=t.filterTime;return r&&kD(e,r)||n&&!kD(e,n)||a&&!a(e)||!1}function ND(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var a,i=Ar(),o=ad(id(i,ka(e)),Pa(e)),s=ad(id(i,ka(r)),Pa(r)),l=ad(id(i,ka(n)),Pa(n));try{a=!a$(o,{start:s,end:l})}catch{a=!1}return a}function RD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=_p(e,1);return r&&bp(r,a)>0||n&&n.every(function(i){return bp(i,a)>0})||!1}function MD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=qi(e,1);return r&&bp(a,r)>0||n&&n.every(function(i){return bp(a,i)>0})||!1}function ID(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=km(e,1);return r&&Cm(r,a)>0||n&&n.every(function(i){return Cm(i,a)>0})||!1}function $D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=wp(e,1);return r&&Cm(a,r)>0||n&&n.every(function(i){return Cm(a,i)>0})||!1}function Gj(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)>=0});return mT(n)}return r?mT(r):t}function Kj(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)<=0});return vT(n)}return r?vT(r):t}function jD(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",r=new Map,n=0,a=e.length;n1&&arguments[1]!==void 0?arguments[1]:12,r=Math.ceil(xt(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function iie(e,t,r,n){for(var a=[],i=0;i<2*t+1;i++){var o=e+t-i,s=!0;r&&(s=xt(r)<=o),n&&s&&(s=xt(n)>=o),s&&a.push(o)}return a}var oie=Iy(function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;Mr(this,r),k(A(a=t.call(this,n)),"renderOptions",function(){var l=a.props.year,u=a.state.yearsList.map(function(d){return b.createElement("div",{className:l===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:a.onChange.bind(A(a),d)},l===d?b.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=a.props.minDate?xt(a.props.minDate):null,f=a.props.maxDate?xt(a.props.maxDate):null;return f&&a.state.yearsList.find(function(d){return d===f})||u.unshift(b.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),c&&a.state.yearsList.find(function(d){return d===c})||u.push(b.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u}),k(A(a),"onChange",function(l){a.props.onChange(l)}),k(A(a),"handleClickOutside",function(){a.props.onCancel()}),k(A(a),"shiftYears",function(l){var u=a.state.yearsList.map(function(c){return c+l});a.setState({yearsList:u})}),k(A(a),"incrementYears",function(){return a.shiftYears(1)}),k(A(a),"decrementYears",function(){return a.shiftYears(-1)});var i=n.yearDropdownItemNumber,o=n.scrollableYearDropdown,s=i||(o?10:5);return a.state={yearsList:iie(a.props.year,s,a.props.minDate,a.props.maxDate)},a}return or(r,[{key:"render",value:function(){var n=Sn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return b.createElement("div",{className:n},this.renderOptions())}}]),r}()),sie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},l=!1;n.getTabIndex()===0&&!s.isInputFocused&&n.isSameDay(n.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||n.props.inline||(l=!0),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&n.dayEl.current.focus({preventScroll:!0})}),k(A(n),"renderDayContents",function(){return n.isOutsideMonth()&&(n.props.monthShowsDuplicateDaysEnd&&Kh(n.props.day)<10||n.props.monthShowsDuplicateDaysStart&&Kh(n.props.day)>20)?null:n.props.renderDayContents?n.props.renderDayContents(Kh(n.props.day),n.props.day):Kh(n.props.day)}),k(A(n),"render",function(){return b.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.handleMouseEnter,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"button","aria-disabled":n.isDisabled()},n.renderDayContents())}),n}return or(r,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(n){this.handleFocusDay(n)}}]),r}(),hie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=6,p=!l&&!n.isWeekInMonth(u);if(d||p){if(!n.props.peekNextMonth)break;f=!0}}return s}),k(A(n),"onMonthClick",function(s,l){n.handleDayClick(zs(Ya(n.props.day,l)),s)}),k(A(n),"handleMonthNavigation",function(s,l){n.isDisabled(l)||n.isExcluded(l)||(n.props.setPreSelection(l),n.MONTH_REFS[s].current&&n.MONTH_REFS[s].current.focus())}),k(A(n),"onMonthKeyDown",function(s,l){var u=s.key;if(!n.props.disabledKeyboardNavigation)switch(u){case"Enter":n.onMonthClick(s,l),n.props.setPreSelection(n.props.selected);break;case"ArrowRight":n.handleMonthNavigation(l===11?0:l+1,qi(n.props.preSelection,1));break;case"ArrowLeft":n.handleMonthNavigation(l===0?11:l-1,_p(n.props.preSelection,1))}}),k(A(n),"onQuarterClick",function(s,l){n.handleDayClick(Xae(Mf(n.props.day,l)),s)}),k(A(n),"getMonthClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate,v=l.preSelection;return Sn("react-datepicker__month-text","react-datepicker__month-".concat(s),{"react-datepicker__month--disabled":(p||h)&&Zae(Ya(u,s),n.props),"react-datepicker__month--selected":Sa(u)===s&&xt(u)===xt(d),"react-datepicker__month-text--keyboard-selected":Sa(v)===s,"react-datepicker__month--in-range":eie(c,f,s,u),"react-datepicker__month--range-start":n.isRangeStartMonth(s),"react-datepicker__month--range-end":n.isRangeEndMonth(s)})}),k(A(n),"getTabIndex",function(s){var l=Sa(n.props.preSelection);return n.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),k(A(n),"getAriaLabel",function(s){var l=n.props,u=l.ariaLabelPrefix,c=u===void 0?"Choose":u,f=l.disabledDayAriaLabelPrefix,d=f===void 0?"Not available":f,p=l.day,h=Ya(p,s),v=n.isDisabled(h)||n.isExcluded(h)?d:c;return"".concat(v," ").concat(wr(h,"MMMM yyyy"))}),k(A(n),"getQuarterClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate;return Sn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter--disabled":(p||h)&&tie(Mf(u,s),n.props),"react-datepicker__quarter--selected":Gb(u)===s&&xt(u)===xt(d),"react-datepicker__quarter--in-range":nie(c,f,s,u),"react-datepicker__quarter--range-start":n.isRangeStartQuarter(s),"react-datepicker__quarter--range-end":n.isRangeEndQuarter(s)})}),k(A(n),"renderMonths",function(){var s=n.props,l=s.showFullMonthYearPicker,u=s.showTwoColumnMonthYearPicker,c=s.locale;return(u?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(f,d){return b.createElement("div",{className:"react-datepicker__month-wrapper",key:d},f.map(function(p,h){return b.createElement("div",{ref:n.MONTH_REFS[p],key:h,onClick:function(v){n.onMonthClick(v,p)},onKeyDown:function(v){n.onMonthKeyDown(v,p)},tabIndex:n.getTabIndex(p),className:n.getMonthClassNames(p),role:"button","aria-label":n.getAriaLabel(p)},l?Hj(p,c):Vj(p,c))}))})}),k(A(n),"renderQuarters",function(){return b.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(s,l){return b.createElement("div",{key:l,onClick:function(u){n.onQuarterClick(u,s)},className:n.getQuarterClassNames(s)},Jae(s,n.props.locale))}))}),k(A(n),"getClassNames",function(){var s=n.props,l=s.day,u=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,d=s.showMonthYearPicker,p=s.showQuarterYearPicker,h=s.monthClassName,v=h?h(l):void 0;return Sn("react-datepicker__month",v,{"react-datepicker__month--selecting-range":u&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),n}return or(r,[{key:"render",value:function(){var n=this.props,a=n.showMonthYearPicker,i=n.showQuarterYearPicker,o=n.day,s=n.ariaLabelPrefix,l=s===void 0?"month ":s;return b.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(wr(o,"yyyy-MM"))},a?this.renderMonths():i?this.renderQuarters():this.renderWeeks())}}]),r}(),qj=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},s=(o.className||"").split(/\s+/);return bie.some(function(l){return s.indexOf(l)>=0})})(i.target)&&a.props.onDropdownFocus()}),k(A(a),"getDateInView",function(){var i=a.props,o=i.preSelection,s=i.selected,l=i.openToDate,u=Gj(a.props),c=Kj(a.props),f=Ar(),d=l||s||o;return d||(u&&Ls(f,u)?u:c&&Qi(f,c)?c:f)}),k(A(a),"increaseMonth",function(){a.setState(function(i){var o=i.date;return{date:qi(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"decreaseMonth",function(){a.setState(function(i){var o=i.date;return{date:_p(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"handleDayClick",function(i,o,s){a.props.onSelect(i,o,s),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleDayMouseEnter",function(i){a.setState({selectingDate:i}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(i)}),k(A(a),"handleMonthMouseLeave",function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()}),k(A(a),"handleYearChange",function(i){a.props.onYearChange&&a.props.onYearChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthChange",function(i){a.props.onMonthChange&&a.props.onMonthChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthYearChange",function(i){a.handleYearChange(i),a.handleMonthChange(i)}),k(A(a),"changeYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(s,i)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"changeMonth",function(i){a.setState(function(o){var s=o.date;return{date:Ya(s,i)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"changeMonthYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(Ya(s,Sa(i)),xt(i))}},function(){return a.handleMonthYearChange(a.state.date)})}),k(A(a),"header",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=DS(i,a.props.locale),s=[];return a.props.showWeekNumbers&&s.push(b.createElement("div",{key:"W",className:"react-datepicker__day-name"},a.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(l){var u=Kc(o,l),c=a.formatWeekday(u,a.props.locale),f=a.props.weekDayClassName?a.props.weekDayClassName(u):void 0;return b.createElement("div",{key:l,className:Sn("react-datepicker__day-name",f)},c)}))}),k(A(a),"formatWeekday",function(i,o){return a.props.formatWeekDay?function(s,l,u){return l(wr(s,"EEEE",u))}(i,a.props.formatWeekDay,o):a.props.useWeekdaysShort?function(s,l){return wr(s,"EEE",l)}(i,o):function(s,l){return wr(s,"EEEEEE",l)}(i,o)}),k(A(a),"decreaseYear",function(){a.setState(function(i){var o=i.date;return{date:km(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderPreviousButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=ID(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.minDate,m=v.yearItemNumber,g=m===void 0?12:m,E=$f(km(h,g)),w=kv(E,g),C=w.endPeriod,S=y&&xt(y);return S&&S>C||!1}(a.state.date,a.props);break;default:i=RD(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!i)&&!a.props.showTimeSelectOnly){var o=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(s=a.decreaseYear),i&&a.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--previous--disabled"),s=null);var l=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,u=a.props,c=u.previousMonthAriaLabel,f=c===void 0?"Previous Month":c,d=u.previousYearAriaLabel,p=d===void 0?"Previous Year":d;return b.createElement("button",{type:"button",className:o.join(" "),onClick:s,"aria-label":l?p:f},l?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel)}}}),k(A(a),"increaseYear",function(){a.setState(function(i){var o=i.date;return{date:wp(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderNextButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=$D(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.maxDate,m=v.yearItemNumber,g=m===void 0?12:m,E=wp(h,g),w=kv(E,g),C=w.startPeriod,S=y&&xt(y);return S&&S0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=["react-datepicker__current-month"];return a.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),a.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),a.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),b.createElement("div",{className:o.join(" ")},wr(i,a.props.dateFormat,a.props.locale))}),k(A(a),"renderYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showYearDropdown&&!i)return b.createElement(sie,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:xt(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})}),k(A(a),"renderMonthDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthDropdown&&!i)return b.createElement(uie,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:Sa(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})}),k(A(a),"renderMonthYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthYearDropdown&&!i)return b.createElement(die,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})}),k(A(a),"renderTodayButton",function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return b.createElement("div",{className:"react-datepicker__today-button",onClick:function(i){return a.props.onSelect(cl(Ar()),i)}},a.props.todayButton)}),k(A(a),"renderDefaultHeader",function(i){var o=i.monthDate,s=i.i;return b.createElement("div",{className:"react-datepicker__header ".concat(a.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},a.renderCurrentMonth(o),b.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(s!==0),a.renderMonthYearDropdown(s!==0),a.renderYearDropdown(s!==0)),b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderCustomHeader",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.monthDate,s=i.i;if(s!==0&&s!==void 0)return null;var l=RD(a.state.date,a.props),u=MD(a.state.date,a.props),c=ID(a.state.date,a.props),f=$D(a.state.date,a.props),d=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return b.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(OD(OD({},a.state),{},{changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:u,prevYearButtonDisabled:c,nextYearButtonDisabled:f})),d&&b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderYearHeader",function(){var i=a.state.date,o=a.props,s=o.showYearPicker,l=kv(i,o.yearItemNumber),u=l.startPeriod,c=l.endPeriod;return b.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(u," - ").concat(c):xt(i))}),k(A(a),"renderHeader",function(i){switch(!0){case a.props.renderCustomHeader!==void 0:return a.renderCustomHeader(i);case(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker):return a.renderYearHeader(i);default:return a.renderDefaultHeader(i)}}),k(A(a),"renderMonths",function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var i=[],o=a.props.showPreviousMonths?a.props.monthsShown-1:0,s=_p(a.state.date,o),l=0;l0;i.push(b.createElement("div",{key:f,ref:function(h){a.monthContainer=h},className:"react-datepicker__month-container"},a.renderHeader({monthDate:c,i:l}),b.createElement(mie,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,onChange:a.changeMonthYear,day:c,dayClassName:a.props.dayClassName,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,inline:a.props.inline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:d,monthShowsDuplicateDaysStart:p})))}return i}}),k(A(a),"renderYears",function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?b.createElement("div",{className:"react-datepicker__year--container"},a.renderHeader(),b.createElement(gie,Tp({onDayClick:a.handleDayClick,date:a.state.date},a.props))):void 0}),k(A(a),"renderTimeSection",function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return b.createElement(qj,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,showTimeSelectOnly:a.props.showTimeSelectOnly})}),k(A(a),"renderInputTimeSection",function(){var i=new Date(a.props.selected),o=mo(i)&&a.props.selected?"".concat(LD(i.getHours()),":").concat(LD(i.getMinutes())):"";if(a.props.showTimeInput)return b.createElement(yie,{date:i,timeString:o,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})}),a.containerRef=b.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null},a}return or(r,null,[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),or(r,[{key:"componentDidMount",value:function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=void n.setState({monthContainer:n.monthContainer}))}},{key:"componentDidUpdate",value:function(n){this.props.preSelection&&!hn(this.props.preSelection,n.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!hn(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var n=this.props.container||wie;return b.createElement("div",{ref:this.containerRef},b.createElement(n,{className:Sn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}]),r}(),Eie=function(e){return!e.disabled&&e.tabIndex!==-1},Sie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getTabChildren",function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Eie)}),k(A(a),"handleFocusStart",function(i){var o=a.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),k(A(a),"handleFocusEnd",function(i){var o=a.getTabChildren();o&&o.length>1&&o[0].focus()}),a.tabLoopRef=b.createRef(),a}return or(r,null,[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),or(r,[{key:"render",value:function(){return this.props.enableTabLoop?b.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},b.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,b.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}]),r}(),xie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),(a=t.call(this,n)).el=document.createElement("div"),a}return or(r,[{key:"componentDidMount",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return nU.createPortal(this.props.children,this.el)}}]),r}(),Cie=function(e){Ir(r,b.Component);var t=$r(r);function r(){return Mr(this,r),t.apply(this,arguments)}return or(r,[{key:"render",value:function(){var n,a=this.props,i=a.className,o=a.wrapperClassName,s=a.hidePopper,l=a.popperComponent,u=a.popperModifiers,c=a.popperPlacement,f=a.popperProps,d=a.targetComponent,p=a.enableTabLoop,h=a.popperOnKeyDown,v=a.portalId;if(!s){var y=Sn("react-datepicker-popper",i);n=b.createElement(Bae,Tp({modifiers:u,placement:c},f),function(g){var E=g.ref,w=g.style,C=g.placement,S=g.arrowProps;return b.createElement(Sie,{enableTabLoop:p},b.createElement("div",Tp({ref:E,style:w},{className:y,"data-placement":C,onKeyDown:h}),b.cloneElement(l,{arrowProps:S})))})}this.props.popperContainer&&(n=b.createElement(this.props.popperContainer,{},n)),v&&!s&&(n=b.createElement(xie,{portalId:v},n));var m=Sn("react-datepicker-wrapper",o);return b.createElement(Lae,{className:"react-datepicker-manager"},b.createElement(Wae,null,function(g){var E=g.ref;return b.createElement("div",{ref:E,className:m},d)}),n)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),r}(),Oie=Iy(_ie),Tie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getPreSelection",function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:Ar()}),k(A(a),"calcInitialState",function(){var i=a.getPreSelection(),o=Gj(a.props),s=Kj(a.props),l=o&&Ls(i,o)?o:s&&Qi(i,s)?s:i;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:a.props.selected?a.props.selected:l,highlightDates:jD(a.props.highlightDates),focused:!1}}),k(A(a),"clearPreventFocusTimeout",function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)}),k(A(a),"setFocus",function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})}),k(A(a),"setBlur",function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()}),k(A(a),"setOpen",function(i){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.setState({open:i,preSelection:i&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:nw},function(){i||a.setState(function(s){return{focused:!!o&&s.focused}},function(){!o&&a.setBlur(),a.setState({inputValue:null})})})}),k(A(a),"inputOk",function(){return XE(a.state.preSelection)}),k(A(a),"isCalendarOpen",function(){return a.props.open===void 0?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open}),k(A(a),"handleFocus",function(i){a.state.preventFocus||(a.props.onFocus(i),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})}),k(A(a),"cancelFocusInput",function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null}),k(A(a),"deferFocusInput",function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout(function(){return a.setFocus()},1)}),k(A(a),"handleDropdownFocus",function(){a.cancelFocusInput()}),k(A(a),"handleBlur",function(i){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(i),a.setState({focused:!1})}),k(A(a),"handleCalendarClickOutside",function(i){a.props.inline||a.setOpen(!1),a.props.onClickOutside(i),a.props.withPortal&&i.preventDefault()}),k(A(a),"handleChange",function(){for(var i=arguments.length,o=new Array(i),s=0;sn.setValue(a)}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const FD=wt(function(){const{activityStore:t}=Ft(),{createActivity:r,updateActivity:n,loadActivity:a,loadingInitial:i}=t,{id:o}=eE(),s=Z1(),[l,u]=x.useState(new lC),c=ih({title:Pn().required("The activity title is required"),description:Pn().required("The activity description is required"),category:Pn().required(),date:Pn().required("date is required"),venue:Pn().required(),city:Pn().required()});x.useEffect(()=>{o&&a(o).then(d=>u(new lC(d)))},[o,a]);function f(d){d.id?n(d).then(()=>s(`/activities/${d.id}`)):(d.id=are(),r(d).then(()=>s(`/activities/${d.id}`)))}return i?_.jsx(Sy,{content:"Loading Activity ..."}):_.jsxs(je,{clearing:!0,children:[_.jsx(qe,{content:"Activity Details",sub:!0,color:"teal"}),_.jsx(ah,{validationSchema:c,enableReinitialize:!0,initialValues:l,onSubmit:d=>f(d),children:({handleSubmit:d,isValid:p,isSubmitting:h,dirty:v})=>_.jsxs(my,{className:"ui form",onSubmit:d,autoComplete:"off",children:[_.jsx(Xa,{name:"title",placeholder:"Title"}),_.jsx(G$,{rows:3,placeholder:"Description",name:"description"}),_.jsx(ire,{option:ore,placeholder:"Category",name:"category"}),_.jsx(kie,{placeholderText:"Date",name:"date",showTimeSelect:!0,timeCaption:"time",dateFormat:"MMMM d, yyyy h:mm aa"}),_.jsx(qe,{content:"Location Details",sub:!0,color:"teal"}),_.jsx(Xa,{placeholder:"City",name:"city"}),_.jsx(Xa,{placeholder:"Venue",name:"venue"}),_.jsx($e,{disabled:h||!v||!p,loading:h,floated:"right",positive:!0,type:"submit",content:"Submit"}),_.jsx($e,{as:an,to:"/activities",floated:"right",type:"button",content:"Cancel"})]})})]})}),Aie={filter:"brightness(30%)"},Nie={position:"absolute",bottom:"5%",left:"5%",width:"100%",height:"auto",color:"white"},Rie=wt(function({activity:t}){var i,o;const{activityStore:{updateAttendance:r,loading:n,cancelActivityToggle:a}}=Ft();return _.jsxs(je.Group,{children:[_.jsxs(je,{basic:!0,attached:"top",style:{padding:"0"},children:[t.isCancelled&&_.jsx(Xt,{style:{position:"absolute",zIndex:1e3,left:-14,top:20},ribbon:!0,color:"red",content:"Cancelled"}),_.jsx(qt,{src:`/assets/categoryImages/${t.category}.jpg`,fluid:!0,style:Aie}),_.jsx(je,{style:Nie,basic:!0,children:_.jsx(nt.Group,{children:_.jsx(nt,{children:_.jsxs(nt.Content,{children:[_.jsx(qe,{size:"huge",content:t.title,style:{color:"white"}}),_.jsx("p",{children:ci(t.date,"dd MMM yyyy")}),_.jsxs("p",{children:["Hosted by ",_.jsx("strong",{children:_.jsx(an,{to:`/profiles/${(i=t.host)==null?void 0:i.username}`,children:(o=t.host)==null?void 0:o.displayName})})]})]})})})})]}),_.jsx(je,{clearing:!0,attached:"bottom",children:t.isHost?_.jsxs(_.Fragment,{children:[_.jsx($e,{color:t.isCancelled?"green":"red",floated:"left",basic:!0,content:t.isCancelled?"Re-activate Activity":"Cancel Activity",onClick:a,loading:n}),_.jsx($e,{as:an,to:`/manage/${t.id}`,color:"orange",floated:"right",disabled:t.isCancelled,children:"Manage Event"})]}):t.isGoing?_.jsx($e,{loading:n,onClick:r,children:"Cancel attendance"}):_.jsx($e,{loading:n,color:"teal",onClick:r,disabled:t.isCancelled,children:"Join Activity"})})]})}),Mie=wt(function({activity:t}){return _.jsxs(je.Group,{children:[_.jsx(je,{attached:"top",children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{size:"large",color:"teal",name:"info"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("p",{children:t.description})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"calendar",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("span",{children:ci(t.date,"dd MMM yyyy h:mm aa")})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"marker",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:11,children:_.jsxs("span",{children:[t.venue,", ",t.city]})})]})})]})}),Iie=wt(function({activityId:t}){const{commentStore:r}=Ft();return x.useEffect(()=>(t&&r.createHubConnection(t),()=>{r.clearComments()}),[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(je,{textAlign:"center",attached:"top",inverted:!0,color:"teal",style:{border:"none"},children:_.jsx(qe,{children:"Chat about this event"})}),_.jsxs(je,{attached:!0,clearing:!0,children:[_.jsx(ah,{onSubmit:(n,{resetForm:a})=>r.addComment(n).then(()=>a()),initialValues:{body:""},validationSchema:ih({body:Pn().required()}),children:({isSubmitting:n,isValid:a,handleSubmit:i})=>_.jsx(my,{className:"ui form",children:_.jsx(Cq,{name:"body",children:o=>_.jsxs("div",{style:{position:"relative"},children:[_.jsx(il,{active:n}),_.jsx("textarea",{placeholder:"Enter your comment (Enter to submit, SHIFT + Enter for new line)",rows:2,...o.field,onKeyDown:s=>{s.key==="Enter"&&s.shiftKey||s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a&&i())}})]})})})}),_.jsx(mr.Group,{children:r.comments.map(n=>_.jsxs(mr,{children:[_.jsx(mr.Avatar,{src:n.image||"/assets/user.png"}),_.jsxs(mr.Content,{children:[_.jsx(mr.Author,{as:an,to:`/profiles/${n.username}`,children:n.displayName}),_.jsx(mr.Metadata,{children:_.jsxs("div",{children:[oJ(n.createdAt)," ago"]})}),_.jsx(mr.Text,{style:{whiteSpace:"pre-wrap"},children:n.body})]})]},n.id))})]})]})}),$ie=wt(function({activity:{attendees:t,host:r}}){return t?_.jsxs(_.Fragment,{children:[_.jsxs(je,{textAlign:"center",style:{border:"none"},attached:"top",secondary:!0,inverted:!0,color:"teal",children:[t.length," ",t.length===1?"Person":"People"," going"]}),_.jsx(je,{attached:!0,children:_.jsx(Ib,{relaxed:!0,divided:!0,children:t.map(n=>_.jsxs(nt,{style:{position:"relative"},children:[n.username===(r==null?void 0:r.username)&&_.jsx(Xt,{style:{position:"absolute"},color:"orange",ribbon:"right",children:"Host"}),_.jsx(qt,{size:"tiny",src:n.image||"/assets/user.png"}),_.jsxs(nt.Content,{verticalAlign:"middle",children:[_.jsx(nt.Header,{as:"h3",children:_.jsx(an,{to:`/profiles/${n.username}`,children:n.displayName})}),n.following&&_.jsx(nt.Extra,{style:{color:"orange"},children:"Following"})]})]},n.username))})})]}):null}),jie=wt(function(){const{activityStore:t}=Ft(),{selectedActivity:r,loadActivity:n,loadingInitial:a,clearSelectedActivity:i}=t,{id:o}=eE();return x.useEffect(()=>(o&&n(o),()=>i()),[o,n,i]),a||!r?_.jsx(Sy,{}):_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:10,children:[_.jsx(Rie,{activity:r}),_.jsx(Mie,{activity:r}),_.jsx(Iie,{activityId:r.id})]}),_.jsx(Oe.Column,{width:6,children:_.jsx($ie,{activity:r})})]})});function Lie(){const e="/api/",[t,r]=x.useState(null);function n(){tn.get(e+"buggy/not-found").catch(u=>console.log(u.response))}function a(){tn.get(e+"buggy/bad-request").catch(u=>console.log(u.response))}function i(){tn.get(e+"buggy/server-error").catch(u=>console.log(u.response))}function o(){tn.get(e+"buggy/unauthorised").catch(u=>console.log(u.response))}function s(){tn.get(e+"activities/notaguid").catch(u=>console.log(u.response))}function l(){tn.post(e+"activities",{}).catch(u=>r(u))}return _.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h1",content:"Test Error component"}),_.jsx(je,{children:_.jsxs($e.Group,{widths:"7",children:[_.jsx($e,{onClick:n,content:"Not Found",basic:!0,primary:!0}),_.jsx($e,{onClick:a,content:"Bad Request",basic:!0,primary:!0}),_.jsx($e,{onClick:l,content:"Validation Error",basic:!0,primary:!0}),_.jsx($e,{onClick:i,content:"Server Error",basic:!0,primary:!0}),_.jsx($e,{onClick:o,content:"Unauthorised",basic:!0,primary:!0}),_.jsx($e,{onClick:s,content:"Bad Guid",basic:!0,primary:!0})]})}),t&&_.jsx(LI,{errors:t})]})}function Fie(){return _.jsxs(je,{placeholder:!0,children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"search"}),"Oops -we've looked everywhere but could not find what you are looking for!"]}),_.jsx(je.Inline,{children:_.jsx($e,{as:an,to:"/activities",children:"Return to activities page"})})]})}const Uie=wt(function(){var r,n;const{commonStore:t}=Ft();return _.jsxs(Ko,{children:[_.jsx(qe,{as:"h1",content:"Server Error"}),_.jsx(qe,{sub:!0,as:"h5",color:"red",content:(r=t.error)==null?void 0:r.message}),((n=t.error)==null?void 0:n.details)&&_.jsxs(je,{children:[_.jsx(qe,{as:"h4",content:"Stack trace",color:"teal"}),_.jsx("code",{style:{marginTop:"10px"},children:t.error.details})]})]})}),Bie=wt(function({profile:t}){return _.jsx(je,{children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:12,children:_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{avatar:!0,size:"small",src:t.image||"/assets/user.png"}),_.jsx(nt.Content,{verticalAlign:"middle",children:_.jsx(qe,{as:"h1",content:t.displayName})})]})})}),_.jsxs(Oe.Column,{width:4,children:[_.jsxs(In.Group,{widths:2,children:[_.jsx(In,{label:"Followers",value:t.followersCount}),_.jsx(In,{label:"Following",value:t.followingCount})]}),_.jsx(cc,{}),_.jsx(o$,{profile:t})]})]})})});function Jc(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function Zc(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function BD(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function Wie(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),a=zie.get(n);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var Hie=[".DS_Store","Thumbs.db"];function Vie(e){return Jc(this,void 0,void 0,function(){return Zc(this,function(t){return Wm(e)&&Yie(e.dataTransfer)?[2,Qie(e.dataTransfer,e.type)]:Gie(e)?[2,Kie(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,qie(e)]:[2,[]]})})}function Yie(e){return Wm(e)}function Gie(e){return Wm(e)&&Wm(e.target)}function Wm(e){return typeof e=="object"&&e!==null}function Kie(e){return x_(e.target.files).map(function(t){return gh(t)})}function qie(e){return Jc(this,void 0,void 0,function(){var t;return Zc(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return gh(n)})]}})})}function Qie(e,t){return Jc(this,void 0,void 0,function(){var r,n;return Zc(this,function(a){switch(a.label){case 0:return e.items?(r=x_(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Xie))]):[3,2];case 1:return n=a.sent(),[2,zD(Qj(n))];case 2:return[2,zD(x_(e.files).map(function(i){return gh(i)}))]}})})}function zD(e){return e.filter(function(t){return Hie.indexOf(t.name)===-1})}function x_(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,GD(r)];if(e.sizer)return[!1,GD(r)]}return[!0,null]}function xs(e){return e!=null}function poe(e){var t=e.files,r=e.accept,n=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&o>=1&&t.length>o?!1:t.every(function(l){var u=e2(l,r),c=Dp(u,1),f=c[0],d=t2(l,n,a),p=Dp(d,1),h=p[0],v=s?s(l):null;return f&&h&&!v})}function Hm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function tv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function qD(e){e.preventDefault()}function hoe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function voe(e){return e.indexOf("Edge/")!==-1}function moe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hoe(e)||voe(e)}function Ua(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),o=1;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Roe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var kS=x.forwardRef(function(e,t){var r=e.children,n=Vm(e,Eoe),a=o2(n),i=a.open,o=Vm(a,Soe);return x.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(x.Fragment,null,r(zt(zt({},o),{},{open:i})))});kS.displayName="Dropzone";var i2={disabled:!1,getFilesFromEvent:Vie,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};kS.defaultProps=i2;kS.propTypes={children:$.func,accept:$.objectOf($.arrayOf($.string)),multiple:$.bool,preventDropOnDocument:$.bool,noClick:$.bool,noKeyboard:$.bool,noDrag:$.bool,noDragEventsBubbling:$.bool,minSize:$.number,maxSize:$.number,maxFiles:$.number,disabled:$.bool,getFilesFromEvent:$.func,onFileDialogCancel:$.func,onFileDialogOpen:$.func,useFsAccessApi:$.bool,autoFocus:$.bool,onDragEnter:$.func,onDragLeave:$.func,onDragOver:$.func,onDrop:$.func,onDropAccepted:$.func,onDropRejected:$.func,onError:$.func,validator:$.func};var D_={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function o2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=zt(zt({},i2),e),r=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,y=t.onFileDialogOpen,m=t.useFsAccessApi,g=t.autoFocus,E=t.preventDropOnDocument,w=t.noClick,C=t.noKeyboard,S=t.noDrag,O=t.noDragEventsBubbling,D=t.onError,N=t.validator,R=x.useMemo(function(){return woe(r)},[r]),j=x.useMemo(function(){return yoe(r)},[r]),U=x.useMemo(function(){return typeof y=="function"?y:XD},[y]),Q=x.useMemo(function(){return typeof v=="function"?v:XD},[v]),X=x.useRef(null),J=x.useRef(null),te=x.useReducer(Moe,D_),ge=aw(te,2),H=ge[0],ee=ge[1],ce=H.isFocused,_e=H.isFileDialogActive,we=x.useRef(typeof window<"u"&&window.isSecureContext&&m&&goe()),rt=function(){!we.current&&_e&&setTimeout(function(){if(J.current){var Y=J.current.files;Y.length||(ee({type:"closeDialog"}),Q())}},300)};x.useEffect(function(){return window.addEventListener("focus",rt,!1),function(){window.removeEventListener("focus",rt,!1)}},[J,_e,Q,we]);var ye=x.useRef([]),Le=function(Y){X.current&&X.current.contains(Y.target)||(Y.preventDefault(),ye.current=[])};x.useEffect(function(){return E&&(document.addEventListener("dragover",qD,!1),document.addEventListener("drop",Le,!1)),function(){E&&(document.removeEventListener("dragover",qD),document.removeEventListener("drop",Le))}},[X,E]),x.useEffect(function(){return!n&&g&&X.current&&X.current.focus(),function(){}},[X,g,n]);var He=x.useCallback(function(F){D?D(F):console.error(F)},[D]),lt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[].concat(Ooe(ye.current),[F.target]),tv(F)&&Promise.resolve(a(F)).then(function(Y){if(!(Hm(F)&&!O)){var pe=Y.length,be=pe>0&&poe({files:Y,accept:R,minSize:o,maxSize:i,multiple:s,maxFiles:l,validator:N}),Ne=pe>0&&!be;ee({isDragAccept:be,isDragReject:Ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(F)}}).catch(function(Y){return He(Y)})},[a,u,He,O,R,o,i,s,l,N]),Ce=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=tv(F);if(Y&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return Y&&f&&f(F),!1},[f,O]),xe=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=ye.current.filter(function(be){return X.current&&X.current.contains(be)}),pe=Y.indexOf(F.target);pe!==-1&&Y.splice(pe,1),ye.current=Y,!(Y.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),tv(F)&&c&&c(F))},[X,c,O]),mt=x.useCallback(function(F,Y){var pe=[],be=[];F.forEach(function(Ne){var ur=e2(Ne,R),Zr=aw(ur,2),un=Zr[0],da=Zr[1],io=t2(Ne,o,i),M=aw(io,2),L=M[0],G=M[1],de=N?N(Ne):null;if(un&&L&&!de)pe.push(Ne);else{var Ee=[da,G];de&&(Ee=Ee.concat(de)),be.push({file:Ne,errors:Ee.filter(function(Se){return Se})})}}),(!s&&pe.length>1||s&&l>=1&&pe.length>l)&&(pe.forEach(function(Ne){be.push({file:Ne,errors:[doe]})}),pe.splice(0)),ee({acceptedFiles:pe,fileRejections:be,type:"setFiles"}),d&&d(pe,be,Y),be.length>0&&h&&h(be,Y),pe.length>0&&p&&p(pe,Y)},[ee,s,R,o,i,l,d,p,h,N]),Nt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[],tv(F)&&Promise.resolve(a(F)).then(function(Y){Hm(F)&&!O||mt(Y,F)}).catch(function(Y){return He(Y)}),ee({type:"reset"})},[a,mt,He,O]),sr=x.useCallback(function(){if(we.current){ee({type:"openDialog"}),U();var F={multiple:s,types:j};window.showOpenFilePicker(F).then(function(Y){return a(Y)}).then(function(Y){mt(Y,null),ee({type:"closeDialog"})}).catch(function(Y){boe(Y)?(Q(Y),ee({type:"closeDialog"})):_oe(Y)?(we.current=!1,J.current?(J.current.value=null,J.current.click()):He(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):He(Y)});return}J.current&&(ee({type:"openDialog"}),U(),J.current.value=null,J.current.click())},[ee,U,Q,m,mt,He,j,s]),jr=x.useCallback(function(F){!X.current||!X.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),sr())},[X,sr]),Je=x.useCallback(function(){ee({type:"focus"})},[]),er=x.useCallback(function(){ee({type:"blur"})},[]),Ut=x.useCallback(function(){w||(moe()?setTimeout(sr,0):sr())},[w,sr]),lr=function(Y){return n?null:Y},Jr=function(Y){return C?null:lr(Y)},Lr=function(Y){return S?null:lr(Y)},Ot=function(Y){O&&Y.stopPropagation()},ln=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.role,Ne=F.onKeyDown,ur=F.onFocus,Zr=F.onBlur,un=F.onClick,da=F.onDragEnter,io=F.onDragOver,M=F.onDragLeave,L=F.onDrop,G=Vm(F,xoe);return zt(zt(T_({onKeyDown:Jr(Ua(Ne,jr)),onFocus:Jr(Ua(ur,Je)),onBlur:Jr(Ua(Zr,er)),onClick:lr(Ua(un,Ut)),onDragEnter:Lr(Ua(da,lt)),onDragOver:Lr(Ua(io,Ce)),onDragLeave:Lr(Ua(M,xe)),onDrop:Lr(Ua(L,Nt)),role:typeof be=="string"&&be!==""?be:"presentation"},pe,X),!n&&!C?{tabIndex:0}:{}),G)}},[X,jr,Je,er,Ut,lt,Ce,xe,Nt,C,S,n]),I=x.useCallback(function(F){F.stopPropagation()},[]),ue=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.onChange,Ne=F.onClick,ur=Vm(F,Coe),Zr=T_({accept:R,multiple:s,type:"file",style:{display:"none"},onChange:lr(Ua(be,Nt)),onClick:lr(Ua(Ne,I)),tabIndex:-1},pe,J);return zt(zt({},Zr),ur)}},[J,r,s,Nt,n]);return zt(zt({},H),{},{isFocused:ce&&!n,getRootProps:ln,getInputProps:ue,rootRef:X,inputRef:J,open:lr(sr)})}function Moe(e,t){switch(t.type){case"focus":return zt(zt({},e),{},{isFocused:!0});case"blur":return zt(zt({},e),{},{isFocused:!1});case"openDialog":return zt(zt({},D_),{},{isFileDialogActive:!0});case"closeDialog":return zt(zt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return zt(zt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return zt(zt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return zt({},D_);default:return e}}function XD(){}function Ioe({setFiles:e}){const t={border:"dashed 3px #eee",borderColor:"#eee",borderRadius:"5px",paddingTop:"30px",textAlign:"center",height:"200px"},r={borderColor:"green"},n=x.useCallback(s=>{e(s.map(l=>Object.assign(l,{preview:URL.createObjectURL(l)})))},[e]),{getRootProps:a,getInputProps:i,isDragActive:o}=o2({onDrop:n});return _.jsxs("div",{...a(),style:o?{...t,...r}:t,children:[_.jsx("input",{...i()}),_.jsx(jt,{name:"upload",size:"huge"}),_.jsx(qe,{content:"Drop image here"})]})}/*! + * Cropper.js v1.6.1 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:44:19.860Z + */function JD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function s2(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r
',Zoe=Number.isNaN||fi.isNaN;function Ue(e){return typeof e=="number"&&!Zoe(e)}var fP=function(t){return t>0&&t<1/0};function iw(e){return typeof e>"u"}function pl(e){return P_(e)==="object"&&e!==null}var ese=Object.prototype.hasOwnProperty;function fu(e){if(!pl(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&ese.call(r,"isPrototypeOf")}catch{return!1}}function fn(e){return typeof e=="function"}var tse=Array.prototype.slice;function g2(e){return Array.from?Array.from(e):tse.call(e)}function dr(e,t){return e&&fn(t)&&(Array.isArray(e)||Ue(e.length)?g2(e).forEach(function(r,n){t.call(e,r,n,e)}):pl(e)&&Object.keys(e).forEach(function(r){t.call(e,e[r],r,e)})),e}var It=Object.assign||function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a0&&n.forEach(function(i){pl(i)&&Object.keys(i).forEach(function(o){t[o]=i[o]})}),t},rse=/\.\d*(?:0|9){12}\d*$/;function Tu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return rse.test(e)?Math.round(e*t)/t:e}var nse=/^width|height|left|top|marginLeft|marginTop$/;function xo(e,t){var r=e.style;dr(t,function(n,a){nse.test(a)&&Ue(n)&&(n="".concat(n,"px")),r[a]=n})}function ase(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Cr(e,t){if(t){if(Ue(e.length)){dr(e,function(n){Cr(n,t)});return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function si(e,t){if(t){if(Ue(e.length)){dr(e,function(r){si(r,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function du(e,t,r){if(t){if(Ue(e.length)){dr(e,function(n){du(n,t,r)});return}r?Cr(e,t):si(e,t)}}var ise=/([a-z\d])([A-Z])/g;function IS(e){return e.replace(ise,"$1-$2").toLowerCase()}function L_(e,t){return pl(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(IS(t)))}function kp(e,t,r){pl(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(IS(t)),r)}function ose(e,t){if(pl(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(IS(t)))}var y2=/\s\s*/,w2=function(){var e=!1;if(Fy){var t=!1,r=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(i){t=i}});fi.addEventListener("test",r,n),fi.removeEventListener("test",r,n)}return e}();function ha(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(!w2){var o=e.listeners;o&&o[i]&&o[i][r]&&(a=o[i][r],delete o[i][r],Object.keys(o[i]).length===0&&delete o[i],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(i,a,n)})}function Vn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(n.once&&!w2){var o=e.listeners,s=o===void 0?{}:o;a=function(){delete s[i][r],e.removeEventListener(i,a,n);for(var u=arguments.length,c=new Array(u),f=0;fMath.abs(r)&&(r=d)})}),r}function nv(e,t){var r=e.pageX,n=e.pageY,a={endX:r,endY:n};return t?a:s2({startX:r,startY:n},a)}function use(e){var t=0,r=0,n=0;return dr(e,function(a){var i=a.startX,o=a.startY;t+=i,r+=o,n+=1}),t/=n,r/=n,{pageX:t,pageY:r}}function Co(e){var t=e.aspectRatio,r=e.height,n=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=fP(n),o=fP(r);if(i&&o){var s=r*t;a==="contain"&&s>n||a==="cover"&&s90?{width:l,height:s}:{width:s,height:l}}function fse(e,t,r,n){var a=t.aspectRatio,i=t.naturalWidth,o=t.naturalHeight,s=t.rotate,l=s===void 0?0:s,u=t.scaleX,c=u===void 0?1:u,f=t.scaleY,d=f===void 0?1:f,p=r.aspectRatio,h=r.naturalWidth,v=r.naturalHeight,y=n.fillColor,m=y===void 0?"transparent":y,g=n.imageSmoothingEnabled,E=g===void 0?!0:g,w=n.imageSmoothingQuality,C=w===void 0?"low":w,S=n.maxWidth,O=S===void 0?1/0:S,D=n.maxHeight,N=D===void 0?1/0:D,R=n.minWidth,j=R===void 0?0:R,U=n.minHeight,Q=U===void 0?0:U,X=document.createElement("canvas"),J=X.getContext("2d"),te=Co({aspectRatio:p,width:O,height:N}),ge=Co({aspectRatio:p,width:j,height:Q},"cover"),H=Math.min(te.width,Math.max(ge.width,h)),ee=Math.min(te.height,Math.max(ge.height,v)),ce=Co({aspectRatio:a,width:O,height:N}),_e=Co({aspectRatio:a,width:j,height:Q},"cover"),we=Math.min(ce.width,Math.max(_e.width,i)),rt=Math.min(ce.height,Math.max(_e.height,o)),ye=[-we/2,-rt/2,we,rt];return X.width=Tu(H),X.height=Tu(ee),J.fillStyle=m,J.fillRect(0,0,H,ee),J.save(),J.translate(H/2,ee/2),J.rotate(l*Math.PI/180),J.scale(c,d),J.imageSmoothingEnabled=E,J.imageSmoothingQuality=C,J.drawImage.apply(J,[e].concat(l2(ye.map(function(Le){return Math.floor(Tu(Le))})))),J.restore(),X}var _2=String.fromCharCode;function dse(e,t,r){var n="";r+=t;for(var a=t;a0;)r.push(_2.apply(null,g2(a.subarray(0,n)))),a=a.subarray(n);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}function mse(e){var t=new DataView(e),r;try{var n,a,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(i=u+f)}}}if(i){var d=t.getUint16(i,n),p,h;for(h=0;h=0?i:v2),height:Math.max(n.offsetHeight,o>=0?o:m2)};this.containerData=s,xo(a,{width:s.width,height:s.height}),Cr(t,dn),si(a,dn)},initCanvas:function(){var t=this.containerData,r=this.imageData,n=this.options.viewMode,a=Math.abs(r.rotate)%180===90,i=a?r.naturalHeight:r.naturalWidth,o=a?r.naturalWidth:r.naturalHeight,s=i/o,l=t.width,u=t.height;t.height*s>t.width?n===3?l=t.height*s:u=t.width/s:n===3?u=t.width/s:l=t.height*s;var c={aspectRatio:s,naturalWidth:i,naturalHeight:o,width:l,height:u};this.canvasData=c,this.limited=n===1||n===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=It({},c)},limitCanvas:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=n.viewMode,l=i.aspectRatio,u=this.cropped&&o;if(t){var c=Number(n.minCanvasWidth)||0,f=Number(n.minCanvasHeight)||0;s>1?(c=Math.max(c,a.width),f=Math.max(f,a.height),s===3&&(f*l>c?c=f*l:f=c/l)):s>0&&(c?c=Math.max(c,u?o.width:0):f?f=Math.max(f,u?o.height:0):u&&(c=o.width,f=o.height,f*l>c?c=f*l:f=c/l));var d=Co({aspectRatio:l,width:c,height:f});c=d.width,f=d.height,i.minWidth=c,i.minHeight=f,i.maxWidth=1/0,i.maxHeight=1/0}if(r)if(s>(u?0:1)){var p=a.width-i.width,h=a.height-i.height;i.minLeft=Math.min(0,p),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,p),i.maxTop=Math.max(0,h),u&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,s===2&&(i.width>=a.width&&(i.minLeft=Math.min(0,p),i.maxLeft=Math.max(0,p)),i.height>=a.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=a.width,i.maxTop=a.height},renderCanvas:function(t,r){var n=this.canvasData,a=this.imageData;if(r){var i=cse({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=i.width,s=i.height,l=n.width*(o/n.naturalWidth),u=n.height*(s/n.naturalHeight);n.left-=(l-n.width)/2,n.top-=(u-n.height)/2,n.width=l,n.height=u,n.aspectRatio=o/s,n.naturalWidth=o,n.naturalHeight=s,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightr.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*a),i.height=Math.max(i.minHeight,i.height*a),i.left=r.left+(r.width-i.width)/2,i.top=r.top+(r.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=It({},i)},limitCropBox:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=this.limited,l=n.aspectRatio;if(t){var u=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,f=s?Math.min(a.width,i.width,i.width+i.left,a.width-i.left):a.width,d=s?Math.min(a.height,i.height,i.height+i.top,a.height-i.top):a.height;u=Math.min(u,a.width),c=Math.min(c,a.height),l&&(u&&c?c*l>u?c=u/l:u=c*l:u?c=u/l:c&&(u=c*l),d*l>f?d=f/l:f=d*l),o.minWidth=Math.min(u,f),o.minHeight=Math.min(c,d),o.maxWidth=f,o.maxHeight=d}r&&(s?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(a.width,i.left+i.width)-o.width,o.maxTop=Math.min(a.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,r=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=r.width&&n.height>=r.height?f2:RS),xo(this.cropBox,It({width:n.width,height:n.height},sd({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Du(this.element,R_,this.getData())}},wse={initPreview:function(){var t=this.element,r=this.crossOrigin,n=this.options.preview,a=r?this.crossOriginUrl:this.url,i=t.alt||"The image to preview",o=document.createElement("img");if(r&&(o.crossOrigin=r),o.src=a,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,!!n){var s=n;typeof n=="string"?s=t.ownerDocument.querySelectorAll(n):n.querySelector&&(s=[n]),this.previews=s,dr(s,function(l){var u=document.createElement("img");kp(l,rv,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),r&&(u.crossOrigin=r),u.src=a,u.alt=i,u.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(u)})}},resetPreview:function(){dr(this.previews,function(t){var r=L_(t,rv);xo(t,{width:r.width,height:r.height}),t.innerHTML=r.html,ose(t,rv)})},preview:function(){var t=this.imageData,r=this.canvasData,n=this.cropBoxData,a=n.width,i=n.height,o=t.width,s=t.height,l=n.left-r.left-t.left,u=n.top-r.top-t.top;!this.cropped||this.disabled||(xo(this.viewBoxImage,It({width:o,height:s},sd(It({translateX:-l,translateY:-u},t)))),dr(this.previews,function(c){var f=L_(c,rv),d=f.width,p=f.height,h=d,v=p,y=1;a&&(y=d/a,v=i*y),i&&v>p&&(y=p/i,h=a*y,v=p),xo(c,{width:h,height:v}),xo(c.getElementsByTagName("img")[0],It({width:o*y,height:s*y},sd(It({translateX:-l*y,translateY:-u*y},t))))}))}},bse={bind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&Vn(t,$_,r.cropstart),fn(r.cropmove)&&Vn(t,I_,r.cropmove),fn(r.cropend)&&Vn(t,M_,r.cropend),fn(r.crop)&&Vn(t,R_,r.crop),fn(r.zoom)&&Vn(t,j_,r.zoom),Vn(n,nP,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&Vn(n,lP,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&Vn(n,rP,this.onDblclick=this.dblclick.bind(this)),Vn(t.ownerDocument,aP,this.onCropMove=this.cropMove.bind(this)),Vn(t.ownerDocument,iP,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&Vn(window,sP,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&ha(t,$_,r.cropstart),fn(r.cropmove)&&ha(t,I_,r.cropmove),fn(r.cropend)&&ha(t,M_,r.cropend),fn(r.crop)&&ha(t,R_,r.crop),fn(r.zoom)&&ha(t,j_,r.zoom),ha(n,nP,this.onCropStart),r.zoomable&&r.zoomOnWheel&&ha(n,lP,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&ha(n,rP,this.onDblclick),ha(t.ownerDocument,aP,this.onCropMove),ha(t.ownerDocument,iP,this.onCropEnd),r.responsive&&ha(window,sP,this.onResize)}},_se={resize:function(){if(!this.disabled){var t=this.options,r=this.container,n=this.containerData,a=r.offsetWidth/n.width,i=r.offsetHeight/n.height,o=Math.abs(a-1)>Math.abs(i-1)?a:i;if(o!==1){var s,l;t.restore&&(s=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(dr(s,function(u,c){s[c]=u*o})),this.setCropBoxData(dr(l,function(u,c){l[c]=u*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===h2||this.setDragMode(ase(this.dragBox,A_)?p2:MS)},wheel:function(t){var r=this,n=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*n,t)))},cropStart:function(t){var r=t.buttons,n=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Ue(r)&&r!==1||Ue(n)&&n!==0||t.ctrlKey))){var a=this.options,i=this.pointers,o;t.changedTouches?dr(t.changedTouches,function(s){i[s.identifier]=nv(s)}):i[t.pointerId||0]=nv(t),Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?o=d2:o=L_(t.target,Pp),Koe.test(o)&&Du(this.element,$_,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===c2&&(this.cropping=!0,Cr(this.dragBox,Ym)))}},cropMove:function(t){var r=this.action;if(!(this.disabled||!r)){var n=this.pointers;t.preventDefault(),Du(this.element,I_,{originalEvent:t,action:r})!==!1&&(t.changedTouches?dr(t.changedTouches,function(a){It(n[a.identifier]||{},nv(a,!0))}):It(n[t.pointerId||0]||{},nv(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var r=this.action,n=this.pointers;t.changedTouches?dr(t.changedTouches,function(a){delete n[a.identifier]}):delete n[t.pointerId||0],r&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,du(this.dragBox,Ym,this.cropped&&this.options.modal)),Du(this.element,M_,{originalEvent:t,action:r}))}}},Ese={change:function(t){var r=this.options,n=this.canvasData,a=this.containerData,i=this.cropBoxData,o=this.pointers,s=this.action,l=r.aspectRatio,u=i.left,c=i.top,f=i.width,d=i.height,p=u+f,h=c+d,v=0,y=0,m=a.width,g=a.height,E=!0,w;!l&&t.shiftKey&&(l=f&&d?f/d:1),this.limited&&(v=i.minLeft,y=i.minTop,m=v+Math.min(a.width,n.width,n.left+n.width),g=y+Math.min(a.height,n.height,n.top+n.height));var C=o[Object.keys(o)[0]],S={x:C.endX-C.startX,y:C.endY-C.startY},O=function(N){switch(N){case gs:p+S.x>m&&(S.x=m-p);break;case ys:u+S.xg&&(S.y=g-h);break}};switch(s){case RS:u+=S.x,c+=S.y;break;case gs:if(S.x>=0&&(p>=m||l&&(c<=y||h>=g))){E=!1;break}O(gs),f+=S.x,f<0&&(s=ys,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case fo:if(S.y<=0&&(c<=y||l&&(u<=v||p>=m))){E=!1;break}O(fo),d-=S.y,c+=S.y,d<0&&(s=Ul,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case ys:if(S.x<=0&&(u<=v||l&&(c<=y||h>=g))){E=!1;break}O(ys),f-=S.x,u+=S.x,f<0&&(s=gs,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case Ul:if(S.y>=0&&(h>=g||l&&(u<=v||p>=m))){E=!1;break}O(Ul),d+=S.y,d<0&&(s=fo,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case Sf:if(l){if(S.y<=0&&(c<=y||p>=m)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l}else O(fo),O(gs),S.x>=0?py&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Of,d=-d,f=-f,c-=d,u-=f):f<0?(s=xf,f=-f,u-=f):d<0&&(s=Cf,d=-d,c-=d);break;case xf:if(l){if(S.y<=0&&(c<=y||u<=v)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l,u+=i.width-f}else O(fo),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y<=0&&c<=y&&(E=!1):(f-=S.x,u+=S.x),S.y<=0?c>y&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Cf,d=-d,f=-f,c-=d,u-=f):f<0?(s=Sf,f=-f,u-=f):d<0&&(s=Of,d=-d,c-=d);break;case Of:if(l){if(S.x<=0&&(u<=v||h>=g)){E=!1;break}O(ys),f-=S.x,u+=S.x,d=f/l}else O(Ul),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y>=0&&h>=g&&(E=!1):(f-=S.x,u+=S.x),S.y>=0?h=0&&(p>=m||h>=g)){E=!1;break}O(gs),f+=S.x,d=f/l}else O(Ul),O(gs),S.x>=0?p=0&&h>=g&&(E=!1):f+=S.x,S.y>=0?h0?s=S.y>0?Cf:Sf:S.x<0&&(u-=f,s=S.y>0?Of:xf),S.y<0&&(c-=d),this.cropped||(si(this.cropBox,dn),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}E&&(i.width=f,i.height=d,i.left=u,i.top=c,this.action=s,this.renderCropBox()),dr(o,function(D){D.startX=D.endX,D.startY=D.endY})}},Sse={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Cr(this.dragBox,Ym),si(this.cropBox,dn),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=It({},this.initialImageData),this.canvasData=It({},this.initialCanvasData),this.cropBoxData=It({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(It(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),si(this.dragBox,Ym),Cr(this.cropBox,dn)),this},replace:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),r?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,dr(this.previews,function(n){n.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,si(this.cropper,eP)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Cr(this.cropper,eP)),this},destroy:function(){var t=this.element;return t[Rt]?(t[Rt]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=n.left,i=n.top;return this.moveTo(iw(t)?t:a+Number(t),iw(r)?r:i+Number(r))},moveTo:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&(Ue(t)&&(n.left=t,a=!0),Ue(r)&&(n.top=r,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,r){var n=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(n.width*t/n.naturalWidth,null,r)},zoomTo:function(t,r,n){var a=this.options,i=this.canvasData,o=i.width,s=i.height,l=i.naturalWidth,u=i.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var c=l*t,f=u*t;if(Du(this.element,j_,{ratio:t,oldRatio:o/l,originalEvent:n})===!1)return this;if(n){var d=this.pointers,p=b2(this.cropper),h=d&&Object.keys(d).length?use(d):{pageX:n.pageX,pageY:n.pageY};i.left-=(c-o)*((h.pageX-p.left-i.left)/o),i.top-=(f-s)*((h.pageY-p.top-i.top)/s)}else fu(r)&&Ue(r.x)&&Ue(r.y)?(i.left-=(c-o)*((r.x-i.left)/o),i.top-=(f-s)*((r.y-i.top)/s)):(i.left-=(c-o)/2,i.top-=(f-s)/2);i.width=c,i.height=f,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Ue(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var r=this.imageData.scaleY;return this.scale(t,Ue(r)?r:1)},scaleY:function(t){var r=this.imageData.scaleX;return this.scale(Ue(r)?r:1,t)},scale:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&(Ue(t)&&(n.scaleX=t,a=!0),Ue(r)&&(n.scaleY=r,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,n=this.imageData,a=this.canvasData,i=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:i.left-a.left,y:i.top-a.top,width:i.width,height:i.height};var s=n.width/n.naturalWidth;if(dr(o,function(c,f){o[f]=c/s}),t){var l=Math.round(o.y+o.height),u=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=u-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return r.rotatable&&(o.rotate=n.rotate||0),r.scalable&&(o.scaleX=n.scaleX||1,o.scaleY=n.scaleY||1),o},setData:function(t){var r=this.options,n=this.imageData,a=this.canvasData,i={};if(this.ready&&!this.disabled&&fu(t)){var o=!1;r.rotatable&&Ue(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),r.scalable&&(Ue(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),Ue(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=n.width/n.naturalWidth;Ue(t.x)&&(i.left=t.x*s+a.left),Ue(t.y)&&(i.top=t.y*s+a.top),Ue(t.width)&&(i.width=t.width*s),Ue(t.height)&&(i.height=t.height*s),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?It({},this.containerData):{}},getImageData:function(){return this.sized?It({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,r={};return this.ready&&dr(["left","top","width","height","naturalWidth","naturalHeight"],function(n){r[n]=t[n]}),r},setCanvasData:function(t){var r=this.canvasData,n=r.aspectRatio;return this.ready&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)?(r.width=t.width,r.height=t.width/n):Ue(t.height)&&(r.height=t.height,r.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:t.left,top:t.top,width:t.width,height:t.height}),r||{}},setCropBoxData:function(t){var r=this.cropBoxData,n=this.options.aspectRatio,a,i;return this.ready&&this.cropped&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)&&t.width!==r.width&&(a=!0,r.width=t.width),Ue(t.height)&&t.height!==r.height&&(i=!0,r.height=t.height),n&&(a?r.height=r.width/n:i&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,n=fse(this.image,this.imageData,r,t);if(!this.cropped)return n;var a=this.getData(t.rounded),i=a.x,o=a.y,s=a.width,l=a.height,u=n.width/Math.floor(r.naturalWidth);u!==1&&(i*=u,o*=u,s*=u,l*=u);var c=s/l,f=Co({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Co({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=Co({aspectRatio:c,width:t.width||(u!==1?n.width:s),height:t.height||(u!==1?n.height:l)}),h=p.width,v=p.height;h=Math.min(f.width,Math.max(d.width,h)),v=Math.min(f.height,Math.max(d.height,v));var y=document.createElement("canvas"),m=y.getContext("2d");y.width=Tu(h),y.height=Tu(v),m.fillStyle=t.fillColor||"transparent",m.fillRect(0,0,h,v);var g=t.imageSmoothingEnabled,E=g===void 0?!0:g,w=t.imageSmoothingQuality;m.imageSmoothingEnabled=E,w&&(m.imageSmoothingQuality=w);var C=n.width,S=n.height,O=i,D=o,N,R,j,U,Q,X;O<=-s||O>C?(O=0,N=0,j=0,Q=0):O<=0?(j=-O,O=0,N=Math.min(C,s+O),Q=N):O<=C&&(j=0,N=Math.min(s,C-O),Q=N),N<=0||D<=-l||D>S?(D=0,R=0,U=0,X=0):D<=0?(U=-D,D=0,R=Math.min(S,l+D),X=R):D<=S&&(U=0,R=Math.min(l,S-D),X=R);var J=[O,D,N,R];if(Q>0&&X>0){var te=h/s;J.push(j*te,U*te,Q*te,X*te)}return m.drawImage.apply(m,[n].concat(l2(J.map(function(ge){return Math.floor(Tu(ge))})))),y},setAspectRatio:function(t){var r=this.options;return!this.disabled&&!iw(t)&&(r.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var r=this.options,n=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var i=t===MS,o=r.movable&&t===p2;t=i||o?t:h2,r.dragMode=t,kp(n,Pp,t),du(n,A_,i),du(n,N_,o),r.cropBoxMovable||(kp(a,Pp,t),du(a,A_,i),du(a,N_,o))}return this}},xse=fi.Cropper,E2=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if($oe(this,e),!t||!Xoe.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=It({},cP,fu(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return joe(e,[{key:"init",value:function(){var r=this.element,n=r.tagName.toLowerCase(),a;if(!r[Rt]){if(r[Rt]=this,n==="img"){if(this.isImg=!0,a=r.getAttribute("src")||"",this.originalUrl=a,!a)return;a=r.src}else n==="canvas"&&window.HTMLCanvasElement&&(a=r.toDataURL());this.load(a)}}},{key:"load",value:function(r){var n=this;if(r){this.url=r,this.imageData={};var a=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(qoe.test(r)){Qoe.test(r)?this.read(hse(r)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==uP&&o.abort()},o.onload=function(){n.read(o.response)},o.onloadend=function(){n.reloading=!1,n.xhr=null},i.checkCrossOrigin&&dP(r)&&a.crossOrigin&&(r=pP(r)),o.open("GET",r,!0),o.responseType="arraybuffer",o.withCredentials=a.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(r){var n=this.options,a=this.imageData,i=mse(r),o=0,s=1,l=1;if(i>1){this.url=vse(r,uP);var u=gse(i);o=u.rotate,s=u.scaleX,l=u.scaleY}n.rotatable&&(a.rotate=o),n.scalable&&(a.scaleX=s,a.scaleY=l),this.clone()}},{key:"clone",value:function(){var r=this.element,n=this.url,a=r.crossOrigin,i=n;this.options.checkCrossOrigin&&dP(n)&&(a||(a="anonymous"),i=pP(n)),this.crossOrigin=a,this.crossOriginUrl=i;var o=document.createElement("img");a&&(o.crossOrigin=a),o.src=i||n,o.alt=r.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),Cr(o,tP),r.parentNode.insertBefore(o,r.nextSibling)}},{key:"start",value:function(){var r=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var a=fi.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(fi.navigator.userAgent),i=function(u,c){It(r.imageData,{naturalWidth:u,naturalHeight:c,aspectRatio:u/c}),r.initialImageData=It({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(n.naturalWidth&&!a){i(n.naturalWidth,n.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){i(o.width,o.height),a||s.removeChild(o)},o.src=n.src,a||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(o))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,n=this.options,a=this.image,i=r.parentNode,o=document.createElement("div");o.innerHTML=Joe;var s=o.querySelector(".".concat(Rt,"-container")),l=s.querySelector(".".concat(Rt,"-canvas")),u=s.querySelector(".".concat(Rt,"-drag-box")),c=s.querySelector(".".concat(Rt,"-crop-box")),f=c.querySelector(".".concat(Rt,"-face"));this.container=i,this.cropper=s,this.canvas=l,this.dragBox=u,this.cropBox=c,this.viewBox=s.querySelector(".".concat(Rt,"-view-box")),this.face=f,l.appendChild(a),Cr(r,dn),i.insertBefore(s,r.nextSibling),si(a,tP),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,Cr(c,dn),n.guides||Cr(c.getElementsByClassName("".concat(Rt,"-dashed")),dn),n.center||Cr(c.getElementsByClassName("".concat(Rt,"-center")),dn),n.background&&Cr(s,"".concat(Rt,"-bg")),n.highlight||Cr(f,Hoe),n.cropBoxMovable&&(Cr(f,N_),kp(f,Pp,RS)),n.cropBoxResizable||(Cr(c.getElementsByClassName("".concat(Rt,"-line")),dn),Cr(c.getElementsByClassName("".concat(Rt,"-point")),dn)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),fn(n.ready)&&Vn(r,oP,n.ready,{once:!0}),Du(r,oP)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),si(this.element,dn)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=xse,e}},{key:"setDefaults",value:function(r){It(cP,fu(r)&&r)}}]),e}();It(E2.prototype,yse,wse,bse,_se,Ese,Sse);var Cs=function(){return Cs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&D.zoomTo(ge)}(O.currentTarget.cropper,E),y&&y(O)}}));m&&m(S)}return function(){var O,D;(D=(O=w.current)===null||O===void 0?void 0:O.cropper)===null||D===void 0||D.destroy()}},[w]);var C=function(S){return Cse.reduce(function(O,D){var N=O,R=D;return N[R],sw(N,[typeof R=="symbol"?R:R+""])},S)}(Cs(Cs({},g),{crossOrigin:l,src:i,alt:v}));return b.createElement("div",{style:o,className:s},b.createElement("img",Cs({},C,{style:Ose,ref:w})))});function Dse({imagePreview:e,setCropper:t}){return _.jsx(Tse,{src:e,style:{height:200,width:"100%"},initialAspectRatio:1,aspectRatio:1,preview:".img-preview",guides:!1,viewMode:1,autoCropArea:1,background:!1,onInitialized:r=>t(r)})}function Pse({loading:e,uploadPhoto:t}){const[r,n]=x.useState([]),[a,i]=x.useState();function o(){a&&a.getCroppedCanvas().toBlob(s=>t(s))}return x.useEffect(()=>()=>{r.forEach(s=>URL.revokeObjectURL(s.preview))},[r]),_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 1 - Add Photo"}),_.jsx(Ioe,{setFiles:n})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 2 - Resize Image"}),r&&r.length>0&&_.jsx(Dse,{setCropper:i,imagePreview:r[0].preview})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 3 - preview & Upload"}),r&&r.length>0&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"img-preview",style:{minHeight:200,overflow:"hidden"}}),_.jsxs($e.Group,{widths:2,children:[_.jsx($e,{loading:e,onClick:o,positive:!0,icon:"check"}),_.jsx($e,{disabled:e,onClick:()=>n([]),icon:"close"})]})]})]})]})}const kse=wt(function({profile:t}){var v;const{profileStore:{isCurrentUser:r,uploadPhoto:n,uploading:a,loading:i,setMainPhoto:o,deletePhoto:s}}=Ft(),[l,u]=x.useState(!1),[c,f]=x.useState("");function d(y){n(y).then(()=>u(!1))}function p(y,m){f(m.currentTarget.name),o(y)}function h(y,m){f(m.currentTarget.name),s(y)}return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:16,children:[_.jsx(qe,{floated:"left",icon:"image",content:"Photos"}),r&&_.jsx($e,{floated:"right",basic:!0,content:l?"Cancel":"Add Photo",onClick:()=>u(!l)})]}),_.jsx(Oe.Column,{width:16,children:l?_.jsx(Pse,{uploadPhoto:d,loading:a}):_.jsx(nr.Group,{itemsPerRow:5,children:(v=t.photos)==null?void 0:v.map(y=>_.jsxs(nr,{children:[_.jsx(qt,{src:y.url||"/assets/user.png"}),r&&_.jsxs($e.Group,{fluid:!0,widths:2,children:[_.jsx($e,{basic:!0,color:"green",content:"Main",name:"main"+y.id,disabled:y.isMain,loading:c==="main"+y.id&&i,onClick:m=>p(y,m)}),_.jsx($e,{basic:!0,color:"red",icon:"trash",name:y.id,loading:c===y.id&&i,onClick:m=>h(y,m),disabled:y.isMain})]})]},y.id))})})]})})}),Ase=wt(function({setEditMode:t}){const{profileStore:{profile:r,updateProfile:n}}=Ft();return _.jsx(ah,{initialValues:{displayName:r==null?void 0:r.displayName,bio:(r==null?void 0:r.bio)||""},onSubmit:a=>{n(a).then(()=>{t(!1)})},validationSchema:ih({displayName:Pn().required()}),children:({isSubmitting:a,isValid:i,dirty:o})=>_.jsxs(my,{className:"ui form",children:[_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(G$,{rows:3,placeholder:"Add your bio",name:"bio"}),_.jsx($e,{positive:!0,type:"submit",loading:a,content:"Update profile",floated:"right",disabled:!i||!o})]})})}),Nse=wt(function(){const{profileStore:t}=Ft(),{isCurrentUser:r,profile:n}=t,[a,i]=x.useState(!1);return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:"16",children:[_.jsx(qe,{floated:"left",icon:"user",content:`About ${n==null?void 0:n.displayName}`}),r&&_.jsx($e,{floated:"right",basic:!0,content:a?"Cancel":"Edit Profile",onClick:()=>i(!a)})]}),_.jsx(Oe.Column,{width:"16",children:a?_.jsx(Ase,{setEditMode:i}):_.jsx("span",{style:{whiteSpace:"pre-wrap"},children:n==null?void 0:n.bio})})]})})}),hP=wt(function(){const{profileStore:t}=Ft(),{profile:r,followings:n,loadingFollowings:a,activeTab:i}=t;return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"16",children:_.jsx(qe,{floated:"left",icon:"user",content:i===3?`People following ${r.displayName}`:`People ${r==null?void 0:r.displayName} is following`})}),_.jsx(Oe.Column,{width:16,children:_.jsx(nr.Group,{itemsPerRow:4,children:n.map(o=>_.jsx(s$,{profile:o},o.username))})})]})})}),vP=[{menuItem:"Future Events",pane:{key:"future"}},{menuItem:"Past Events",pane:{key:"past"}},{menuItem:"Hosting",pane:{key:"hosting"}}],Rse=wt(function(){const{profileStore:t}=Ft(),{loadUserActivities:r,profile:n,loadingActivities:a,userActivities:i}=t;x.useEffect(()=>{r(n.username)},[r,n]);const o=(s,l)=>{r(n.username,vP[l.activeIndex].pane.key)};return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:16,children:_.jsx(qe,{floated:"left",icon:"calendar",content:"Activities"})}),_.jsxs(Oe.Column,{width:16,children:[_.jsx(mc,{panes:vP,menu:{secondary:!0,pointing:!0},onTabChange:(s,l)=>o(s,l)}),_.jsx("br",{}),_.jsx(nr.Group,{itemsPerRow:4,children:i.map(s=>_.jsxs(nr,{as:an,to:`/activities/${s.id}`,children:[_.jsx(qt,{src:`/assets/categoryImages/${s.category}.jpg`,style:{minHeight:100,objectFit:"cover"}}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{textAlign:"center",children:s.title}),_.jsxs(nr.Meta,{textAlign:"center",children:[_.jsx("div",{children:ci(new Date(s.date),"do LLL")}),_.jsx("div",{children:ci(new Date(s.date),"h:mm a")})]})]})]},s.id))})]})]})})}),Mse=wt(function({profile:t}){const{profileStore:r}=Ft(),n=[{menuItem:"About",render:()=>_.jsx(Nse,{})},{menuItem:"Photos",render:()=>_.jsx(kse,{profile:t})},{menuItem:"Events",render:()=>_.jsx(Rse,{})},{menuItem:"Followers",render:()=>_.jsx(hP,{})},{menuItem:"Following",render:()=>_.jsx(hP,{})}];return _.jsx(mc,{menu:{fluid:!0,vertical:!0},menuPosition:"right",panes:n,onTabChange:(a,i)=>r.setActiveTab(i.activeIndex)})}),Ise=wt(function(){const{username:t}=eE(),{profileStore:r}=Ft(),{loadProfile:n,loadingProfile:a,profile:i,setActiveTab:o}=r;return x.useEffect(()=>(t&&n(t),()=>{o(0)}),[n,t]),a?_.jsx(Sy,{content:"Loading Profile..."}):_.jsx(Oe,{children:_.jsx(Oe.Column,{width:16,children:i&&_.jsxs(_.Fragment,{children:[_.jsx(Bie,{profile:i}),_.jsx(Mse,{profile:i})]})})})});function $se(){const{userStore:{isLoggedIn:e}}=Ft(),t=hi();return e?_.jsx(ER,{}):_.jsx(_R,{to:"/",state:{from:t}})}function F_(){return new URLSearchParams(hi().search)}function jse(){const e=F_().get("email");function t(){Vt.Account.resendEmailConfirm(e).then(()=>{ct.success("verification email resent - please check your email")}).catch(r=>console.log(r))}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,color:"green",children:[_.jsx(jt,{name:"check"}),"Successfully registered!"]}),_.jsx("p",{children:"Please check your email (including junk email) fot the verification email"}),e&&_.jsxs(_.Fragment,{children:[_.jsx("p",{children:"Didn't receive the email? Click the below button to resend"}),_.jsx($e,{primary:!0,onClick:t,content:"Resend Email",size:"huge"})]})]})}function Lse(){const{modalStore:e}=Ft(),t=F_().get("email"),r=F_().get("token"),n={Verifying:"Verifying",Failed:"Failed",Success:"Success"},[a,i]=x.useState(n.Verifying);function o(){Vt.Account.resendEmailConfirm(t).then(()=>{ct.success("verification email resent - please check your email")}).catch(l=>console.log(l))}x.useEffect(()=>{Vt.Account.verifyEmail(r,t).then(()=>{i(n.Success)}).catch(()=>{i(n.Failed)})},[n.Verifying,n.Failed,n.Success,r,t]);function s(){switch(a){case n.Verifying:return _.jsx("p",{children:"Verifying..."});case n.Failed:return _.jsxs("div",{children:[_.jsx("p",{children:"Verification failed. You can try resending the verify link to your email"}),_.jsx($e,{primary:!0,onClick:o,size:"huge",content:"Resend email"})]});case n.Success:return _.jsxs("div",{children:[_.jsx("p",{children:"Email has been verified - you can now login"}),_.jsx($e,{primary:!0,onClick:()=>e.openModal(_.jsx(PI,{})),size:"huge",content:"Login"})]})}}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"envelope"}),"Email verification"]}),_.jsx(je.Inline,{children:s()})]})}const Fse=[{path:"/",element:_.jsx($Q,{}),children:[{element:_.jsx($se,{}),children:[{path:"activities",element:_.jsx(Zte,{})},{path:"activities/:id",element:_.jsx(jie,{})},{path:"createActivity",element:_.jsx(FD,{},"create")},{path:"manage/:id",element:_.jsx(FD,{},"manage")},{path:"profiles/:username",element:_.jsx(Ise,{})},{path:"errors",element:_.jsx(Lie,{})}]},{path:"not-found",element:_.jsx(Fie,{})},{path:"server-error",element:_.jsx(Uie,{})},{path:"account/registerSuccess",element:_.jsx(jse,{})},{path:"account/verifyEmail",element:_.jsx(Lse,{})},{path:"*",element:_.jsx(_R,{replace:!0,to:"/not-found"})}]}],Oo=P4(Fse);tn.defaults.baseURL="/api";tn.interceptors.request.use(e=>{const t=yt.commonStore.token;return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e});tn.interceptors.response.use(async e=>{const t=e.headers.pagination;return t&&(e.data=new Jte(e.data,JSON.parse(t))),e},e=>{var i;console.log(e);const{data:t,status:r,config:n,headers:a}=e.response;switch(r){case 400:if(n.method==="get"&&Object.prototype.hasOwnProperty.call(t.errors,"id")&&Oo.navigate("/not-found"),t.errors){const o=[];for(const s in t.errors)t.errors[s]&&o.push(t.errors[s]);throw o.flat()}else ct.error(t);break;case 401:r===401&&((i=a["www-authenticate"])!=null&&i.startsWith('Bearer error="invalid_token"'))?(yt.userStore.logout(),ct.error("Session expired - please login again")):ct.error("unauthorized");break;case 403:ct.error("forbiddent");break;case 404:Oo.navigate("/not-found");break;case 500:yt.commonStore.setServerError(t),Oo.navigate("/server-error");break}return Promise.reject(e)});const jf=e=>e.data,gr={get:e=>tn.get(e).then(jf),post:(e,t)=>tn.post(e,t).then(jf),put:(e,t)=>tn.put(e,t).then(jf),del:e=>tn.delete(e).then(jf)},Use={list:e=>tn.get("/activities",{params:e}).then(jf),details:e=>gr.get(`/activities/${e}`),create:e=>gr.post("/activities",e),update:e=>gr.put(`/activities/${e.id}`,e),delete:e=>gr.del(`/activities/${e}`),attend:e=>gr.post(`/activities/${e}/attend`,{})},Bse={current:()=>gr.get("/account"),login:e=>gr.post("/account/login",e),register:e=>gr.post("/account/register",e),fbLogin:e=>gr.post(`/account/fbLogin?accessToken=${e}`,{}),refreshToken:()=>gr.post("/account/refreshToken",{}),verifyEmail:(e,t)=>gr.post(`/account/verifyEmail?token=${e}&email=${t}`,{}),resendEmailConfirm:e=>gr.get(`/account/resendEmailConfirmationLink?email=${e}`)},zse={get:e=>gr.get(`/profiles/${e}`),uploadPhoto:e=>{let t=new FormData;return t.append("File",e),tn.post("photos",t,{headers:{"Content-Type":"multipart/form-data"}})},setMainPhoto:e=>gr.post(`/photos/${e}/setMain`,{}),deletePhoto:e=>gr.del(`/photos/${e}`),updateProfile:e=>gr.put("/profiles",e),updateFollowing:e=>gr.post(`/follow/${e}`,{}),listFollowings:(e,t)=>gr.get(`/follow/${e}?predicate=${t}`),listActivities:(e,t)=>gr.get(`/profiles/${e}/activities?predicate=${t}`)},Vt={Activities:Use,Account:Bse,Profiles:zse};class mP{constructor(t){Z(this,"username");Z(this,"displayName");Z(this,"image");Z(this,"bio");Z(this,"followersCount",0);Z(this,"followingCount",0);Z(this,"following",!1);Z(this,"photos");this.username=t.username,this.displayName=t.displayName,this.image=t.image}}class Wse{constructor(){Z(this,"activityRegistry",new Map);Z(this,"selectedActivity");Z(this,"editMode",!1);Z(this,"loading",!1);Z(this,"loadingInitial",!1);Z(this,"pagination",null);Z(this,"pagingParams",new l_);Z(this,"predicate",new Map().set("all",!0));Z(this,"setPredicate",(t,r)=>{const n=()=>{this.predicate.forEach((a,i)=>{i!=="startDate"&&this.predicate.delete(i)})};switch(t){case"all":n(),this.predicate.set("all",!0);break;case"isGoing":n(),this.predicate.set("isGoing",!0);break;case"isHost":n(),this.predicate.set("isHost",!0);break;case"startDate":this.predicate.delete("startDate"),this.predicate.set("startDate",r);break}});Z(this,"setPagingParams",t=>{this.pagingParams=t});Z(this,"loadActivities",async()=>{this.setLoadingInitial(!0);try{const t=await Vt.Activities.list(this.axiosParams);t.data.forEach(r=>{this.setActivity(r)}),this.setPagination(t.pagination),this.setLoadingInitial(!1)}catch(t){console.log(t),this.setLoadingInitial(!1)}});Z(this,"setPagination",t=>{this.pagination=t});Z(this,"loadActivity",async t=>{let r=this.getActivity(t);if(r)return this.selectedActivity=r,r;this.setLoadingInitial(!0);try{return r=await Vt.Activities.details(t),this.setActivity(r),Ze(()=>this.selectedActivity=r),this.setLoadingInitial(!1),r}catch(n){console.log(n),this.setLoadingInitial(!1)}});Z(this,"getActivity",t=>this.activityRegistry.get(t));Z(this,"setActivity",t=>{var n;const r=yt.userStore.user;r&&(t.isGoing=t.attendees.some(a=>a.username===r.username),t.isHost=t.hostUsername===r.username,t.host=(n=t.attendees)==null?void 0:n.find(a=>a.username===t.hostUsername)),t.date=new Date(t.date),this.activityRegistry.set(t.id,t)});Z(this,"setLoadingInitial",t=>{this.loadingInitial=t});Z(this,"createActivity",async t=>{const r=yt.userStore.user,n=new mP(r);try{await Vt.Activities.create(t);const a=new H3(t);a.hostUsername=r==null?void 0:r.username,a.attendees=[n],this.setActivity(a),Ze(()=>{this.selectedActivity=a})}catch(a){console.log(a)}});Z(this,"updateActivity",async t=>{try{await Vt.Activities.update(t),Ze(()=>{if(t.id){const r={...this.getActivity(t.id),...t};this.activityRegistry.set(t.id,r),this.selectedActivity=r}})}catch(r){console.log(r)}});Z(this,"deleteActivity",async t=>{this.loading=!0;try{await Vt.Activities.delete(t),Ze(()=>{this.activityRegistry.delete(t),this.loading=!1})}catch(r){console.log(r),Ze(()=>{this.loading=!1})}});Z(this,"updateAttendance",async()=>{const t=yt.userStore.user;this.loading=!0;try{await Vt.Activities.attend(this.selectedActivity.id),Ze(()=>{var r,n,a,i;if((r=this.selectedActivity)!=null&&r.isGoing)this.selectedActivity.attendees=(n=this.selectedActivity.attendees)==null?void 0:n.filter(o=>o.username!==(t==null?void 0:t.username)),this.selectedActivity.isGoing=!1;else{const o=new mP(t);(i=(a=this.selectedActivity)==null?void 0:a.attendees)==null||i.push(o),this.selectedActivity.isGoing=!0}this.activityRegistry.set(this.selectedActivity.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>this.loading=!1)}});Z(this,"cancelActivityToggle",async()=>{var t;this.loading=!0;try{await Vt.Activities.attend((t=this.selectedActivity)==null?void 0:t.id),Ze(()=>{var r,n;this.selectedActivity.isCancelled=!((r=this.selectedActivity)!=null&&r.isCancelled),this.activityRegistry.set((n=this.selectedActivity)==null?void 0:n.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"clearSelectedActivity",()=>{this.selectedActivity=void 0});Z(this,"updateAttendeeFollowing",t=>{this.activityRegistry.forEach(r=>{r.attendees.forEach(n=>{n.username==t&&(n.following?n.followersCount--:n.followersCount++,n.following=!n.following)})})});Ic(this),B1(()=>this.predicate.keys(),()=>{this.pagingParams=new l_,this.activityRegistry.clear(),this.loadActivities()})}get axiosParams(){const t=new URLSearchParams;return t.append("pageNumber",this.pagingParams.pageNumber.toString()),t.append("pageSize",this.pagingParams.pageSize.toString()),this.predicate.forEach((r,n)=>{n==="startDate"?t.append(n,r.toISOString()):t.append(n,r)}),t}get activitiesByDate(){return Array.from(this.activityRegistry.values()).sort((t,r)=>t.date.getTime()-r.date.getTime())}get groupedAcivities(){return Object.entries(this.activitiesByDate.reduce((t,r)=>{const n=ci(r.date,"dd MMM yyyy");return t[n]=t[n]?[...t[n],r]:[r],t},{}))}}class Hse{constructor(){Z(this,"error",null);Z(this,"token",localStorage.getItem("jwt"));Z(this,"appLoaded",!1);Z(this,"setToken",t=>{this.token=t});Z(this,"setAppLoaded",()=>{this.appLoaded=!0});Ic(this),B1(()=>this.token,t=>{t?localStorage.setItem("jwt",t):localStorage.removeItem("jwt")})}setServerError(t){this.error=t}}class Vse{constructor(){Z(this,"user",null);Z(this,"fbLoading",!1);Z(this,"refreshTokenTimeout");Z(this,"login",async t=>{const r=await Vt.Account.login(t);yt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>this.user=r),Oo.navigate("/activities"),yt.modalStore.closeModal()});Z(this,"register",async t=>{await Vt.Account.register(t),Oo.navigate(`/account/registerSuccess?email=${t.email}`),yt.modalStore.closeModal()});Z(this,"logout",()=>{yt.commonStore.setToken(null),this.user=null,Oo.navigate("/")});Z(this,"getUser",async()=>{try{const t=await Vt.Account.current();yt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t),Ze(()=>{this.user=t})}catch(t){console.log(t)}});Z(this,"setImage",t=>{this.user&&(this.user.image=t)});Z(this,"setDisplayName",t=>{this.user&&(this.user.displayName=t)});Z(this,"facebookLogin",async t=>{try{this.fbLoading=!0;const r=await Vt.Account.fbLogin(t);yt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>{this.user=r,this.fbLoading=!1}),Oo.navigate("/activities")}catch(r){console.log(r),Ze(()=>{this.fbLoading=!1})}});Z(this,"refreshToken",async()=>{this.stopRefreshTokenTimer();try{const t=await Vt.Account.refreshToken();Ze(()=>this.user=t),yt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t)}catch(t){console.log(t)}});Ic(this)}get isLoggedIn(){return!!this.user}startRefreshTokenTimer(t){const r=JSON.parse(atob(t.token.split(".")[1])),a=new Date(r.exp*1e3).getTime()-Date.now()-60*1e3;this.refreshTokenTimeout=setTimeout(this.refreshToken,a),console.log({refreshTimeout:this.refreshTokenTimeout})}stopRefreshTokenTimer(){clearTimeout(this.refreshTokenTimeout)}}class Yse{constructor(){Z(this,"modal",{open:!1,body:null});Z(this,"openModal",t=>{this.modal.open=!0,this.modal.body=t});Z(this,"closeModal",()=>{this.modal.open=!1,this.modal.body=null});Ic(this)}}class Gse{constructor(){Z(this,"profile",null);Z(this,"loadingProfile",!1);Z(this,"uploading",!1);Z(this,"loading",!1);Z(this,"followings",[]);Z(this,"loadingFollowings",!1);Z(this,"activeTab",0);Z(this,"userActivities",[]);Z(this,"loadingActivities",!1);Z(this,"setActiveTab",t=>{this.activeTab=t});Z(this,"loadProfile",async t=>{this.loadingProfile=!0;try{const r=await Vt.Profiles.get(t);Ze(()=>{this.profile=r})}catch(r){console.log(r)}finally{Ze(()=>{this.loadingProfile=!1})}});Z(this,"uploadPhoto",async t=>{this.uploading=!0;try{const n=(await Vt.Profiles.uploadPhoto(t)).data;Ze(()=>{var a;this.profile&&((a=this.profile.photos)==null||a.push(n),n.isMain&&yt.userStore.user&&(yt.userStore.setImage(n.url),this.profile.image=n.url))})}catch(r){console.log(r)}finally{Ze(()=>{this.uploading=!1})}});Z(this,"setMainPhoto",async t=>{this.loading=!0;try{await Vt.Profiles.setMainPhoto(t.id),yt.userStore.setImage(t.url),Ze(()=>{this.profile&&this.profile.photos&&(this.profile.photos.find(r=>r.isMain).isMain=!1,this.profile.photos.find(r=>r.id===t.id).isMain=!0,this.profile.image=t.url)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"deletePhoto",async t=>{this.loading=!0;try{await Vt.Profiles.deletePhoto(t.id),Ze(()=>{var r;this.profile&&(this.profile.photos=(r=this.profile.photos)==null?void 0:r.filter(n=>n.id!==t.id))})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"updateProfile",async t=>{this.loading=!0;try{await Vt.Profiles.updateProfile(t),Ze(()=>{var r;t.displayName&&t.displayName!==((r=yt.userStore.user)==null?void 0:r.displayName)&&yt.userStore.setDisplayName(t.displayName),this.profile={...this.profile,...t},this.loading=!1})}catch(r){console.log(r),Ze(()=>this.loading=!1)}});Z(this,"updateFollowing",async(t,r)=>{this.loading=!0;try{await Vt.Profiles.updateFollowing(t),yt.activityStore.updateAttendeeFollowing(t),Ze(()=>{var n,a;this.profile&&this.profile.username!==((n=yt.userStore.user)==null?void 0:n.username)&&this.profile.username===t&&(r?this.profile.followersCount++:this.profile.followersCount--,this.profile.following=!this.profile.following),this.profile&&this.profile.username===((a=yt.userStore.user)==null?void 0:a.username)&&(r?this.profile.followersCount++:this.profile.followersCount--),this.followings.forEach(i=>{i.username==t&&(i.following?i.followersCount--:i.followersCount++,i.following=!i.following)}),this.loading=!1})}catch(n){console.log(n),Ze(()=>this.loading=!1)}});Z(this,"loadFollowings",async t=>{this.loadingFollowings=!0;try{const r=await Vt.Profiles.listFollowings(this.profile.username,t);Ze(()=>{this.followings=r,this.loadingFollowings=!1})}catch(r){console.log(r),Ze(()=>this.loadingFollowings=!1)}});Z(this,"loadUserActivities",async(t,r)=>{this.loadingActivities=!0;try{const n=await Vt.Profiles.listActivities(t,r);Ze(()=>{this.userActivities=n,this.loadingActivities=!1})}catch(n){console.log(n),Ze(()=>{this.loadingActivities=!1})}});Ic(this),B1(()=>this.activeTab,t=>{if(t===3||t===4){const r=t===3?"followers":"following";this.loadFollowings(r)}else this.followings=[]})}get isCurrentUser(){return yt.userStore.user&&this.profile?yt.userStore.user.username===this.profile.username:!1}}class Pc extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class $S extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class xa extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Kse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Xse extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Jse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class S2{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Uy{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var B;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(B||(B={}));class Ap{constructor(){}log(t,r){}}Ap.instance=new Ap;const Zse="7.0.12";class Dr{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class Tr{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Np(e,t){let r="";return yh(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${ele(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function ele(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const a=n<16?"0":"";r+=`0x${a}${n.toString(16)} `}),r.substr(0,r.length-1)}function yh(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function x2(e,t,r,n,a,i){const o={},[s,l]=kc();o[s]=l,e.log(B.Trace,`(${t} transport) sending data. ${Np(a,i.logMessageContent)}.`);const u=yh(a)?"arraybuffer":"text",c=await r.post(n,{content:a,headers:{...o,...i.headers},responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});e.log(B.Trace,`(${t} transport) request complete. Response status: ${c.statusCode}.`)}function tle(e){return e===void 0?new Gm(B.Information):e===null?Ap.instance:e.log!==void 0?e:new Gm(e)}class rle{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class Gm{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${B[t]}: ${r}`;switch(t){case B.Critical:case B.Error:this.out.error(n);break;case B.Warning:this.out.warn(n);break;case B.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function kc(){let e="X-SignalR-User-Agent";return Tr.isNode&&(e="User-Agent"),[e,nle(Zse,ale(),ole(),ile())]}function nle(e,t,r,n){let a="Microsoft SignalR/";const i=e.split(".");return a+=`${i[0]}.${i[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${r}`,n?a+=`; ${n}`:a+="; Unknown Runtime Version",a+=")",a}function ale(){if(Tr.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function ile(){if(Tr.isNode)return process.versions.node}function ole(){return Tr.isNode?"NodeJS":"Browser"}function gP(e){return e.stack?e.stack:e.message?e.message:`${e}`}function sle(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class lle extends Uy{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,this._fetchType=r("node-fetch"),this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(sle());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new xa;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new xa});let a=null;if(t.timeout){const l=t.timeout;a=setTimeout(()=>{r.abort(),this._logger.log(B.Warning,"Timeout from HTTP request."),n=new $S},l)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},yh(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(l){throw n||(this._logger.log(B.Warning,`Error from HTTP request. ${l}.`),l)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!i.ok){const l=await yP(i,"text");throw new Pc(l||i.statusText,i.status)}const s=await yP(i,t.responseType);return new S2(i.status,i.statusText,s)}getCookieString(t){let r="";return Tr.isNode&&this._jar&&this._jar.getCookies(t,(n,a)=>r=a.join("; ")),r}}function yP(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class ule extends Uy{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?new Promise((r,n)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(yh(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(o=>{a.setRequestHeader(o,i[o])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),n(new xa)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?r(new S2(a.status,a.statusText,a.response||a.responseText)):n(new Pc(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(B.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),n(new Pc(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(B.Warning,"Timeout from HTTP request."),n(new $S)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class cle extends Uy{constructor(t){if(super(),typeof fetch<"u"||Tr.isNode)this._httpClient=new lle(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new ule(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class An{static write(t){return`${t}${An.RecordSeparator}`}static parse(t){if(t[t.length-1]!==An.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(An.RecordSeparator);return r.pop(),r}}An.RecordSeparatorCode=30;An.RecordSeparator=String.fromCharCode(An.RecordSeparatorCode);class fle{writeHandshakeRequest(t){return An.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(yh(t)){const s=new Uint8Array(t),l=s.indexOf(An.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),n=s.byteLength>u?s.slice(u).buffer:null}else{const s=t,l=s.indexOf(An.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=s.substring(0,u),n=s.length>u?s.substring(u):null}const a=An.parse(r),i=JSON.parse(a[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[n,i]}}var Et;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(Et||(Et={}));class dle{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new rle(this,t)}}const ple=30*1e3,hle=15*1e3;var Bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Bt||(Bt={}));class jS{constructor(t,r,n,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(B.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Dr.isRequired(t,"connection"),Dr.isRequired(r,"logger"),Dr.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=ple,this.keepAliveIntervalInMilliseconds=hle,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new fle,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Et.Ping})}static create(t,r,n,a){return new jS(t,r,n,a)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Bt.Disconnected&&this._connectionState!==Bt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Bt.Connecting,this._logger.log(B.Debug,"Starting HubConnection.");try{await this._startInternal(),Tr.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Bt.Connected,this._connectionStarted=!0,this._logger.log(B.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Bt.Disconnected,this._logger.log(B.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{const r={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(B.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(B.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(B.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===Bt.Disconnected?(this._logger.log(B.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===Bt.Disconnecting?(this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=Bt.Disconnecting,this._logger.log(B.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(B.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new xa("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createStreamInvocation(t,r,a);let o;const s=new dle;return s.cancelCallback=()=>{const l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],o.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){s.error(u);return}else l&&(l.type===Et.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},o=this._sendWithProtocol(i).catch(l=>{s.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(n,o),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._sendWithProtocol(this._createInvocation(t,r,!0,a));return this._launchStreams(n,i),i}invoke(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createInvocation(t,r,!1,a);return new Promise((s,l)=>{this._callbacks[i.invocationId]=(c,f)=>{if(f){l(f);return}else c&&(c.type===Et.Completion?c.error?l(new Error(c.error)):s(c.result):l(new Error(`Unexpected message type: ${c.type}`)))};const u=this._sendWithProtocol(i).catch(c=>{l(c),delete this._callbacks[i.invocationId]});this._launchStreams(n,u)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const a=n.indexOf(r);a!==-1&&(n.splice(a,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)switch(n.type){case Et.Invocation:this._invokeClientMethod(n);break;case Et.StreamItem:case Et.Completion:{const a=this._callbacks[n.invocationId];if(a){n.type===Et.Completion&&delete this._callbacks[n.invocationId];try{a(n)}catch(i){this._logger.log(B.Error,`Stream callback threw error: ${gP(i)}`)}}break}case Et.Ping:break;case Et.Close:{this._logger.log(B.Information,"Close message received from server.");const a=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}default:this._logger.log(B.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const i="Error parsing handshake response: "+a;this._logger.log(B.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}if(r.error){const a="Server returned handshake error: "+r.error;this._logger.log(B.Error,a);const i=new Error(a);throw this._handshakeRejecter(i),i}else this._logger.log(B.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===Bt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(B.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=n.slice(),i=!!t.invocationId;let o,s,l;for(const u of a)try{const c=o;o=await u.apply(this,t.arguments),i&&o&&c&&(this._logger.log(B.Error,`Multiple results provided for '${r}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(c){s=c,this._logger.log(B.Error,`A callback for the method '${r}' threw error '${c}'.`)}l?await this._sendWithProtocol(l):i?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):o!==void 0?l=this._createCompletionMessage(t.invocationId,null,o):(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):o&&this._logger.log(B.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(B.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new xa("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Bt.Disconnecting?this._completeClose(t):this._connectionState===Bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Bt.Disconnected,this._connectionStarted=!1,Tr.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(B.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(n++,0,a);if(i===null){this._logger.log(B.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Bt.Reconnecting,t?this._logger.log(B.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(B.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(o=>o.apply(this,[t]))}catch(o){this._logger.log(B.Error,`An onreconnecting callback called with error '${t}' threw error '${o}'.`)}if(this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(B.Information,`Reconnect attempt number ${n} will start in ${i} ms.`),await new Promise(o=>{this._reconnectDelayHandle=setTimeout(o,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Bt.Connected,this._logger.log(B.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(o=>o.apply(this,[this.connection.connectionId]))}catch(o){this._logger.log(B.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${o}'.`)}return}catch(o){if(this._logger.log(B.Information,`Reconnect attempt failed because of error '${o}'.`),this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Bt.Disconnecting&&this._completeClose();return}a=o instanceof Error?o:new Error(o.toString()),i=this._getNextRetryDelay(n++,Date.now()-r,a)}}this._logger.log(B.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(a){return this._logger.log(B.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const a=r[n];try{a(null,t)}catch(i){this._logger.log(B.Error,`Stream 'error' callback called with '${t}' threw error: ${gP(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,a){if(n)return a.length!==0?{arguments:r,streamIds:a,target:t,type:Et.Invocation}:{arguments:r,target:t,type:Et.Invocation};{const i=this._invocationId;return this._invocationId++,a.length!==0?{arguments:r,invocationId:i.toString(),streamIds:a,target:t,type:Et.Invocation}:{arguments:r,invocationId:i.toString(),target:t,type:Et.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:a=>{let i;a instanceof Error?i=a.message:a&&a.toString?i=a.toString():i="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,i)))},next:a=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,a)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let a=0;a0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Vs.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Vs.Authorization]&&delete t.headers[Vs.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Er;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Er||(Er={}));var qr;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(qr||(qr={}));let gle=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class bP{constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new gle,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,r){if(Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._url=t,this._logger.log(B.Trace,"(LongPolling transport) Connecting."),r===qr.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,a]=kc(),i={[n]:a,...this._options.headers},o={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};r===qr.Binary&&(o.responseType="arraybuffer");const s=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${s}.`);const l=await this._httpClient.get(s,o);l.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new Pc(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,o)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${n}.`);const a=await this._httpClient.get(n,r);a.statusCode===204?(this._logger.log(B.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Pc(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(B.Trace,`(LongPolling transport) data received. ${Np(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $S?this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(B.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(B.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?x2(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(B.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(B.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=kc();t[r]=n;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,a),this._logger.log(B.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(B.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(B.Trace,t),this.onclose(this._closeError)}}}class yle{constructor(t,r,n,a){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,r){return Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,a)=>{let i=!1;if(r!==qr.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let o;if(Tr.isBrowser||Tr.isWebWorker)o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const s=this._httpClient.getCookieString(t),l={};l.Cookie=s;const[u,c]=kc();l[u]=c,o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...l,...this._options.headers}})}try{o.onmessage=s=>{if(this.onreceive)try{this._logger.log(B.Trace,`(SSE transport) data received. ${Np(s.data,this._options.logMessageContent)}.`),this.onreceive(s.data)}catch(l){this._close(l);return}},o.onerror=s=>{i?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(B.Information,`SSE connected to ${this._url}`),this._eventSource=o,i=!0,n()}}catch(s){a(s);return}})}async send(t){return this._eventSource?x2(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class wle{constructor(t,r,n,a,i,o){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=a,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=o}async connect(t,r){Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((a,i)=>{t=t.replace(/^http/,"ws");let o;const s=this._httpClient.getCookieString(t);let l=!1;if(Tr.isNode||Tr.isReactNative){const u={},[c,f]=kc();u[c]=f,n&&(u[Vs.Authorization]=`Bearer ${n}`),s&&(u[Vs.Cookie]=s),o=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);o||(o=new this._webSocketConstructor(t)),r===qr.Binary&&(o.binaryType="arraybuffer"),o.onopen=u=>{this._logger.log(B.Information,`WebSocket connected to ${t}.`),this._webSocket=o,l=!0,a()},o.onerror=u=>{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="There was an error with the transport",this._logger.log(B.Information,`(WebSockets transport) ${c}.`)},o.onmessage=u=>{if(this._logger.log(B.Trace,`(WebSockets transport) data received. ${Np(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(c){this._close(c);return}},o.onclose=u=>{if(l)this._close(u);else{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(c))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(B.Trace,`(WebSockets transport) sending data. ${Np(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(B.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const _P=100;class ble{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Dr.isRequired(t,"url"),this._logger=tle(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,a=null;if(Tr.isNode&&typeof require<"u"){const i=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=i("ws"),a=i("eventsource")}!Tr.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Tr.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Tr.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Tr.isNode&&!r.EventSource&&typeof a<"u"&&(r.EventSource=a),this._httpClient=new mle(r.httpClient||new cle(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||qr.Binary,Dr.isIn(t,qr,"transferFormat"),this._logger.log(B.Debug,`Starting connection with transfer format '${qr[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(B.Error,r),await this._stopPromise,Promise.reject(new xa(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(B.Error,r),Promise.reject(new xa(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new LS(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(B.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(B.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Er.WebSockets)this.transport=this._constructTransport(Er.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,a=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xa("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const i=n.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}a++}while(n.url&&a<_P);if(a===_P&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof bP&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(B.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(B.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,a]=kc();r[n]=a;const i=this._resolveNegotiateUrl(t);this._logger.log(B.Debug,`Sending negotiation request: ${i}.`);try{const o=await this._httpClient.post(i,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(o.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${o.statusCode}'`));const s=JSON.parse(o.content);return(!s.negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),s}catch(o){let s="Failed to complete negotiation with the server: "+o;return o instanceof Pc&&o.statusCode===404&&(s=s+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(B.Error,s),Promise.reject(new Xse(s))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,a){let i=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(B.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(i,a),this.connectionId=n.connectionId;return}const o=[],s=n.availableTransports||[];let l=n;for(const u of s){const c=this._resolveTransportOrError(u,r,a);if(c instanceof Error)o.push(`${u.transport} failed:`),o.push(c);else if(this._isITransport(c)){if(this.transport=c,!l){try{l=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}i=this._createConnectUrl(t,l.connectionToken)}try{await this._startTransport(i,a),this.connectionId=l.connectionId;return}catch(f){if(this._logger.log(B.Error,`Failed to start the transport '${u.transport}': ${f}`),l=void 0,o.push(new Qse(`${u.transport} failed: ${f}`,Er[u.transport])),this._connectionState!=="Connecting"){const d="Failed to select transport before stop() was called.";return this._logger.log(B.Debug,d),Promise.reject(new xa(d))}}}}return o.length>0?Promise.reject(new Jse(`Unable to connect to the server with any of the available transports. ${o.join(" ")}`,o)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Er.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new wle(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Er.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new yle(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Er.LongPolling:return new bP(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n){const a=Er[t.transport];if(a==null)return this._logger.log(B.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(_le(r,a))if(t.transferFormats.map(o=>qr[o]).indexOf(n)>=0){if(a===Er.WebSockets&&!this._options.WebSocket||a===Er.ServerSentEvents&&!this._options.EventSource)return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it is not supported in your environment.'`),new Kse(`'${Er[a]}' is not supported in your environment.`,a);this._logger.log(B.Debug,`Selecting transport '${Er[a]}'.`);try{return this._constructTransport(a)}catch(o){return o}}else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it does not support the requested transfer format '${qr[n]}'.`),new Error(`'${Er[a]}' does not support ${qr[n]}.`);else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it was disabled by the client.`),new qse(`'${Er[a]}' is disabled by the client.`,a)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(B.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(B.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(B.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(B.Error,`Connection disconnected with error '${t}'.`):this._logger.log(B.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(B.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(B.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Tr.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(B.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=t.indexOf("?");let n=t.substring(0,r===-1?t.length:r);return n[n.length-1]!=="/"&&(n+="/"),n+="negotiate",n+=r===-1?"":t.substring(r),n.indexOf("negotiateVersion")===-1&&(n+=r===-1?"?":"&",n+="negotiateVersion="+this._negotiateVersion),n}}function _le(e,t){return!e||(t&e)!==0}class LS{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new av,this._transportResult=new av,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new av),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new av;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):LS._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(i=>i.byteLength).reduce((i,o)=>i+o),n=new Uint8Array(r);let a=0;for(const i of t)n.set(new Uint8Array(i),a),a+=i.byteLength;return n.buffer}}class av{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const Ele="json";class Sle{constructor(){this.name=Ele,this.version=1,this.transferFormat=qr.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ap.instance);const n=An.parse(t),a=[];for(const i of n){const o=JSON.parse(i);if(typeof o.type!="number")throw new Error("Invalid payload.");switch(o.type){case Et.Invocation:this._isInvocationMessage(o);break;case Et.StreamItem:this._isStreamItemMessage(o);break;case Et.Completion:this._isCompletionMessage(o);break;case Et.Ping:break;case Et.Close:break;default:r.log(B.Information,"Unknown message type '"+o.type+"' ignored.");continue}a.push(o)}return a}writeMessage(t){return An.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const xle={trace:B.Trace,debug:B.Debug,info:B.Information,information:B.Information,warn:B.Warning,warning:B.Warning,error:B.Error,critical:B.Critical,none:B.None};function Cle(e){const t=xle[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class Ole{configureLogging(t){if(Dr.isRequired(t,"logging"),Tle(t))this.logger=t;else if(typeof t=="string"){const r=Cle(t);this.logger=new Gm(r)}else this.logger=new Gm(t);return this}withUrl(t,r){return Dr.isRequired(t,"url"),Dr.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Dr.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new wP(t):this.reconnectPolicy=t:this.reconnectPolicy=new wP,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new ble(this.url,t);return jS.create(r,this.logger||Ap.instance,this.protocol||new Sle,this.reconnectPolicy)}}function Tle(e){return e.log!==void 0}class Dle{constructor(){Z(this,"comments",[]);Z(this,"hubConnection",null);Z(this,"createHubConnection",t=>{yt.activityStore.selectedActivity&&(this.hubConnection=new Ole().withUrl(`/chat?activityId=${t}`,{accessTokenFactory:()=>{var r;return(r=yt.userStore.user)==null?void 0:r.token}}).withAutomaticReconnect().configureLogging(B.Information).build(),this.hubConnection.start().catch(r=>console.log("Error establishing the connection: "+r)),this.hubConnection.on("LoadComments",r=>{Ze(()=>{r.forEach(n=>{n.createdAt=new Date(n.createdAt)}),this.comments=r})}),this.hubConnection.on("ReceiveComment",r=>{Ze(()=>{r.createdAt=new Date(r.createdAt),this.comments.unshift(r)})}))});Z(this,"stopHubConnection",()=>{var t;(t=this.hubConnection)==null||t.stop().catch(r=>console.log("Error stopping connection: ",r))});Z(this,"clearComments",()=>{this.comments=[],this.stopHubConnection()});Z(this,"addComment",async t=>{var r,n;t.activityId=(r=yt.activityStore.selectedActivity)==null?void 0:r.id;try{await((n=this.hubConnection)==null?void 0:n.invoke("SendComment",t))}catch(a){console.log(a)}});Ic(this)}}const yt={activityStore:new Wse,commonStore:new Hse,userStore:new Vse,modalStore:new Yse,profileStore:new Gse,commentStore:new Dle},C2=x.createContext(yt);function Ft(){return x.useContext(C2)}lw.createRoot(document.getElementById("root")).render(_.jsx(b.StrictMode,{children:_.jsx(C2.Provider,{value:yt,children:_.jsx(_4,{router:Oo})})}))});export default Ple(); diff --git a/API/wwwroot/assets/index-e8d2414a.js b/API/wwwroot/assets/index-e8d2414a.js new file mode 100644 index 0000000..73e95da --- /dev/null +++ b/API/wwwroot/assets/index-e8d2414a.js @@ -0,0 +1,143 @@ +var D2=Object.defineProperty;var P2=(e,t,r)=>t in e?D2(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var k2=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Z=(e,t,r)=>(P2(e,typeof t!="symbol"?t+"":t,r),r);var Ple=k2((Nn,Rn)=>{function A2(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))n(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&n(o)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function n(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();var et=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var EP={exports:{}},Km={},SP={exports:{}},ze={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Rp=Symbol.for("react.element"),N2=Symbol.for("react.portal"),R2=Symbol.for("react.fragment"),M2=Symbol.for("react.strict_mode"),I2=Symbol.for("react.profiler"),$2=Symbol.for("react.provider"),j2=Symbol.for("react.context"),L2=Symbol.for("react.forward_ref"),F2=Symbol.for("react.suspense"),U2=Symbol.for("react.memo"),B2=Symbol.for("react.lazy"),FS=Symbol.iterator;function z2(e){return e===null||typeof e!="object"?null:(e=FS&&e[FS]||e["@@iterator"],typeof e=="function"?e:null)}var xP={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},CP=Object.assign,OP={};function Ac(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}Ac.prototype.isReactComponent={};Ac.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ac.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function TP(){}TP.prototype=Ac.prototype;function U_(e,t,r){this.props=e,this.context=t,this.refs=OP,this.updater=r||xP}var B_=U_.prototype=new TP;B_.constructor=U_;CP(B_,Ac.prototype);B_.isPureReactComponent=!0;var US=Array.isArray,DP=Object.prototype.hasOwnProperty,z_={current:null},PP={key:!0,ref:!0,__self:!0,__source:!0};function kP(e,t,r){var n,a={},i=null,o=null;if(t!=null)for(n in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)DP.call(t,n)&&!PP.hasOwnProperty(n)&&(a[n]=t[n]);var s=arguments.length-2;if(s===1)a.children=r;else if(1>>1,we=H[_e];if(0>>1;_ea(Le,ce))Hea(lt,Le)?(H[_e]=lt,H[He]=ce,_e=He):(H[_e]=Le,H[ye]=ce,_e=ye);else if(Hea(lt,ce))H[_e]=lt,H[He]=ce,_e=He;else break e}}return ee}function a(H,ee){var ce=H.sortIndex-ee.sortIndex;return ce!==0?ce:H.id-ee.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var l=[],u=[],c=1,f=null,d=3,p=!1,h=!1,v=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(H){for(var ee=r(u);ee!==null;){if(ee.callback===null)n(u);else if(ee.startTime<=H)n(u),ee.sortIndex=ee.expirationTime,t(l,ee);else break;ee=r(u)}}function w(H){if(v=!1,E(H),!h)if(r(l)!==null)h=!0,te(C);else{var ee=r(u);ee!==null&&ge(w,ee.startTime-H)}}function C(H,ee){h=!1,v&&(v=!1,m(D),D=-1),p=!0;var ce=d;try{for(E(ee),f=r(l);f!==null&&(!(f.expirationTime>ee)||H&&!j());){var _e=f.callback;if(typeof _e=="function"){f.callback=null,d=f.priorityLevel;var we=_e(f.expirationTime<=ee);ee=e.unstable_now(),typeof we=="function"?f.callback=we:f===r(l)&&n(l),E(ee)}else n(l);f=r(l)}if(f!==null)var rt=!0;else{var ye=r(u);ye!==null&&ge(w,ye.startTime-ee),rt=!1}return rt}finally{f=null,d=ce,p=!1}}var S=!1,O=null,D=-1,N=5,R=-1;function j(){return!(e.unstable_now()-RH||125_e?(H.sortIndex=ce,t(u,H),r(l)===null&&H===r(u)&&(v?(m(D),D=-1):v=!0,ge(w,ce-_e))):(H.sortIndex=we,t(l,H),h||p||(h=!0,te(C))),H},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(H){var ee=d;return function(){var ce=d;d=ee;try{return H.apply(this,arguments)}finally{d=ce}}}})(MP);RP.exports=MP;var eL=RP.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var IP=x,$n=eL;function ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),uw=Object.prototype.hasOwnProperty,tL=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,zS={},WS={};function rL(e){return uw.call(WS,e)?!0:uw.call(zS,e)?!1:tL.test(e)?WS[e]=!0:(zS[e]=!0,!1)}function nL(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function aL(e,t,r,n){if(t===null||typeof t>"u"||nL(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function sn(e,t,r,n,a,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Vr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Vr[e]=new sn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Vr[t]=new sn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Vr[e]=new sn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Vr[e]=new sn(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Vr[e]=new sn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Vr[e]=new sn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Vr[e]=new sn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Vr[e]=new sn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Vr[e]=new sn(e,5,!1,e.toLowerCase(),null,!1,!1)});var H_=/[\-:]([a-z])/g;function V_(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(H_,V_);Vr[t]=new sn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!1,!1)});Vr.xlinkHref=new sn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Vr[e]=new sn(e,1,!1,e.toLowerCase(),null,!0,!0)});function Y_(e,t,r,n){var a=Vr.hasOwnProperty(t)?Vr[t]:null;(a!==null?a.type!==0:n||!(2s||a[o]!==i[s]){var l=` +`+a[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=s);break}}}finally{Wy=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Tf(e):""}function iL(e){switch(e.tag){case 5:return Tf(e.type);case 16:return Tf("Lazy");case 13:return Tf("Suspense");case 19:return Tf("SuspenseList");case 0:case 2:case 15:return e=Hy(e.type,!1),e;case 11:return e=Hy(e.type.render,!1),e;case 1:return e=Hy(e.type,!0),e;default:return""}}function pw(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Vl:return"Fragment";case Hl:return"Portal";case cw:return"Profiler";case G_:return"StrictMode";case fw:return"Suspense";case dw:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case LP:return(e.displayName||"Context")+".Consumer";case jP:return(e._context.displayName||"Context")+".Provider";case K_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q_:return t=e.displayName||null,t!==null?t:pw(e.type)||"Memo";case po:t=e._payload,e=e._init;try{return pw(e(t))}catch{}}return null}function oL(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pw(t);case 8:return t===G_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function jo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function UP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function sL(e){var t=UP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function _h(e){e._valueTracker||(e._valueTracker=sL(e))}function BP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=UP(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function Av(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function hw(e,t){var r=t.checked;return Kt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function VS(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=jo(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function zP(e,t){t=t.checked,t!=null&&Y_(e,"checked",t,!1)}function vw(e,t){zP(e,t);var r=jo(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?mw(e,t.type,r):t.hasOwnProperty("defaultValue")&&mw(e,t.type,jo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function YS(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function mw(e,t,r){(t!=="number"||Av(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Df=Array.isArray;function pu(e,t,r,n){if(e=e.options,t){t={};for(var a=0;a"+t.valueOf().toString()+"",t=Eh.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ud(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Lf={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},lL=["Webkit","ms","Moz","O"];Object.keys(Lf).forEach(function(e){lL.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Lf[t]=Lf[e]})});function YP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Lf.hasOwnProperty(e)&&Lf[e]?(""+t).trim():t+"px"}function GP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,a=YP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,a):e[r]=a}}var uL=Kt({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ww(e,t){if(t){if(uL[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ne(62))}}function bw(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _w=null;function Q_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ew=null,hu=null,vu=null;function qS(e){if(e=$p(e)){if(typeof Ew!="function")throw Error(ne(280));var t=e.stateNode;t&&(t=Zm(t),Ew(e.stateNode,e.type,t))}}function KP(e){hu?vu?vu.push(e):vu=[e]:hu=e}function qP(){if(hu){var e=hu,t=vu;if(vu=hu=null,qS(e),t)for(e=0;e>>=0,e===0?32:31-(bL(e)/_L|0)|0}var Sh=64,xh=4194304;function Pf(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Iv(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,a=e.suspendedLanes,i=e.pingedLanes,o=r&268435455;if(o!==0){var s=o&~a;s!==0?n=Pf(s):(i&=o,i!==0&&(n=Pf(i)))}else o=r&~a,o!==0?n=Pf(o):i!==0&&(n=Pf(i));if(n===0)return 0;if(t!==0&&t!==n&&!(t&a)&&(a=n&-n,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(n&4&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function Mp(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ca(t),e[t]=r}function CL(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Uf),ax=String.fromCharCode(32),ix=!1;function vk(e,t){switch(e){case"keyup":return ZL.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mk(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Yl=!1;function tF(e,t){switch(e){case"compositionend":return mk(t);case"keypress":return t.which!==32?null:(ix=!0,ax);case"textInput":return e=t.data,e===ax&&ix?null:e;default:return null}}function rF(e,t){if(Yl)return e==="compositionend"||!a1&&vk(e,t)?(e=pk(),lv=t1=wo=null,Yl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ux(r)}}function bk(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?bk(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _k(){for(var e=window,t=Av();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Av(e.document)}return t}function i1(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function fF(e){var t=_k(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&bk(r.ownerDocument.documentElement,r)){if(n!==null&&i1(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(n.start,a);n=n.end===void 0?i:Math.min(n.end,a),!e.extend&&i>n&&(a=n,n=i,i=a),a=cx(r,i);var o=cx(r,n);a&&o&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,Gl=null,Dw=null,zf=null,Pw=!1;function fx(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Pw||Gl==null||Gl!==Av(n)||(n=Gl,"selectionStart"in n&&i1(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zf&&vd(zf,n)||(zf=n,n=Lv(Dw,"onSelect"),0Ql||(e.current=Iw[Ql],Iw[Ql]=null,Ql--)}function St(e,t){Ql++,Iw[Ql]=e.current,e.current=t}var Lo={},Qr=is(Lo),gn=is(!1),Ys=Lo;function ku(e,t){var r=e.type.contextTypes;if(!r)return Lo;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function yn(e){return e=e.childContextTypes,e!=null}function Uv(){At(gn),At(Qr)}function yx(e,t,r){if(Qr.current!==Lo)throw Error(ne(168));St(Qr,t),St(gn,r)}function kk(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var a in n)if(!(a in t))throw Error(ne(108,oL(e)||"Unknown",a));return Kt({},r,n)}function Bv(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Lo,Ys=Qr.current,St(Qr,e),St(gn,gn.current),!0}function wx(e,t,r){var n=e.stateNode;if(!n)throw Error(ne(169));r?(e=kk(e,t,Ys),n.__reactInternalMemoizedMergedChildContext=e,At(gn),At(Qr),St(Qr,e)):At(gn),St(gn,r)}var Si=null,eg=!1,a0=!1;function Ak(e){Si===null?Si=[e]:Si.push(e)}function SF(e){eg=!0,Ak(e)}function os(){if(!a0&&Si!==null){a0=!0;var e=0,t=pt;try{var r=Si;for(pt=1;e>=o,a-=o,Oi=1<<32-Ca(t)+a|r<D?(N=O,O=null):N=O.sibling;var R=d(m,O,E[D],w);if(R===null){O===null&&(O=N);break}e&&O&&R.alternate===null&&t(m,O),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R,O=N}if(D===E.length)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;DD?(N=O,O=null):N=O.sibling;var j=d(m,O,R.value,w);if(j===null){O===null&&(O=N);break}e&&O&&j.alternate===null&&t(m,O),g=i(j,g,D),S===null?C=j:S.sibling=j,S=j,O=N}if(R.done)return r(m,O),$t&&ws(m,D),C;if(O===null){for(;!R.done;D++,R=E.next())R=f(m,R.value,w),R!==null&&(g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return $t&&ws(m,D),C}for(O=n(m,O);!R.done;D++,R=E.next())R=p(O,m,D,R.value,w),R!==null&&(e&&R.alternate!==null&&O.delete(R.key===null?D:R.key),g=i(R,g,D),S===null?C=R:S.sibling=R,S=R);return e&&O.forEach(function(U){return t(m,U)}),$t&&ws(m,D),C}function y(m,g,E,w){if(typeof E=="object"&&E!==null&&E.type===Vl&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case bh:e:{for(var C=E.key,S=g;S!==null;){if(S.key===C){if(C=E.type,C===Vl){if(S.tag===7){r(m,S.sibling),g=a(S,E.props.children),g.return=m,m=g;break e}}else if(S.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===po&&Ox(C)===S.type){r(m,S.sibling),g=a(S,E.props),g.ref=lf(m,S,E),g.return=m,m=g;break e}r(m,S);break}else t(m,S);S=S.sibling}E.type===Vl?(g=Rs(E.props.children,m.mode,w,E.key),g.return=m,m=g):(w=mv(E.type,E.key,E.props,null,m.mode,w),w.ref=lf(m,g,E),w.return=m,m=w)}return o(m);case Hl:e:{for(S=E.key;g!==null;){if(g.key===S)if(g.tag===4&&g.stateNode.containerInfo===E.containerInfo&&g.stateNode.implementation===E.implementation){r(m,g.sibling),g=a(g,E.children||[]),g.return=m,m=g;break e}else{r(m,g);break}else t(m,g);g=g.sibling}g=d0(E,m.mode,w),g.return=m,m=g}return o(m);case po:return S=E._init,y(m,g,S(E._payload),w)}if(Df(E))return h(m,g,E,w);if(rf(E))return v(m,g,E,w);Ah(m,E)}return typeof E=="string"&&E!==""||typeof E=="number"?(E=""+E,g!==null&&g.tag===6?(r(m,g.sibling),g=a(g,E),g.return=m,m=g):(r(m,g),g=f0(E,m.mode,w),g.return=m,m=g),o(m)):r(m,g)}return y}var Nu=Fk(!0),Uk=Fk(!1),jp={},Za=is(jp),wd=is(jp),bd=is(jp);function Ds(e){if(e===jp)throw Error(ne(174));return e}function h1(e,t){switch(St(bd,t),St(wd,e),St(Za,jp),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:yw(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=yw(t,e)}At(Za),St(Za,t)}function Ru(){At(Za),At(wd),At(bd)}function Bk(e){Ds(bd.current);var t=Ds(Za.current),r=yw(t,e.type);t!==r&&(St(wd,e),St(Za,r))}function v1(e){wd.current===e&&(At(Za),At(wd))}var Ht=is(0);function Gv(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var i0=[];function m1(){for(var e=0;er?r:4,e(!0);var n=o0.transition;o0.transition={};try{e(!1),t()}finally{pt=r,o0.transition=n}}function nA(){return sa().memoizedState}function TF(e,t,r){var n=Ro(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},aA(e))iA(t,r);else if(r=Ik(e,t,r,n),r!==null){var a=nn();Oa(r,e,n,a),oA(r,t,n)}}function DF(e,t,r){var n=Ro(e),a={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(aA(e))iA(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,s=i(o,r);if(a.hasEagerState=!0,a.eagerState=s,Aa(s,o)){var l=t.interleaved;l===null?(a.next=a,d1(t)):(a.next=l.next,l.next=a),t.interleaved=a;return}}catch{}finally{}r=Ik(e,t,a,n),r!==null&&(a=nn(),Oa(r,e,n,a),oA(r,t,n))}}function aA(e){var t=e.alternate;return e===Gt||t!==null&&t===Gt}function iA(e,t){Wf=Kv=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function oA(e,t,r){if(r&4194240){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,J_(e,r)}}var qv={readContext:oa,useCallback:Yr,useContext:Yr,useEffect:Yr,useImperativeHandle:Yr,useInsertionEffect:Yr,useLayoutEffect:Yr,useMemo:Yr,useReducer:Yr,useRef:Yr,useState:Yr,useDebugValue:Yr,useDeferredValue:Yr,useTransition:Yr,useMutableSource:Yr,useSyncExternalStore:Yr,useId:Yr,unstable_isNewReconciler:!1},PF={readContext:oa,useCallback:function(e,t){return Ba().memoizedState=[e,t===void 0?null:t],e},useContext:oa,useEffect:Dx,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,dv(4194308,4,Jk.bind(null,t,e),r)},useLayoutEffect:function(e,t){return dv(4194308,4,e,t)},useInsertionEffect:function(e,t){return dv(4,2,e,t)},useMemo:function(e,t){var r=Ba();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Ba();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=TF.bind(null,Gt,e),[n.memoizedState,e]},useRef:function(e){var t=Ba();return e={current:e},t.memoizedState=e},useState:Tx,useDebugValue:_1,useDeferredValue:function(e){return Ba().memoizedState=e},useTransition:function(){var e=Tx(!1),t=e[0];return e=OF.bind(null,e[1]),Ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=Gt,a=Ba();if($t){if(r===void 0)throw Error(ne(407));r=r()}else{if(r=t(),Pr===null)throw Error(ne(349));Ks&30||Hk(n,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,Dx(Yk.bind(null,n,i,e),[e]),n.flags|=2048,Sd(9,Vk.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Ba(),t=Pr.identifierPrefix;if($t){var r=Ti,n=Oi;r=(n&~(1<<32-Ca(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=_d++,0<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=o.createElement(r,{is:n.is}):(e=o.createElement(r),r==="select"&&(o=e,n.multiple?o.multiple=!0:n.size&&(o.size=n.size))):e=o.createElementNS(e,r),e[Wa]=t,e[yd]=n,vA(e,t,!1,!1),t.stateNode=e;e:{switch(o=bw(r,n),r){case"dialog":Dt("cancel",e),Dt("close",e),a=n;break;case"iframe":case"object":case"embed":Dt("load",e),a=n;break;case"video":case"audio":for(a=0;aIu&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304)}else{if(!n)if(e=Gv(o),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),uf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!$t)return Gr(t),null}else 2*rr()-i.renderingStartTime>Iu&&r!==1073741824&&(t.flags|=128,n=!0,uf(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(r=i.last,r!==null?r.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=rr(),t.sibling=null,r=Ht.current,St(Ht,n?r&1|2:r&1),t):(Gr(t),null);case 22:case 23:return T1(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&t.mode&1?Dn&1073741824&&(Gr(t),t.subtreeFlags&6&&(t.flags|=8192)):Gr(t),null;case 24:return null;case 25:return null}throw Error(ne(156,t.tag))}function jF(e,t){switch(s1(t),t.tag){case 1:return yn(t.type)&&Uv(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ru(),At(gn),At(Qr),m1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return v1(t),null;case 13:if(At(Ht),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ne(340));Au()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return At(Ht),null;case 4:return Ru(),null;case 10:return f1(t.type._context),null;case 22:case 23:return T1(),null;case 24:return null;default:return null}}var Rh=!1,Kr=!1,LF=typeof WeakSet=="function"?WeakSet:Set,ve=null;function eu(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Qt(e,t,n)}else r.current=null}function Gw(e,t,r){try{r()}catch(n){Qt(e,t,n)}}var jx=!1;function FF(e,t){if(kw=$v,e=_k(),i1(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,s=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==r||a!==0&&f.nodeType!==3||(s=o+a),f!==i||n!==0&&f.nodeType!==3||(l=o+n),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===r&&++u===a&&(s=o),d===i&&++c===n&&(l=o),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Aw={focusedElem:e,selectionRange:r},$v=!1,ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){t=ve;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,y=h.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:ma(t.type,v),y);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var E=t.stateNode.containerInfo;E.nodeType===1?E.textContent="":E.nodeType===9&&E.documentElement&&E.removeChild(E.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ne(163))}}catch(w){Qt(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}return h=jx,jx=!1,h}function Hf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var a=n=n.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Gw(t,r,i)}a=a.next}while(a!==n)}}function ng(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Kw(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function yA(e){var t=e.alternate;t!==null&&(e.alternate=null,yA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wa],delete t[yd],delete t[Mw],delete t[_F],delete t[EF])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wA(e){return e.tag===5||e.tag===3||e.tag===4}function Lx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wA(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Fv));else if(n!==4&&(e=e.child,e!==null))for(qw(e,t,r),e=e.sibling;e!==null;)qw(e,t,r),e=e.sibling}function Qw(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Qw(e,t,r),e=e.sibling;e!==null;)Qw(e,t,r),e=e.sibling}var Br=null,ga=!1;function lo(e,t,r){for(r=r.child;r!==null;)bA(e,t,r),r=r.sibling}function bA(e,t,r){if(Ja&&typeof Ja.onCommitFiberUnmount=="function")try{Ja.onCommitFiberUnmount(qm,r)}catch{}switch(r.tag){case 5:Kr||eu(r,t);case 6:var n=Br,a=ga;Br=null,lo(e,t,r),Br=n,ga=a,Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Br.removeChild(r.stateNode));break;case 18:Br!==null&&(ga?(e=Br,r=r.stateNode,e.nodeType===8?n0(e.parentNode,r):e.nodeType===1&&n0(e,r),pd(e)):n0(Br,r.stateNode));break;case 4:n=Br,a=ga,Br=r.stateNode.containerInfo,ga=!0,lo(e,t,r),Br=n,ga=a;break;case 0:case 11:case 14:case 15:if(!Kr&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){a=n=n.next;do{var i=a,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Gw(r,t,o),a=a.next}while(a!==n)}lo(e,t,r);break;case 1:if(!Kr&&(eu(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Qt(r,t,s)}lo(e,t,r);break;case 21:lo(e,t,r);break;case 22:r.mode&1?(Kr=(n=Kr)||r.memoizedState!==null,lo(e,t,r),Kr=n):lo(e,t,r);break;default:lo(e,t,r)}}function Fx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new LF),t.forEach(function(n){var a=KF.bind(null,e,n);r.has(n)||(r.add(n),n.then(a,a))})}}function pa(e,t){var r=t.deletions;if(r!==null)for(var n=0;na&&(a=o),n&=~i}if(n=a,n=rr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*BF(n/1960))-n,10e?16:e,bo===null)var n=!1;else{if(e=bo,bo=null,Jv=0,Ke&6)throw Error(ne(331));var a=Ke;for(Ke|=4,ve=e.current;ve!==null;){var i=ve,o=i.child;if(ve.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lrr()-C1?Ns(e,0):x1|=r),wn(e,t)}function DA(e,t){t===0&&(e.mode&1?(t=xh,xh<<=1,!(xh&130023424)&&(xh=4194304)):t=1);var r=nn();e=$i(e,t),e!==null&&(Mp(e,t,r),wn(e,r))}function GF(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),DA(e,r)}function KF(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ne(314))}n!==null&&n.delete(t),DA(e,r)}var PA;PA=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||gn.current)vn=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return vn=!1,IF(e,t,r);vn=!!(e.flags&131072)}else vn=!1,$t&&t.flags&1048576&&Nk(t,Wv,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;pv(e,t),e=t.pendingProps;var a=ku(t,Qr.current);gu(t,r),a=y1(null,t,n,e,a,r);var i=w1();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,yn(n)?(i=!0,Bv(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,p1(t),a.updater=tg,t.stateNode=a,a._reactInternals=t,Uw(t,n,e,r),t=Ww(null,t,n,!0,i,r)):(t.tag=0,$t&&i&&o1(t),en(null,t,a,r),t=t.child),t;case 16:n=t.elementType;e:{switch(pv(e,t),e=t.pendingProps,a=n._init,n=a(n._payload),t.type=n,a=t.tag=QF(n),e=ma(n,e),a){case 0:t=zw(null,t,n,e,r);break e;case 1:t=Mx(null,t,n,e,r);break e;case 11:t=Nx(null,t,n,e,r);break e;case 14:t=Rx(null,t,n,ma(n.type,e),r);break e}throw Error(ne(306,n,""))}return t;case 0:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),zw(e,t,n,a,r);case 1:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Mx(e,t,n,a,r);case 3:e:{if(dA(t),e===null)throw Error(ne(387));n=t.pendingProps,i=t.memoizedState,a=i.element,$k(e,t),Yv(t,n,null,r);var o=t.memoizedState;if(n=o.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=Mu(Error(ne(423)),t),t=Ix(e,t,n,r,a);break e}else if(n!==a){a=Mu(Error(ne(424)),t),t=Ix(e,t,n,r,a);break e}else for(kn=ko(t.stateNode.containerInfo.firstChild),Mn=t,$t=!0,wa=null,r=Uk(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Au(),n===a){t=ji(e,t,r);break e}en(e,t,n,r)}t=t.child}return t;case 5:return Bk(t),e===null&&jw(t),n=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,o=a.children,Nw(n,a)?o=null:i!==null&&Nw(n,i)&&(t.flags|=32),fA(e,t),en(e,t,o,r),t.child;case 6:return e===null&&jw(t),null;case 13:return pA(e,t,r);case 4:return h1(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Nu(t,null,n,r):en(e,t,n,r),t.child;case 11:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),Nx(e,t,n,a,r);case 7:return en(e,t,t.pendingProps,r),t.child;case 8:return en(e,t,t.pendingProps.children,r),t.child;case 12:return en(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,a=t.pendingProps,i=t.memoizedProps,o=a.value,St(Hv,n._currentValue),n._currentValue=o,i!==null)if(Aa(i.value,o)){if(i.children===a.children&&!gn.current){t=ji(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){o=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=Di(-1,r&-r),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),Lw(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(ne(341));o.lanes|=r,s=o.alternate,s!==null&&(s.lanes|=r),Lw(o,r,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}en(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,n=t.pendingProps.children,gu(t,r),a=oa(a),n=n(a),t.flags|=1,en(e,t,n,r),t.child;case 14:return n=t.type,a=ma(n,t.pendingProps),a=ma(n.type,a),Rx(e,t,n,a,r);case 15:return uA(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,a=t.pendingProps,a=t.elementType===n?a:ma(n,a),pv(e,t),t.tag=1,yn(n)?(e=!0,Bv(t)):e=!1,gu(t,r),Lk(t,n,a),Uw(t,n,a,r),Ww(null,t,n,!0,e,r);case 19:return hA(e,t,r);case 22:return cA(e,t,r)}throw Error(ne(156,t.tag))};function kA(e,t){return rk(e,t)}function qF(e,t,r,n){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jn(e,t,r,n){return new qF(e,t,r,n)}function P1(e){return e=e.prototype,!(!e||!e.isReactComponent)}function QF(e){if(typeof e=="function")return P1(e)?1:0;if(e!=null){if(e=e.$$typeof,e===K_)return 11;if(e===q_)return 14}return 2}function Mo(e,t){var r=e.alternate;return r===null?(r=Jn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function mv(e,t,r,n,a,i){var o=2;if(n=e,typeof e=="function")P1(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Vl:return Rs(r.children,a,i,t);case G_:o=8,a|=8;break;case cw:return e=Jn(12,r,t,a|2),e.elementType=cw,e.lanes=i,e;case fw:return e=Jn(13,r,t,a),e.elementType=fw,e.lanes=i,e;case dw:return e=Jn(19,r,t,a),e.elementType=dw,e.lanes=i,e;case FP:return ig(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jP:o=10;break e;case LP:o=9;break e;case K_:o=11;break e;case q_:o=14;break e;case po:o=16,n=null;break e}throw Error(ne(130,e==null?e:typeof e,""))}return t=Jn(o,r,t,a),t.elementType=e,t.type=n,t.lanes=i,t}function Rs(e,t,r,n){return e=Jn(7,e,n,t),e.lanes=r,e}function ig(e,t,r,n){return e=Jn(22,e,n,t),e.elementType=FP,e.lanes=r,e.stateNode={isHidden:!1},e}function f0(e,t,r){return e=Jn(6,e,null,t),e.lanes=r,e}function d0(e,t,r){return t=Jn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function XF(e,t,r,n,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Yy(0),this.expirationTimes=Yy(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yy(0),this.identifierPrefix=n,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function k1(e,t,r,n,a,i,o,s,l){return e=new XF(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Jn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},p1(i),e}function JF(e,t,r){var n=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(MA)}catch(e){console.error(e)}}MA(),NP.exports=Fn;var Fo=NP.exports;const nU=Xr(Fo);var Gx=Fo;lw.createRoot=Gx.createRoot,lw.hydrateRoot=Gx.hydrateRoot;function at(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cU(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fU(e){var t=cU(e,"string");return typeof t=="symbol"?t:String(t)}var Ga=Symbol("mobx-stored-annotations");function ti(e){function t(r,n){Up(r,n,e)}return Object.assign(t,e)}function Up(e,t,r){Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),bU(r)||(e[Ga][t]=r)}function dU(e){return Pi(e,Ga)||Lp(e,Ga,ju({},e[Ga])),e[Ga]}var Pe=Symbol("mobx administration"),Bp=function(){function e(r){r===void 0&&(r="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.batchId_=void 0,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=tt.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=r,this.batchId_=ie.inBatch?ie.batchId:NaN}var t=e.prototype;return t.onBO=function(){this.onBOL&&this.onBOL.forEach(function(n){return n()})},t.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(n){return n()})},t.reportObserved=function(){return cN(this)},t.reportChanged=function(){(!ie.inBatch||this.batchId_!==ie.batchId)&&(ie.stateVersion=ie.stateVersionn&&(n=s.dependenciesState_)}for(r.length=a,e.newObserving_=null,i=t.length;i--;){var l=t[i];l.diffValue_===0&&lN(l,e),l.diffValue_=0}for(;a--;){var u=r[a];u.diffValue_===1&&(u.diffValue_=0,r3(u,e))}n!==tt.UP_TO_DATE_&&(e.dependenciesState_=n,e.onBecomeStale_())}function ab(e){var t=e.observing_;e.observing_=[];for(var r=t.length;r--;)lN(t[r],e);e.dependenciesState_=tt.NOT_TRACKING_}function aN(e){var t=gl();try{return e()}finally{ki(t)}}function gl(){var e=ie.trackingDerivation;return ie.trackingDerivation=null,e}function ki(e){ie.trackingDerivation=e}function F1(e){var t=ie.allowStateReads;return ie.allowStateReads=e,t}function Gf(e){ie.allowStateReads=e}function iN(e){if(e.dependenciesState_!==tt.UP_TO_DATE_){e.dependenciesState_=tt.UP_TO_DATE_;for(var t=e.observing_,r=t.length;r--;)t[r].lowestObserverState_=tt.UP_TO_DATE_}}var yv=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.batchId=Number.MIN_SAFE_INTEGER,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0,this.stateVersion=Number.MIN_SAFE_INTEGER},wv=!0,oN=!1,ie=function(){var e=M1();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(wv=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==new yv().version&&(wv=!1),wv?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new yv):(setTimeout(function(){oN||at(35)},1),new yv)}();function t3(){if((ie.pendingReactions.length||ie.inBatch||ie.isRunningReactions)&&at(36),oN=!0,wv){var e=M1();--e.__mobxInstanceCount===0&&(e.__mobxGlobals=void 0),ie=new yv}}function sN(){return ie}function r3(e,t){e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function lN(e,t){e.observers_.delete(t),e.observers_.size===0&&uN(e)}function uN(e){e.isPendingUnobservation_===!1&&(e.isPendingUnobservation_=!0,ie.pendingUnobservations.push(e))}function Zn(){ie.inBatch===0&&(ie.batchId=ie.batchId0&&uN(e),!1)}function fN(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&t.onBecomeStale_(),t.dependenciesState_=tt.STALE_}))}function n3(e){e.lowestObserverState_!==tt.STALE_&&(e.lowestObserverState_=tt.STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.POSSIBLY_STALE_?t.dependenciesState_=tt.STALE_:t.dependenciesState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.UP_TO_DATE_)}))}function a3(e){e.lowestObserverState_===tt.UP_TO_DATE_&&(e.lowestObserverState_=tt.POSSIBLY_STALE_,e.observers_.forEach(function(t){t.dependenciesState_===tt.UP_TO_DATE_&&(t.dependenciesState_=tt.POSSIBLY_STALE_,t.onBecomeStale_())}))}var Od=function(){function e(r,n,a,i){r===void 0&&(r="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=tt.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=nm.NONE,this.name_=r,this.onInvalidate_=n,this.errorHandler_=a,this.requiresObservable_=i}var t=e.prototype;return t.onBecomeStale_=function(){this.schedule_()},t.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,ie.pendingReactions.push(this),dN())},t.isScheduled=function(){return this.isScheduled_},t.runReaction_=function(){if(!this.isDisposed_){Zn(),this.isScheduled_=!1;var n=ie.trackingContext;if(ie.trackingContext=this,nb(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}ie.trackingContext=n,ea()}},t.track=function(n){if(!this.isDisposed_){Zn(),this.isRunning_=!0;var a=ie.trackingContext;ie.trackingContext=this;var i=nN(this,n,void 0);ie.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&ab(this),gv(i)&&this.reportExceptionInDerivation_(i.cause),ea()}},t.reportExceptionInDerivation_=function(n){var a=this;if(this.errorHandler_){this.errorHandler_(n,this);return}if(ie.disableErrorBoundaries)throw n;var i="[mobx] uncaught error in '"+this+"'";ie.suppressReactionErrors||console.error(i,n),ie.globalReactionErrorHandlers.forEach(function(o){return o(n,a)})},t.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(Zn(),ab(this),ea()))},t.getDisposer_=function(n){var a=this,i=function o(){a.dispose(),n==null||n.removeEventListener==null||n.removeEventListener("abort",o)};return n==null||n.addEventListener==null||n.addEventListener("abort",i),i[Pe]=this,i},t.toString=function(){return"Reaction["+this.name_+"]"},t.trace=function(n){},e}(),i3=100,ib=function(t){return t()};function dN(){ie.inBatch>0||ie.isRunningReactions||ib(o3)}function o3(){ie.isRunningReactions=!0;for(var e=ie.pendingReactions,t=0;e.length>0;){++t===i3&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var r=e.splice(0),n=0,a=r.length;n0&&(t.dependencies=S3(e.observing_).map(SN)),t}function S3(e){return Array.from(new Set(e))}var x3=0;function xN(){this.message="FLOW_CANCELLED"}xN.prototype=Object.create(Error.prototype);var Zx=VA("flow"),C3=VA("flow.bound",{bound:!0}),Dd=Object.assign(function(t,r){if(Xs(r))return Up(t,r,Zx);var n=t,a=n.name||"",i=function(){var s=this,l=arguments,u=++x3,c=Ps(a+" - runid: "+u+" - init",n).apply(s,l),f,d=void 0,p=new Promise(function(h,v){var y=0;f=v;function m(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.next).call(c,w)}catch(S){return v(S)}E(C)}function g(w){d=void 0;var C;try{C=Ps(a+" - runid: "+u+" - yield "+y++,c.throw).call(c,w)}catch(S){return v(S)}E(C)}function E(w){if(Na(w==null?void 0:w.then)){w.then(E,v);return}return w.done?h(w.value):(d=Promise.resolve(w.value),d.then(m,g))}m(void 0)});return p.cancel=Ps(a+" - runid: "+u+" - cancel",function(){try{d&&eC(d);var h=c.return(void 0),v=Promise.resolve(h.value);v.then(ru,ru),eC(v),f(new xN)}catch(y){f(y)}}),p};return i.isMobXFlow=!0,i},Zx);Dd.bound=ti(C3);function eC(e){Na(e.cancel)&&e.cancel()}function om(e){return(e==null?void 0:e.isMobXFlow)===!0}function O3(e,t){return e?t!==void 0?Pd(e)?e[Pe].values_.has(t):!1:Pd(e)||!!e[Pe]||j1(e)||im(e)||gg(e):!1}function CN(e){return O3(e)}function xi(e,t){t===void 0&&(t=void 0),Zn();try{return e.apply(t)}finally{ea()}}function Ml(e){return e[Pe]}var T3={has:function(t,r){return Ml(t).has_(r)},get:function(t,r){return Ml(t).get_(r)},set:function(t,r,n){var a;return Xs(r)?(a=Ml(t).set_(r,n,!0))!=null?a:!0:!1},deleteProperty:function(t,r){var n;return Xs(r)?(n=Ml(t).delete_(r,!0))!=null?n:!0:!1},defineProperty:function(t,r,n){var a;return(a=Ml(t).defineProperty_(r,n))!=null?a:!0},ownKeys:function(t){return Ml(t).ownKeys_()},preventExtensions:function(t){at(13)}};function D3(e,t){var r,n;return $A(),e=Vp(e,t),(n=(r=e[Pe]).proxy_)!=null?n:r.proxy_=new Proxy(e,T3)}function Qn(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function Wp(e,t){var r=e.interceptors_||(e.interceptors_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Xn(e,t){var r=gl();try{for(var n=[].concat(e.interceptors_||[]),a=0,i=n.length;a0}function Hp(e,t){var r=e.changeListeners_||(e.changeListeners_=[]);return r.push(t),jA(function(){var n=r.indexOf(t);n!==-1&&r.splice(n,1)})}function Da(e,t){var r=gl(),n=e.changeListeners_;if(n){n=n.slice();for(var a=0,i=n.length;a0?n.map(this.dehancer):n},t.intercept_=function(n){return Wp(this,n)},t.observe_=function(n,a){return a===void 0&&(a=!1),a&&n({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Hp(this,n)},t.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(n){(typeof n!="number"||isNaN(n)||n<0)&&at("Out of range: "+n);var a=this.values_.length;if(n!==a)if(n>a){for(var i=new Array(n-a),o=0;o0&&$N(n+a+1)},t.spliceWithArray_=function(n,a,i){var o=this;this.atom_;var s=this.values_.length;if(n===void 0?n=0:n>s?n=s:n<0&&(n=Math.max(0,s+n)),arguments.length===1?a=s-n:a==null?a=0:a=Math.max(0,Math.min(a,s-n)),i===void 0&&(i=tb),Qn(this)){var l=Xn(this,{object:this.proxy_,type:tC,index:n,removedCount:a,added:i});if(!l)return tb;a=l.removedCount,i=l.added}if(i=i.length===0?i:i.map(function(f){return o.enhancer_(f,void 0)}),this.legacyMode_){var u=i.length-a;this.updateArrayLength_(s,u)}var c=this.spliceItemsIntoValues_(n,a,i);return(a!==0||i.length!==0)&&this.notifyArraySplice_(n,i,c),this.dehanceValues_(c)},t.spliceItemsIntoValues_=function(n,a,i){if(i.length=this.values_.length){console.warn("[mobx] Out of bounds read: "+n);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[n])},t.set_=function(n,a){var i=this.values_;if(this.legacyMode_&&n>i.length&&at(17,n,i.length),n2?n-2:0),i=2;i-1?(this.splice(n,1),!0):!1}};br("concat",Ji);br("flat",Ji);br("includes",Ji);br("indexOf",Ji);br("join",Ji);br("lastIndexOf",Ji);br("slice",Ji);br("toString",Ji);br("toLocaleString",Ji);br("every",ss);br("filter",ss);br("find",ss);br("findIndex",ss);br("flatMap",ss);br("forEach",ss);br("map",ss);br("some",ss);br("reduce",ON);br("reduceRight",ON);function br(e,t){typeof Array.prototype[e]=="function"&&(sm[e]=t(e))}function Ji(e){return function(){var t=this[Pe];t.atom_.reportObserved();var r=t.dehanceValues_(t.values_);return r[e].apply(r,arguments)}}function ss(e){return function(t,r){var n=this,a=this[Pe];a.atom_.reportObserved();var i=a.dehanceValues_(a.values_);return i[e](function(o,s){return t.call(r,o,s,n)})}}function ON(e){return function(){var t=this,r=this[Pe];r.atom_.reportObserved();var n=r.dehanceValues_(r.values_),a=arguments[0];return arguments[0]=function(i,o,s){return a(i,o,s,t)},n[e].apply(n,arguments)}}var R3=ml("ObservableArrayAdministration",z1);function yg(e){return fg(e)&&R3(e[Pe])}var TN,DN,M3={},_o="add",lm="delete";TN=Symbol.iterator;DN=Symbol.toStringTag;var PN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Pe]=M3,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=n,this.name_=a,Na(Map)||at(18),ls(function(){i.keysAtom_=WA("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,r&&i.merge(r)})}var t=e.prototype;return t.has_=function(n){return this.data_.has(n)},t.has=function(n){var a=this;if(!ie.trackingDerivation)return this.has_(n);var i=this.hasMap_.get(n);if(!i){var o=i=new wu(this.has_(n),dg,"ObservableMap.key?",!1);this.hasMap_.set(n,o),bN(o,function(){return a.hasMap_.delete(n)})}return i.get()},t.set=function(n,a){var i=this.has_(n);if(Qn(this)){var o=Xn(this,{type:i?ri:_o,object:this,newValue:a,name:n});if(!o)return this;a=o.newValue}return i?this.updateValue_(n,a):this.addValue_(n,a),this},t.delete=function(n){var a=this;if(this.keysAtom_,Qn(this)){var i=Xn(this,{type:lm,object:this,name:n});if(!i)return!1}if(this.has_(n)){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:lm,object:this,oldValue:this.data_.get(n).value_,name:n}:null;return xi(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(n))==null||u.setNewValue_(!1);var c=a.data_.get(n);c.setNewValue_(void 0),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.updateValue_=function(n,a){var i=this.data_.get(n);if(a=i.prepareNewValue_(a),a!==ie.UNCHANGED){var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:ri,object:this,oldValue:i.value_,name:n,newValue:a}:null;i.setNewValue_(a),s&&Da(this,l)}},t.addValue_=function(n,a){var i=this;this.keysAtom_,xi(function(){var u,c=new wu(a,i.enhancer_,"ObservableMap.key",!1);i.data_.set(n,c),a=c.value_,(u=i.hasMap_.get(n))==null||u.setNewValue_(!0),i.keysAtom_.reportChanged()});var o=Kf(),s=Ta(this),l=s||o?{observableKind:"map",debugObjectName:this.name_,type:_o,object:this,name:n,newValue:a}:null;s&&Da(this,l)},t.get=function(n){return this.has(n)?this.dehanceValue_(this.data_.get(n).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:n.get(l)}}})},t.entries=function(){var n=this,a=this.keys();return kd({next:function(){var o=a.next(),s=o.done,l=o.value;return{done:s,value:s?void 0:[l,n.get(l)]}}})},t[TN]=function(){return this.entries()},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value,l=s[0],u=s[1];n.call(a,u,l,this)}},t.merge=function(n){var a=this;return yl(n)&&(n=new Map(n)),xi(function(){Li(n)?sU(n).forEach(function(i){return a.set(i,n[i])}):Array.isArray(n)?n.forEach(function(i){var o=i[0],s=i[1];return a.set(o,s)}):Mc(n)?(n.constructor!==Map&&at(19,n),n.forEach(function(i,o){return a.set(o,i)})):n!=null&&at(20,n)}),this},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.keys()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.replace=function(n){var a=this;return xi(function(){for(var i=I3(n),o=new Map,s=!1,l=nu(a.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!i.has(c)){var f=a.delete(c);if(f)s=!0;else{var d=a.data_.get(c);o.set(c,d)}}}for(var p=nu(i.entries()),h;!(h=p()).done;){var v=h.value,y=v[0],m=v[1],g=a.data_.has(y);if(a.set(y,m),a.data_.has(y)){var E=a.data_.get(y);o.set(y,E),g||(s=!0)}}if(!s)if(a.data_.size!==o.size)a.keysAtom_.reportChanged();else for(var w=a.data_.keys(),C=o.keys(),S=w.next(),O=C.next();!S.done;){if(S.value!==O.value){a.keysAtom_.reportChanged();break}S=w.next(),O=C.next()}a.data_=o}),this},t.toString=function(){return"[object ObservableMap]"},t.toJSON=function(){return Array.from(this)},t.observe_=function(n,a){return Hp(this,n)},t.intercept_=function(n){return Wp(this,n)},$1(e,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:DN,get:function(){return"Map"}}]),e}(),yl=ml("ObservableMap",PN);function I3(e){if(Mc(e)||yl(e))return e;if(Array.isArray(e))return new Map(e);if(Li(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}else return at(21,e)}var kN,AN,$3={};kN=Symbol.iterator;AN=Symbol.toStringTag;var NN=function(){function e(r,n,a){var i=this;n===void 0&&(n=Fu),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[Pe]=$3,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=a,Na(Set)||at(22),this.enhancer_=function(o,s){return n(o,s,a)},ls(function(){i.atom_=WA(i.name_),r&&i.replace(r)})}var t=e.prototype;return t.dehanceValue_=function(n){return this.dehancer!==void 0?this.dehancer(n):n},t.clear=function(){var n=this;xi(function(){aN(function(){for(var a=nu(n.data_.values()),i;!(i=a()).done;){var o=i.value;n.delete(o)}})})},t.forEach=function(n,a){for(var i=nu(this),o;!(o=i()).done;){var s=o.value;n.call(a,s,s,this)}},t.add=function(n){var a=this;if(this.atom_,Qn(this)){var i=Xn(this,{type:_o,object:this,newValue:n});if(!i)return this}if(!this.has(n)){xi(function(){a.data_.add(a.enhancer_(n,void 0)),a.atom_.reportChanged()});var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:_o,object:this,newValue:n}:null;s&&Da(this,l)}return this},t.delete=function(n){var a=this;if(Qn(this)){var i=Xn(this,{type:lm,object:this,oldValue:n});if(!i)return!1}if(this.has(n)){var o=!1,s=Ta(this),l=s||o?{observableKind:"set",debugObjectName:this.name_,type:lm,object:this,oldValue:n}:null;return xi(function(){a.atom_.reportChanged(),a.data_.delete(n)}),s&&Da(this,l),!0}return!1},t.has=function(n){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(n))},t.entries=function(){var n=0,a=Array.from(this.keys()),i=Array.from(this.values());return kd({next:function(){var s=n;return n+=1,sv0){for(var t=v0;t=0&&r++;break}e=sC(e),t=sC(t);var s=o==="[object Array]";if(!s){if(typeof e!="object"||typeof t!="object")return!1;var l=e.constructor,u=t.constructor;if(l!==u&&!(Na(l)&&l instanceof l&&Na(u)&&u instanceof u)&&"constructor"in e&&"constructor"in t)return!1}if(r===0)return!1;r<0&&(r=-1),n=n||[],a=a||[];for(var c=n.length;c--;)if(n[c]===e)return a[c]===t;if(n.push(e),a.push(t),s){if(c=e.length,c!==t.length)return!1;for(;c--;)if(!sb(e[c],t[c],r-1,n,a))return!1}else{var f=Object.keys(e),d;if(c=f.length,Object.keys(t).length!==c)return!1;for(;c--;)if(d=f[c],!(Pi(t,d)&&sb(e[d],t[d],r-1,n,a)))return!1}return n.pop(),a.pop(),!0}function sC(e){return yg(e)?e.slice():Mc(e)||yl(e)||Fp(e)||$c(e)?Array.from(e.entries()):e}function kd(e){return e[Symbol.iterator]=W3,e}function W3(){return this}["Symbol","Map","Set"].forEach(function(e){var t=M1();typeof t[e]>"u"&&at("MobX requires global '"+e+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:l3,extras:{getDebugName:ob},$mobx:Pe});class H3{constructor(t){Z(this,"id");Z(this,"title");Z(this,"date");Z(this,"description");Z(this,"category");Z(this,"city");Z(this,"venue");Z(this,"hostUsername","");Z(this,"isCancelled",!1);Z(this,"isGoing",!1);Z(this,"isHost",!1);Z(this,"host");Z(this,"attendees",[]);this.id=t==null?void 0:t.id,this.title=t==null?void 0:t.title,this.date=t==null?void 0:t.date,this.description=t==null?void 0:t.description,this.category=t==null?void 0:t.category,this.venue=t==null?void 0:t.venue,this.city=t==null?void 0:t.city}}class lC{constructor(t){Z(this,"id");Z(this,"title","");Z(this,"date",null);Z(this,"description","");Z(this,"category","");Z(this,"city","");Z(this,"venue","");t&&(this.id=t.id,this.title=t.title,this.category=t.category,this.description=t.description,this.date=t.date,this.city=t.city,this.venue=t.venue)}}function LN(e,t){return function(){return e.apply(t,arguments)}}const{toString:V3}=Object.prototype,{getPrototypeOf:V1}=Object,wg=(e=>t=>{const r=V3.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),di=e=>(e=e.toLowerCase(),t=>wg(t)===e),bg=e=>t=>typeof t===e,{isArray:jc}=Array,Ad=bg("undefined");function Y3(e){return e!==null&&!Ad(e)&&e.constructor!==null&&!Ad(e.constructor)&&aa(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const FN=di("ArrayBuffer");function G3(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&FN(e.buffer),t}const K3=bg("string"),aa=bg("function"),UN=bg("number"),_g=e=>e!==null&&typeof e=="object",q3=e=>e===!0||e===!1,bv=e=>{if(wg(e)!=="object")return!1;const t=V1(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Q3=di("Date"),X3=di("File"),J3=di("Blob"),Z3=di("FileList"),eB=e=>_g(e)&&aa(e.pipe),tB=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||aa(e.append)&&((t=wg(e))==="formdata"||t==="object"&&aa(e.toString)&&e.toString()==="[object FormData]"))},rB=di("URLSearchParams"),nB=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Yp(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),jc(e))for(n=0,a=e.length;n0;)if(a=r[n],t===a.toLowerCase())return a;return null}const zN=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),WN=e=>!Ad(e)&&e!==zN;function lb(){const{caseless:e}=WN(this)&&this||{},t={},r=(n,a)=>{const i=e&&BN(t,a)||a;bv(t[i])&&bv(n)?t[i]=lb(t[i],n):bv(n)?t[i]=lb({},n):jc(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n(Yp(t,(a,i)=>{r&&aa(a)?e[i]=LN(a,r):e[i]=a},{allOwnKeys:n}),e),iB=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),oB=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},sB=(e,t,r,n)=>{let a,i,o;const s={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],(!n||n(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=r!==!1&&V1(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},lB=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},uB=e=>{if(!e)return null;if(jc(e))return e;let t=e.length;if(!UN(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},cB=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&V1(Uint8Array)),fB=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},dB=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},pB=di("HTMLFormElement"),hB=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),uC=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),vB=di("RegExp"),HN=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Yp(r,(a,i)=>{let o;(o=t(a,i,e))!==!1&&(n[i]=o||a)}),Object.defineProperties(e,n)},mB=e=>{HN(e,(t,r)=>{if(aa(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(aa(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},gB=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return jc(e)?n(e):n(String(e).split(t)),r},yB=()=>{},wB=(e,t)=>(e=+e,Number.isFinite(e)?e:t),m0="abcdefghijklmnopqrstuvwxyz",cC="0123456789",VN={DIGIT:cC,ALPHA:m0,ALPHA_DIGIT:m0+m0.toUpperCase()+cC},bB=(e=16,t=VN.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function _B(e){return!!(e&&aa(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const EB=e=>{const t=new Array(10),r=(n,a)=>{if(_g(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=jc(n)?[]:{};return Yp(n,(o,s)=>{const l=r(o,a+1);!Ad(l)&&(i[s]=l)}),t[a]=void 0,i}}return n};return r(e,0)},SB=di("AsyncFunction"),xB=e=>e&&(_g(e)||aa(e))&&aa(e.then)&&aa(e.catch),W={isArray:jc,isArrayBuffer:FN,isBuffer:Y3,isFormData:tB,isArrayBufferView:G3,isString:K3,isNumber:UN,isBoolean:q3,isObject:_g,isPlainObject:bv,isUndefined:Ad,isDate:Q3,isFile:X3,isBlob:J3,isRegExp:vB,isFunction:aa,isStream:eB,isURLSearchParams:rB,isTypedArray:cB,isFileList:Z3,forEach:Yp,merge:lb,extend:aB,trim:nB,stripBOM:iB,inherits:oB,toFlatObject:sB,kindOf:wg,kindOfTest:di,endsWith:lB,toArray:uB,forEachEntry:fB,matchAll:dB,isHTMLForm:pB,hasOwnProperty:uC,hasOwnProp:uC,reduceDescriptors:HN,freezeMethods:mB,toObjectSet:gB,toCamelCase:hB,noop:yB,toFiniteNumber:wB,findKey:BN,global:zN,isContextDefined:WN,ALPHABET:VN,generateString:bB,isSpecCompliantForm:_B,toJSONObject:EB,isAsyncFn:SB,isThenable:xB};function Ye(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a)}W.inherits(Ye,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:W.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const YN=Ye.prototype,GN={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{GN[e]={value:e}});Object.defineProperties(Ye,GN);Object.defineProperty(YN,"isAxiosError",{value:!0});Ye.from=(e,t,r,n,a,i)=>{const o=Object.create(YN);return W.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),Ye.call(o,e.message,t,r,n,a),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const CB=null;function ub(e){return W.isPlainObject(e)||W.isArray(e)}function KN(e){return W.endsWith(e,"[]")?e.slice(0,-2):e}function fC(e,t,r){return e?e.concat(t).map(function(a,i){return a=KN(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function OB(e){return W.isArray(e)&&!e.some(ub)}const TB=W.toFlatObject(W,{},null,function(t){return/^is[A-Z]/.test(t)});function Eg(e,t,r){if(!W.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=W.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,y){return!W.isUndefined(y[v])});const n=r.metaTokens,a=r.visitor||c,i=r.dots,o=r.indexes,l=(r.Blob||typeof Blob<"u"&&Blob)&&W.isSpecCompliantForm(t);if(!W.isFunction(a))throw new TypeError("visitor must be a function");function u(h){if(h===null)return"";if(W.isDate(h))return h.toISOString();if(!l&&W.isBlob(h))throw new Ye("Blob is not supported. Use a Buffer instead.");return W.isArrayBuffer(h)||W.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function c(h,v,y){let m=h;if(h&&!y&&typeof h=="object"){if(W.endsWith(v,"{}"))v=n?v:v.slice(0,-2),h=JSON.stringify(h);else if(W.isArray(h)&&OB(h)||(W.isFileList(h)||W.endsWith(v,"[]"))&&(m=W.toArray(h)))return v=KN(v),m.forEach(function(E,w){!(W.isUndefined(E)||E===null)&&t.append(o===!0?fC([v],w,i):o===null?v:v+"[]",u(E))}),!1}return ub(h)?!0:(t.append(fC(y,v,i),u(h)),!1)}const f=[],d=Object.assign(TB,{defaultVisitor:c,convertValue:u,isVisitable:ub});function p(h,v){if(!W.isUndefined(h)){if(f.indexOf(h)!==-1)throw Error("Circular reference detected in "+v.join("."));f.push(h),W.forEach(h,function(m,g){(!(W.isUndefined(m)||m===null)&&a.call(t,m,W.isString(g)?g.trim():g,v,d))===!0&&p(m,v?v.concat(g):[g])}),f.pop()}}if(!W.isObject(e))throw new TypeError("data must be an object");return p(e),t}function dC(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Y1(e,t){this._pairs=[],e&&Eg(e,this,t)}const qN=Y1.prototype;qN.append=function(t,r){this._pairs.push([t,r])};qN.toString=function(t){const r=t?function(n){return t.call(this,n,dC)}:dC;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function DB(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function QN(e,t,r){if(!t)return e;const n=r&&r.encode||DB,a=r&&r.serialize;let i;if(a?i=a(t,r):i=W.isURLSearchParams(t)?t.toString():new Y1(t,r).toString(n),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class PB{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){W.forEach(this.handlers,function(n){n!==null&&t(n)})}}const pC=PB,XN={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kB=typeof URLSearchParams<"u"?URLSearchParams:Y1,AB=typeof FormData<"u"?FormData:null,NB=typeof Blob<"u"?Blob:null,RB={isBrowser:!0,classes:{URLSearchParams:kB,FormData:AB,Blob:NB},protocols:["http","https","file","blob","url","data"]},JN=typeof window<"u"&&typeof document<"u",MB=(e=>JN&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),IB=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),$B=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:JN,hasStandardBrowserEnv:MB,hasStandardBrowserWebWorkerEnv:IB},Symbol.toStringTag,{value:"Module"})),Ka={...$B,...RB};function jB(e,t){return Eg(e,new Ka.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return Ka.isNode&&W.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function LB(e){return W.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function FB(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n=r.length;return o=!o&&W.isArray(a)?a.length:o,l?(W.hasOwnProp(a,o)?a[o]=[a[o],n]:a[o]=n,!s):((!a[o]||!W.isObject(a[o]))&&(a[o]=[]),t(r,n,a[o],i)&&W.isArray(a[o])&&(a[o]=FB(a[o])),!s)}if(W.isFormData(e)&&W.isFunction(e.entries)){const r={};return W.forEachEntry(e,(n,a)=>{t(LB(n),a,r,0)}),r}return null}function UB(e,t,r){if(W.isString(e))try{return(t||JSON.parse)(e),W.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const G1={transitional:XN,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=W.isObject(t);if(i&&W.isHTMLForm(t)&&(t=new FormData(t)),W.isFormData(t))return a&&a?JSON.stringify(ZN(t)):t;if(W.isArrayBuffer(t)||W.isBuffer(t)||W.isStream(t)||W.isFile(t)||W.isBlob(t))return t;if(W.isArrayBufferView(t))return t.buffer;if(W.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jB(t,this.formSerializer).toString();if((s=W.isFileList(t))||n.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Eg(s?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),UB(t)):t}],transformResponse:[function(t){const r=this.transitional||G1.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(t&&W.isString(t)&&(n&&!this.responseType||a)){const o=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(s){if(o)throw s.name==="SyntaxError"?Ye.from(s,Ye.ERR_BAD_RESPONSE,this,null,this.response):s}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ka.classes.FormData,Blob:Ka.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};W.forEach(["delete","get","head","post","put","patch"],e=>{G1.headers[e]={}});const K1=G1,BB=W.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),zB=e=>{const t={};let r,n,a;return e&&e.split(` +`).forEach(function(o){a=o.indexOf(":"),r=o.substring(0,a).trim().toLowerCase(),n=o.substring(a+1).trim(),!(!r||t[r]&&BB[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},hC=Symbol("internals");function ff(e){return e&&String(e).trim().toLowerCase()}function _v(e){return e===!1||e==null?e:W.isArray(e)?e.map(_v):String(e)}function WB(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const HB=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function g0(e,t,r,n,a){if(W.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!W.isString(t)){if(W.isString(n))return t.indexOf(n)!==-1;if(W.isRegExp(n))return n.test(t)}}function VB(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function YB(e,t){const r=W.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,o){return this[n].call(this,t,a,i,o)},configurable:!0})})}class Sg{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(s,l,u){const c=ff(l);if(!c)throw new Error("header name must be a non-empty string");const f=W.findKey(a,c);(!f||a[f]===void 0||u===!0||u===void 0&&a[f]!==!1)&&(a[f||l]=_v(s))}const o=(s,l)=>W.forEach(s,(u,c)=>i(u,c,l));return W.isPlainObject(t)||t instanceof this.constructor?o(t,r):W.isString(t)&&(t=t.trim())&&!HB(t)?o(zB(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=ff(t),t){const n=W.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return WB(a);if(W.isFunction(r))return r.call(this,a,n);if(W.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=ff(t),t){const n=W.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||g0(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(o){if(o=ff(o),o){const s=W.findKey(n,o);s&&(!r||g0(n,n[s],s,r))&&(delete n[s],a=!0)}}return W.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||g0(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return W.forEach(this,(a,i)=>{const o=W.findKey(n,i);if(o){r[o]=_v(a),delete r[i];return}const s=t?VB(i):String(i).trim();s!==i&&delete r[i],r[s]=_v(a),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return W.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&W.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(` +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[hC]=this[hC]={accessors:{}}).accessors,a=this.prototype;function i(o){const s=ff(o);n[s]||(YB(a,o),n[s]=!0)}return W.isArray(t)?t.forEach(i):i(t),this}}Sg.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);W.reduceDescriptors(Sg.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}});W.freezeMethods(Sg);const Ai=Sg;function y0(e,t){const r=this||K1,n=t||r,a=Ai.from(n.headers);let i=n.data;return W.forEach(e,function(s){i=s.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function eR(e){return!!(e&&e.__CANCEL__)}function Gp(e,t,r){Ye.call(this,e??"canceled",Ye.ERR_CANCELED,t,r),this.name="CanceledError"}W.inherits(Gp,Ye,{__CANCEL__:!0});function GB(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Ye("Request failed with status code "+r.status,[Ye.ERR_BAD_REQUEST,Ye.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const KB=Ka.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const o=[e+"="+encodeURIComponent(t)];W.isNumber(r)&&o.push("expires="+new Date(r).toGMTString()),W.isString(n)&&o.push("path="+n),W.isString(a)&&o.push("domain="+a),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function qB(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function QB(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function tR(e,t){return e&&!qB(t)?QB(e,t):t}const XB=Ka.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function a(i){let o=i;return t&&(r.setAttribute("href",o),o=r.href),r.setAttribute("href",o),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=a(window.location.href),function(o){const s=W.isString(o)?a(o):o;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function JB(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ZB(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),c=n[i];o||(o=u),r[a]=l,n[a]=u;let f=i,d=0;for(;f!==a;)d+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),u-o{const i=a.loaded,o=a.lengthComputable?a.total:void 0,s=i-r,l=n(s),u=i<=o;r=i;const c={loaded:i,total:o,progress:o?i/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&u?(o-i)/l:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const ez=typeof XMLHttpRequest<"u",tz=ez&&function(e){return new Promise(function(r,n){let a=e.data;const i=Ai.from(e.headers).normalize();let{responseType:o,withXSRFToken:s}=e,l;function u(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}let c;if(W.isFormData(a)){if(Ka.hasStandardBrowserEnv||Ka.hasStandardBrowserWebWorkerEnv)i.setContentType(!1);else if((c=i.getContentType())!==!1){const[v,...y]=c?c.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([v||"multipart/form-data",...y].join("; "))}}let f=new XMLHttpRequest;if(e.auth){const v=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(v+":"+y))}const d=tR(e.baseURL,e.url);f.open(e.method.toUpperCase(),QN(d,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function p(){if(!f)return;const v=Ai.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:v,config:e,request:f};GB(function(E){r(E),u()},function(E){n(E),u()},m),f=null}if("onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new Ye("Request aborted",Ye.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new Ye("Network Error",Ye.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||XN;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),n(new Ye(y,m.clarifyTimeoutError?Ye.ETIMEDOUT:Ye.ECONNABORTED,e,f)),f=null},Ka.hasStandardBrowserEnv&&(s&&W.isFunction(s)&&(s=s(e)),s||s!==!1&&XB(d))){const v=e.xsrfHeaderName&&e.xsrfCookieName&&KB.read(e.xsrfCookieName);v&&i.set(e.xsrfHeaderName,v)}a===void 0&&i.setContentType(null),"setRequestHeader"in f&&W.forEach(i.toJSON(),function(y,m){f.setRequestHeader(m,y)}),W.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",vC(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",vC(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=v=>{f&&(n(!v||v.type?new Gp(null,e,f):v),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const h=JB(d);if(h&&Ka.protocols.indexOf(h)===-1){n(new Ye("Unsupported protocol "+h+":",Ye.ERR_BAD_REQUEST,e));return}f.send(a||null)})},cb={http:CB,xhr:tz};W.forEach(cb,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const mC=e=>`- ${e}`,rz=e=>W.isFunction(e)||e===null||e===!1,rR={getAdapter:e=>{e=W.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i`adapter ${s} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : +`+i.map(mC).join(` +`):" "+mC(i[0]):"as no adapter specified";throw new Ye("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return n},adapters:cb};function w0(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Gp(null,e)}function gC(e){return w0(e),e.headers=Ai.from(e.headers),e.data=y0.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),rR.getAdapter(e.adapter||K1.adapter)(e).then(function(n){return w0(e),n.data=y0.call(e,e.transformResponse,n),n.headers=Ai.from(n.headers),n},function(n){return eR(n)||(w0(e),n&&n.response&&(n.response.data=y0.call(e,e.transformResponse,n.response),n.response.headers=Ai.from(n.response.headers))),Promise.reject(n)})}const yC=e=>e instanceof Ai?e.toJSON():e;function zu(e,t){t=t||{};const r={};function n(u,c,f){return W.isPlainObject(u)&&W.isPlainObject(c)?W.merge.call({caseless:f},u,c):W.isPlainObject(c)?W.merge({},c):W.isArray(c)?c.slice():c}function a(u,c,f){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u,f)}else return n(u,c,f)}function i(u,c){if(!W.isUndefined(c))return n(void 0,c)}function o(u,c){if(W.isUndefined(c)){if(!W.isUndefined(u))return n(void 0,u)}else return n(void 0,c)}function s(u,c,f){if(f in t)return n(u,c);if(f in e)return n(void 0,u)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(u,c)=>a(yC(u),yC(c),!0)};return W.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=l[c]||a,d=f(e[c],t[c],c);W.isUndefined(d)&&f!==s||(r[c]=d)}),r}const nR="1.6.2",q1={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{q1[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wC={};q1.transitional=function(t,r,n){function a(i,o){return"[Axios v"+nR+"] Transitional option '"+i+"'"+o+(n?". "+n:"")}return(i,o,s)=>{if(t===!1)throw new Ye(a(o," has been removed"+(r?" in "+r:"")),Ye.ERR_DEPRECATED);return r&&!wC[o]&&(wC[o]=!0,console.warn(a(o," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,o,s):!0}};function nz(e,t,r){if(typeof e!="object")throw new Ye("options must be an object",Ye.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],o=t[i];if(o){const s=e[i],l=s===void 0||o(s,i,e);if(l!==!0)throw new Ye("option "+i+" must be "+l,Ye.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Ye("Unknown option "+i,Ye.ERR_BAD_OPTION)}}const fb={assertOptions:nz,validators:q1},uo=fb.validators;class um{constructor(t){this.defaults=t,this.interceptors={request:new pC,response:new pC}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=zu(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&fb.assertOptions(n,{silentJSONParsing:uo.transitional(uo.boolean),forcedJSONParsing:uo.transitional(uo.boolean),clarifyTimeoutError:uo.transitional(uo.boolean)},!1),a!=null&&(W.isFunction(a)?r.paramsSerializer={serialize:a}:fb.assertOptions(a,{encode:uo.function,serialize:uo.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let o=i&&W.merge(i.common,i[r.method]);i&&W.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Ai.concat(o,i);const s=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(r)===!1||(l=l&&v.synchronous,s.unshift(v.fulfilled,v.rejected))});const u=[];this.interceptors.response.forEach(function(v){u.push(v.fulfilled,v.rejected)});let c,f=0,d;if(!l){const h=[gC.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,u),d=h.length,c=Promise.resolve(r);f{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const o=new Promise(s=>{n.subscribe(s),i=s}).then(a);return o.cancel=function(){n.unsubscribe(i)},o},t(function(i,o,s){n.reason||(n.reason=new Gp(i,o,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Q1(function(a){t=a}),cancel:t}}}const az=Q1;function iz(e){return function(r){return e.apply(null,r)}}function oz(e){return W.isObject(e)&&e.isAxiosError===!0}const db={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(db).forEach(([e,t])=>{db[t]=e});const sz=db;function aR(e){const t=new Ev(e),r=LN(Ev.prototype.request,t);return W.extend(r,Ev.prototype,t,{allOwnKeys:!0}),W.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return aR(zu(e,a))},r}const hr=aR(K1);hr.Axios=Ev;hr.CanceledError=Gp;hr.CancelToken=az;hr.isCancel=eR;hr.VERSION=nR;hr.toFormData=Eg;hr.AxiosError=Ye;hr.Cancel=hr.CanceledError;hr.all=function(t){return Promise.all(t)};hr.spread=iz;hr.isAxiosError=oz;hr.mergeConfig=zu;hr.AxiosHeaders=Ai;hr.formToJSON=e=>ZN(W.isHTMLForm(e)?new FormData(e):e);hr.getAdapter=rR.getAdapter;hr.HttpStatusCode=sz;hr.default=hr;const tn=hr;function iR(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;ttypeof e=="number"&&!isNaN(e),Js=e=>typeof e=="string",mn=e=>typeof e=="function",Sv=e=>Js(e)||mn(e)?e:null,b0=e=>x.isValidElement(e)||Js(e)||mn(e)||qf(e);function lz(e,t,r){r===void 0&&(r=300);const{scrollHeight:n,style:a}=e;requestAnimationFrame(()=>{a.minHeight="initial",a.height=n+"px",a.transition=`all ${r}ms`,requestAnimationFrame(()=>{a.height="0",a.padding="0",a.margin="0",setTimeout(t,r)})})}function xg(e){let{enter:t,exit:r,appendPosition:n=!1,collapse:a=!0,collapseDuration:i=300}=e;return function(o){let{children:s,position:l,preventExitTransition:u,done:c,nodeRef:f,isIn:d}=o;const p=n?`${t}--${l}`:t,h=n?`${r}--${l}`:r,v=x.useRef(0);return x.useLayoutEffect(()=>{const y=f.current,m=p.split(" "),g=E=>{E.target===f.current&&(y.dispatchEvent(new Event("d")),y.removeEventListener("animationend",g),y.removeEventListener("animationcancel",g),v.current===0&&E.type!=="animationcancel"&&y.classList.remove(...m))};y.classList.add(...m),y.addEventListener("animationend",g),y.addEventListener("animationcancel",g)},[]),x.useEffect(()=>{const y=f.current,m=()=>{y.removeEventListener("animationend",m),a?lz(y,c,i):c()};d||(u?m():(v.current=1,y.className+=` ${h}`,y.addEventListener("animationend",m)))},[d]),b.createElement(b.Fragment,null,s)}}function bC(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Gn={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const r=this.list.get(e).filter(n=>n!==t);return this.list.set(e,r),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const r=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(r)})}},Fh=e=>{let{theme:t,type:r,...n}=e;return b.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${r})`,...n})},_0={info:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return b.createElement(Fh,{...e},b.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return b.createElement("div",{className:"Toastify__spinner"})}};function uz(e){const[,t]=x.useReducer(p=>p+1,0),[r,n]=x.useState([]),a=x.useRef(null),i=x.useRef(new Map).current,o=p=>r.indexOf(p)!==-1,s=x.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:e,containerId:null,isToastActive:o,getToast:p=>i.get(p)}).current;function l(p){let{containerId:h}=p;const{limit:v}=s.props;!v||h&&s.containerId!==h||(s.count-=s.queue.length,s.queue=[])}function u(p){n(h=>p==null?[]:h.filter(v=>v!==p))}function c(){const{toastContent:p,toastProps:h,staleId:v}=s.queue.shift();d(p,h,v)}function f(p,h){let{delay:v,staleId:y,...m}=h;if(!b0(p)||function(U){return!a.current||s.props.enableMultiContainer&&U.containerId!==s.props.containerId||i.has(U.toastId)&&U.updateId==null}(m))return;const{toastId:g,updateId:E,data:w}=m,{props:C}=s,S=()=>u(g),O=E==null;O&&s.count++;const D={...C,style:C.toastStyle,key:s.toastKey++,...Object.fromEntries(Object.entries(m).filter(U=>{let[Q,X]=U;return X!=null})),toastId:g,updateId:E,data:w,closeToast:S,isIn:!1,className:Sv(m.className||C.toastClassName),bodyClassName:Sv(m.bodyClassName||C.bodyClassName),progressClassName:Sv(m.progressClassName||C.progressClassName),autoClose:!m.isLoading&&(N=m.autoClose,R=C.autoClose,N===!1||qf(N)&&N>0?N:R),deleteToast(){const U=bC(i.get(g),"removed");i.delete(g),Gn.emit(4,U);const Q=s.queue.length;if(s.count=g==null?s.count-s.displayedToast:s.count-1,s.count<0&&(s.count=0),Q>0){const X=g==null?s.props.limit:1;if(Q===1||X===1)s.displayedToast++,c();else{const J=X>Q?Q:X;s.displayedToast=J;for(let te=0;teee in _0)(X)&&(ge=_0[X](H))),ge}(D),mn(m.onOpen)&&(D.onOpen=m.onOpen),mn(m.onClose)&&(D.onClose=m.onClose),D.closeButton=C.closeButton,m.closeButton===!1||b0(m.closeButton)?D.closeButton=m.closeButton:m.closeButton===!0&&(D.closeButton=!b0(C.closeButton)||C.closeButton);let j=p;x.isValidElement(p)&&!Js(p.type)?j=x.cloneElement(p,{closeToast:S,toastProps:D,data:w}):mn(p)&&(j=p({closeToast:S,toastProps:D,data:w})),C.limit&&C.limit>0&&s.count>C.limit&&O?s.queue.push({toastContent:j,toastProps:D,staleId:y}):qf(v)?setTimeout(()=>{d(j,D,y)},v):d(j,D,y)}function d(p,h,v){const{toastId:y}=h;v&&i.delete(v);const m={content:p,props:h};i.set(y,m),n(g=>[...g,y].filter(E=>E!==v)),Gn.emit(4,bC(m,m.props.updateId==null?"added":"updated"))}return x.useEffect(()=>(s.containerId=e.containerId,Gn.cancelEmit(3).on(0,f).on(1,p=>a.current&&u(p)).on(5,l).emit(2,s),()=>{i.clear(),Gn.emit(3,s)}),[]),x.useEffect(()=>{s.props=e,s.isToastActive=o,s.displayedToast=r.length}),{getToastToRender:function(p){const h=new Map,v=Array.from(i.values());return e.newestOnTop&&v.reverse(),v.forEach(y=>{const{position:m}=y.props;h.has(m)||h.set(m,[]),h.get(m).push(y)}),Array.from(h,y=>p(y[0],y[1]))},containerRef:a,isToastActive:o}}function _C(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function EC(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function cz(e){const[t,r]=x.useState(!1),[n,a]=x.useState(!1),i=x.useRef(null),o=x.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,s=x.useRef(e),{autoClose:l,pauseOnHover:u,closeToast:c,onClick:f,closeOnClick:d}=e;function p(w){if(e.draggable){w.nativeEvent.type==="touchstart"&&w.nativeEvent.preventDefault(),o.didMove=!1,document.addEventListener("mousemove",m),document.addEventListener("mouseup",g),document.addEventListener("touchmove",m),document.addEventListener("touchend",g);const C=i.current;o.canCloseOnClick=!0,o.canDrag=!0,o.boundingRect=C.getBoundingClientRect(),C.style.transition="",o.x=_C(w.nativeEvent),o.y=EC(w.nativeEvent),e.draggableDirection==="x"?(o.start=o.x,o.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(o.start=o.y,o.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent/100))}}function h(w){if(o.boundingRect){const{top:C,bottom:S,left:O,right:D}=o.boundingRect;w.nativeEvent.type!=="touchend"&&e.pauseOnHover&&o.x>=O&&o.x<=D&&o.y>=C&&o.y<=S?y():v()}}function v(){r(!0)}function y(){r(!1)}function m(w){const C=i.current;o.canDrag&&C&&(o.didMove=!0,t&&y(),o.x=_C(w),o.y=EC(w),o.delta=e.draggableDirection==="x"?o.x-o.start:o.y-o.start,o.start!==o.x&&(o.canCloseOnClick=!1),C.style.transform=`translate${e.draggableDirection}(${o.delta}px)`,C.style.opacity=""+(1-Math.abs(o.delta/o.removalDistance)))}function g(){document.removeEventListener("mousemove",m),document.removeEventListener("mouseup",g),document.removeEventListener("touchmove",m),document.removeEventListener("touchend",g);const w=i.current;if(o.canDrag&&o.didMove&&w){if(o.canDrag=!1,Math.abs(o.delta)>o.removalDistance)return a(!0),void e.closeToast();w.style.transition="transform 0.2s, opacity 0.2s",w.style.transform=`translate${e.draggableDirection}(0)`,w.style.opacity="1"}}x.useEffect(()=>{s.current=e}),x.useEffect(()=>(i.current&&i.current.addEventListener("d",v,{once:!0}),mn(e.onOpen)&&e.onOpen(x.isValidElement(e.children)&&e.children.props),()=>{const w=s.current;mn(w.onClose)&&w.onClose(x.isValidElement(w.children)&&w.children.props)}),[]),x.useEffect(()=>(e.pauseOnFocusLoss&&(document.hasFocus()||y(),window.addEventListener("focus",v),window.addEventListener("blur",y)),()=>{e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}),[e.pauseOnFocusLoss]);const E={onMouseDown:p,onTouchStart:p,onMouseUp:h,onTouchEnd:h};return l&&u&&(E.onMouseEnter=y,E.onMouseLeave=v),d&&(E.onClick=w=>{f&&f(w),o.canCloseOnClick&&c()}),{playToast:v,pauseToast:y,isRunning:t,preventExitTransition:n,toastRef:i,eventHandlers:E}}function oR(e){let{closeToast:t,theme:r,ariaLabel:n="close"}=e;return b.createElement("button",{className:`Toastify__close-button Toastify__close-button--${r}`,type:"button",onClick:a=>{a.stopPropagation(),t(a)},"aria-label":n},b.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},b.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function fz(e){let{delay:t,isRunning:r,closeToast:n,type:a="default",hide:i,className:o,style:s,controlledProgress:l,progress:u,rtl:c,isIn:f,theme:d}=e;const p=i||l&&u===0,h={...s,animationDuration:`${t}ms`,animationPlayState:r?"running":"paused",opacity:p?0:1};l&&(h.transform=`scaleX(${u})`);const v=z("Toastify__progress-bar",l?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${d}`,`Toastify__progress-bar--${a}`,{"Toastify__progress-bar--rtl":c}),y=mn(o)?o({rtl:c,type:a,defaultClassName:v}):z(v,o);return b.createElement("div",{role:"progressbar","aria-hidden":p?"true":"false","aria-label":"notification timer",className:y,style:h,[l&&u>=1?"onTransitionEnd":"onAnimationEnd"]:l&&u<1?null:()=>{f&&n()}})}const dz=e=>{const{isRunning:t,preventExitTransition:r,toastRef:n,eventHandlers:a}=cz(e),{closeButton:i,children:o,autoClose:s,onClick:l,type:u,hideProgressBar:c,closeToast:f,transition:d,position:p,className:h,style:v,bodyClassName:y,bodyStyle:m,progressClassName:g,progressStyle:E,updateId:w,role:C,progress:S,rtl:O,toastId:D,deleteToast:N,isIn:R,isLoading:j,iconOut:U,closeOnClick:Q,theme:X}=e,J=z("Toastify__toast",`Toastify__toast-theme--${X}`,`Toastify__toast--${u}`,{"Toastify__toast--rtl":O},{"Toastify__toast--close-on-click":Q}),te=mn(h)?h({rtl:O,position:p,type:u,defaultClassName:J}):z(J,h),ge=!!S||!s,H={closeToast:f,type:u,theme:X};let ee=null;return i===!1||(ee=mn(i)?i(H):x.isValidElement(i)?x.cloneElement(i,H):oR(H)),b.createElement(d,{isIn:R,done:N,position:p,preventExitTransition:r,nodeRef:n},b.createElement("div",{id:D,onClick:l,className:te,...a,style:v,ref:n},b.createElement("div",{...R&&{role:C},className:mn(y)?y({type:u}):z("Toastify__toast-body",y),style:m},U!=null&&b.createElement("div",{className:z("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!j})},U),b.createElement("div",null,o)),ee,b.createElement(fz,{...w&&!ge?{key:`pb-${w}`}:{},rtl:O,theme:X,delay:s,isRunning:t,isIn:R,closeToast:f,hide:c,type:u,style:E,className:g,controlledProgress:ge,progress:S||0})))},Cg=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},pz=xg(Cg("bounce",!0));xg(Cg("slide",!0));xg(Cg("zoom"));xg(Cg("flip"));const pb=x.forwardRef((e,t)=>{const{getToastToRender:r,containerRef:n,isToastActive:a}=uz(e),{className:i,style:o,rtl:s,containerId:l}=e;function u(c){const f=z("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":s});return mn(i)?i({position:c,rtl:s,defaultClassName:f}):z(f,Sv(i))}return x.useEffect(()=>{t&&(t.current=n.current)},[]),b.createElement("div",{ref:n,className:"Toastify",id:l},r((c,f)=>{const d=f.length?{...o}:{...o,pointerEvents:"none"};return b.createElement("div",{className:u(c),style:d,key:`container-${c}`},f.map((p,h)=>{let{content:v,props:y}=p;return b.createElement(dz,{...y,isIn:a(y.toastId),style:{...y.style,"--nth":h+1,"--len":f.length},key:`toast-${y.key}`},v)}))}))});pb.displayName="ToastContainer",pb.defaultProps={position:"top-right",transition:pz,autoClose:5e3,closeButton:oR,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let E0,_s=new Map,Af=[],hz=1;function sR(){return""+hz++}function vz(e){return e&&(Js(e.toastId)||qf(e.toastId))?e.toastId:sR()}function Qf(e,t){return _s.size>0?Gn.emit(0,e,t):Af.push({content:e,options:t}),t.toastId}function cm(e,t){return{...t,type:t&&t.type||e,toastId:vz(t)}}function Uh(e){return(t,r)=>Qf(t,cm(e,r))}function ct(e,t){return Qf(e,cm("default",t))}ct.loading=(e,t)=>Qf(e,cm("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),ct.promise=function(e,t,r){let n,{pending:a,error:i,success:o}=t;a&&(n=Js(a)?ct.loading(a,r):ct.loading(a.render,{...r,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},l=(c,f,d)=>{if(f==null)return void ct.dismiss(n);const p={type:c,...s,...r,data:d},h=Js(f)?{render:f}:f;return n?ct.update(n,{...p,...h}):ct(h.render,{...p,...h}),d},u=mn(e)?e():e;return u.then(c=>l("success",o,c)).catch(c=>l("error",i,c)),u},ct.success=Uh("success"),ct.info=Uh("info"),ct.error=Uh("error"),ct.warning=Uh("warning"),ct.warn=ct.warning,ct.dark=(e,t)=>Qf(e,cm("default",{theme:"dark",...t})),ct.dismiss=e=>{_s.size>0?Gn.emit(1,e):Af=Af.filter(t=>e!=null&&t.options.toastId!==e)},ct.clearWaitingQueue=function(e){return e===void 0&&(e={}),Gn.emit(5,e)},ct.isActive=e=>{let t=!1;return _s.forEach(r=>{r.isToastActive&&r.isToastActive(e)&&(t=!0)}),t},ct.update=function(e,t){t===void 0&&(t={}),setTimeout(()=>{const r=function(n,a){let{containerId:i}=a;const o=_s.get(i||E0);return o&&o.getToast(n)}(e,t);if(r){const{props:n,content:a}=r,i={delay:100,...n,...t,toastId:t.toastId||e,updateId:sR()};i.toastId!==e&&(i.staleId=e);const o=i.render||a;delete i.render,Qf(o,i)}},0)},ct.done=e=>{ct.update(e,{progress:1})},ct.onChange=e=>(Gn.on(4,e),()=>{Gn.off(4,e)}),ct.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},ct.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},Gn.on(2,e=>{E0=e.containerId||e,_s.set(E0,e),Af.forEach(t=>{Gn.emit(0,t.content,t.options)}),Af=[]}).on(3,e=>{_s.delete(e.containerId||e),_s.size===0&&Gn.off(0).off(1).off(5)});/** + * @remix-run/router v1.9.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function Wt(){return Wt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Wu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function gz(){return Math.random().toString(36).substr(2,8)}function xC(e,t){return{usr:e.state,key:e.key,idx:t}}function Nd(e,t,r,n){return r===void 0&&(r=null),Wt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Zi(t):t,{state:r,key:t&&t.key||n||gz()})}function Zs(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}function Zi(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function yz(e,t,r,n){n===void 0&&(n={});let{window:a=document.defaultView,v5Compat:i=!1}=n,o=a.history,s=cr.Pop,l=null,u=c();u==null&&(u=0,o.replaceState(Wt({},o.state,{idx:u}),""));function c(){return(o.state||{idx:null}).idx}function f(){s=cr.Pop;let y=c(),m=y==null?null:y-u;u=y,l&&l({action:s,location:v.location,delta:m})}function d(y,m){s=cr.Push;let g=Nd(v.location,y,m);r&&r(g,y),u=c()+1;let E=xC(g,u),w=v.createHref(g);try{o.pushState(E,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(w)}i&&l&&l({action:s,location:v.location,delta:1})}function p(y,m){s=cr.Replace;let g=Nd(v.location,y,m);r&&r(g,y),u=c();let E=xC(g,u),w=v.createHref(g);o.replaceState(E,"",w),i&&l&&l({action:s,location:v.location,delta:0})}function h(y){let m=a.location.origin!=="null"?a.location.origin:a.location.href,g=typeof y=="string"?y:Zs(y);return Ie(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return s},get location(){return e(a,o)},listen(y){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(SC,f),l=y,()=>{a.removeEventListener(SC,f),l=null}},createHref(y){return t(a,y)},createURL:h,encodeLocation(y){let m=h(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:d,replace:p,go(y){return o.go(y)}};return v}var tr;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tr||(tr={}));const wz=new Set(["lazy","caseSensitive","path","id","index","children"]);function bz(e){return e.index===!0}function hb(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((a,i)=>{let o=[...r,i],s=typeof a.id=="string"?a.id:o.join("-");if(Ie(a.index!==!0||!a.children,"Cannot specify children on an index route"),Ie(!n[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),bz(a)){let l=Wt({},a,t(a),{id:s});return n[s]=l,l}else{let l=Wt({},a,t(a),{id:s,children:void 0});return n[s]=l,a.children&&(l.children=hb(a.children,t,o,n)),l}})}function au(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?Zi(t):t,a=wl(n.pathname||"/",r);if(a==null)return null;let i=uR(e);_z(i);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(Ie(l.relativePath.startsWith(n),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(n.length));let u=Ni([n,l.relativePath]),c=r.concat(l);i.children&&i.children.length>0&&(Ie(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),uR(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:Dz(u,i.index),routesMeta:c})};return e.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of cR(i.path))a(i,o,l)}),t}function cR(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(n.length===0)return a?[i,""]:[i];let o=cR(n.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function _z(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Pz(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}const Ez=/^:\w+$/,Sz=3,xz=2,Cz=1,Oz=10,Tz=-2,CC=e=>e==="*";function Dz(e,t){let r=e.split("/"),n=r.length;return r.some(CC)&&(n+=Tz),t&&(n+=xz),r.filter(a=>!CC(a)).reduce((a,i)=>a+(Ez.test(i)?Sz:i===""?Cz:Oz),n)}function Pz(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function kz(e,t){let{routesMeta:r}=e,n={},a="/",i=[];for(let o=0;o{if(c==="*"){let d=s[f]||"";o=i.slice(0,i.length-d.length).replace(/(.)\/+$/,"$1")}return u[c]=Mz(s[f]||"",c),u},{}),pathname:i,pathnameBase:o,pattern:e}}function Nz(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),Wu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(n.push(s),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Rz(e){try{return decodeURI(e)}catch(t){return Wu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Mz(e,t){try{return decodeURIComponent(e)}catch(r){return Wu(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}function wl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Iz(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Zi(e):e;return{pathname:r?r.startsWith("/")?r:$z(r,t):t,search:Lz(n),hash:Fz(a)}}function $z(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function S0(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Kp(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Og(e,t,r,n){n===void 0&&(n=!1);let a;typeof e=="string"?a=Zi(e):(a=Wt({},e),Ie(!a.pathname||!a.pathname.includes("?"),S0("?","pathname","search",a)),Ie(!a.pathname||!a.pathname.includes("#"),S0("#","pathname","hash",a)),Ie(!a.search||!a.search.includes("#"),S0("#","search","hash",a)));let i=e===""||a.pathname==="",o=i?"/":a.pathname,s;if(n||o==null)s=r;else{let f=t.length-1;if(o.startsWith("..")){let d=o.split("/");for(;d[0]==="..";)d.shift(),f-=1;a.pathname=d.join("/")}s=f>=0?t[f]:"/"}let l=Iz(a,s),u=o&&o!=="/"&&o.endsWith("/"),c=(i||o===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Ni=e=>e.join("/").replace(/\/\/+/g,"/"),jz=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lz=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Fz=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class X1{constructor(t,r,n,a){a===void 0&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}function fR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const dR=["post","put","patch","delete"],Uz=new Set(dR),Bz=["get",...dR],zz=new Set(Bz),Wz=new Set([301,302,303,307,308]),Hz=new Set([307,308]),x0={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Vz={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},df={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},pR=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yz=e=>({hasErrorBoundary:!!e.hasErrorBoundary});function Gz(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",n=!r;Ie(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let M=e.detectErrorBoundary;a=L=>({hasErrorBoundary:M(L)})}else a=Yz;let i={},o=hb(e.routes,a,void 0,i),s,l=e.basename||"/",u=Wt({v7_normalizeFormMethod:!1,v7_prependBasename:!1},e.future),c=null,f=new Set,d=null,p=null,h=null,v=e.hydrationData!=null,y=au(o,e.history.location,l),m=null;if(y==null){let M=Yn(404,{pathname:e.history.location.pathname}),{matches:L,route:G}=RC(o);y=L,m={[G.id]:M}}let g=!y.some(M=>M.route.lazy)&&(!y.some(M=>M.route.loader)||e.hydrationData!=null),E,w={historyAction:e.history.action,location:e.history.location,matches:y,initialized:g,navigation:x0,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},C=cr.Pop,S=!1,O,D=!1,N=!1,R=[],j=[],U=new Map,Q=0,X=-1,J=new Map,te=new Set,ge=new Map,H=new Map,ee=new Map,ce=!1;function _e(){return c=e.history.listen(M=>{let{action:L,location:G,delta:de}=M;if(ce){ce=!1;return}Wu(ee.size===0||de!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ee=be({currentLocation:w.location,nextLocation:G,historyAction:L});if(Ee&&de!=null){ce=!0,e.history.go(de*-1),pe(Ee,{state:"blocked",location:G,proceed(){pe(Ee,{state:"proceeding",proceed:void 0,reset:void 0,location:G}),e.history.go(de)},reset(){let Se=new Map(w.blockers);Se.set(Ee,df),ye({blockers:Se})}});return}return Ce(L,G)}),w.initialized||Ce(cr.Pop,w.location),E}function we(){c&&c(),f.clear(),O&&O.abort(),w.fetchers.forEach((M,L)=>Lr(L)),w.blockers.forEach((M,L)=>Y(L))}function rt(M){return f.add(M),()=>f.delete(M)}function ye(M){w=Wt({},w,M),f.forEach(L=>L(w))}function Le(M,L){var G,de;let Ee=w.actionData!=null&&w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&w.navigation.state==="loading"&&((G=M.state)==null?void 0:G._isRedirect)!==!0,Se;L.actionData?Object.keys(L.actionData).length>0?Se=L.actionData:Se=null:Ee?Se=w.actionData:Se=null;let Te=L.loaderData?NC(w.loaderData,L.loaderData,L.matches||[],L.errors):w.loaderData,me=w.blockers;me.size>0&&(me=new Map(me),me.forEach((gt,Re)=>me.set(Re,df)));let he=S===!0||w.navigation.formMethod!=null&&ya(w.navigation.formMethod)&&((de=M.state)==null?void 0:de._isRedirect)!==!0;s&&(o=s,s=void 0),D||C===cr.Pop||(C===cr.Push?e.history.push(M,M.state):C===cr.Replace&&e.history.replace(M,M.state)),ye(Wt({},L,{actionData:Se,loaderData:Te,historyAction:C,location:M,initialized:!0,navigation:x0,revalidation:"idle",restoreScrollPosition:da(M,L.matches||w.matches),preventScrollReset:he,blockers:me})),C=cr.Pop,S=!1,D=!1,N=!1,R=[],j=[]}async function He(M,L){if(typeof M=="number"){e.history.go(M);return}let G=vb(w.location,w.matches,l,u.v7_prependBasename,M,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:de,submission:Ee,error:Se}=OC(u.v7_normalizeFormMethod,!1,G,L),Te=w.location,me=Nd(w.location,de,L&&L.state);me=Wt({},me,e.history.encodeLocation(me));let he=L&&L.replace!=null?L.replace:void 0,gt=cr.Push;he===!0?gt=cr.Replace:he===!1||Ee!=null&&ya(Ee.formMethod)&&Ee.formAction===w.location.pathname+w.location.search&&(gt=cr.Replace);let Re=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,Ae=be({currentLocation:Te,nextLocation:me,historyAction:gt});if(Ae){pe(Ae,{state:"blocked",location:me,proceed(){pe(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),He(M,L)},reset(){let ut=new Map(w.blockers);ut.set(Ae,df),ye({blockers:ut})}});return}return await Ce(gt,me,{submission:Ee,pendingError:Se,preventScrollReset:Re,replace:L&&L.replace})}function lt(){if(lr(),ye({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ce(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ce(C||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation})}}async function Ce(M,L,G){O&&O.abort(),O=null,C=M,D=(G&&G.startUninterruptedRevalidation)===!0,un(w.location,w.matches),S=(G&&G.preventScrollReset)===!0;let de=s||o,Ee=G&&G.overrideNavigation,Se=au(de,L,l);if(!Se){let ut=Yn(404,{pathname:L.pathname}),{matches:Tt,route:$a}=RC(de);Ne(),Le(L,{matches:Tt,loaderData:{},errors:{[$a.id]:ut}});return}if(w.initialized&&!N&&Jz(w.location,L)&&!(G&&G.submission&&ya(G.submission.formMethod))){Le(L,{matches:Se});return}O=new AbortController;let Te=hf(e.history,L,O.signal,G&&G.submission),me,he;if(G&&G.pendingError)he={[iu(Se).route.id]:G.pendingError};else if(G&&G.submission&&ya(G.submission.formMethod)){let ut=await xe(Te,L,G.submission,Se,{replace:G.replace});if(ut.shortCircuited)return;me=ut.pendingActionData,he=ut.pendingActionError,Ee=C0(L,G.submission),Te=new Request(Te.url,{signal:Te.signal})}let{shortCircuited:gt,loaderData:Re,errors:Ae}=await mt(Te,L,Se,Ee,G&&G.submission,G&&G.fetcherSubmission,G&&G.replace,me,he);gt||(O=null,Le(L,Wt({matches:Se},me?{actionData:me}:{},{loaderData:Re,errors:Ae})))}async function xe(M,L,G,de,Ee){Ee===void 0&&(Ee={}),lr();let Se=r4(L,G);ye({navigation:Se});let Te,me=gb(de,L);if(!me.route.action&&!me.route.lazy)Te={type:tr.error,error:Yn(405,{method:M.method,pathname:L.pathname,routeId:me.route.id})};else if(Te=await pf("action",M,me,de,i,a,l),M.signal.aborted)return{shortCircuited:!0};if(bu(Te)){let he;return Ee&&Ee.replace!=null?he=Ee.replace:he=Te.location===w.location.pathname+w.location.search,await er(w,Te,{submission:G,replace:he}),{shortCircuited:!0}}if(Xf(Te)){let he=iu(de,me.route.id);return(Ee&&Ee.replace)!==!0&&(C=cr.Push),{pendingActionData:{},pendingActionError:{[he.route.id]:Te.error}}}if(ks(Te))throw Yn(400,{type:"defer-action"});return{pendingActionData:{[me.route.id]:Te.data}}}async function mt(M,L,G,de,Ee,Se,Te,me,he){let gt=de||C0(L,Ee),Re=Ee||Se||$C(gt),Ae=s||o,[ut,Tt]=TC(e.history,w,G,Re,L,N,R,j,ge,te,Ae,l,me,he);if(Ne(st=>!(G&&G.some(Tn=>Tn.route.id===st))||ut&&ut.some(Tn=>Tn.route.id===st)),X=++Q,ut.length===0&&Tt.length===0){let st=I();return Le(L,Wt({matches:G,loaderData:{},errors:he||null},me?{actionData:me}:{},st?{fetchers:new Map(w.fetchers)}:{})),{shortCircuited:!0}}if(!D){Tt.forEach(Tn=>{let De=w.fetchers.get(Tn.key),bt=vf(void 0,De?De.data:void 0);w.fetchers.set(Tn.key,bt)});let st=me||w.actionData;ye(Wt({navigation:gt},st?Object.keys(st).length===0?{actionData:null}:{actionData:st}:{},Tt.length>0?{fetchers:new Map(w.fetchers)}:{}))}Tt.forEach(st=>{U.has(st.key)&&Ot(st.key),st.controller&&U.set(st.key,st.controller)});let $a=()=>Tt.forEach(st=>Ot(st.key));O&&O.signal.addEventListener("abort",$a);let{results:ja,loaderResults:bi,fetcherResults:oo}=await Ut(w.matches,G,ut,Tt,M);if(M.signal.aborted)return{shortCircuited:!0};O&&O.signal.removeEventListener("abort",$a),Tt.forEach(st=>U.delete(st.key));let Cn=MC(ja);if(Cn){if(Cn.idx>=ut.length){let st=Tt[Cn.idx-ut.length].key;te.add(st)}return await er(w,Cn.result,{replace:Te}),{shortCircuited:!0}}let{loaderData:On,errors:so}=AC(w,G,ut,bi,he,Tt,oo,H);H.forEach((st,Tn)=>{st.subscribe(De=>{(De||st.done)&&H.delete(Tn)})});let ef=I(),hs=ue(X),Nl=ef||hs||Tt.length>0;return Wt({loaderData:On,errors:so},Nl?{fetchers:new Map(w.fetchers)}:{})}function Nt(M){return w.fetchers.get(M)||Vz}function sr(M,L,G,de){if(n)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");U.has(M)&&Ot(M);let Ee=s||o,Se=vb(w.location,w.matches,l,u.v7_prependBasename,G,L,de==null?void 0:de.relative),Te=au(Ee,Se,l);if(!Te){Jr(M,L,Yn(404,{pathname:Se}));return}let{path:me,submission:he,error:gt}=OC(u.v7_normalizeFormMethod,!0,Se,de);if(gt){Jr(M,L,gt);return}let Re=gb(Te,me);if(S=(de&&de.preventScrollReset)===!0,he&&ya(he.formMethod)){jr(M,L,me,Re,Te,he);return}ge.set(M,{routeId:L,path:me}),Je(M,L,me,Re,Te,he)}async function jr(M,L,G,de,Ee,Se){if(lr(),ge.delete(M),!de.route.action&&!de.route.lazy){let Me=Yn(405,{method:Se.formMethod,pathname:G,routeId:L});Jr(M,L,Me);return}let Te=w.fetchers.get(M),me=n4(Se,Te);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,gt=hf(e.history,G,he.signal,Se);U.set(M,he);let Re=Q,Ae=await pf("action",gt,de,Ee,i,a,l);if(gt.signal.aborted){U.get(M)===he&&U.delete(M);return}if(bu(Ae))if(U.delete(M),X>Re){let Me=Bl(void 0);w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M);let Me=vf(Se);return w.fetchers.set(M,Me),ye({fetchers:new Map(w.fetchers)}),er(w,Ae,{fetcherSubmission:Se})}if(Xf(Ae)){Jr(M,L,Ae.error);return}if(ks(Ae))throw Yn(400,{type:"defer-action"});let ut=w.navigation.location||w.location,Tt=hf(e.history,ut,he.signal),$a=s||o,ja=w.navigation.state!=="idle"?au($a,w.navigation.location,l):w.matches;Ie(ja,"Didn't find any matches after fetcher action");let bi=++Q;J.set(M,bi);let oo=vf(Se,Ae.data);w.fetchers.set(M,oo);let[Cn,On]=TC(e.history,w,ja,Se,ut,N,R,j,ge,te,$a,l,{[de.route.id]:Ae.data},void 0);On.filter(Me=>Me.key!==M).forEach(Me=>{let Fr=Me.key,cn=w.fetchers.get(Fr),tf=vf(void 0,cn?cn.data:void 0);w.fetchers.set(Fr,tf),U.has(Fr)&&Ot(Fr),Me.controller&&U.set(Fr,Me.controller)}),ye({fetchers:new Map(w.fetchers)});let so=()=>On.forEach(Me=>Ot(Me.key));he.signal.addEventListener("abort",so);let{results:ef,loaderResults:hs,fetcherResults:Nl}=await Ut(w.matches,ja,Cn,On,Tt);if(he.signal.aborted)return;he.signal.removeEventListener("abort",so),J.delete(M),U.delete(M),On.forEach(Me=>U.delete(Me.key));let st=MC(ef);if(st){if(st.idx>=Cn.length){let Me=On[st.idx-Cn.length].key;te.add(Me)}return er(w,st.result)}let{loaderData:Tn,errors:De}=AC(w,w.matches,Cn,hs,void 0,On,Nl,H);if(w.fetchers.has(M)){let Me=Bl(Ae.data);w.fetchers.set(M,Me)}let bt=ue(bi);w.navigation.state==="loading"&&bi>X?(Ie(C,"Expected pending action"),O&&O.abort(),Le(w.navigation.location,{matches:ja,loaderData:Tn,errors:De,fetchers:new Map(w.fetchers)})):(ye(Wt({errors:De,loaderData:NC(w.loaderData,Tn,ja,De)},bt||On.length>0?{fetchers:new Map(w.fetchers)}:{})),N=!1)}async function Je(M,L,G,de,Ee,Se){let Te=w.fetchers.get(M),me=vf(Se,Te?Te.data:void 0);w.fetchers.set(M,me),ye({fetchers:new Map(w.fetchers)});let he=new AbortController,gt=hf(e.history,G,he.signal);U.set(M,he);let Re=Q,Ae=await pf("loader",gt,de,Ee,i,a,l);if(ks(Ae)&&(Ae=await mR(Ae,gt.signal,!0)||Ae),U.get(M)===he&&U.delete(M),gt.signal.aborted)return;if(bu(Ae))if(X>Re){let Tt=Bl(void 0);w.fetchers.set(M,Tt),ye({fetchers:new Map(w.fetchers)});return}else{te.add(M),await er(w,Ae);return}if(Xf(Ae)){let Tt=iu(w.matches,L);w.fetchers.delete(M),ye({fetchers:new Map(w.fetchers),errors:{[Tt.route.id]:Ae.error}});return}Ie(!ks(Ae),"Unhandled fetcher deferred data");let ut=Bl(Ae.data);w.fetchers.set(M,ut),ye({fetchers:new Map(w.fetchers)})}async function er(M,L,G){let{submission:de,fetcherSubmission:Ee,replace:Se}=G===void 0?{}:G;L.revalidate&&(N=!0);let Te=Nd(M.location,L.location,{_isRedirect:!0});if(Ie(Te,"Expected a location on the redirect navigation"),r){let ut=!1;if(L.reloadDocument)ut=!0;else if(pR.test(L.location)){const Tt=e.history.createURL(L.location);ut=Tt.origin!==t.location.origin||wl(Tt.pathname,l)==null}if(ut){Se?t.location.replace(L.location):t.location.assign(L.location);return}}O=null;let me=Se===!0?cr.Replace:cr.Push,{formMethod:he,formAction:gt,formEncType:Re}=M.navigation;!de&&!Ee&&he&>&&Re&&(de=$C(M.navigation));let Ae=de||Ee;if(Hz.has(L.status)&&Ae&&ya(Ae.formMethod))await Ce(me,Te,{submission:Wt({},Ae,{formAction:L.location}),preventScrollReset:S});else{let ut=C0(Te,de);await Ce(me,Te,{overrideNavigation:ut,fetcherSubmission:Ee,preventScrollReset:S})}}async function Ut(M,L,G,de,Ee){let Se=await Promise.all([...G.map(he=>pf("loader",Ee,he,L,i,a,l)),...de.map(he=>he.matches&&he.match&&he.controller?pf("loader",hf(e.history,he.path,he.controller.signal),he.match,he.matches,i,a,l):{type:tr.error,error:Yn(404,{pathname:he.path})})]),Te=Se.slice(0,G.length),me=Se.slice(G.length);return await Promise.all([IC(M,G,Te,Te.map(()=>Ee.signal),!1,w.loaderData),IC(M,de.map(he=>he.match),me,de.map(he=>he.controller?he.controller.signal:null),!0)]),{results:Se,loaderResults:Te,fetcherResults:me}}function lr(){N=!0,R.push(...Ne()),ge.forEach((M,L)=>{U.has(L)&&(j.push(L),Ot(L))})}function Jr(M,L,G){let de=iu(w.matches,L);Lr(M),ye({errors:{[de.route.id]:G},fetchers:new Map(w.fetchers)})}function Lr(M){let L=w.fetchers.get(M);U.has(M)&&!(L&&L.state==="loading"&&J.has(M))&&Ot(M),ge.delete(M),J.delete(M),te.delete(M),w.fetchers.delete(M)}function Ot(M){let L=U.get(M);Ie(L,"Expected fetch controller: "+M),L.abort(),U.delete(M)}function ln(M){for(let L of M){let G=Nt(L),de=Bl(G.data);w.fetchers.set(L,de)}}function I(){let M=[],L=!1;for(let G of te){let de=w.fetchers.get(G);Ie(de,"Expected fetcher: "+G),de.state==="loading"&&(te.delete(G),M.push(G),L=!0)}return ln(M),L}function ue(M){let L=[];for(let[G,de]of J)if(de0}function F(M,L){let G=w.blockers.get(M)||df;return ee.get(M)!==L&&ee.set(M,L),G}function Y(M){w.blockers.delete(M),ee.delete(M)}function pe(M,L){let G=w.blockers.get(M)||df;Ie(G.state==="unblocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="blocked"||G.state==="blocked"&&L.state==="proceeding"||G.state==="blocked"&&L.state==="unblocked"||G.state==="proceeding"&&L.state==="unblocked","Invalid blocker state transition: "+G.state+" -> "+L.state);let de=new Map(w.blockers);de.set(M,L),ye({blockers:de})}function be(M){let{currentLocation:L,nextLocation:G,historyAction:de}=M;if(ee.size===0)return;ee.size>1&&Wu(!1,"A router only supports one blocker at a time");let Ee=Array.from(ee.entries()),[Se,Te]=Ee[Ee.length-1],me=w.blockers.get(Se);if(!(me&&me.state==="proceeding")&&Te({currentLocation:L,nextLocation:G,historyAction:de}))return Se}function Ne(M){let L=[];return H.forEach((G,de)=>{(!M||M(de))&&(G.cancel(),L.push(de),H.delete(de))}),L}function ur(M,L,G){if(d=M,h=L,p=G||null,!v&&w.navigation===x0){v=!0;let de=da(w.location,w.matches);de!=null&&ye({restoreScrollPosition:de})}return()=>{d=null,h=null,p=null}}function Zr(M,L){return p&&p(M,L.map(de=>lR(de,w.loaderData)))||M.key}function un(M,L){if(d&&h){let G=Zr(M,L);d[G]=h()}}function da(M,L){if(d){let G=Zr(M,L),de=d[G];if(typeof de=="number")return de}return null}function io(M){i={},s=hb(M,a,void 0,i)}return E={get basename(){return l},get state(){return w},get routes(){return o},initialize:_e,subscribe:rt,enableScrollRestoration:ur,navigate:He,fetch:sr,revalidate:lt,createHref:M=>e.history.createHref(M),encodeLocation:M=>e.history.encodeLocation(M),getFetcher:Nt,deleteFetcher:Lr,dispose:we,getBlocker:F,deleteBlocker:Y,_internalFetchControllers:U,_internalActiveDeferreds:H,_internalSetRoutes:io},E}function Kz(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function vb(e,t,r,n,a,i,o){let s,l;if(i!=null&&o!=="path"){s=[];for(let c of t)if(s.push(c),c.route.id===i){l=c;break}}else s=t,l=t[t.length-1];let u=Og(a||".",Kp(s).map(c=>c.pathnameBase),wl(e.pathname,r)||e.pathname,o==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&l&&l.route.index&&!J1(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),n&&r!=="/"&&(u.pathname=u.pathname==="/"?r:Ni([r,u.pathname])),Zs(u)}function OC(e,t,r,n){if(!n||!Kz(n))return{path:r};if(n.formMethod&&!t4(n.formMethod))return{path:r,error:Yn(405,{method:n.formMethod})};let a=()=>({path:r,error:Yn(400,{type:"invalid-body"})}),i=n.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),s=vR(r);if(n.body!==void 0){if(n.formEncType==="text/plain"){if(!ya(o))return a();let d=typeof n.body=="string"?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((p,h)=>{let[v,y]=h;return""+p+v+"="+y+` +`},""):String(n.body);return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:void 0,text:d}}}else if(n.formEncType==="application/json"){if(!ya(o))return a();try{let d=typeof n.body=="string"?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:o,formAction:s,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch{return a()}}}Ie(typeof FormData=="function","FormData is not available in this environment");let l,u;if(n.formData)l=mb(n.formData),u=n.formData;else if(n.body instanceof FormData)l=mb(n.body),u=n.body;else if(n.body instanceof URLSearchParams)l=n.body,u=kC(l);else if(n.body==null)l=new URLSearchParams,u=new FormData;else try{l=new URLSearchParams(n.body),u=kC(l)}catch{return a()}let c={formMethod:o,formAction:s,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:u,json:void 0,text:void 0};if(ya(c.formMethod))return{path:r,submission:c};let f=Zi(r);return t&&f.search&&J1(f.search)&&l.append("index",""),f.search="?"+l,{path:Zs(f),submission:c}}function qz(e,t){let r=e;if(t){let n=e.findIndex(a=>a.route.id===t);n>=0&&(r=e.slice(0,n))}return r}function TC(e,t,r,n,a,i,o,s,l,u,c,f,d,p){let h=p?Object.values(p)[0]:d?Object.values(d)[0]:void 0,v=e.createURL(t.location),y=e.createURL(a),m=p?Object.keys(p)[0]:void 0,E=qz(r,m).filter((C,S)=>{if(C.route.lazy)return!0;if(C.route.loader==null)return!1;if(Qz(t.loaderData,t.matches[S],C)||o.some(N=>N===C.route.id))return!0;let O=t.matches[S],D=C;return DC(C,Wt({currentUrl:v,currentParams:O.params,nextUrl:y,nextParams:D.params},n,{actionResult:h,defaultShouldRevalidate:i||v.pathname+v.search===y.pathname+y.search||v.search!==y.search||hR(O,D)}))}),w=[];return l.forEach((C,S)=>{if(!r.some(j=>j.route.id===C.routeId))return;let O=au(c,C.path,f);if(!O){w.push({key:S,routeId:C.routeId,path:C.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(S),N=gb(O,C.path),R=!1;u.has(S)?R=!1:s.includes(S)?R=!0:D&&D.state!=="idle"&&D.data===void 0?R=i:R=DC(N,Wt({currentUrl:v,currentParams:t.matches[t.matches.length-1].params,nextUrl:y,nextParams:r[r.length-1].params},n,{actionResult:h,defaultShouldRevalidate:i})),R&&w.push({key:S,routeId:C.routeId,path:C.path,matches:O,match:N,controller:new AbortController})}),[E,w]}function Qz(e,t,r){let n=!t||r.route.id!==t.route.id,a=e[r.route.id]===void 0;return n||a}function hR(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function DC(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}async function PC(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let a=r[e.id];Ie(a,"No route found in manifest");let i={};for(let o in n){let l=a[o]!==void 0&&o!=="hasErrorBoundary";Wu(!l,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!wz.has(o)&&(i[o]=n[o])}Object.assign(a,i),Object.assign(a,Wt({},t(a),{lazy:void 0}))}async function pf(e,t,r,n,a,i,o,s){s===void 0&&(s={});let l,u,c,f=h=>{let v,y=new Promise((m,g)=>v=g);return c=()=>v(),t.signal.addEventListener("abort",c),Promise.race([h({request:t,params:r.params,context:s.requestContext}),y])};try{let h=r.route[e];if(r.route.lazy)if(h){let v,y=await Promise.all([f(h).catch(m=>{v=m}),PC(r.route,i,a)]);if(v)throw v;u=y[0]}else if(await PC(r.route,i,a),h=r.route[e],h)u=await f(h);else if(e==="action"){let v=new URL(t.url),y=v.pathname+v.search;throw Yn(405,{method:t.method,pathname:y,routeId:r.route.id})}else return{type:tr.data,data:void 0};else if(h)u=await f(h);else{let v=new URL(t.url),y=v.pathname+v.search;throw Yn(404,{pathname:y})}Ie(u!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){l=tr.error,u=h}finally{c&&t.signal.removeEventListener("abort",c)}if(e4(u)){let h=u.status;if(Wz.has(h)){let m=u.headers.get("Location");if(Ie(m,"Redirects returned/thrown from loaders/actions must have a Location header"),!pR.test(m))m=vb(new URL(t.url),n.slice(0,n.indexOf(r)+1),o,!0,m);else if(!s.isStaticRequest){let g=new URL(t.url),E=m.startsWith("//")?new URL(g.protocol+m):new URL(m),w=wl(E.pathname,o)!=null;E.origin===g.origin&&w&&(m=E.pathname+E.search+E.hash)}if(s.isStaticRequest)throw u.headers.set("Location",m),u;return{type:tr.redirect,status:h,location:m,revalidate:u.headers.get("X-Remix-Revalidate")!==null,reloadDocument:u.headers.get("X-Remix-Reload-Document")!==null}}if(s.isRouteRequest)throw{type:l===tr.error?tr.error:tr.data,response:u};let v,y=u.headers.get("Content-Type");return y&&/\bapplication\/json\b/.test(y)?v=await u.json():v=await u.text(),l===tr.error?{type:l,error:new X1(h,u.statusText,v),headers:u.headers}:{type:tr.data,data:v,statusCode:u.status,headers:u.headers}}if(l===tr.error)return{type:l,error:u};if(Zz(u)){var d,p;return{type:tr.deferred,deferredData:u,statusCode:(d=u.init)==null?void 0:d.status,headers:((p=u.init)==null?void 0:p.headers)&&new Headers(u.init.headers)}}return{type:tr.data,data:u}}function hf(e,t,r,n){let a=e.createURL(vR(t)).toString(),i={signal:r};if(n&&ya(n.formMethod)){let{formMethod:o,formEncType:s}=n;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(n.json)):s==="text/plain"?i.body=n.text:s==="application/x-www-form-urlencoded"&&n.formData?i.body=mb(n.formData):i.body=n.formData}return new Request(a,i)}function mb(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function kC(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Xz(e,t,r,n,a){let i={},o=null,s,l=!1,u={};return r.forEach((c,f)=>{let d=t[f].route.id;if(Ie(!bu(c),"Cannot handle redirect results in processLoaderData"),Xf(c)){let p=iu(e,d),h=c.error;n&&(h=Object.values(n)[0],n=void 0),o=o||{},o[p.route.id]==null&&(o[p.route.id]=h),i[d]=void 0,l||(l=!0,s=fR(c.error)?c.error.status:500),c.headers&&(u[d]=c.headers)}else ks(c)?(a.set(d,c.deferredData),i[d]=c.deferredData.data):i[d]=c.data,c.statusCode!=null&&c.statusCode!==200&&!l&&(s=c.statusCode),c.headers&&(u[d]=c.headers)}),n&&(o=n,i[Object.keys(n)[0]]=void 0),{loaderData:i,errors:o,statusCode:s||200,loaderHeaders:u}}function AC(e,t,r,n,a,i,o,s){let{loaderData:l,errors:u}=Xz(t,r,n,a,s);for(let c=0;cn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function RC(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Yn(e,t){let{pathname:r,routeId:n,method:a,type:i}=t===void 0?{}:t,o="Unknown Server Error",s="Unknown @remix-run/router error";return e===400?(o="Bad Request",a&&r&&n?s="You made a "+a+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":i==="defer-action"?s="defer() is not supported in actions":i==="invalid-body"&&(s="Unable to encode submission body")):e===403?(o="Forbidden",s='Route "'+n+'" does not match URL "'+r+'"'):e===404?(o="Not Found",s='No route matches URL "'+r+'"'):e===405&&(o="Method Not Allowed",a&&r&&n?s="You made a "+a.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":a&&(s='Invalid request method "'+a.toUpperCase()+'"')),new X1(e||500,o,new Error(s),!0)}function MC(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(bu(r))return{result:r,idx:t}}}function vR(e){let t=typeof e=="string"?Zi(e):e;return Zs(Wt({},t,{hash:""}))}function Jz(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function ks(e){return e.type===tr.deferred}function Xf(e){return e.type===tr.error}function bu(e){return(e&&e.type)===tr.redirect}function Zz(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function e4(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function t4(e){return zz.has(e.toLowerCase())}function ya(e){return Uz.has(e.toLowerCase())}async function IC(e,t,r,n,a,i){for(let o=0;of.route.id===l.route.id),c=u!=null&&!hR(u,l)&&(i&&i[l.route.id])!==void 0;if(ks(s)&&(a||c)){let f=n[o];Ie(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await mR(s,f,a).then(d=>{d&&(r[o]=d||r[o])})}}}async function mR(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:tr.data,data:e.deferredData.unwrappedData}}catch(a){return{type:tr.error,error:a}}return{type:tr.data,data:e.deferredData.data}}}function J1(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function gb(e,t){let r=typeof t=="string"?Zi(t).search:t.search;if(e[e.length-1].route.index&&J1(r||""))return e[e.length-1];let n=Kp(e);return n[n.length-1]}function $C(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:i,json:o}=e;if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:r,formEncType:n,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:o,text:void 0}}}function C0(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r4(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function vf(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function n4(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Bl(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}/** + * React Router v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function fm(){return fm=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),o=x.useRef(!1);return yR(()=>{o.current=!0}),x.useCallback(function(l,u){if(u===void 0&&(u={}),!o.current)return;if(typeof l=="number"){r.go(l);return}let c=Og(l,JSON.parse(i),a,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Ni([t,c.pathname])),(u.replace?r.replace:r.push)(c,u.state,u)},[t,r,i,a,e])}const o4=x.createContext(null);function s4(e){let t=x.useContext(pi).outlet;return t&&x.createElement(o4.Provider,{value:e},t)}function eE(){let{matches:e}=x.useContext(pi),t=e[e.length-1];return t?t.params:{}}function tE(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=x.useContext(pi),{pathname:a}=hi(),i=JSON.stringify(Kp(n).map(o=>o.pathnameBase));return x.useMemo(()=>Og(e,JSON.parse(i),a,r==="path"),[e,i,a,r])}function l4(e,t,r){Lc()||Ie(!1);let{navigator:n}=x.useContext(us),{matches:a}=x.useContext(pi),i=a[a.length-1],o=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=hi(),u;if(t){var c;let v=typeof t=="string"?Zi(t):t;s==="/"||(c=v.pathname)!=null&&c.startsWith(s)||Ie(!1),u=v}else u=l;let f=u.pathname||"/",d=s==="/"?f:f.slice(s.length)||"/",p=au(e,{pathname:d}),h=p4(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},o,v.params),pathname:Ni([s,n.encodeLocation?n.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Ni([s,n.encodeLocation?n.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),a,r);return t&&h?x.createElement(Dg.Provider,{value:{location:fm({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:cr.Pop}},h):h}function u4(){let e=y4(),t=fR(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),r?x.createElement("pre",{style:a},r):null,i)}const c4=x.createElement(u4,null);class f4 extends x.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?x.createElement(pi.Provider,{value:this.props.routeContext},x.createElement(gR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function d4(e){let{routeContext:t,match:r,children:n}=e,a=x.useContext(qp);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),x.createElement(pi.Provider,{value:t},n)}function p4(e,t,r){var n;if(t===void 0&&(t=[]),r===void 0&&(r=null),e==null){var a;if((a=r)!=null&&a.errors)e=r.matches;else return null}let i=e,o=(n=r)==null?void 0:n.errors;if(o!=null){let s=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));s>=0||Ie(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,u)=>{let c=l.route.id?o==null?void 0:o[l.route.id]:null,f=null;r&&(f=l.route.errorElement||c4);let d=t.concat(i.slice(0,u+1)),p=()=>{let h;return c?h=f:l.route.Component?h=x.createElement(l.route.Component,null):l.route.element?h=l.route.element:h=s,x.createElement(d4,{match:l,routeContext:{outlet:s,matches:d,isDataRoute:r!=null},children:h})};return r&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?x.createElement(f4,{location:r.location,revalidation:r.revalidation,component:f,error:c,children:p(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):p()},null)}var wR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(wR||{}),Hu=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Hu||{});function h4(e){let t=x.useContext(qp);return t||Ie(!1),t}function rE(e){let t=x.useContext(Tg);return t||Ie(!1),t}function v4(e){let t=x.useContext(pi);return t||Ie(!1),t}function bR(e){let t=v4(),r=t.matches[t.matches.length-1];return r.route.id||Ie(!1),r.route.id}function m4(){return rE(Hu.UseNavigation).navigation}function g4(){let{matches:e,loaderData:t}=rE(Hu.UseMatches);return x.useMemo(()=>e.map(r=>lR(r,t)),[e,t])}function y4(){var e;let t=x.useContext(gR),r=rE(Hu.UseRouteError),n=bR(Hu.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}function w4(){let{router:e}=h4(wR.UseNavigateStable),t=bR(Hu.UseNavigateStable),r=x.useRef(!1);return yR(()=>{r.current=!0}),x.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,fm({fromRouteId:t},i)))},[e,t])}const b4="startTransition",jC=G2[b4];function _4(e){let{fallbackElement:t,router:r,future:n}=e,[a,i]=x.useState(r.state),{v7_startTransition:o}=n||{},s=x.useCallback(f=>{o&&jC?jC(()=>i(f)):i(f)},[i,o]);x.useLayoutEffect(()=>r.subscribe(s),[r,s]);let l=x.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:f=>r.navigate(f),push:(f,d,p)=>r.navigate(f,{state:d,preventScrollReset:p==null?void 0:p.preventScrollReset}),replace:(f,d,p)=>r.navigate(f,{replace:!0,state:d,preventScrollReset:p==null?void 0:p.preventScrollReset})}),[r]),u=r.basename||"/",c=x.useMemo(()=>({router:r,navigator:l,static:!1,basename:u}),[r,l,u]);return x.createElement(x.Fragment,null,x.createElement(qp.Provider,{value:c},x.createElement(Tg.Provider,{value:a},x.createElement(S4,{basename:u,location:a.location,navigationType:a.historyAction,navigator:l},a.initialized?x.createElement(E4,{routes:r.routes,state:a}):t))),null)}function E4(e){let{routes:t,state:r}=e;return l4(t,void 0,r)}function _R(e){let{to:t,replace:r,state:n,relative:a}=e;Lc()||Ie(!1);let{matches:i}=x.useContext(pi),{pathname:o}=hi(),s=Z1(),l=Og(t,Kp(i).map(c=>c.pathnameBase),o,a==="path"),u=JSON.stringify(l);return x.useEffect(()=>s(JSON.parse(u),{replace:r,state:n,relative:a}),[s,u,a,r,n]),null}function ER(e){return s4(e.context)}function S4(e){let{basename:t="/",children:r=null,location:n,navigationType:a=cr.Pop,navigator:i,static:o=!1}=e;Lc()&&Ie(!1);let s=t.replace(/^\/*/,"/"),l=x.useMemo(()=>({basename:s,navigator:i,static:o}),[s,i,o]);typeof n=="string"&&(n=Zi(n));let{pathname:u="/",search:c="",hash:f="",state:d=null,key:p="default"}=n,h=x.useMemo(()=>{let v=wl(u,s);return v==null?null:{location:{pathname:v,search:c,hash:f,state:d,key:p},navigationType:a}},[s,u,c,f,d,p,a]);return h==null?null:x.createElement(us.Provider,{value:l},x.createElement(Dg.Provider,{children:r,value:h}))}new Promise(()=>{});function x4(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:x.createElement(e.Component),Component:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:x.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** + * React Router DOM v6.16.0 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */function el(){return el=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}function C4(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function O4(e,t){return e.button===0&&(!t||t==="_self")&&!C4(e)}const T4=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],D4=["aria-current","caseSensitive","className","end","style","to","children"];function P4(e,t){return Gz({basename:t==null?void 0:t.basename,future:el({},t==null?void 0:t.future,{v7_prependBasename:!0}),history:mz({window:t==null?void 0:t.window}),hydrationData:(t==null?void 0:t.hydrationData)||k4(),routes:e,mapRouteProperties:x4}).initialize()}function k4(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=el({},t,{errors:A4(t.errors)})),t}function A4(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new X1(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let i=window[a.__subType];if(typeof i=="function")try{let o=new i(a.message);o.stack="",r[n]=o}catch{}}if(r[n]==null){let i=new Error(a.message);i.stack="",r[n]=i}}else r[n]=a;return r}const N4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",R4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,an=x.forwardRef(function(t,r){let{onClick:n,relative:a,reloadDocument:i,replace:o,state:s,target:l,to:u,preventScrollReset:c}=t,f=SR(t,T4),{basename:d}=x.useContext(us),p,h=!1;if(typeof u=="string"&&R4.test(u)&&(p=u,N4))try{let g=new URL(window.location.href),E=u.startsWith("//")?new URL(g.protocol+u):new URL(u),w=wl(E.pathname,d);E.origin===g.origin&&w!=null?u=w+E.search+E.hash:h=!0}catch{}let v=a4(u,{relative:a}),y=j4(u,{replace:o,state:s,target:l,preventScrollReset:c,relative:a});function m(g){n&&n(g),g.defaultPrevented||y(g)}return x.createElement("a",el({},f,{href:p||v,onClick:h||i?n:m,ref:r,target:l}))}),Bh=x.forwardRef(function(t,r){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:o=!1,style:s,to:l,children:u}=t,c=SR(t,D4),f=tE(l,{relative:c.relative}),d=hi(),p=x.useContext(Tg),{navigator:h}=x.useContext(us),v=h.encodeLocation?h.encodeLocation(f).pathname:f.pathname,y=d.pathname,m=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;a||(y=y.toLowerCase(),m=m?m.toLowerCase():null,v=v.toLowerCase());let g=y===v||!o&&y.startsWith(v)&&y.charAt(v.length)==="/",E=m!=null&&(m===v||!o&&m.startsWith(v)&&m.charAt(v.length)==="/"),w=g?n:void 0,C;typeof i=="function"?C=i({isActive:g,isPending:E}):C=[i,g?"active":null,E?"pending":null].filter(Boolean).join(" ");let S=typeof s=="function"?s({isActive:g,isPending:E}):s;return x.createElement(an,el({},c,{"aria-current":w,className:C,ref:r,style:S,to:l}),typeof u=="function"?u({isActive:g,isPending:E}):u)});function M4(e){let{getKey:t,storageKey:r}=e;return L4({getKey:t,storageKey:r}),null}var yb;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(yb||(yb={}));var wb;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(wb||(wb={}));function I4(e){let t=x.useContext(qp);return t||Ie(!1),t}function $4(e){let t=x.useContext(Tg);return t||Ie(!1),t}function j4(e,t){let{target:r,replace:n,state:a,preventScrollReset:i,relative:o}=t===void 0?{}:t,s=Z1(),l=hi(),u=tE(e,{relative:o});return x.useCallback(c=>{if(O4(c,r)){c.preventDefault();let f=n!==void 0?n:Zs(l)===Zs(u);s(e,{replace:f,state:a,preventScrollReset:i,relative:o})}},[l,s,u,n,a,r,e,i,o])}const LC="react-router-scroll-positions";let zh={};function L4(e){let{getKey:t,storageKey:r}=e===void 0?{}:e,{router:n}=I4(yb.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:i}=$4(wb.UseScrollRestoration),{basename:o}=x.useContext(us),s=hi(),l=g4(),u=m4();x.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),F4(x.useCallback(()=>{if(u.state==="idle"){let c=(t?t(s,l):null)||s.key;zh[c]=window.scrollY}sessionStorage.setItem(r||LC,JSON.stringify(zh)),window.history.scrollRestoration="auto"},[r,t,u.state,s,l])),typeof document<"u"&&(x.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(r||LC);c&&(zh=JSON.parse(c))}catch{}},[r]),x.useLayoutEffect(()=>{let c=t&&o!=="/"?(d,p)=>t(el({},d,{pathname:wl(d.pathname,o)||d.pathname}),p):t,f=n==null?void 0:n.enableScrollRestoration(zh,()=>window.scrollY,c);return()=>f&&f()},[n,o,t]),x.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(s.hash){let c=document.getElementById(decodeURIComponent(s.hash.slice(1)));if(c){c.scrollIntoView();return}}i!==!0&&window.scrollTo(0,0)}},[s,a,i]))}function F4(e,t){let{capture:r}=t||{};x.useEffect(()=>{let n=r!=null?{capture:r}:void 0;return window.addEventListener("pagehide",e,n),()=>{window.removeEventListener("pagehide",e,n)}},[e,r])}function Pg(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var xR={exports:{}},ht={};/** @license React v16.13.1 + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Nr=typeof Symbol=="function"&&Symbol.for,nE=Nr?Symbol.for("react.element"):60103,aE=Nr?Symbol.for("react.portal"):60106,kg=Nr?Symbol.for("react.fragment"):60107,Ag=Nr?Symbol.for("react.strict_mode"):60108,Ng=Nr?Symbol.for("react.profiler"):60114,Rg=Nr?Symbol.for("react.provider"):60109,Mg=Nr?Symbol.for("react.context"):60110,iE=Nr?Symbol.for("react.async_mode"):60111,Ig=Nr?Symbol.for("react.concurrent_mode"):60111,$g=Nr?Symbol.for("react.forward_ref"):60112,jg=Nr?Symbol.for("react.suspense"):60113,U4=Nr?Symbol.for("react.suspense_list"):60120,Lg=Nr?Symbol.for("react.memo"):60115,Fg=Nr?Symbol.for("react.lazy"):60116,B4=Nr?Symbol.for("react.block"):60121,z4=Nr?Symbol.for("react.fundamental"):60117,W4=Nr?Symbol.for("react.responder"):60118,H4=Nr?Symbol.for("react.scope"):60119;function Bn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case nE:switch(e=e.type,e){case iE:case Ig:case kg:case Ng:case Ag:case jg:return e;default:switch(e=e&&e.$$typeof,e){case Mg:case $g:case Fg:case Lg:case Rg:return e;default:return t}}case aE:return t}}}function CR(e){return Bn(e)===Ig}ht.AsyncMode=iE;ht.ConcurrentMode=Ig;ht.ContextConsumer=Mg;ht.ContextProvider=Rg;ht.Element=nE;ht.ForwardRef=$g;ht.Fragment=kg;ht.Lazy=Fg;ht.Memo=Lg;ht.Portal=aE;ht.Profiler=Ng;ht.StrictMode=Ag;ht.Suspense=jg;ht.isAsyncMode=function(e){return CR(e)||Bn(e)===iE};ht.isConcurrentMode=CR;ht.isContextConsumer=function(e){return Bn(e)===Mg};ht.isContextProvider=function(e){return Bn(e)===Rg};ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===nE};ht.isForwardRef=function(e){return Bn(e)===$g};ht.isFragment=function(e){return Bn(e)===kg};ht.isLazy=function(e){return Bn(e)===Fg};ht.isMemo=function(e){return Bn(e)===Lg};ht.isPortal=function(e){return Bn(e)===aE};ht.isProfiler=function(e){return Bn(e)===Ng};ht.isStrictMode=function(e){return Bn(e)===Ag};ht.isSuspense=function(e){return Bn(e)===jg};ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===kg||e===Ig||e===Ng||e===Ag||e===jg||e===U4||typeof e=="object"&&e!==null&&(e.$$typeof===Fg||e.$$typeof===Lg||e.$$typeof===Rg||e.$$typeof===Mg||e.$$typeof===$g||e.$$typeof===z4||e.$$typeof===W4||e.$$typeof===H4||e.$$typeof===B4)};ht.typeOf=Bn;xR.exports=ht;var V4=xR.exports;function dm(e,t){return dm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,a){return n.__proto__=a,n},dm(e,t)}function it(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,dm(e,t)}var qa=function(t,r){if(typeof t=="function"){t(r);return}t!==null&&typeof t=="object"&&(t.current=r)},bb=function(t){return t!==null&&typeof t=="object"&&t.hasOwnProperty("current")},Y4=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o0?x.cloneElement(i,a):i;return x.createElement(o,{innerRef:n},s)};function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t-1}function YW(e,t){var r=this.__data__,n=Bg(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function eo(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=pH}var hH=1/0;function El(e){if(typeof e=="string"||Qp(e))return e;var t=e+"";return t=="0"&&1/e==-hH?"-0":t}function vH(e,t,r){t=Jp(t,e);for(var n=-1,a=t.length,i=!1;++na?0:a+t),r=r>a?a:r,r<0&&(r+=a),a=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(a);++n0){if(++t>=EH)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var OH=CH(_H);const MR=OH;function Gg(e,t){return MR(NR(e,t,Zp),e+"")}var TH=Gg(yH);const se=TH;var IR={exports:{}},DH="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",PH=DH,kH=PH;function $R(){}function jR(){}jR.resetWarningCache=$R;var AH=function(){function e(n,a,i,o,s,l){if(l!==kH){var u=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw u.name="Invariant Violation",u}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:jR,resetWarningCache:$R};return r.PropTypes=r,r};IR.exports=AH();var LR=IR.exports;const $=Xr(LR);function K(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kg(e){return e===void 0}var NH=/\s/;function RH(e){for(var t=e.length;t--&&NH.test(e.charAt(t)););return t}var MH=/^\s+/;function IH(e){return e&&e.slice(0,RH(e)+1).replace(MH,"")}var VC=0/0,$H=/^[-+]0x[0-9a-f]+$/i,jH=/^0b[01]+$/i,LH=/^0o[0-7]+$/i,FH=parseInt;function FR(e){if(typeof e=="number")return e;if(Qp(e))return VC;if(Ra(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Ra(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=IH(e);var r=jH.test(e);return r||LH.test(e)?FH(e.slice(2),r?2:8):$H.test(e)?VC:+e}var YC=1/0,UH=17976931348623157e292;function _b(e){if(!e)return e===0?e:0;if(e=FR(e),e===YC||e===-YC){var t=e<0?-1:1;return t*UH}return e===e?e:0}function uE(e){var t=_b(e),r=t%1;return t===t?r?t-r:t:0}function UR(e,t){for(var r=-1,n=e==null?0:e.length,a=0,i=[];++rs))return!1;var u=i.get(e),c=i.get(t);if(u&&c)return u==t&&c==e;var f=-1,d=!0,p=r&W6?new Gu:void 0;for(i.set(e,t),i.set(t,e);++f-1}function nM(e,t,r){for(var n=-1,a=e==null?0:e.length;++n-1?a[i?t[o]:o]:void 0}}var KV=Math.max;function Ob(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var a=r==null?0:uE(r);return a<0&&(a=KV(n+a,0)),eM(e,Sl(t),a)}var qV=GV(Ob);const iM=qV;function QV(e,t){var r;return Uc(e,function(n,a,i){return r=t(n,a,i),!r}),!!r}function oM(e,t,r){if(!Ra(r))return!1;var n=typeof t;return(n=="number"?gi(r)&&Vg(t,r.length):n=="string"&&t in r)?Ug(r[t],e):!1}function Zf(e,t,r){var n=Jt(e)?YR:QV;return r&&oM(e,t,r)&&(t=void 0),n(e,Sl(t))}var XV=function(t,r){return Zf(x.Children.toArray(t),{type:r})},re=function(t){return t==null||Array.isArray(t)&&t.length===0},JV={1:"one",2:"two",3:"three",4:"four",5:"five",6:"six",7:"seven",8:"eight",9:"nine",10:"ten",11:"eleven",12:"twelve",13:"thirteen",14:"fourteen",15:"fifteen",16:"sixteen"};function sO(e){var t=typeof e;return t==="string"||t==="number"?JV[e]||e:""}var T=function(t,r){return t&&r},kr=function(t,r){return t&&t!==!0&&t+" "+r},Ct=function(t,r){return t&&(t===!0?r:t+" "+r)},mm=function(t,r){return!t||t===!0?null:t.replace("large screen","large-screen").replace(/ vertically/g,"-vertically").split(" ").map(function(n){return n.replace("-"," ")+" "+r}).join(" ")},Ia=function(t){return t==="justified"?"justified":kr(t,"aligned")},ro=function(t){return kr(t,"aligned")},rn=function(t,r,n){if(r===void 0&&(r=""),n===void 0&&(n=!1),n&&t==="equal")return"equal width";var a=typeof t;return(a==="string"||a==="number")&&r?sO(t)+" "+r:sO(t)},ZV=200;function sM(e,t,r,n){var a=-1,i=rM,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;r&&(t=Xp(t,qg(r))),n?(i=nM,o=!1):t.length>=ZV&&(i=dE,o=!1,t=new Gu(t));e:for(;++a0&&r(s)?t>1?Jg(s,t-1,r,n,a):hE(a,s):n||(a[a.length]=s)}return a}var tY=Gg(function(e,t){return vm(e)?sM(e,Jg(t,1,vm,!0)):[]});const uO=tY;function rY(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:lE(e,t,r)}function nY(e){return e.split("")}var aY="\\ud800-\\udfff",iY="\\u0300-\\u036f",oY="\\ufe20-\\ufe2f",sY="\\u20d0-\\u20ff",lY=iY+oY+sY,uY="\\ufe0e\\ufe0f",cY="\\u200d",fY=RegExp("["+cY+aY+lY+uY+"]");function mE(e){return fY.test(e)}var lM="\\ud800-\\udfff",dY="\\u0300-\\u036f",pY="\\ufe20-\\ufe2f",hY="\\u20d0-\\u20ff",vY=dY+pY+hY,mY="\\ufe0e\\ufe0f",gY="["+lM+"]",Tb="["+vY+"]",Db="\\ud83c[\\udffb-\\udfff]",yY="(?:"+Tb+"|"+Db+")",uM="[^"+lM+"]",cM="(?:\\ud83c[\\udde6-\\uddff]){2}",fM="[\\ud800-\\udbff][\\udc00-\\udfff]",wY="\\u200d",dM=yY+"?",pM="["+mY+"]?",bY="(?:"+wY+"(?:"+[uM,cM,fM].join("|")+")"+pM+dM+")*",_Y=pM+dM+bY,EY="(?:"+[uM+Tb+"?",Tb,cM,fM,gY].join("|")+")",SY=RegExp(Db+"(?="+Db+")|"+EY+_Y,"g");function xY(e){return e.match(SY)||[]}function CY(e){return mE(e)?xY(e):nY(e)}function hM(e,t,r){t=="__proto__"&&pm?pm(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var OY=Object.prototype,TY=OY.hasOwnProperty;function gE(e,t,r){var n=e[t];(!(TY.call(e,t)&&Ug(n,r))||r===void 0&&!(t in e))&&hM(e,t,r)}function vM(e,t,r,n){if(!Ra(e))return e;t=Jp(t,e);for(var a=-1,i=t.length,o=i-1,s=e;s!=null&&++a=0;a-=1)this.handlers[a].called||(this.handlers[a].called=!0,this.handlers[a](t));for(var i=n;i>=0;i-=1)this.handlers[i].called=!1}else(0,this.handlers[n])(t)}},{key:"hasHandlers",value:function(){return this.handlers.length>0}},{key:"removeHandlers",value:function(t){for(var r=[],n=this.handlers.length,a=0;a0;var r=this.handlerSets.get(t);return!!r&&r.hasHandlers()}},{key:"removeHandlers",value:function(t,r){var n=dO(this.handlerSets);if(!n.has(t))return new e(this.poolName,n);var a=n.get(t).removeHandlers(r);return a.hasHandlers()?n.set(t,a):n.delete(t),new e(this.poolName,n)}}]),e}();ta(Pb,"createByType",function(e,t,r){var n=new Map;return n.set(t,new _M(r)),new Pb(e,n)});var YY=function(){function e(t){var r=this;eh(this,e),ta(this,"handlers",new Map),ta(this,"pools",new Map),ta(this,"target",void 0),ta(this,"createEmitter",function(n){return function(a){r.pools.forEach(function(i){i.dispatchEvent(n,a)})}}),this.target=t}return th(e,[{key:"addHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t);this.pools.set(t,a.addHandlers(r,n))}else this.pools.set(t,Pb.createByType(t,r,n));this.handlers.has(r)||this.addTargetHandler(r)}},{key:"hasHandlers",value:function(){return this.handlers.size>0}},{key:"removeHandlers",value:function(t,r,n){if(this.pools.has(t)){var a=this.pools.get(t).removeHandlers(r,n);a.hasHandlers()?this.pools.set(t,a):this.pools.delete(t);var i=!1;this.pools.forEach(function(o){return i=i||o.hasHandlers(r)}),i||this.removeTargetHandler(r)}}},{key:"addTargetHandler",value:function(t){var r=this.createEmitter(t);this.handlers.set(t,r),this.target.addEventListener(t,r,!0)}},{key:"removeTargetHandler",value:function(t){this.handlers.has(t)&&(this.target.removeEventListener(t,this.handlers.get(t),!0),this.handlers.delete(t))}}]),e}(),GY=function(){function e(){var t=this;eh(this,e),ta(this,"targets",new Map),ta(this,"getTarget",function(r){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=hO(r);if(t.targets.has(a))return t.targets.get(a);if(!n)return null;var i=new YY(a);return t.targets.set(a,i),i}),ta(this,"removeTarget",function(r){t.targets.delete(hO(r))})}return th(e,[{key:"sub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o;this.getTarget(i).addHandlers(s,t,pO(r))}}},{key:"unsub",value:function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(cO.canUseDOM){var a=n.target,i=a===void 0?document:a,o=n.pool,s=o===void 0?"default":o,l=this.getTarget(i,!1);l&&(l.removeHandlers(s,t,pO(r)),l.hasHandlers()||this.removeTarget(i))}}}]),e}(),kb=new GY,P0=function(e){function t(){return eh(this,t),HY(this,wM(t).apply(this,arguments))}return zY(t,BY.PureComponent),th(t,[{key:"componentDidMount",value:function(){this.subscribe(this.props)}},{key:"componentDidUpdate",value:function(r){this.unsubscribe(r),this.subscribe(this.props)}},{key:"componentWillUnmount",value:function(){this.unsubscribe(this.props)}},{key:"subscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.sub(n,a,{pool:i,target:o})}},{key:"unsubscribe",value:function(r){var n=r.name,a=r.on,i=r.pool,o=r.target;kb.unsub(n,a,{pool:i,target:o})}},{key:"render",value:function(){return null}}]),t}();ta(P0,"defaultProps",{pool:"default",target:"document"}),P0.propTypes={},gm.instance=kb,gm.default=P0;var _E;_E=gm;bE.exports=_E.default;var Rf=bE.exports.instance=_E.instance,KY=bE.exports;const Ci=Xr(KY);function EM(){}var qY=1/0,QY=_u&&1/pE(new _u([,-0]))[1]==qY?function(e){return new _u(e)}:EM;const XY=QY;var JY=200;function SM(e,t,r){var n=-1,a=rM,i=e.length,o=!0,s=[],l=s;if(r)o=!1,a=nM;else if(i>=JY){var u=t?null:XY(e);if(u)return pE(u);o=!1,a=dE,l=new Gu}else l=t?[]:s;e:for(;++n-1:!!a&&tM(e,t,r)>-1}var xM=["selected","defaultValue","defaultChecked","accept","autoCapitalize","autoComplete","autoCorrect","autoFocus","checked","disabled","enterKeyHint","form","id","inputMode","lang","list","max","maxLength","min","minLength","multiple","name","pattern","placeholder","readOnly","required","step","title","type","value"],p8=["onKeyDown","onKeyPress","onKeyUp","onFocus","onBlur","onChange","onInput","onClick","onContextMenu","onDrag","onDragEnd","onDragEnter","onDragExit","onDragLeave","onDragOver","onDragStart","onDrop","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onSelect","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart"],h8=[].concat(xM,p8),CM=["alt","height","src","srcSet","width","loading"],Zg=function(t,r){r===void 0&&(r={});var n=r,a=n.htmlProps,i=a===void 0?h8:a,o=n.includeAria,s=o===void 0?!0:o,l={},u={};return HV(t,function(c,f){var d=s&&(/^aria-.*$/.test(f)||f==="role"),p=Qa(i,f)||d?l:u;p[f]=c}),[l,u]},v8=typeof document=="object"&&document!==null,m8=typeof window=="object"&&window!==null&&window.self===window,g8=function e(){return Be(e.override)?v8&&m8:e.override};const Ms=g8;var y8=Math.max,w8=Math.min;function b8(e,t,r){return e>=w8(t,r)&&e0&&a.indexOf(r)===n})):[]}function P8(e,t){return[t.filter(function(r){return e.indexOf(r)===-1}),e.filter(function(r){return t.indexOf(r)===-1})]}var yO=new Map,k0=function(t,r){var n=D8(r),a=P8(yO.get(t)||[],n),i=a[0],o=a[1];t&&(i.forEach(function(s){return t.classList.add(s)}),o.forEach(function(s){return t.classList.remove(s)})),yO.set(t,n)},k8=function(){var t=this;this.add=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);a.add(n);return}var i=new Set;i.add(n),t.nodes.set(r,i)},this.del=function(r,n){if(t.nodes.has(r)){var a=t.nodes.get(r);if(a.size===1){t.nodes.delete(r);return}a.delete(n)}},this.emit=function(r,n){n(r,t.nodes.get(r))},this.nodes=new Map},gf=new k8;function A8(e,t){var r=b.useRef(),n=b.useRef(!1);gO(function(){if(r.current=t,n.current){var a=bb(e)?e.current:e;gf.emit(a,k0)}n.current=!0},[t]),gO(function(){var a=bb(e)?e.current:e;return gf.add(a,r),gf.emit(a,k0),function(){gf.del(a,r),gf.emit(a,k0)}},[e])}var N8=Gg(function(e,t){return vm(e)?sM(e,t):[]});const R8=N8;function qu(e){var t=e.children,r=e.className,n=e.content,a=e.size,i=z(a,"icons",r),o=V(qu,e),s=q(qu,e);return b.createElement(s,P({},o,{className:i}),re(t)?n:t)}qu.handledProps=["as","children","className","content","size"];qu.propTypes={};qu.defaultProps={as:"i"};var nl=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"};for(var Hh=0;Hh<24;Hh+=1)ym[112+Hh]="F"+(Hh+1);for(var A0=0;A0<26;A0+=1){var N0=A0+65;ym[N0]=[String.fromCharCode(N0+32),String.fromCharCode(N0)]}var oe={codes:ym,getCode:function(t){return wO(t)?t.keyCode||t.which||this[t.key]:this[t]},getKey:function(t){var r=wO(t);if(r&&t.key)return t.key;var n=ym[r?t.keyCode||t.which:t];return Array.isArray(n)&&(r?n=n[t.shiftKey?1:0]:n=n[0]),n},Cancel:3,Help:6,Backspace:8,Tab:9,Clear:12,Enter:13,Shift:16,Control:17,Alt:18,Pause:19,CapsLock:20,Escape:27,Convert:28,NonConvert:29,Accept:30,ModeChange:31," ":32,PageUp:33,PageDown:34,End:35,Home:36,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Select:41,Print:42,Execute:43,PrintScreen:44,Insert:45,Delete:46,0:48,")":48,1:49,"!":49,2:50,"@":50,3:51,"#":51,4:52,$:52,5:53,"%":53,6:54,"^":54,7:55,"&":55,8:56,"*":56,9:57,"(":57,a:65,A:65,b:66,B:66,c:67,C:67,d:68,D:68,e:69,E:69,f:70,F:70,g:71,G:71,h:72,H:72,i:73,I:73,j:74,J:74,k:75,K:75,l:76,L:76,m:77,M:77,n:78,N:78,o:79,O:79,p:80,P:80,q:81,Q:81,r:82,R:82,s:83,S:83,t:84,T:84,u:85,U:85,v:86,V:86,w:87,W:87,x:88,X:88,y:89,Y:89,z:90,Z:90,OS:91,ContextMenu:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,F20:131,F21:132,F22:133,F23:134,F24:135,NumLock:144,ScrollLock:145,VolumeMute:181,VolumeDown:182,VolumeUp:183,";":186,":":186,"=":187,"+":187,",":188,"<":188,"-":189,_:189,".":190,">":190,"/":191,"?":191,"`":192,"~":192,"[":219,"{":219,"\\":220,"|":220,"]":221,"}":221,"'":222,'"':222,Meta:224,AltGraph:225,Attn:246,CrSel:247,ExSel:248,EraseEof:249,Play:250,ZoomOut:251};oe.Spacebar=oe[" "];oe.Digit0=oe[0];oe.Digit1=oe[1];oe.Digit2=oe[2];oe.Digit3=oe[3];oe.Digit4=oe[4];oe.Digit5=oe[5];oe.Digit6=oe[6];oe.Digit7=oe[7];oe.Digit8=oe[8];oe.Digit9=oe[9];oe.Tilde=oe["~"];oe.GraveAccent=oe["`"];oe.ExclamationPoint=oe["!"];oe.AtSign=oe["@"];oe.PoundSign=oe["#"];oe.PercentSign=oe["%"];oe.Caret=oe["^"];oe.Ampersand=oe["&"];oe.PlusSign=oe["+"];oe.MinusSign=oe["-"];oe.EqualsSign=oe["="];oe.DivisionSign=oe["/"];oe.MultiplicationSign=oe["*"];oe.Comma=oe[","];oe.Decimal=oe["."];oe.Colon=oe[":"];oe.Semicolon=oe[";"];oe.Pipe=oe["|"];oe.BackSlash=oe["\\"];oe.QuestionMark=oe["?"];oe.SingleQuote=oe["'"];oe.DoubleQuote=oe['"'];oe.LeftCurlyBrace=oe["{"];oe.RightCurlyBrace=oe["}"];oe.LeftParenthesis=oe["("];oe.RightParenthesis=oe[")"];oe.LeftAngleBracket=oe["<"];oe.RightAngleBracket=oe[">"];oe.LeftSquareBracket=oe["["];oe.RightSquareBracket=oe["]"];var M8=oe;const _r=Xr(M8);var SE=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?f-1:0),p=1;p1?p-1:0),v=1;v1?f-1:0),p=1;p1?d-1:0),h=1;h1?d-1:0),h=1;h=u}),u>=f.length-1&&(p=d[d.length-1]);else{var v=Ob(f,["value",c]);p=Qa(d,v)?v:void 0}return(!p||p<0)&&(p=d[0]),p}var PO=function(t,r){return Be(t)?r:t},kO=function(t){return t&&t.map(function(r){return yE(r,["key","value"])})};function XM(e){var t=e.flag,r=e.image,n=e.text;return Vu(n)?n:{content:b.createElement(b.Fragment,null,GM.create(t),qt.create(r),n)}}var pr=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o=u||u===1){n.open(s);return}se(n.searchRef.current,"focus")},n.handleIconClick=function(s){var l=n.props.clearable,u=n.hasValue();se(n.props,"onClick",s,n.props),s.stopPropagation(),l&&u?n.clearValue(s):n.toggle(s)},n.handleItemClick=function(s,l){var u=n.props,c=u.multiple,f=u.search,d=n.state.value,p=l.value;if(s.stopPropagation(),(c||l.disabled)&&s.nativeEvent.stopImmediatePropagation(),!l.disabled){var h=l["data-additional"],v=c?TO(n.state.value,[p]):p,y=c?!!uO(v,d).length:v!==d;y&&(n.setState({value:v}),n.handleChange(s,v)),n.clearSearchQuery(),se(f?n.searchRef.current:n.ref.current,"focus"),n.closeOnChange(s),h&&se(n.props,"onAddItem",s,P({},n.props,{value:p}))}},n.handleFocus=function(s){var l=n.state.focus;l||(se(n.props,"onFocus",s,n.props),n.setState({focus:!0}))},n.handleBlur=function(s){var l=Ea(s,"currentTarget");if(!(l&&l.contains(document.activeElement))){var u=n.props,c=u.closeOnBlur,f=u.multiple,d=u.selectOnBlur;n.isMouseDown||(se(n.props,"onBlur",s,n.props),d&&!f&&(n.makeSelectedItemActive(s,n.state.selectedIndex),c&&n.close()),n.setState({focus:!1}),n.clearSearchQuery())}},n.handleSearchChange=function(s,l){var u=l.value;s.stopPropagation();var c=n.props.minCharacters,f=n.state.open,d=u;if(se(n.props,"onSearchChange",s,P({},n.props,{searchQuery:d})),n.setState({searchQuery:d,selectedIndex:0}),!f&&d.length>=c){n.open();return}f&&c!==1&&d.lengthc||d<0)?d=l:d>c?d=0:d<0&&(d=c),u[d].disabled?n.getSelectedIndexAfterMove(s,d):d}},n.handleIconOverrides=function(s){var l=n.props.clearable,u=z(l&&n.hasValue()&&"clear",s.className);return{className:u,onClick:function(f){se(s,"onClick",f,s),n.handleIconClick(f)}}},n.clearValue=function(s){var l=n.props.multiple,u=l?[]:"";n.setState({value:u}),n.handleChange(s,u)},n.computeSearchInputTabIndex=function(){var s=n.props,l=s.disabled,u=s.tabIndex;return Be(u)?l?-1:0:u},n.computeSearchInputWidth=function(){var s=n.state.searchQuery;if(n.sizerRef.current&&s){n.sizerRef.current.style.display="inline",n.sizerRef.current.textContent=s;var l=Math.ceil(n.sizerRef.current.getBoundingClientRect().width);return n.sizerRef.current.style.removeProperty("display"),l}},n.computeTabIndex=function(){var s=n.props,l=s.disabled,u=s.search,c=s.tabIndex;if(!u)return l?-1:Be(c)?0:c},n.handleSearchInputOverrides=function(s){return{onChange:function(u,c){se(s,"onChange",u,c),n.handleSearchChange(u,c)}}},n.hasValue=function(){var s=n.props.multiple,l=n.state.value;return s?!Nf(l):!Be(l)&&l!==""},n.scrollSelectedItemIntoView=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=s.querySelector(".item.selected");if(l){var u=l.offsetTops.scrollTop+s.clientHeight;u?s.scrollTop=l.offsetTop:c&&(s.scrollTop=l.offsetTop+l.clientHeight-s.clientHeight)}}}},n.setOpenDirection=function(){if(n.ref.current){var s=n.ref.current.querySelector(".menu.visible");if(s){var l=n.ref.current.getBoundingClientRect(),u=s.clientHeight,c=document.documentElement.clientHeight-l.top-l.height-u,f=l.top-u,d=c<0&&f>c;!d!=!n.state.upward&&n.setState({upward:d})}}},n.open=function(s,l){s===void 0&&(s=null),l===void 0&&(l=!0);var u=n.props,c=u.disabled,f=u.search;c||(f&&se(n.searchRef.current,"focus"),se(n.props,"onOpen",s,n.props),l&&n.setState({open:!0}),n.scrollSelectedItemIntoView())},n.close=function(s,l){l===void 0&&(l=n.handleClose),n.state.open&&(se(n.props,"onClose",s,n.props),n.setState({open:!1},l))},n.handleClose=function(){var s=document.activeElement===n.searchRef.current;!s&&n.ref.current&&n.ref.current.blur();var l=document.activeElement===n.ref.current,u=s||l;n.setState({focus:u})},n.toggle=function(s){return n.state.open?n.close(s):n.open(s)},n.renderText=function(){var s=n.props,l=s.multiple,u=s.placeholder,c=s.search,f=s.text,d=n.state,p=d.searchQuery,h=d.selectedIndex,v=d.value,y=d.open,m=n.hasValue(),g=z(u&&!m&&"default","text",c&&p&&"filtered"),E=u,w;return f?E=f:y&&!l?w=n.getSelectedItem(h):m&&(w=n.getItemByValue(v)),Yo.create(w?XM(w):E,{defaultProps:{className:g}})},n.renderSearchInput=function(){var s=n.props,l=s.search,u=s.searchInput,c=n.state.searchQuery;return l&&b.createElement(jn,{innerRef:n.searchRef},qM.create(u,{defaultProps:{style:{width:n.computeSearchInputWidth()},tabIndex:n.computeSearchInputTabIndex(),value:c},overrideProps:n.handleSearchInputOverrides}))},n.renderSearchSizer=function(){var s=n.props,l=s.search,u=s.multiple;return l&&u&&b.createElement("span",{className:"sizer",ref:n.sizerRef})},n.renderLabels=function(){var s=n.props,l=s.multiple,u=s.renderLabel,c=n.state,f=c.selectedLabel,d=c.value;if(!(!l||Nf(d))){var p=bn(d,n.getItemByValue);return bn(I5(p),function(h,v){var y={active:h.value===f,as:"a",key:PO(h.key,h.value),onClick:n.handleLabelClick,onRemove:n.handleLabelRemove,value:h.value};return Xt.create(u(h,v,y),{defaultProps:y})})}},n.renderOptions=function(){var s=n.props,l=s.lazyLoad,u=s.multiple,c=s.search,f=s.noResultsMessage,d=n.state,p=d.open,h=d.selectedIndex,v=d.value;if(l&&!p)return null;var y=ou({value:n.state.value,options:n.props.options,searchQuery:n.state.searchQuery,additionLabel:n.props.additionLabel,additionPosition:n.props.additionPosition,allowAdditions:n.props.allowAdditions,deburr:n.props.deburr,multiple:n.props.multiple,search:n.props.search});if(f!==null&&c&&Nf(y))return b.createElement("div",{className:"message"},f);var m=u?function(g){return Qa(v,g)}:function(g){return g===v};return bn(y,function(g,E){return KM.create(P({active:m(g.value),selected:h===E},g,{key:PO(g.key,g.value),style:P({},g.style,{pointerEvents:"all"})}),{generateKey:!1,overrideProps:function(C){return{onClick:function(O,D){C.onClick==null||C.onClick(O,D),n.handleItemClick(O,D)}}}})})},n.renderMenu=function(){var s=n.props,l=s.children,u=s.direction,c=s.header,f=n.state.open,d=n.getDropdownMenuAriaOptions();if(!re(l)){var p=x.Children.only(l),h=z(u,T(f,"visible"),p.props.className);return x.cloneElement(p,P({className:h},d))}return b.createElement(Zu,P({},d,{direction:u,open:f}),Vo.create(c,{autoGenerateKey:!1}),n.renderOptions())},n}var r=t.prototype;return r.getInitialAutoControlledState=function(){return{focus:!1,searchQuery:""}},t.getAutoControlledStateFromProps=function(a,i,o){var s={__options:a.options,__value:i.value},l=!ed(o.__value,i.value)||!S8(kO(a.options),kO(o.__options));return l&&(s.selectedIndex=DO({additionLabel:a.additionLabel,additionPosition:a.additionPosition,allowAdditions:a.allowAdditions,deburr:a.deburr,multiple:a.multiple,search:a.search,selectedIndex:i.selectedIndex,value:i.value,options:a.options,searchQuery:i.searchQuery})),s},r.componentDidMount=function(){var a=this.state.open;a&&this.open(null,!1)},r.shouldComponentUpdate=function(a,i){return!ed(a,this.props)||!ed(i,this.state)},r.componentDidUpdate=function(a,i){var o=this.props,s=o.closeOnBlur,l=o.minCharacters,u=o.openOnFocus,c=o.search;if(!i.focus&&this.state.focus){if(!this.isMouseDown){var f=!c||c&&l===1&&!this.state.open;u&&f&&this.open()}}else i.focus&&!this.state.focus&&!this.isMouseDown&&s&&this.close();!i.open&&this.state.open?(this.setOpenDirection(),this.scrollSelectedItemIntoView()):i.open&&this.state.open,i.selectedIndex!==this.state.selectedIndex&&this.scrollSelectedItemIntoView()},r.getDropdownMenuAriaOptions=function(){var a=this.props,i=a.search,o=a.multiple,s={};return i&&(s["aria-multiselectable"]=o,s.role="listbox"),s},r.render=function(){var a=this.props,i=a.basic,o=a.button,s=a.className,l=a.compact,u=a.disabled,c=a.error,f=a.fluid,d=a.floating,p=a.icon,h=a.inline,v=a.item,y=a.labeled,m=a.loading,g=a.multiple,E=a.pointing,w=a.search,C=a.selection,S=a.scrolling,O=a.simple,D=a.trigger,N=this.state,R=N.focus,j=N.open,U=N.upward,Q=z("ui",T(j,"active visible"),T(u,"disabled"),T(c,"error"),T(m,"loading"),T(i,"basic"),T(o,"button"),T(l,"compact"),T(f,"fluid"),T(d,"floating"),T(h,"inline"),T(y,"labeled"),T(v,"item"),T(g,"multiple"),T(w,"search"),T(C,"selection"),T(O,"simple"),T(S,"scrolling"),T(U,"upward"),Ct(E,"pointing"),"dropdown",s),X=V(t,this.props),J=q(t,this.props),te=this.getDropdownAriaOptions(J,this.props);return b.createElement(jn,{innerRef:this.ref},b.createElement(J,P({},X,te,{className:Q,onBlur:this.handleBlur,onClick:this.handleClick,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,onFocus:this.handleFocus,onChange:this.handleChange,tabIndex:this.computeTabIndex()}),this.renderLabels(),this.renderSearchInput(),this.renderSearchSizer(),D||this.renderText(),jt.create(p,{overrideProps:this.handleIconOverrides,autoGenerateKey:!1}),this.renderMenu(),j&&b.createElement(Ci,{name:"keydown",on:this.closeOnEscape}),j&&b.createElement(Ci,{name:"click",on:this.closeOnDocumentClick}),R&&b.createElement(Ci,{name:"keydown",on:this.removeItemOnBackspace})))},t}(Bc);pr.handledProps=["additionLabel","additionPosition","allowAdditions","as","basic","button","children","className","clearable","closeOnBlur","closeOnChange","closeOnEscape","compact","deburr","defaultOpen","defaultSearchQuery","defaultSelectedLabel","defaultUpward","defaultValue","direction","disabled","error","floating","fluid","header","icon","inline","item","labeled","lazyLoad","loading","minCharacters","multiple","noResultsMessage","onAddItem","onBlur","onChange","onClick","onClose","onFocus","onLabelClick","onMouseDown","onOpen","onSearchChange","open","openOnFocus","options","placeholder","pointing","renderLabel","scrolling","search","searchInput","searchQuery","selectOnBlur","selectOnNavigation","selectedLabel","selection","simple","tabIndex","text","trigger","upward","value","wrapSelection"];pr.propTypes={};pr.defaultProps={additionLabel:"Add ",additionPosition:"top",closeOnBlur:!0,closeOnEscape:!0,deburr:!1,icon:"dropdown",minCharacters:1,noResultsMessage:"No results found.",openOnFocus:!0,renderLabel:XM,searchInput:"text",selectOnBlur:!0,selectOnNavigation:!0,wrapSelection:!0};pr.autoControlledProps=["open","searchQuery","selectedLabel","value","upward"];pr.Divider=Yd;pr.Header=Vo;pr.Item=KM;pr.Menu=Zu;pr.SearchInput=qM;pr.Text=Yo;function fs(e){return b.createElement(pr,P({},e,{selection:!0}))}fs.handledProps=["options"];fs.propTypes={};fs.Divider=pr.Divider;fs.Header=pr.Header;fs.Item=pr.Item;fs.Menu=pr.Menu;var ey=function(e){it(t,e);function t(){for(var n,a=arguments.length,i=new Array(a),o=0;o1?u-1:0),f=1;f1?r-1:0),a=1;a"u")return!1;var t=Ln(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function R7(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},a=t.attributes[r]||{},i=t.elements[r];!ia(i)||!li(i)||(Object.assign(i.style,n),Object.keys(a).forEach(function(o){var s=a[o];s===!1?i.removeAttribute(o):i.setAttribute(o,s===!0?"":s)}))})}function M7(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var a=t.elements[n],i=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,u){return l[u]="",l},{});!ia(a)||!li(a)||(Object.assign(a.style,s),Object.keys(i).forEach(function(l){a.removeAttribute(l)}))})}}const I7={name:"applyStyles",enabled:!0,phase:"write",fn:R7,effect:M7,requires:["computeStyles"]};function ii(e){return e.split("-")[0]}var $s=Math.max,wm=Math.min,pc=Math.round;function $b(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function rI(){return!/^((?!chrome|android).)*safari/i.test($b())}function hc(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),a=1,i=1;t&&ia(e)&&(a=e.offsetWidth>0&&pc(n.width)/e.offsetWidth||1,i=e.offsetHeight>0&&pc(n.height)/e.offsetHeight||1);var o=ol(e)?Ln(e):window,s=o.visualViewport,l=!rI()&&r,u=(n.left+(l&&s?s.offsetLeft:0))/a,c=(n.top+(l&&s?s.offsetTop:0))/i,f=n.width/a,d=n.height/i;return{width:f,height:d,top:c,right:u+f,bottom:c+d,left:u,x:u,y:c}}function DE(e){var t=hc(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function nI(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&TE(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Yi(e){return Ln(e).getComputedStyle(e)}function $7(e){return["table","td","th"].indexOf(li(e))>=0}function ds(e){return((ol(e)?e.ownerDocument:e.document)||window.document).documentElement}function ty(e){return li(e)==="html"?e:e.assignedSlot||e.parentNode||(TE(e)?e.host:null)||ds(e)}function MO(e){return!ia(e)||Yi(e).position==="fixed"?null:e.offsetParent}function j7(e){var t=/firefox/i.test($b()),r=/Trident/i.test($b());if(r&&ia(e)){var n=Yi(e);if(n.position==="fixed")return null}var a=ty(e);for(TE(a)&&(a=a.host);ia(a)&&["html","body"].indexOf(li(a))<0;){var i=Yi(a);if(i.transform!=="none"||i.perspective!=="none"||i.contain==="paint"||["transform","perspective"].indexOf(i.willChange)!==-1||t&&i.willChange==="filter"||t&&i.filter&&i.filter!=="none")return a;a=a.parentNode}return null}function nh(e){for(var t=Ln(e),r=MO(e);r&&$7(r)&&Yi(r).position==="static";)r=MO(r);return r&&(li(r)==="html"||li(r)==="body"&&Yi(r).position==="static")?t:r||j7(e)||t}function PE(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function td(e,t,r){return $s(e,wm(t,r))}function L7(e,t,r){var n=td(e,t,r);return n>r?r:n}function aI(){return{top:0,right:0,bottom:0,left:0}}function iI(e){return Object.assign({},aI(),e)}function oI(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var F7=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,iI(typeof t!="number"?t:oI(t,rh))};function U7(e){var t,r=e.state,n=e.name,a=e.options,i=r.elements.arrow,o=r.modifiersData.popperOffsets,s=ii(r.placement),l=PE(s),u=[En,fa].indexOf(s)>=0,c=u?"height":"width";if(!(!i||!o)){var f=F7(a.padding,r),d=DE(i),p=l==="y"?_n:En,h=l==="y"?ca:fa,v=r.rects.reference[c]+r.rects.reference[l]-o[l]-r.rects.popper[c],y=o[l]-r.rects.reference[l],m=nh(i),g=m?l==="y"?m.clientHeight||0:m.clientWidth||0:0,E=v/2-y/2,w=f[p],C=g-d[c]-f[h],S=g/2-d[c]/2+E,O=td(w,S,C),D=l;r.modifiersData[n]=(t={},t[D]=O,t.centerOffset=O-S,t)}}function B7(e){var t=e.state,r=e.options,n=r.element,a=n===void 0?"[data-popper-arrow]":n;a!=null&&(typeof a=="string"&&(a=t.elements.popper.querySelector(a),!a)||nI(t.elements.popper,a)&&(t.elements.arrow=a))}const z7={name:"arrow",enabled:!0,phase:"main",fn:U7,effect:B7,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function vc(e){return e.split("-")[1]}var W7={top:"auto",right:"auto",bottom:"auto",left:"auto"};function H7(e,t){var r=e.x,n=e.y,a=t.devicePixelRatio||1;return{x:pc(r*a)/a||0,y:pc(n*a)/a||0}}function IO(e){var t,r=e.popper,n=e.popperRect,a=e.placement,i=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,u=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=o.x,p=d===void 0?0:d,h=o.y,v=h===void 0?0:h,y=typeof c=="function"?c({x:p,y:v}):{x:p,y:v};p=y.x,v=y.y;var m=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),E=En,w=_n,C=window;if(u){var S=nh(r),O="clientHeight",D="clientWidth";if(S===Ln(r)&&(S=ds(r),Yi(S).position!=="static"&&s==="absolute"&&(O="scrollHeight",D="scrollWidth")),S=S,a===_n||(a===En||a===fa)&&i===ip){w=ca;var N=f&&S===C&&C.visualViewport?C.visualViewport.height:S[O];v-=N-n.height,v*=l?1:-1}if(a===En||(a===_n||a===ca)&&i===ip){E=fa;var R=f&&S===C&&C.visualViewport?C.visualViewport.width:S[D];p-=R-n.width,p*=l?1:-1}}var j=Object.assign({position:s},u&&W7),U=c===!0?H7({x:p,y:v},Ln(r)):{x:p,y:v};if(p=U.x,v=U.y,l){var Q;return Object.assign({},j,(Q={},Q[w]=g?"0":"",Q[E]=m?"0":"",Q.transform=(C.devicePixelRatio||1)<=1?"translate("+p+"px, "+v+"px)":"translate3d("+p+"px, "+v+"px, 0)",Q))}return Object.assign({},j,(t={},t[w]=g?v+"px":"",t[E]=m?p+"px":"",t.transform="",t))}function V7(e){var t=e.state,r=e.options,n=r.gpuAcceleration,a=n===void 0?!0:n,i=r.adaptive,o=i===void 0?!0:i,s=r.roundOffsets,l=s===void 0?!0:s,u={placement:ii(t.placement),variation:vc(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:a,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,IO(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,IO(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const Y7={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:V7,data:{}};var Vh={passive:!0};function G7(e){var t=e.state,r=e.instance,n=e.options,a=n.scroll,i=a===void 0?!0:a,o=n.resize,s=o===void 0?!0:o,l=Ln(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&u.forEach(function(c){c.addEventListener("scroll",r.update,Vh)}),s&&l.addEventListener("resize",r.update,Vh),function(){i&&u.forEach(function(c){c.removeEventListener("scroll",r.update,Vh)}),s&&l.removeEventListener("resize",r.update,Vh)}}const K7={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:G7,data:{}};var q7={left:"right",right:"left",bottom:"top",top:"bottom"};function xv(e){return e.replace(/left|right|bottom|top/g,function(t){return q7[t]})}var Q7={start:"end",end:"start"};function $O(e){return e.replace(/start|end/g,function(t){return Q7[t]})}function kE(e){var t=Ln(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function AE(e){return hc(ds(e)).left+kE(e).scrollLeft}function X7(e,t){var r=Ln(e),n=ds(e),a=r.visualViewport,i=n.clientWidth,o=n.clientHeight,s=0,l=0;if(a){i=a.width,o=a.height;var u=rI();(u||!u&&t==="fixed")&&(s=a.offsetLeft,l=a.offsetTop)}return{width:i,height:o,x:s+AE(e),y:l}}function J7(e){var t,r=ds(e),n=kE(e),a=(t=e.ownerDocument)==null?void 0:t.body,i=$s(r.scrollWidth,r.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),o=$s(r.scrollHeight,r.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0),s=-n.scrollLeft+AE(e),l=-n.scrollTop;return Yi(a||r).direction==="rtl"&&(s+=$s(r.clientWidth,a?a.clientWidth:0)-i),{width:i,height:o,x:s,y:l}}function NE(e){var t=Yi(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+a+n)}function sI(e){return["html","body","#document"].indexOf(li(e))>=0?e.ownerDocument.body:ia(e)&&NE(e)?e:sI(ty(e))}function rd(e,t){var r;t===void 0&&(t=[]);var n=sI(e),a=n===((r=e.ownerDocument)==null?void 0:r.body),i=Ln(n),o=a?[i].concat(i.visualViewport||[],NE(n)?n:[]):n,s=t.concat(o);return a?s:s.concat(rd(ty(o)))}function jb(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Z7(e,t){var r=hc(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function jO(e,t,r){return t===eI?jb(X7(e,r)):ol(t)?Z7(t,r):jb(J7(ds(e)))}function eG(e){var t=rd(ty(e)),r=["absolute","fixed"].indexOf(Yi(e).position)>=0,n=r&&ia(e)?nh(e):e;return ol(n)?t.filter(function(a){return ol(a)&&nI(a,n)&&li(a)!=="body"}):[]}function tG(e,t,r,n){var a=t==="clippingParents"?eG(e):[].concat(t),i=[].concat(a,[r]),o=i[0],s=i.reduce(function(l,u){var c=jO(e,u,n);return l.top=$s(c.top,l.top),l.right=wm(c.right,l.right),l.bottom=wm(c.bottom,l.bottom),l.left=$s(c.left,l.left),l},jO(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function lI(e){var t=e.reference,r=e.element,n=e.placement,a=n?ii(n):null,i=n?vc(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(a){case _n:l={x:o,y:t.y-r.height};break;case ca:l={x:o,y:t.y+t.height};break;case fa:l={x:t.x+t.width,y:s};break;case En:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var u=a?PE(a):null;if(u!=null){var c=u==="y"?"height":"width";switch(i){case dc:l[u]=l[u]-(t[c]/2-r[c]/2);break;case ip:l[u]=l[u]+(t[c]/2-r[c]/2);break}}return l}function op(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=n===void 0?e.placement:n,i=r.strategy,o=i===void 0?e.strategy:i,s=r.boundary,l=s===void 0?_7:s,u=r.rootBoundary,c=u===void 0?eI:u,f=r.elementContext,d=f===void 0?yf:f,p=r.altBoundary,h=p===void 0?!1:p,v=r.padding,y=v===void 0?0:v,m=iI(typeof y!="number"?y:oI(y,rh)),g=d===yf?E7:yf,E=e.rects.popper,w=e.elements[h?g:d],C=tG(ol(w)?w:w.contextElement||ds(e.elements.popper),l,c,o),S=hc(e.elements.reference),O=lI({reference:S,element:E,strategy:"absolute",placement:a}),D=jb(Object.assign({},E,O)),N=d===yf?D:S,R={top:C.top-N.top+m.top,bottom:N.bottom-C.bottom+m.bottom,left:C.left-N.left+m.left,right:N.right-C.right+m.right},j=e.modifiersData.offset;if(d===yf&&j){var U=j[a];Object.keys(R).forEach(function(Q){var X=[fa,ca].indexOf(Q)>=0?1:-1,J=[_n,ca].indexOf(Q)>=0?"y":"x";R[Q]+=U[J]*X})}return R}function rG(e,t){t===void 0&&(t={});var r=t,n=r.placement,a=r.boundary,i=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,u=l===void 0?tI:l,c=vc(n),f=c?s?RO:RO.filter(function(h){return vc(h)===c}):rh,d=f.filter(function(h){return u.indexOf(h)>=0});d.length===0&&(d=f);var p=d.reduce(function(h,v){return h[v]=op(e,{placement:v,boundary:a,rootBoundary:i,padding:o})[ii(v)],h},{});return Object.keys(p).sort(function(h,v){return p[h]-p[v]})}function nG(e){if(ii(e)===OE)return[];var t=xv(e);return[$O(e),t,$O(t)]}function aG(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,u=r.padding,c=r.boundary,f=r.rootBoundary,d=r.altBoundary,p=r.flipVariations,h=p===void 0?!0:p,v=r.allowedAutoPlacements,y=t.options.placement,m=ii(y),g=m===y,E=l||(g||!h?[xv(y)]:nG(y)),w=[y].concat(E).reduce(function(ye,Le){return ye.concat(ii(Le)===OE?rG(t,{placement:Le,boundary:c,rootBoundary:f,padding:u,flipVariations:h,allowedAutoPlacements:v}):Le)},[]),C=t.rects.reference,S=t.rects.popper,O=new Map,D=!0,N=w[0],R=0;R=0,J=X?"width":"height",te=op(t,{placement:j,boundary:c,rootBoundary:f,altBoundary:d,padding:u}),ge=X?Q?fa:En:Q?ca:_n;C[J]>S[J]&&(ge=xv(ge));var H=xv(ge),ee=[];if(i&&ee.push(te[U]<=0),s&&ee.push(te[ge]<=0,te[H]<=0),ee.every(function(ye){return ye})){N=j,D=!1;break}O.set(j,ee)}if(D)for(var ce=h?3:1,_e=function(Le){var He=w.find(function(lt){var Ce=O.get(lt);if(Ce)return Ce.slice(0,Le).every(function(xe){return xe})});if(He)return N=He,"break"},we=ce;we>0;we--){var rt=_e(we);if(rt==="break")break}t.placement!==N&&(t.modifiersData[n]._skip=!0,t.placement=N,t.reset=!0)}}const iG={name:"flip",enabled:!0,phase:"main",fn:aG,requiresIfExists:["offset"],data:{_skip:!1}};function LO(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function FO(e){return[_n,fa,ca,En].some(function(t){return e[t]>=0})}function oG(e){var t=e.state,r=e.name,n=t.rects.reference,a=t.rects.popper,i=t.modifiersData.preventOverflow,o=op(t,{elementContext:"reference"}),s=op(t,{altBoundary:!0}),l=LO(o,n),u=LO(s,a,i),c=FO(l),f=FO(u);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:u,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}const sG={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:oG};function lG(e,t,r){var n=ii(e),a=[En,_n].indexOf(n)>=0?-1:1,i=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=i[0],s=i[1];return o=o||0,s=(s||0)*a,[En,fa].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function uG(e){var t=e.state,r=e.options,n=e.name,a=r.offset,i=a===void 0?[0,0]:a,o=tI.reduce(function(c,f){return c[f]=lG(f,t.rects,i),c},{}),s=o[t.placement],l=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}const cG={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:uG};function fG(e){var t=e.state,r=e.name;t.modifiersData[r]=lI({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const dG={name:"popperOffsets",enabled:!0,phase:"read",fn:fG,data:{}};function pG(e){return e==="x"?"y":"x"}function hG(e){var t=e.state,r=e.options,n=e.name,a=r.mainAxis,i=a===void 0?!0:a,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,u=r.rootBoundary,c=r.altBoundary,f=r.padding,d=r.tether,p=d===void 0?!0:d,h=r.tetherOffset,v=h===void 0?0:h,y=op(t,{boundary:l,rootBoundary:u,padding:f,altBoundary:c}),m=ii(t.placement),g=vc(t.placement),E=!g,w=PE(m),C=pG(w),S=t.modifiersData.popperOffsets,O=t.rects.reference,D=t.rects.popper,N=typeof v=="function"?v(Object.assign({},t.rects,{placement:t.placement})):v,R=typeof N=="number"?{mainAxis:N,altAxis:N}:Object.assign({mainAxis:0,altAxis:0},N),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,U={x:0,y:0};if(S){if(i){var Q,X=w==="y"?_n:En,J=w==="y"?ca:fa,te=w==="y"?"height":"width",ge=S[w],H=ge+y[X],ee=ge-y[J],ce=p?-D[te]/2:0,_e=g===dc?O[te]:D[te],we=g===dc?-D[te]:-O[te],rt=t.elements.arrow,ye=p&&rt?DE(rt):{width:0,height:0},Le=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:aI(),He=Le[X],lt=Le[J],Ce=td(0,O[te],ye[te]),xe=E?O[te]/2-ce-Ce-He-R.mainAxis:_e-Ce-He-R.mainAxis,mt=E?-O[te]/2+ce+Ce+lt+R.mainAxis:we+Ce+lt+R.mainAxis,Nt=t.elements.arrow&&nh(t.elements.arrow),sr=Nt?w==="y"?Nt.clientTop||0:Nt.clientLeft||0:0,jr=(Q=j==null?void 0:j[w])!=null?Q:0,Je=ge+xe-jr-sr,er=ge+mt-jr,Ut=td(p?wm(H,Je):H,ge,p?$s(ee,er):ee);S[w]=Ut,U[w]=Ut-ge}if(s){var lr,Jr=w==="x"?_n:En,Lr=w==="x"?ca:fa,Ot=S[C],ln=C==="y"?"height":"width",I=Ot+y[Jr],ue=Ot-y[Lr],F=[_n,En].indexOf(m)!==-1,Y=(lr=j==null?void 0:j[C])!=null?lr:0,pe=F?I:Ot-O[ln]-D[ln]-Y+R.altAxis,be=F?Ot+O[ln]+D[ln]-Y-R.altAxis:ue,Ne=p&&F?L7(pe,Ot,be):td(p?pe:I,Ot,p?be:ue);S[C]=Ne,U[C]=Ne-Ot}t.modifiersData[n]=U}}const vG={name:"preventOverflow",enabled:!0,phase:"main",fn:hG,requiresIfExists:["offset"]};function mG(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gG(e){return e===Ln(e)||!ia(e)?kE(e):mG(e)}function yG(e){var t=e.getBoundingClientRect(),r=pc(t.width)/e.offsetWidth||1,n=pc(t.height)/e.offsetHeight||1;return r!==1||n!==1}function wG(e,t,r){r===void 0&&(r=!1);var n=ia(t),a=ia(t)&&yG(t),i=ds(t),o=hc(e,a,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((li(t)!=="body"||NE(i))&&(s=gG(t)),ia(t)?(l=hc(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=AE(i))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function bG(e){var t=new Map,r=new Set,n=[];e.forEach(function(i){t.set(i.name,i)});function a(i){r.add(i.name);var o=[].concat(i.requires||[],i.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&a(l)}}),n.push(i)}return e.forEach(function(i){r.has(i.name)||a(i)}),n}function _G(e){var t=bG(e);return N7.reduce(function(r,n){return r.concat(t.filter(function(a){return a.phase===n}))},[])}function EG(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function SG(e){var t=e.reduce(function(r,n){var a=r[n.name];return r[n.name]=a?Object.assign({},a,n,{options:Object.assign({},a.options,n.options),data:Object.assign({},a.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var UO={placement:"bottom",modifiers:[],strategy:"absolute"};function BO(){for(var e=arguments.length,t=new Array(e),r=0;r=n&&(r.finalize(i.value),r.registrations.delete(o))}),r.registrations.size>0&&r.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.sweep(0)}})}return Object.defineProperty(e.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(t,r,n){this.registrations.set(n,{value:r,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(e.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(t){this.registrations.delete(t)}}),Object.defineProperty(e.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,r9))}}),e}(),a9=typeof FinalizationRegistry<"u"?FinalizationRegistry:n9,Lb=new a9(function(e){var t;(t=e.reaction)===null||t===void 0||t.dispose(),e.reaction=null}),dI={exports:{}},pI={};/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Ec=x;function i9(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var o9=typeof Object.is=="function"?Object.is:i9,s9=Ec.useState,l9=Ec.useEffect,u9=Ec.useLayoutEffect,c9=Ec.useDebugValue;function f9(e,t){var r=t(),n=s9({inst:{value:r,getSnapshot:t}}),a=n[0].inst,i=n[1];return u9(function(){a.value=r,a.getSnapshot=t,R0(a)&&i({inst:a})},[e,r,t]),l9(function(){return R0(a)&&i({inst:a}),e(function(){R0(a)&&i({inst:a})})},[e]),c9(r),r}function R0(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o9(e,r)}catch{return!0}}function d9(e,t){return t()}var p9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d9:f9;pI.useSyncExternalStore=Ec.useSyncExternalStore!==void 0?Ec.useSyncExternalStore:p9;dI.exports=pI;var h9=dI.exports,v9=globalThis&&globalThis.__read||function(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),a,i=[],o;try{for(;(t===void 0||t-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i},m9=function(){},hI=typeof sN().stateVersion<"u";function WO(e){e.reaction=new Od("observer".concat(e.name),function(){var t;hI||(e.stateVersion=Symbol()),(t=e.onStoreChange)===null||t===void 0||t.call(e)})}function g9(e,t){t===void 0&&(t="observed");var r=b.useRef(null),n=v9(b.useState(),2),a=n[1];if(!r.current){var i={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe:function(u){return Lb.unregister(i),i.onStoreChange=u,i.reaction||(WO(i),a(Symbol())),function(){var c;i.onStoreChange=null,(c=i.reaction)===null||c===void 0||c.dispose(),i.reaction=null}},getSnapshot:function(){return hI?sN().stateVersion:i.stateVersion}};r.current=i}var o=r.current;o.reaction||(WO(o),Lb.register(r,o,o)),b.useDebugValue(o.reaction,e9),h9.useSyncExternalStore(o.subscribe,o.getSnapshot,m9);var s,l;if(o.reaction.track(function(){try{s=e()}catch(u){l=u}}),l)throw l;return s}var vI=typeof Symbol=="function"&&Symbol.for,HO=vI?Symbol.for("react.forward_ref"):typeof x.forwardRef=="function"&&x.forwardRef(function(e){return null}).$$typeof,VO=vI?Symbol.for("react.memo"):typeof x.memo=="function"&&x.memo(function(e){return null}).$$typeof;function wt(e,t){var r;if(VO&&e.$$typeof===VO)throw new Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");var n=(r=t==null?void 0:t.forwardRef)!==null&&r!==void 0?r:!1,a=e,i=e.displayName||e.name;if(HO&&e.$$typeof===HO&&(n=!0,a=e.render,typeof a!="function"))throw new Error("[mobx-react-lite] `render` property of ForwardRef was not a function");var o=function(s,l){return g9(function(){return a(s,l)},i)};return o.displayName=e.displayName,Object.defineProperty(o,"name",{value:e.name,writable:!0,configurable:!0}),e.contextTypes&&(o.contextTypes=e.contextTypes),n&&(o=x.forwardRef(o)),o=x.memo(o),w9(e,o),o}var y9={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function w9(e,t){Object.keys(e).forEach(function(r){y9[r]||Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))})}globalThis&&globalThis.__read;var M0;ZG(Fo.unstable_batchedUpdates);M0=Lb.finalizeAllImmediately;const b9=wt(function(){const{userStore:{user:t,logout:r,isLoggedIn:n}}=Ft();return _.jsx(ba,{inverted:!0,fixed:"top",children:_.jsxs(Ko,{children:[_.jsxs(ba.Item,{as:Bh,to:"/",header:!0,children:[_.jsx("img",{src:"/assets/logo.png",alt:"logo",style:{marginRight:"10px"}}),"Reactivities"]}),n&&_.jsxs(_.Fragment,{children:[_.jsx(ba.Item,{as:Bh,to:"/activities",name:"Activities"}),_.jsx(ba.Item,{as:Bh,to:"/errors",name:"Errors"}),_.jsx(ba.Item,{children:_.jsx($e,{as:Bh,to:"/createActivity",positive:!0,content:"Create Activity"})}),_.jsxs(ba.Item,{position:"right",children:[_.jsx(qt,{src:(t==null?void 0:t.image)||"/assets/user.png",avatar:!0,spaced:"right"}),_.jsx(pr,{pointing:"top left",text:t==null?void 0:t.displayName,children:_.jsxs(pr.Menu,{children:[_.jsx(pr.Item,{as:an,to:`/profiles/${t==null?void 0:t.username}`,text:"My Profile",icon:"user"}),_.jsx(pr.Item,{onClick:r,text:"Logout",icon:"power"})]})})]})]})]})})});var _9=function(t){return E9(t)&&!S9(t)};function E9(e){return!!e&&typeof e=="object"}function S9(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||O9(e)}var x9=typeof Symbol=="function"&&Symbol.for,C9=x9?Symbol.for("react.element"):60103;function O9(e){return e.$$typeof===C9}function T9(e){return Array.isArray(e)?[]:{}}function bm(e,t){return t.clone!==!1&&t.isMergeableObject(e)?gp(T9(e),e,t):e}function D9(e,t,r){return e.concat(t).map(function(n){return bm(n,r)})}function P9(e,t,r){var n={};return r.isMergeableObject(e)&&Object.keys(e).forEach(function(a){n[a]=bm(e[a],r)}),Object.keys(t).forEach(function(a){!r.isMergeableObject(t[a])||!e[a]?n[a]=bm(t[a],r):n[a]=gp(e[a],t[a],r)}),n}function gp(e,t,r){r=r||{},r.arrayMerge=r.arrayMerge||D9,r.isMergeableObject=r.isMergeableObject||_9;var n=Array.isArray(t),a=Array.isArray(e),i=n===a;return i?n?r.arrayMerge(e,t,r):P9(e,t,r):bm(t,r)}gp.all=function(t,r){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(n,a){return gp(n,a,r)},{})};var Fb=gp,YO=Array.isArray,GO=Object.keys,k9=Object.prototype.hasOwnProperty,A9=typeof Element<"u";function Ub(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){var r=YO(e),n=YO(t),a,i,o;if(r&&n){if(i=e.length,i!=t.length)return!1;for(a=i;a--!==0;)if(!Ub(e[a],t[a]))return!1;return!0}if(r!=n)return!1;var s=e instanceof Date,l=t instanceof Date;if(s!=l)return!1;if(s&&l)return e.getTime()==t.getTime();var u=e instanceof RegExp,c=t instanceof RegExp;if(u!=c)return!1;if(u&&c)return e.toString()==t.toString();var f=GO(e);if(i=f.length,i!==GO(t).length)return!1;for(a=i;a--!==0;)if(!k9.call(t,f[a]))return!1;if(A9&&e instanceof Element&&t instanceof Element)return e===t;for(a=i;a--!==0;)if(o=f[a],!(o==="_owner"&&e.$$typeof)&&!Ub(e[o],t[o]))return!1;return!0}return e!==e&&t!==t}var N9=function(t,r){try{return Ub(t,r)}catch(n){if(n.message&&n.message.match(/stack|recursion/i)||n.number===-2146828260)return console.warn("Warning: react-fast-compare does not handle circular references.",n.name,n.message),!1;throw n}};const vo=Xr(N9);var R9=!0;function ry(e,t){if(!R9){if(e)return;var r="Warning: "+t;typeof console<"u"&&console.warn(r);try{throw Error(r)}catch{}}}function ny(e,t,r,n){var a=!r;r||(r={});for(var i=-1,o=t.length;++i=0)&&(r[a]=e[a]);return r}function iT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var hy=x.createContext(void 0);hy.displayName="FormikContext";var hq=hy.Provider,vq=hy.Consumer;function UE(){var e=x.useContext(hy);return e||ry(!1),e}var oT=function(t){return Array.isArray(t)&&t.length===0},zr=function(t){return typeof t=="function"},Gc=function(t){return t!==null&&typeof t=="object"},mq=function(t){return String(Math.floor(Number(t)))===t},I0=function(t){return Object.prototype.toString.call(t)==="[object String]"},OI=function(t){return x.Children.count(t)===0},$0=function(t){return Gc(t)&&zr(t.then)};function Mt(e,t,r,n){n===void 0&&(n=0);for(var a=bI(t);e&&n=0?[]:{}}}return(i===0?e:a)[o[i]]===r?e:(r===void 0?delete a[o[i]]:a[o[i]]=r,i===0&&r===void 0&&delete n[o[i]],n)}function TI(e,t,r,n){r===void 0&&(r=new WeakMap),n===void 0&&(n={});for(var a=0,i=Object.keys(e);a0?ue.map(function(Y){return R(Y,Mt(I,Y))}):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(F).then(function(Y){return Y.reduce(function(pe,be,Ne){return be==="DO_NOT_DELETE_YOU_WILL_BE_FIRED"||be&&(pe=oi(pe,ue[Ne],be)),pe},{})})},[R]),U=x.useCallback(function(I){return Promise.all([j(I),d.validationSchema?N(I):{},d.validate?D(I):{}]).then(function(ue){var F=ue[0],Y=ue[1],pe=ue[2],be=Fb.all([F,Y,pe],{arrayMerge:_q});return be})},[d.validate,d.validationSchema,j,D,N]),Q=Hn(function(I){return I===void 0&&(I=S.values),O({type:"SET_ISVALIDATING",payload:!0}),U(I).then(function(ue){return m.current&&(O({type:"SET_ISVALIDATING",payload:!1}),O({type:"SET_ERRORS",payload:ue})),ue})});x.useEffect(function(){o&&m.current===!0&&vo(p.current,d.initialValues)&&Q(p.current)},[o,Q]);var X=x.useCallback(function(I){var ue=I&&I.values?I.values:p.current,F=I&&I.errors?I.errors:h.current?h.current:d.initialErrors||{},Y=I&&I.touched?I.touched:v.current?v.current:d.initialTouched||{},pe=I&&I.status?I.status:y.current?y.current:d.initialStatus;p.current=ue,h.current=F,v.current=Y,y.current=pe;var be=function(){O({type:"RESET_FORM",payload:{isSubmitting:!!I&&!!I.isSubmitting,errors:F,touched:Y,status:pe,values:ue,isValidating:!!I&&!!I.isValidating,submitCount:I&&I.submitCount&&typeof I.submitCount=="number"?I.submitCount:0}})};if(d.onReset){var Ne=d.onReset(S.values,jr);$0(Ne)?Ne.then(be):be()}else be()},[d.initialErrors,d.initialStatus,d.initialTouched,d.onReset]);x.useEffect(function(){m.current===!0&&!vo(p.current,d.initialValues)&&u&&(p.current=d.initialValues,X(),o&&Q(p.current))},[u,d.initialValues,X,o,Q]),x.useEffect(function(){u&&m.current===!0&&!vo(h.current,d.initialErrors)&&(h.current=d.initialErrors||vs,O({type:"SET_ERRORS",payload:d.initialErrors||vs}))},[u,d.initialErrors]),x.useEffect(function(){u&&m.current===!0&&!vo(v.current,d.initialTouched)&&(v.current=d.initialTouched||Yh,O({type:"SET_TOUCHED",payload:d.initialTouched||Yh}))},[u,d.initialTouched]),x.useEffect(function(){u&&m.current===!0&&!vo(y.current,d.initialStatus)&&(y.current=d.initialStatus,O({type:"SET_STATUS",payload:d.initialStatus}))},[u,d.initialStatus,d.initialTouched]);var J=Hn(function(I){if(g.current[I]&&zr(g.current[I].validate)){var ue=Mt(S.values,I),F=g.current[I].validate(ue);return $0(F)?(O({type:"SET_ISVALIDATING",payload:!0}),F.then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Y}}),O({type:"SET_ISVALIDATING",payload:!1})})):(O({type:"SET_FIELD_ERROR",payload:{field:I,value:F}}),Promise.resolve(F))}else if(d.validationSchema)return O({type:"SET_ISVALIDATING",payload:!0}),N(S.values,I).then(function(Y){return Y}).then(function(Y){O({type:"SET_FIELD_ERROR",payload:{field:I,value:Mt(Y,I)}}),O({type:"SET_ISVALIDATING",payload:!1})});return Promise.resolve()}),te=x.useCallback(function(I,ue){var F=ue.validate;g.current[I]={validate:F}},[]),ge=x.useCallback(function(I){delete g.current[I]},[]),H=Hn(function(I,ue){O({type:"SET_TOUCHED",payload:I});var F=ue===void 0?a:ue;return F?Q(S.values):Promise.resolve()}),ee=x.useCallback(function(I){O({type:"SET_ERRORS",payload:I})},[]),ce=Hn(function(I,ue){var F=zr(I)?I(S.values):I;O({type:"SET_VALUES",payload:F});var Y=ue===void 0?r:ue;return Y?Q(F):Promise.resolve()}),_e=x.useCallback(function(I,ue){O({type:"SET_FIELD_ERROR",payload:{field:I,value:ue}})},[]),we=Hn(function(I,ue,F){O({type:"SET_FIELD_VALUE",payload:{field:I,value:ue}});var Y=F===void 0?r:F;return Y?Q(oi(S.values,I,ue)):Promise.resolve()}),rt=x.useCallback(function(I,ue){var F=ue,Y=I,pe;if(!I0(I)){I.persist&&I.persist();var be=I.target?I.target:I.currentTarget,Ne=be.type,ur=be.name,Zr=be.id,un=be.value,da=be.checked,io=be.outerHTML,M=be.options,L=be.multiple;F=ue||ur||Zr,Y=/number|range/.test(Ne)?(pe=parseFloat(un),isNaN(pe)?"":pe):/checkbox/.test(Ne)?Sq(Mt(S.values,F),da,un):M&&L?Eq(M):un}F&&we(F,Y)},[we,S.values]),ye=Hn(function(I){if(I0(I))return function(ue){return rt(ue,I)};rt(I)}),Le=Hn(function(I,ue,F){ue===void 0&&(ue=!0),O({type:"SET_FIELD_TOUCHED",payload:{field:I,value:ue}});var Y=F===void 0?a:F;return Y?Q(S.values):Promise.resolve()}),He=x.useCallback(function(I,ue){I.persist&&I.persist();var F=I.target,Y=F.name,pe=F.id,be=F.outerHTML,Ne=ue||Y||pe;Le(Ne,!0)},[Le]),lt=Hn(function(I){if(I0(I))return function(ue){return He(ue,I)};He(I)}),Ce=x.useCallback(function(I){zr(I)?O({type:"SET_FORMIK_STATE",payload:I}):O({type:"SET_FORMIK_STATE",payload:function(){return I}})},[]),xe=x.useCallback(function(I){O({type:"SET_STATUS",payload:I})},[]),mt=x.useCallback(function(I){O({type:"SET_ISSUBMITTING",payload:I})},[]),Nt=Hn(function(){return O({type:"SUBMIT_ATTEMPT"}),Q().then(function(I){var ue=I instanceof Error,F=!ue&&Object.keys(I).length===0;if(F){var Y;try{if(Y=Je(),Y===void 0)return}catch(pe){throw pe}return Promise.resolve(Y).then(function(pe){return m.current&&O({type:"SUBMIT_SUCCESS"}),pe}).catch(function(pe){if(m.current)throw O({type:"SUBMIT_FAILURE"}),pe})}else if(m.current&&(O({type:"SUBMIT_FAILURE"}),ue))throw I})}),sr=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),Nt().catch(function(ue){console.warn("Warning: An unhandled error was caught from submitForm()",ue)})}),jr={resetForm:X,validateForm:Q,validateField:J,setErrors:ee,setFieldError:_e,setFieldTouched:Le,setFieldValue:we,setStatus:xe,setSubmitting:mt,setTouched:H,setValues:ce,setFormikState:Ce,submitForm:Nt},Je=Hn(function(){return c(S.values,jr)}),er=Hn(function(I){I&&I.preventDefault&&zr(I.preventDefault)&&I.preventDefault(),I&&I.stopPropagation&&zr(I.stopPropagation)&&I.stopPropagation(),X()}),Ut=x.useCallback(function(I){return{value:Mt(S.values,I),error:Mt(S.errors,I),touched:!!Mt(S.touched,I),initialValue:Mt(p.current,I),initialTouched:!!Mt(v.current,I),initialError:Mt(h.current,I)}},[S.errors,S.touched,S.values]),lr=x.useCallback(function(I){return{setValue:function(F,Y){return we(I,F,Y)},setTouched:function(F,Y){return Le(I,F,Y)},setError:function(F){return _e(I,F)}}},[we,Le,_e]),Jr=x.useCallback(function(I){var ue=Gc(I),F=ue?I.name:I,Y=Mt(S.values,F),pe={name:F,value:Y,onChange:ye,onBlur:lt};if(ue){var be=I.type,Ne=I.value,ur=I.as,Zr=I.multiple;be==="checkbox"?Ne===void 0?pe.checked=!!Y:(pe.checked=!!(Array.isArray(Y)&&~Y.indexOf(Ne)),pe.value=Ne):be==="radio"?(pe.checked=Y===Ne,pe.value=Ne):ur==="select"&&Zr&&(pe.value=pe.value||[],pe.multiple=!0)}return pe},[lt,ye,S.values]),Lr=x.useMemo(function(){return!vo(p.current,S.values)},[p.current,S.values]),Ot=x.useMemo(function(){return typeof s<"u"?Lr?S.errors&&Object.keys(S.errors).length===0:s!==!1&&zr(s)?s(d):s:S.errors&&Object.keys(S.errors).length===0},[s,Lr,S.errors,d]),ln=dt({},S,{initialValues:p.current,initialErrors:h.current,initialTouched:v.current,initialStatus:y.current,handleBlur:lt,handleChange:ye,handleReset:er,handleSubmit:sr,resetForm:X,setErrors:ee,setFormikState:Ce,setFieldTouched:Le,setFieldValue:we,setFieldError:_e,setStatus:xe,setSubmitting:mt,setTouched:H,setValues:ce,submitForm:Nt,validateForm:Q,validateField:J,isValid:Ot,dirty:Lr,unregisterField:ge,registerField:te,getFieldProps:Jr,getFieldMeta:Ut,getFieldHelpers:lr,validateOnBlur:a,validateOnChange:r,validateOnMount:o});return ln}function ah(e){var t=yq(e),r=e.component,n=e.children,a=e.render,i=e.innerRef;return x.useImperativeHandle(i,function(){return t}),x.createElement(hq,{value:t},r?x.createElement(r,t):a?a(t):n?zr(n)?n(t):OI(n)?null:x.Children.only(n):null)}function wq(e){var t={};if(e.inner){if(e.inner.length===0)return oi(t,e.path,e.message);for(var a=e.inner,r=Array.isArray(a),n=0,a=r?a:a[Symbol.iterator]();;){var i;if(r){if(n>=a.length)break;i=a[n++]}else{if(n=a.next(),n.done)break;i=n.value}var o=i;Mt(t,o.path)||(t=oi(t,o.path,o.message))}}return t}function bq(e,t,r,n){r===void 0&&(r=!1);var a=Bb(e);return t[r?"validateSync":"validate"](a,{abortEarly:!1,context:n||a})}function Bb(e){var t=Array.isArray(e)?[]:{};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=String(r);Array.isArray(e[n])===!0?t[n]=e[n].map(function(a){return Array.isArray(a)===!0||Ku(a)?Bb(a):a!==""?a:void 0}):Ku(e[n])?t[n]=Bb(e[n]):t[n]=e[n]!==""?e[n]:void 0}return t}function _q(e,t,r){var n=e.slice();return t.forEach(function(i,o){if(typeof n[o]>"u"){var s=r.clone!==!1,l=s&&r.isMergeableObject(i);n[o]=l?Fb(Array.isArray(i)?[]:{},i,r):i}else r.isMergeableObject(i)?n[o]=Fb(e[o],i,r):e.indexOf(i)===-1&&n.push(i)}),n}function Eq(e){return Array.from(e).filter(function(t){return t.selected}).map(function(t){return t.value})}function Sq(e,t,r){if(typeof e=="boolean")return!!t;var n=[],a=!1,i=-1;if(Array.isArray(e))n=e,i=e.indexOf(r),a=i>=0;else if(!r||r=="true"||r=="false")return!!t;return t&&r&&!a?n.concat(r):a?n.slice(0,i).concat(n.slice(i+1)):n}var xq=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?x.useLayoutEffect:x.useEffect;function Hn(e){var t=x.useRef(e);return xq(function(){t.current=e}),x.useCallback(function(){for(var r=arguments.length,n=new Array(r),a=0;an?a:n},0);return Array.from(dt({},t,{length:r+1}))}else return[]},sT=function(t,r){var n=typeof t=="function"?t:r;return function(a){if(Array.isArray(a)||Gc(a)){var i=ul(a);return n(i)}return a}},kq=function(e){CI(t,e);function t(n){var a;return a=e.call(this,n)||this,a.updateArrayField=function(i,o,s){var l=a.props,u=l.name,c=l.formik.setFormikState;c(function(f){var d=sT(s,i),p=sT(o,i),h=oi(f.values,u,i(Mt(f.values,u))),v=s?d(Mt(f.errors,u)):void 0,y=o?p(Mt(f.touched,u)):void 0;return oT(v)&&(v=void 0),oT(y)&&(y=void 0),dt({},f,{values:h,errors:s?oi(f.errors,u,v):f.errors,touched:o?oi(f.touched,u,y):f.touched})})},a.push=function(i){return a.updateArrayField(function(o){return[].concat(ul(o),[pq(i)])},!1,!1)},a.handlePush=function(i){return function(){return a.push(i)}},a.swap=function(i,o){return a.updateArrayField(function(s){return Dq(s,i,o)},!0,!0)},a.handleSwap=function(i,o){return function(){return a.swap(i,o)}},a.move=function(i,o){return a.updateArrayField(function(s){return Tq(s,i,o)},!0,!0)},a.handleMove=function(i,o){return function(){return a.move(i,o)}},a.insert=function(i,o){return a.updateArrayField(function(s){return j0(s,i,o)},function(s){return j0(s,i,null)},function(s){return j0(s,i,null)})},a.handleInsert=function(i,o){return function(){return a.insert(i,o)}},a.replace=function(i,o){return a.updateArrayField(function(s){return Pq(s,i,o)},!1,!1)},a.handleReplace=function(i,o){return function(){return a.replace(i,o)}},a.unshift=function(i){var o=-1;return a.updateArrayField(function(s){var l=s?[i].concat(s):[i];return o=l.length,l},function(s){return s?[null].concat(s):[null]},function(s){return s?[null].concat(s):[null]}),o},a.handleUnshift=function(i){return function(){return a.unshift(i)}},a.handleRemove=function(i){return function(){return a.remove(i)}},a.handlePop=function(){return function(){return a.pop()}},a.remove=a.remove.bind(iT(a)),a.pop=a.pop.bind(iT(a)),a}var r=t.prototype;return r.componentDidUpdate=function(a){this.props.validateOnChange&&this.props.formik.validateOnChange&&!vo(Mt(a.formik.values,a.name),Mt(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},r.remove=function(a){var i;return this.updateArrayField(function(o){var s=o?ul(o):[];return i||(i=s[a]),zr(s.splice)&&s.splice(a,1),zr(s.every)&&s.every(function(l){return l===void 0})?[]:s},!0,!0),i},r.pop=function(){var a;return this.updateArrayField(function(i){var o=i.slice();return a||(a=o&&o.pop&&o.pop()),o},!0,!0),a},r.render=function(){var a={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},i=this.props,o=i.component,s=i.render,l=i.children,u=i.name,c=i.formik,f=Eo(c,["validate","validationSchema"]),d=dt({},a,{form:f,name:u});return o?x.createElement(o,d):s?s(d):l?typeof l=="function"?l(d):OI(l)?null:x.Children.only(l):null},t}(x.Component);kq.defaultProps={validateOnChange:!0};var Aq=function(e){CI(t,e);function t(){return e.apply(this,arguments)||this}var r=t.prototype;return r.shouldComponentUpdate=function(a){return Mt(this.props.formik.errors,this.props.name)!==Mt(a.formik.errors,this.props.name)||Mt(this.props.formik.touched,this.props.name)!==Mt(a.formik.touched,this.props.name)||Object.keys(this.props).length!==Object.keys(a).length},r.render=function(){var a=this.props,i=a.component,o=a.formik,s=a.render,l=a.children,u=a.name,c=Eo(a,["component","formik","render","children","name"]),f=Mt(o.touched,u),d=Mt(o.errors,u);return f&&d?s?zr(s)?s(d):null:l?zr(l)?l(d):null:i?x.createElement(i,c,d):d:null},t}(x.Component),DI=Oq(Aq);function Xa(e){const[t,r]=vy(e.name);return _.jsxs(Hc.Field,{error:r.touched&&!!r.error,children:[_.jsx("label",{children:e.label}),_.jsx("input",{...t,...e}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const PI=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.login(r).catch(a=>n({error:a.response.data})),children:({handleSubmit:r,isSubmitting:n,errors:a})=>_.jsxs(Hc,{className:"ui form",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Login to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(Xt,{style:{marginBottom:10},basic:!0,color:"red",content:a.error})}),_.jsx($e,{loading:n,positive:!0,content:"Login",type:"submit",fluid:!0})]})})});function Cl(e){this._maxSize=e,this.clear()}Cl.prototype.clear=function(){this._size=0,this._values=Object.create(null)};Cl.prototype.get=function(e){return this._values[e]};Cl.prototype.set=function(e,t){return this._size>=this._maxSize&&this.clear(),e in this._values||this._size++,this._values[e]=t};var Nq=/[^.^\]^[]+|(?=\[\]|\.\.)/g,kI=/^\d+$/,Rq=/^\d/,Mq=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,Iq=/^\s*(['"]?)(.*?)(\1)\s*$/,BE=512,lT=new Cl(BE),uT=new Cl(BE),cT=new Cl(BE),js={Cache:Cl,split:zb,normalizePath:L0,setter:function(e){var t=L0(e);return uT.get(e)||uT.set(e,function(n,a){for(var i=0,o=t.length,s=n;ie.match(Uq)||[],yy=e=>e[0].toUpperCase()+e.slice(1),WE=(e,t)=>gy(e).join(t).toLowerCase(),AI=e=>gy(e).reduce((t,r)=>`${t}${t?r[0].toUpperCase()+r.slice(1).toLowerCase():r.toLowerCase()}`,""),Bq=e=>yy(AI(e)),zq=e=>WE(e,"_"),Wq=e=>WE(e,"-"),Hq=e=>yy(WE(e," ")),Vq=e=>gy(e).map(yy).join(" ");var F0={words:gy,upperFirst:yy,camelCase:AI,pascalCase:Bq,snakeCase:zq,kebabCase:Wq,sentenceCase:Hq,titleCase:Vq},HE={exports:{}};HE.exports=function(e){return NI(Yq(e),e)};HE.exports.array=NI;function NI(e,t){var r=e.length,n=new Array(r),a={},i=r,o=Gq(t),s=Kq(e);for(t.forEach(function(u){if(!s.has(u[0])||!s.has(u[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});i--;)a[i]||l(e[i],i,new Set);return n;function l(u,c,f){if(f.has(u)){var d;try{d=", node was:"+JSON.stringify(u)}catch{d=""}throw new Error("Cyclic dependency"+d)}if(!s.has(u))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(u));if(!a[c]){a[c]=!0;var p=o.get(u)||new Set;if(p=Array.from(p),c=p.length){f.add(u);do{var h=p[--c];l(h,s.get(h),f)}while(c);f.delete(u)}n[--r]=u}}}function Yq(e){for(var t=new Set,r=0,n=e.length;r"",tQ=/^Symbol\((.*)\)(.*)$/;function rQ(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function fT(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return rQ(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return eQ.call(e).replace(tQ,"Symbol($1)");const n=Xq.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Jq.call(e)+"]":n==="RegExp"?Zq.call(e):null}function $o(e,t){let r=fT(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=fT(this[n],t);return i!==null?i:a},2)}function RI(e){return e==null?[]:[].concat(e)}let MI,nQ=/\$\{\s*(\w+)\s*\}/g;MI=Symbol.toStringTag;let _a=class Wb{static formatError(t,r){const n=r.label||r.path||"this";return n!==r.path&&(r=Object.assign({},r,{path:n})),typeof t=="string"?t.replace(nQ,(a,i)=>$o(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a,i){this.name=void 0,this.message=void 0,this.stack=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.errors=void 0,this.params=void 0,this.inner=void 0,this[MI]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],RI(t).forEach(o=>{if(Wb.isError(o)){this.errors.push(...o.errors);const s=o.inner.length?o.inner:[o];this.inner.push(...s)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0],!i&&Error.captureStackTrace&&Error.captureStackTrace(this,Wb)}},za={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const a=n!=null&&n!==r?` (cast from the value \`${$o(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${$o(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${$o(r,!0)}\``+a}},va={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},aQ={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Hb={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},iQ={isValue:"${path} field must be ${value}"},Vb={noUnknown:"${path} field has unspecified keys: ${unknown}"},oQ={min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},sQ={notType:e=>{const{path:t,value:r,spec:n}=e,a=n.types.length;if(Array.isArray(r)){if(r.lengtha)return`${t} tuple value has too many items, expected a length of ${a} but got ${r.length} for value: \`${$o(r,!0)}\``}return _a.formatError(za.notType,e)}};Object.assign(Object.create(null),{mixed:za,string:va,number:aQ,date:Hb,object:Vb,array:oQ,boolean:iQ,tuple:sQ});const VE=e=>e&&e.__isYupSchema__;class _m{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:a,otherwise:i}=r,o=typeof n=="function"?n:(...s)=>s.every(l=>l===n);return new _m(t,(s,l)=>{var u;let c=o(...s)?a:i;return(u=c==null?void 0:c(l))!=null?u:l})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!VE(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const Gh={context:"$",value:"."};let Ol=class{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Gh.context,this.isValue=this.key[0]===Gh.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Gh.context:this.isValue?Gh.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&js.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let a=this.isContext?n:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}};Ol.prototype.__isYupRef=!0;const As=e=>e==null;function Il(e){function t({value:r,path:n="",options:a,originalValue:i,schema:o},s,l){const{name:u,test:c,params:f,message:d,skipAbsent:p}=e;let{parent:h,context:v,abortEarly:y=o.spec.abortEarly,disableStackTrace:m=o.spec.disableStackTrace}=a;function g(j){return Ol.isRef(j)?j.getValue(r,h,v):j}function E(j={}){var U;const Q=Object.assign({value:r,originalValue:i,label:o.spec.label,path:j.path||n,spec:o.spec},f,j.params);for(const J of Object.keys(Q))Q[J]=g(Q[J]);const X=new _a(_a.formatError(j.message||d,Q),r,Q.path,j.type||u,(U=j.disableStackTrace)!=null?U:m);return X.params=Q,X}const w=y?s:l;let C={path:n,parent:h,type:u,from:a.from,createError:E,resolve:g,options:a,originalValue:i,schema:o};const S=j=>{_a.isError(j)?w(j):j?l(null):w(E())},O=j=>{_a.isError(j)?w(j):s(j)};if(p&&As(r))return S(!0);let N;try{var R;if(N=c.call(C,r,C),typeof((R=N)==null?void 0:R.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${C.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(N).then(S,O)}}catch(j){O(j);return}S(N)}return t.OPTIONS=e,t}function lQ(e,t,r,n=r){let a,i,o;return t?(js.forEach(t,(s,l,u)=>{let c=l?s.slice(1,s.length-1):s;e=e.resolve({context:n,parent:a,value:r});let f=e.type==="tuple",d=u?parseInt(c,10):0;if(e.innerType||f){if(f&&!u)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${o}" must contain an index to the tuple element, e.g. "${o}[0]"`);if(r&&d>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${s}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[d],e=f?e.spec.types[d]:e.innerType}if(!u){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${o} which is a type: "${e.type}")`);a=r,r=r&&r[c],e=e.fields[c]}i=c,o=l?"["+s+"]":"."+s}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Em extends Set{describe(){const t=[];for(const r of this.values())t.push(Ol.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Em(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function su(e,t=new Map){if(VE(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n{this.typeError(za.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=su(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const a=Object.assign({},r.spec,n.spec);return n.spec=a,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(o=>{i.test(o.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((a,i)=>i.resolve(a,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,a,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),a=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(a&&As(i))return i;let o=$o(t),s=$o(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}". + +attempted value: ${o} +`+(s!==o?`result of cast: ${s}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:o=t,strict:s=this.spec.strict}=r,l=t;s||(l=this._cast(l,Object.assign({assert:!1},r)));let u=[];for(let c of Object.values(this.internalTests))c&&u.push(c);this.runTests({path:i,value:l,originalValue:o,options:r,tests:u},n,c=>{if(c.length)return a(c,l);this.runTests({path:i,value:l,originalValue:o,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:o,originalValue:s,path:l,options:u}=t,c=v=>{a||(a=!0,r(v,o))},f=v=>{a||(a=!0,n(v,o))},d=i.length,p=[];if(!d)return f([]);let h={value:o,originalValue:s,path:l,options:u,schema:this};for(let v=0;vthis.resolve(c)._validate(u,c,d,p)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((o,s)=>a._validate(t,r,(l,u)=>{_a.isError(l)&&(l.value=u),s(l)},(l,u)=>{l.length?s(new _a(l,u,void 0,void 0,i)):o(u)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,o=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(s,l)=>{throw _a.isError(s)&&(s.value=l),s},(s,l)=>{if(s.length)throw new _a(s,t,void 0,void 0,o);i=l}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(_a.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(_a.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):su(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Il({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Il({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=za.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=za.notNull){return this.nullability(!1,t)}required(t=za.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=za.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Il(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(o=>!(o.OPTIONS.name===r.name&&(i||o.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=RI(t).map(i=>new Ol(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new _m(a,r):_m.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Il({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=za.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Il({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,o=i.resolveAll(this.resolve);return o.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:o}})}}),n}notOneOf(t,r=za.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Il({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,o=i.resolveAll(this.resolve);return o.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:o}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:o}=r.spec;return{meta:a,label:n,optional:i,nullable:o,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(l=>({name:l.OPTIONS.name,params:l.OPTIONS.params})).filter((l,u,c)=>c.findIndex(f=>f.name===l.name)===u)}}}ui.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])ui.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:o}=lQ(this,t,r,n.context);return o[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])ui.prototype[e]=ui.prototype.oneOf;for(const e of["not","nope"])ui.prototype[e]=ui.prototype.notOneOf;let uQ=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,cQ=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,fQ=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,dQ=e=>As(e)||e===e.trim(),pQ={}.toString();function Pn(){return new II}class II extends ui{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===pQ?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||za.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=va.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=va.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=va.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||va.matches,params:{regex:t},skipAbsent:!0,test:o=>o===""&&n||o.search(t)!==-1})}email(t=va.email){return this.matches(uQ,{name:"email",message:t,excludeEmptyString:!0})}url(t=va.url){return this.matches(cQ,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=va.uuid){return this.matches(fQ,{name:"uuid",message:t,excludeEmptyString:!1})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=va.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:dQ})}lowercase(t=va.lowercase){return this.transform(r=>As(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toLowerCase()})}uppercase(t=va.uppercase){return this.transform(r=>As(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>As(r)||r===r.toUpperCase()})}}Pn.prototype=II.prototype;const hQ=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function _i(e,t=0){return Number(e)||t}function vQ(e){const t=hQ.exec(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;const r={year:_i(t[1]),month:_i(t[2],1)-1,day:_i(t[3],1),hour:_i(t[4]),minute:_i(t[5]),second:_i(t[6]),millisecond:t[7]?_i(t[7].substring(0,3)):0,z:t[8]||void 0,plusMinus:t[9]||void 0,hourOffset:_i(t[10]),minuteOffset:_i(t[11])};if(r.z===void 0&&r.plusMinus===void 0)return new Date(r.year,r.month,r.day,r.hour,r.minute,r.second,r.millisecond).valueOf();let n=0;return r.z!=="Z"&&r.plusMinus!==void 0&&(n=r.hourOffset*60+r.minuteOffset,r.plusMinus==="+"&&(n=0-n)),Date.UTC(r.year,r.month,r.day,r.hour,r.minute+n,r.second,r.millisecond)}let mQ=new Date(""),gQ=e=>Object.prototype.toString.call(e)==="[object Date]";class wy extends ui{constructor(){super({type:"date",check(t){return gQ(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=vQ(t),isNaN(t)?wy.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(Ol.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=Hb.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=Hb.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}wy.INVALID_DATE=mQ;wy.prototype;function yQ(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([o,s])=>`${o}-${s}`));function i(o,s){let l=js.split(o)[0];n.add(l),a.has(`${s}-${l}`)||r.push([s,l])}for(const o of Object.keys(e)){let s=e[o];n.add(o),Ol.isRef(s)&&s.isSibling?i(s.path,o):VE(s)&&"deps"in s&&s.deps.forEach(l=>i(l,o))}return Qq.array(Array.from(n),r).reverse()}function dT(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function $I(e){return(t,r)=>dT(e,t)-dT(e,r)}const wQ=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Ov(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Ov(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Ov(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Ov)}):"optional"in e?e.optional():e}const bQ=(e,t)=>{const r=[...js.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=js.getter(js.join(r),!0)(e);return!!(a&&n in a)};let pT=e=>Object.prototype.toString.call(e)==="[object Object]";function _Q(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const EQ=$I([]);function ih(e){return new jI(e)}class jI extends ui{constructor(t){super({type:"object",check(r){return pT(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=EQ,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,o=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,s=[].concat(this._nodes,Object.keys(a).filter(f=>!this._nodes.includes(f))),l={},u=Object.assign({},r,{parent:l,__validating:r.__validating||!1}),c=!1;for(const f of s){let d=i[f],p=f in a;if(d){let h,v=a[f];u.path=(r.path?`${r.path}.`:"")+f,d=d.resolve({value:v,context:r.context,parent:l});let y=d instanceof ui?d.spec:void 0,m=y==null?void 0:y.strict;if(y!=null&&y.strip){c=c||f in a;continue}h=!r.__validating||!m?d.cast(a[f],u):a[f],h!==void 0&&(l[f]=h)}else p&&!o&&(l[f]=a[f]);(p!==f in l||l[f]!==a[f])&&(c=!0)}return c?l:a}_validate(t,r={},n,a){let{from:i=[],originalValue:o=t,recursive:s=this.spec.recursive}=r;r.from=[{schema:this,value:o},...i],r.__validating=!0,r.originalValue=o,super._validate(t,r,n,(l,u)=>{if(!s||!pT(u)){a(l,u);return}o=o||u;let c=[];for(let f of this._nodes){let d=this.fields[f];!d||Ol.isRef(d)||c.push(d.asNestedTest({options:r,key:f,parent:u,parentPath:r.path,originalParent:o}))}this.runTests({tests:c,value:u,originalValue:o,options:r},n,f=>{a(f.sort(this._sortErrors).concat(l),u)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const o=n[a];n[a]=o===void 0?i:o}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let o=t;(a=o)!=null&&a.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(o):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=yQ(t,r),n._sortErrors=$I(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Ov(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r)}omit(t){const r=Object.assign({},this.fields);for(const n of t)delete r[n];return this.setFields(r)}from(t,r,n){let a=js.getter(t,!0);return this.transform(i=>{if(!i)return i;let o=i;return bQ(i,t)&&(o=Object.assign({},i),n||delete o[t],o[r]=a(i)),o})}json(){return this.transform(wQ)}noUnknown(t=!0,r=Vb.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=_Q(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=Vb.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(F0.camelCase)}snakeCase(){return this.transformKeys(F0.snakeCase)}constantCase(){return this.transformKeys(t=>F0.snakeCase(t).toUpperCase())}describe(t){let r=super.describe(t);r.fields={};for(const[a,i]of Object.entries(this.fields)){var n;let o=t;(n=o)!=null&&n.value&&(o=Object.assign({},o,{parent:o.value,value:o.value[a]})),r.fields[a]=i.describe(o)}return r}}ih.prototype=jI.prototype;function LI({errors:e}){return _.jsx(Ri,{error:!0,children:e&&_.jsx(Ri.List,{children:e.map((t,r)=>_.jsx(Ri.Item,{children:t},r))})})}const SQ=wt(function(){const{userStore:t}=Ft();return _.jsx(ah,{initialValues:{displayName:"",username:"",email:"",password:"",error:null},onSubmit:(r,{setErrors:n})=>t.register(r).catch(a=>n({error:a})),validationSchema:ih({displayName:Pn().required(),username:Pn().required(),email:Pn().required(),password:Pn().required()}),children:({handleSubmit:r,isSubmitting:n,errors:a,isValid:i,dirty:o})=>_.jsxs(Hc,{className:"ui form error",onSubmit:r,autoComplete:"off",children:[_.jsx(qe,{as:"h2",content:"Sign up to Reactivities",color:"teal",textAlign:"center"}),_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(Xa,{placeholder:"Username",name:"username"}),_.jsx(Xa,{placeholder:"Email",name:"email"}),_.jsx(Xa,{placeholder:"Password",name:"password",type:"password"}),_.jsx(DI,{name:"error",render:()=>_.jsx(LI,{errors:a.error})}),_.jsx($e,{disabled:!i||!o||n,loading:n,positive:!0,content:"Register",type:"submit",fluid:!0})]})})});var FI={},Sm={},YE={},by={},_y={};Object.defineProperty(_y,"__esModule",{value:!0});_y.createScriptEle=void 0;const xQ=(e,t)=>new Promise(r=>{var n;const i=document.getElementsByTagName("script")[0];if(document.getElementById(e)){r(void 0);return}const o=document.createElement("script");if(o.id=e,o.src=t,o.onload=r,i)(n=i.parentNode)===null||n===void 0||n.insertBefore(o,i);else{const s=document.body.childNodes;document.body.insertBefore(o,s.item(s.length-1))}});_y.createScriptEle=xQ;var UI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.paramsToObject=e.objectToParams=e.isObject=void 0;const t=a=>Object.prototype.toString.call(a)==="[object Object]";e.isObject=t;const r=a=>!(0,e.isObject)(a)||Object.keys(a).length===0?"":"?"+Object.keys(a).map(i=>`${i}=${encodeURIComponent(a[i])}`).join("&");e.objectToParams=r;const n=a=>(a==null?void 0:a.replace(/^\?/,"").split("&").reduce((i,o)=>{if(!o)return i;const[s,l]=o.split("=");return Object.assign(Object.assign({},i),{[s]:decodeURIComponent(l)})},{}))||{};e.paramsToObject=n})(UI);var Ey={};Object.defineProperty(Ey,"__esModule",{value:!0});Ey.isFacebookApp=void 0;const CQ=()=>{if(typeof window>"u")return!1;const e=navigator.userAgent||navigator.vendor||window.opera;return e.indexOf("FBAN")>-1||e.indexOf("FBAV")>-1||e.indexOf("Instagram")>-1};Ey.isFacebookApp=CQ;(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(_y,e),r(UI,e),r(Ey,e)})(by);(function(e){var t=et&&et.__awaiter||function(a,i,o,s){function l(u){return u instanceof o?u:new o(function(c){c(u)})}return new(o||(o=Promise))(function(u,c){function f(h){try{p(s.next(h))}catch(v){c(v)}}function d(h){try{p(s.throw(h))}catch(v){c(v)}}function p(h){h.done?u(h.value):l(h.value).then(f,d)}p((s=s.apply(a,i||[])).next())})},r=et&&et.__rest||function(a,i){var o={};for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&i.indexOf(s)<0&&(o[s]=a[s]);if(a!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,s=Object.getOwnPropertySymbols(a);lwindow.FB?window.FB:(console.warn("FB not found"),null),getLoginStatus(a,i=!1){const o=this.getFB();if(!o){a({status:"unknown"});return}o.getLoginStatus(a,i)},getProfile(a,i){var o;(o=this.getFB())===null||o===void 0||o.api("me",i,a)},init(a){var i;(i=this.getFB())===null||i===void 0||i.init(a)},clear(){window.FB=null;const a=document.getElementById(e.SDK_SCRIPT_ELE_ID);a&&a.remove()},isRedirected(a){var i,o;const s=(0,n.paramsToObject)(window.location.search);return((i=s.state===(a==null?void 0:a.state))!==null&&i!==void 0?i:"facebookdirect")&&s[(o=a==null?void 0:a.response_type)!==null&&o!==void 0?o:""]!==void 0},loadSdk(a,i){return t(this,void 0,void 0,function*(){yield(0,n.createScriptEle)(e.SDK_SCRIPT_ELE_ID,`https://connect.facebook.net/${a}/sdk${i?"/xfbml.customerchat":""}.js`)})},redirectToDialog(a,i){var o=r(i,["ignoreSdkError"]);window.location.href=`https://www.facebook.com/dialog/oauth${(0,n.objectToParams)(Object.assign(Object.assign({},a),o))}`},login(a,i){var o,{ignoreSdkError:s}=i,l=r(i,["ignoreSdkError"]);try{(o=this.getFB())===null||o===void 0||o.login(a,l)}catch(u){if(s)return;throw u}},logout(a){this.getLoginStatus(i=>{var o;i.status==="connected"?(o=this.getFB())===null||o===void 0||o.logout(a):a()})}}})(YE);var OQ=et&&et.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),TQ=et&&et.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),DQ=et&&et.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&OQ(t,e,r);return TQ(t,e),t},PQ=et&&et.__awaiter||function(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})};Object.defineProperty(Sm,"__esModule",{value:!0});const hT=DQ(x),ms=YE,kQ=by;function AQ(e){var t,r;const{appId:n,language:a="en_US",scope:i="public_profile, email",fields:o="name,email,picture",onSuccess:s,onFail:l,onProfileSuccess:u,className:c,style:f,children:d="Login with Facebook",render:p,autoLoad:h=!1,useRedirect:v=!1,useCustomerChat:y=!1}=e,m=Object.assign(Object.assign({version:"v9.0",xfbml:!1,cookie:!1,localStorage:!0},e.initParams),{appId:n}),g=Object.assign(Object.assign({redirect_uri:typeof window<"u"?location.origin+location.pathname:"/",state:"facebookdirect",response_type:"code"},e.dialogParams),{client_id:n}),E=Object.assign(Object.assign({return_scopes:!1,ignoreSdkError:!1},e.loginOptions),{auth_nonce:typeof((t=e.loginOptions)===null||t===void 0?void 0:t.auth_nonce)=="function"?e.loginOptions.auth_nonce():(r=e.loginOptions)===null||r===void 0?void 0:r.auth_nonce,scope:i});(0,hT.useEffect)(()=>{w()},[]);const w=()=>PQ(this,void 0,void 0,function*(){yield ms.FacebookLoginClient.loadSdk(a,y),window.fbAsyncInit=()=>{ms.FacebookLoginClient.init(m);const O=ms.FacebookLoginClient.isRedirected(g);if(O===!1&&h){S();return}O===!0&&v&&C()}}),C=()=>{ms.FacebookLoginClient.login(O=>{if(!O.authResponse){l&&l({status:"loginCancelled"});return}s&&s(O.authResponse),u&&ms.FacebookLoginClient.getProfile(u,{fields:o})},Object.assign(Object.assign({},E),{scope:i}))},S=()=>{if((0,kQ.isFacebookApp)()||v){ms.FacebookLoginClient.redirectToDialog(g,E);return}if(!window.FB){l&&l({status:"facebookNotLoaded"});return}C()};return p?p({onClick:S,logout:ms.FacebookLoginClient.logout}):hT.default.createElement("button",{type:"button",onClick:S,className:c,style:f},d)}Sm.default=AQ;var BI={},zI={};Object.defineProperty(zI,"__esModule",{value:!0});var WI={};Object.defineProperty(WI,"__esModule",{value:!0});var HI={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LoginStatus=void 0,function(t){t.Connected="connected",t.NotAuthorized="not_authorized",t.Unknown="unknown"}(e.LoginStatus||(e.LoginStatus={}))})(HI);(function(e){var t=et&&et.__createBinding||(Object.create?function(n,a,i,o){o===void 0&&(o=i);var s=Object.getOwnPropertyDescriptor(a,i);(!s||("get"in s?!a.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return a[i]}}),Object.defineProperty(n,o,s)}:function(n,a,i,o){o===void 0&&(o=i),n[o]=a[i]}),r=et&&et.__exportStar||function(n,a){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(a,i)&&t(a,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(zI,e),r(WI,e),r(HI,e)})(BI);(function(e){var t=et&&et.__createBinding||(Object.create?function(i,o,s,l){l===void 0&&(l=s);var u=Object.getOwnPropertyDescriptor(o,s);(!u||("get"in u?!o.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return o[s]}}),Object.defineProperty(i,l,u)}:function(i,o,s,l){l===void 0&&(l=s),i[l]=o[s]}),r=et&&et.__exportStar||function(i,o){for(var s in i)s!=="default"&&!Object.prototype.hasOwnProperty.call(o,s)&&t(o,i,s)},n=et&&et.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(e,"__esModule",{value:!0});const a=n(Sm);r(by,e),r(BI,e),r(Sm,e),r(YE,e),e.default=a.default})(FI);const NQ=Xr(FI),RQ=wt(function(){const{userStore:t,modalStore:r}=Ft();return _.jsx(je,{inverted:!0,textAlign:"center",vertical:!0,className:"masthead",children:_.jsxs(Ko,{text:!0,children:[_.jsxs(qe,{as:"h1",inverted:!0,children:[_.jsx(qt,{size:"massive",src:"/assets/logo.png",alt:"logo",style:{marginBottom:12}}),"Reactivities"]}),t.isLoggedIn?_.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h2",inverted:!0,content:"Welcome to Reactivities"}),_.jsx($e,{as:an,to:"/activities",size:"huge",inverted:!0,children:"Go to Activities!"})]}):_.jsxs(_.Fragment,{children:[_.jsx($e,{onClick:()=>r.openModal(_.jsx(PI,{})),size:"huge",inverted:!0,children:"Login!"}),_.jsx($e,{onClick:()=>r.openModal(_.jsx(SQ,{})),size:"huge",inverted:!0,children:"Register"}),_.jsx(cc,{horizontal:!0,inverted:!0,children:"Or"}),_.jsx(NQ,{appId:"859222439029599",onSuccess:n=>{t.facebookLogin(n.accessToken),console.log("Login Success!",n)},onFail:n=>{console.log("Login Failed!",n)},className:`ui button facebook huge inverted ${t.fbLoading&&"loading"}`})]})]})})});function Sy({inverted:e=!0,content:t="Loading..."}){return _.jsx(Uo,{active:!0,inverted:e,children:_.jsx(il,{content:t})})}const MQ=wt(function(){const{modalStore:t}=Ft();return _.jsx(_O,{open:t.modal.open,onClose:t.closeModal,size:"mini",children:_.jsx(_O.Content,{children:t.modal.body})})});function IQ(){const e=hi(),{commonStore:t,userStore:r}=Ft();return x.useEffect(()=>{t.token?r.getUser().finally(()=>t.setAppLoaded()):t.setAppLoaded()},[t,r]),t.appLoaded?_.jsxs(_.Fragment,{children:[_.jsx(M4,{}),_.jsx(MQ,{}),_.jsx(pb,{position:"bottom-right",hideProgressBar:!0,theme:"colored"}),e.pathname==="/"?_.jsx(RQ,{}):_.jsxs(_.Fragment,{children:[_.jsx(b9,{}),_.jsx(Ko,{style:{marginTop:"7em"},children:_.jsx(ER,{})})]})]}):_.jsx(Sy,{content:"Loading app ..."})}const $Q=wt(IQ);function Ge(e){if(e===null||e===!0||e===!1)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function le(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function fe(e){le(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||Ma(e)==="object"&&t==="[object Date]"?new Date(e.getTime()):typeof e=="number"||t==="[object Number]"?new Date(e):((typeof e=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Kc(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(n)?new Date(NaN):(n&&r.setDate(r.getDate()+n),r)}function qi(e,t){le(2,arguments);var r=fe(e),n=Ge(t);if(isNaN(n))return new Date(NaN);if(!n)return r;var a=r.getDate(),i=new Date(r.getTime());i.setMonth(r.getMonth()+n+1,0);var o=i.getDate();return a>=o?i:(r.setFullYear(i.getFullYear(),i.getMonth(),a),r)}function GE(e,t){le(2,arguments);var r=fe(e).getTime(),n=Ge(t);return new Date(r+n)}var jQ=36e5;function LQ(e,t){le(2,arguments);var r=Ge(t);return GE(e,r*jQ)}var FQ={};function wi(){return FQ}function yp(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getDay(),h=(pa||isNaN(a.getDate()))&&(r=a)}),r||new Date(NaN)}function Tv(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getTime()-n.getTime();return a<0?-1:a>0?1:a}var qE=6e4,QE=36e5,zQ=1e3;function WQ(e,t){le(2,arguments);var r=cl(e),n=cl(t);return r.getTime()===n.getTime()}function XE(e){return le(1,arguments),e instanceof Date||Ma(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function VI(e){if(le(1,arguments),!XE(e)&&typeof e!="number")return!1;var t=fe(e);return!isNaN(Number(t))}function bp(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=r.getFullYear()-n.getFullYear(),i=r.getMonth()-n.getMonth();return a*12+i}function Gb(e){le(1,arguments);var t=fe(e),r=Math.floor(t.getMonth()/3)+1;return r}function Cm(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()-n.getFullYear()}function HQ(e,t){return le(2,arguments),fe(e).getTime()-fe(t).getTime()}var gT={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},VQ="trunc";function YQ(e){return e?gT[e]:gT[VQ]}function YI(e){le(1,arguments);var t=fe(e);return t.setHours(23,59,59,999),t}function GQ(e){le(1,arguments);var t=fe(e),r=t.getMonth();return t.setFullYear(t.getFullYear(),r+1,0),t.setHours(23,59,59,999),t}function KQ(e){le(1,arguments);var t=fe(e);return YI(t).getTime()===GQ(t).getTime()}function qQ(e,t){le(2,arguments);var r=fe(e),n=fe(t),a=Tv(r,n),i=Math.abs(bp(r,n)),o;if(i<1)o=0;else{r.getMonth()===1&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-a*i);var s=Tv(r,n)===-a;KQ(fe(e))&&i===1&&Tv(e,n)===1&&(s=!1),o=a*(i-Number(s))}return o===0?0:o}function QQ(e,t,r){le(2,arguments);var n=HQ(e,t)/1e3;return YQ(r==null?void 0:r.roundingMethod)(n)}function Kb(e){le(1,arguments);var t=fe(e),r=t.getMonth(),n=r-r%3;return t.setMonth(n,1),t.setHours(0,0,0,0),t}function XQ(e){le(1,arguments);var t=fe(e);return t.setDate(1),t.setHours(0,0,0,0),t}function JQ(e){le(1,arguments);var t=fe(e),r=new Date(0);return r.setFullYear(t.getFullYear(),0,1),r.setHours(0,0,0,0),r}function GI(e,t){le(2,arguments);var r=Ge(t);return GE(e,-r)}var ZQ=864e5;function eX(e){le(1,arguments);var t=fe(e),r=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var n=t.getTime(),a=r-n;return Math.floor(a/ZQ)+1}function xc(e){le(1,arguments);var t=1,r=fe(e),n=r.getUTCDay(),a=(n=a.getTime()?r+1:t.getTime()>=o.getTime()?r:r-1}function tX(e){le(1,arguments);var t=KI(e),r=new Date(0);r.setUTCFullYear(t,0,4),r.setUTCHours(0,0,0,0);var n=xc(r);return n}var rX=6048e5;function qI(e){le(1,arguments);var t=fe(e),r=xc(t).getTime()-tX(t).getTime();return Math.round(r/rX)+1}function fl(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.weekStartsOn)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&r!==void 0?r:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=fe(e),p=d.getUTCDay(),h=(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setUTCFullYear(f+1,0,p),h.setUTCHours(0,0,0,0);var v=fl(h,t),y=new Date(0);y.setUTCFullYear(f,0,p),y.setUTCHours(0,0,0,0);var m=fl(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function nX(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=JE(e,t),p=new Date(0);p.setUTCFullYear(d,0,f),p.setUTCHours(0,0,0,0);var h=fl(p,t);return h}var aX=6048e5;function QI(e,t){le(1,arguments);var r=fe(e),n=fl(r,t).getTime()-nX(r,t).getTime();return Math.round(n/aX)+1}function ft(e,t){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length0?n:1-n;return ft(r==="yy"?a%100:a,r.length)},M:function(t,r){var n=t.getUTCMonth();return r==="M"?String(n+1):ft(n+1,2)},d:function(t,r){return ft(t.getUTCDate(),r.length)},a:function(t,r){var n=t.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(t,r){return ft(t.getUTCHours()%12||12,r.length)},H:function(t,r){return ft(t.getUTCHours(),r.length)},m:function(t,r){return ft(t.getUTCMinutes(),r.length)},s:function(t,r){return ft(t.getUTCSeconds(),r.length)},S:function(t,r){var n=r.length,a=t.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ft(i,r.length)}};const co=iX;var $l={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},oX={G:function(t,r,n){var a=t.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(t,r,n){if(r==="yo"){var a=t.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return co.y(t,r)},Y:function(t,r,n,a){var i=JE(t,a),o=i>0?i:1-i;if(r==="YY"){var s=o%100;return ft(s,2)}return r==="Yo"?n.ordinalNumber(o,{unit:"year"}):ft(o,r.length)},R:function(t,r){var n=KI(t);return ft(n,r.length)},u:function(t,r){var n=t.getUTCFullYear();return ft(n,r.length)},Q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ft(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(t,r,n){var a=Math.ceil((t.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ft(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(t,r,n){var a=t.getUTCMonth();switch(r){case"M":case"MM":return co.M(t,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(t,r,n){var a=t.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ft(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(t,r,n,a){var i=QI(t,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):ft(i,r.length)},I:function(t,r,n){var a=qI(t);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ft(a,r.length)},d:function(t,r,n){return r==="do"?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):co.d(t,r)},D:function(t,r,n){var a=eX(t);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ft(a,r.length)},E:function(t,r,n){var a=t.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(o);case"ee":return ft(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(t,r,n,a){var i=t.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(o);case"cc":return ft(o,r.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(t,r,n){var a=t.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return ft(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(t,r,n){var a=t.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,r,n){var a=t.getUTCHours(),i;switch(a===12?i=$l.noon:a===0?i=$l.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,r,n){var a=t.getUTCHours(),i;switch(a>=17?i=$l.evening:a>=12?i=$l.afternoon:a>=4?i=$l.morning:i=$l.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,r,n){if(r==="ho"){var a=t.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return co.h(t,r)},H:function(t,r,n){return r==="Ho"?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):co.H(t,r)},K:function(t,r,n){var a=t.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},k:function(t,r,n){var a=t.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ft(a,r.length)},m:function(t,r,n){return r==="mo"?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):co.m(t,r)},s:function(t,r,n){return r==="so"?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):co.s(t,r)},S:function(t,r){return co.S(t,r)},X:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();if(o===0)return"Z";switch(r){case"X":return wT(o);case"XXXX":case"XX":return Ss(o);case"XXXXX":case"XXX":default:return Ss(o,":")}},x:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"x":return wT(o);case"xxxx":case"xx":return Ss(o);case"xxxxx":case"xxx":default:return Ss(o,":")}},O:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+yT(o,":");case"OOOO":default:return"GMT"+Ss(o,":")}},z:function(t,r,n,a){var i=a._originalDate||t,o=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+yT(o,":");case"zzzz":default:return"GMT"+Ss(o,":")}},t:function(t,r,n,a){var i=a._originalDate||t,o=Math.floor(i.getTime()/1e3);return ft(o,r.length)},T:function(t,r,n,a){var i=a._originalDate||t,o=i.getTime();return ft(o,r.length)}};function yT(e,t){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var o=t||"";return r+String(a)+o+ft(i,2)}function wT(e,t){if(e%60===0){var r=e>0?"-":"+";return r+ft(Math.abs(e)/60,2)}return Ss(e,t)}function Ss(e,t){var r=t||"",n=e>0?"-":"+",a=Math.abs(e),i=ft(Math.floor(a/60),2),o=ft(a%60,2);return n+i+r+o}const sX=oX;var bT=function(t,r){switch(t){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},XI=function(t,r){switch(t){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},lX=function(t,r){var n=t.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return bT(t,r);var o;switch(a){case"P":o=r.dateTime({width:"short"});break;case"PP":o=r.dateTime({width:"medium"});break;case"PPP":o=r.dateTime({width:"long"});break;case"PPPP":default:o=r.dateTime({width:"full"});break}return o.replace("{{date}}",bT(a,r)).replace("{{time}}",XI(i,r))},uX={p:XI,P:lX};const qb=uX;var cX=["D","DD"],fX=["YY","YYYY"];function JI(e){return cX.indexOf(e)!==-1}function ZI(e){return fX.indexOf(e)!==-1}function Om(e,t,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var dX={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},pX=function(t,r,n){var a,i=dX[t];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const hX=pX;function U0(e){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.width?String(t.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var vX={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},mX={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gX={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yX={date:U0({formats:vX,defaultWidth:"full"}),time:U0({formats:mX,defaultWidth:"full"}),dateTime:U0({formats:gX,defaultWidth:"full"})};const wX=yX;var bX={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},_X=function(t,r,n,a){return bX[t]};const EX=_X;function wf(e){return function(t,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,o=r!=null&&r.width?String(r.width):i;a=e.formattingValues[o]||e.formattingValues[i]}else{var s=e.defaultWidth,l=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[l]||e.values[s]}var u=e.argumentCallback?e.argumentCallback(t):t;return a[u]}}var SX={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xX={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},CX={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},OX={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},TX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},DX={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},PX=function(t,r){var n=Number(t),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},kX={ordinalNumber:PX,era:wf({values:SX,defaultWidth:"wide"}),quarter:wf({values:xX,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:wf({values:CX,defaultWidth:"wide"}),day:wf({values:OX,defaultWidth:"wide"}),dayPeriod:wf({values:TX,defaultWidth:"wide",formattingValues:DX,defaultFormattingWidth:"wide"})};const AX=kX;function bf(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;var o=i[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(s)?RX(s,function(f){return f.test(o)}):NX(s,function(f){return f.test(o)}),u;u=e.valueCallback?e.valueCallback(l):l,u=r.valueCallback?r.valueCallback(u):u;var c=t.slice(o.length);return{value:u,rest:c}}}function NX(e,t){for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return r}function RX(e,t){for(var r=0;r1&&arguments[1]!==void 0?arguments[1]:{},n=t.match(e.matchPattern);if(!n)return null;var a=n[0],i=t.match(e.parsePattern);if(!i)return null;var o=e.valueCallback?e.valueCallback(i[0]):i[0];o=r.valueCallback?r.valueCallback(o):o;var s=t.slice(a.length);return{value:o,rest:s}}}var IX=/^(\d+)(th|st|nd|rd)?/i,$X=/\d+/i,jX={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},LX={any:[/^b/i,/^(a|c)/i]},FX={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},UX={any:[/1/i,/2/i,/3/i,/4/i]},BX={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zX={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},WX={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},HX={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},VX={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},YX={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},GX={ordinalNumber:MX({matchPattern:IX,parsePattern:$X,valueCallback:function(t){return parseInt(t,10)}}),era:bf({matchPatterns:jX,defaultMatchWidth:"wide",parsePatterns:LX,defaultParseWidth:"any"}),quarter:bf({matchPatterns:FX,defaultMatchWidth:"wide",parsePatterns:UX,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:bf({matchPatterns:BX,defaultMatchWidth:"wide",parsePatterns:zX,defaultParseWidth:"any"}),day:bf({matchPatterns:WX,defaultMatchWidth:"wide",parsePatterns:HX,defaultParseWidth:"any"}),dayPeriod:bf({matchPatterns:VX,defaultMatchWidth:"any",parsePatterns:YX,defaultParseWidth:"any"})};const KX=GX;var qX={code:"en-US",formatDistance:hX,formatLong:wX,formatRelative:EX,localize:AX,match:KX,options:{weekStartsOn:0,firstWeekContainsDate:1}};const ZE=qX;var QX=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,XX=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,JX=/^'([^]*?)'?$/,ZX=/''/g,eJ=/[a-zA-Z]/;function ci(e,t,r){var n,a,i,o,s,l,u,c,f,d,p,h,v,y,m,g,E,w;le(2,arguments);var C=String(t),S=wi(),O=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:ZE,D=Ge((i=(o=(s=(l=r==null?void 0:r.firstWeekContainsDate)!==null&&l!==void 0?l:r==null||(u=r.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&o!==void 0?o:(f=S.locale)===null||f===void 0||(d=f.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(D>=1&&D<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var N=Ge((p=(h=(v=(y=r==null?void 0:r.weekStartsOn)!==null&&y!==void 0?y:r==null||(m=r.locale)===null||m===void 0||(g=m.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&v!==void 0?v:S.weekStartsOn)!==null&&h!==void 0?h:(E=S.locale)===null||E===void 0||(w=E.options)===null||w===void 0?void 0:w.weekStartsOn)!==null&&p!==void 0?p:0);if(!(N>=0&&N<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!O.localize)throw new RangeError("locale must contain localize property");if(!O.formatLong)throw new RangeError("locale must contain formatLong property");var R=fe(e);if(!VI(R))throw new RangeError("Invalid time value");var j=Sc(R),U=GI(R,j),Q={firstWeekContainsDate:D,weekStartsOn:N,locale:O,_originalDate:R},X=C.match(XX).map(function(J){var te=J[0];if(te==="p"||te==="P"){var ge=qb[te];return ge(J,O.formatLong)}return J}).join("").match(QX).map(function(J){if(J==="''")return"'";var te=J[0];if(te==="'")return tJ(J);var ge=sX[te];if(ge)return!(r!=null&&r.useAdditionalWeekYearTokens)&&ZI(J)&&Om(J,t,String(e)),!(r!=null&&r.useAdditionalDayOfYearTokens)&&JI(J)&&Om(J,t,String(e)),ge(U,J,O.localize,Q);if(te.match(eJ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+te+"`");return J}).join("");return X}function tJ(e){var t=e.match(JX);return t?t[1].replace(ZX,"'"):e}function eS(e,t){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}function rJ(e){return eS({},e)}var _T=1440,nJ=2520,B0=43200,aJ=86400;function iJ(e,t,r){var n,a;le(2,arguments);var i=wi(),o=(n=(a=r==null?void 0:r.locale)!==null&&a!==void 0?a:i.locale)!==null&&n!==void 0?n:ZE;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var s=Tv(e,t);if(isNaN(s))throw new RangeError("Invalid time value");var l=eS(rJ(r),{addSuffix:!!(r!=null&&r.addSuffix),comparison:s}),u,c;s>0?(u=fe(t),c=fe(e)):(u=fe(e),c=fe(t));var f=QQ(c,u),d=(Sc(c)-Sc(u))/1e3,p=Math.round((f-d)/60),h;if(p<2)return r!=null&&r.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,l):f<10?o.formatDistance("lessThanXSeconds",10,l):f<20?o.formatDistance("lessThanXSeconds",20,l):f<40?o.formatDistance("halfAMinute",0,l):f<60?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",1,l):p===0?o.formatDistance("lessThanXMinutes",1,l):o.formatDistance("xMinutes",p,l);if(p<45)return o.formatDistance("xMinutes",p,l);if(p<90)return o.formatDistance("aboutXHours",1,l);if(p<_T){var v=Math.round(p/60);return o.formatDistance("aboutXHours",v,l)}else{if(p=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var h=new Date(0);h.setFullYear(f+1,0,p),h.setHours(0,0,0,0);var v=yp(h,t),y=new Date(0);y.setFullYear(f,0,p),y.setHours(0,0,0,0);var m=yp(y,t);return c.getTime()>=v.getTime()?f+1:c.getTime()>=m.getTime()?f:f-1}function fJ(e,t){var r,n,a,i,o,s,l,u;le(1,arguments);var c=wi(),f=Ge((r=(n=(a=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(o=t.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:1),d=cJ(e,t),p=new Date(0);p.setFullYear(d,0,f),p.setHours(0,0,0,0);var h=yp(p,t);return h}var dJ=6048e5;function pJ(e,t){le(1,arguments);var r=fe(e),n=yp(r,t).getTime()-fJ(r,t).getTime();return Math.round(n/dJ)+1}function xt(e){return le(1,arguments),fe(e).getFullYear()}function Qi(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()>n.getTime()}function Ls(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getTime()e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(u){throw u},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,o=!1,s;return{s:function(){r=r.call(e)},n:function(){var u=r.next();return i=u.done,u},e:function(u){o=!0,s=u},f:function(){try{!i&&r.return!=null&&r.return()}finally{if(o)throw s}}}}function Qe(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dm(e,t)}function Tm(e){return Tm=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tm(e)}function mJ(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function gJ(e,t){if(t&&(Ma(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return K(e)}function Xe(e){var t=mJ();return function(){var n=Tm(e),a;if(t){var i=Tm(this).constructor;a=Reflect.construct(n,arguments,i)}else a=n.apply(this,arguments);return gJ(this,a)}}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ae(e,t,r){return t=cI(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var yJ=10,e$=function(){function e(){Ve(this,e),ae(this,"priority",void 0),ae(this,"subPriority",0)}return We(e,[{key:"validate",value:function(r,n){return!0}}]),e}(),wJ=function(e){Qe(r,e);var t=Xe(r);function r(n,a,i,o,s){var l;return Ve(this,r),l=t.call(this),l.value=n,l.validateValue=a,l.setValue=i,l.priority=o,s&&(l.subPriority=s),l}return We(r,[{key:"validate",value:function(a,i){return this.validateValue(a,this.value,i)}},{key:"set",value:function(a,i,o){return this.setValue(a,i,this.value,o)}}]),r}(e$),bJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0,n=r?t:1-t,a;if(n<=50)a=e||100;else{var i=n+50,o=Math.floor(i/100)*100,s=e>=i%100;a=e+o-(s?100:0)}return r?a:1-a}function n$(e){return e%400===0||e%4===0&&e%100!==0}var EJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o){var s=a.getUTCFullYear();if(o.isTwoDigitYear){var l=r$(o.year,s);return a.setUTCFullYear(l,0,1),a.setUTCHours(0,0,0,0),a}var u=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(u,0,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),SJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0}},{key:"set",value:function(a,i,o,s){var l=JE(a,s);if(o.isTwoDigitYear){var u=r$(o.year,l);return a.setUTCFullYear(u,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}var c=!("era"in i)||i.era===1?o.year:1-o.year;return a.setUTCFullYear(c,0,s.firstWeekContainsDate),a.setUTCHours(0,0,0,0),fl(a,s)}}]),r}(ot),xJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),TJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=4}},{key:"set",value:function(a,i,o){return a.setUTCMonth((o-1)*3,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),DJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot),PJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){return a.setUTCMonth(o,1),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function kJ(e,t,r){le(2,arguments);var n=fe(e),a=Ge(t),i=QI(n,r)-a;return n.setUTCDate(n.getUTCDate()-i*7),n}var AJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o,s){return fl(kJ(a,o,s),s)}}]),r}(ot);function NJ(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=qI(r)-n;return r.setUTCDate(r.getUTCDate()-a*7),r}var RJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=53}},{key:"set",value:function(a,i,o){return xc(NJ(a,o))}}]),r}(ot),MJ=[31,28,31,30,31,30,31,31,30,31,30,31],IJ=[31,29,31,30,31,30,31,31,30,31,30,31],$J=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=IJ[l]:i>=1&&i<=MJ[l]}},{key:"set",value:function(a,i,o){return a.setUTCDate(o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),jJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=366:i>=1&&i<=365}},{key:"set",value:function(a,i,o){return a.setUTCMonth(0,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function rS(e,t,r){var n,a,i,o,s,l,u,c;le(2,arguments);var f=wi(),d=Ge((n=(a=(i=(o=r==null?void 0:r.weekStartsOn)!==null&&o!==void 0?o:r==null||(s=r.locale)===null||s===void 0||(l=s.options)===null||l===void 0?void 0:l.weekStartsOn)!==null&&i!==void 0?i:f.weekStartsOn)!==null&&a!==void 0?a:(u=f.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=fe(e),h=Ge(t),v=p.getUTCDay(),y=h%7,m=(y+7)%7,g=(m=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),FJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot),UJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=6}},{key:"set",value:function(a,i,o,s){return a=rS(a,o,s),a.setUTCHours(0,0,0,0),a}}]),r}(ot);function BJ(e,t){le(2,arguments);var r=Ge(t);r%7===0&&(r=r-7);var n=1,a=fe(e),i=a.getUTCDay(),o=r%7,s=(o+7)%7,l=(s=1&&i<=7}},{key:"set",value:function(a,i,o){return a=BJ(a,o),a.setUTCHours(0,0,0,0),a}}]),r}(ot),WJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=12}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):!s&&o===12?a.setUTCHours(0,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),GJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=23}},{key:"set",value:function(a,i,o){return a.setUTCHours(o,0,0,0),a}}]),r}(ot),KJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=11}},{key:"set",value:function(a,i,o){var s=a.getUTCHours()>=12;return s&&o<12?a.setUTCHours(o+12,0,0,0):a.setUTCHours(o,0,0,0),a}}]),r}(ot),qJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&i<=24}},{key:"set",value:function(a,i,o){var s=o<=24?o%24:o;return a.setUTCHours(s,0,0,0),a}}]),r}(ot),QJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCMinutes(o,0,0),a}}]),r}(ot),XJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=0&&i<=59}},{key:"set",value:function(a,i,o){return a.setUTCSeconds(o,0),a}}]),r}(ot),JJ=function(e){Qe(r,e);var t=Xe(r);function r(){var n;Ve(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var j=Ge((h=(v=(y=(m=n==null?void 0:n.weekStartsOn)!==null&&m!==void 0?m:n==null||(g=n.locale)===null||g===void 0||(E=g.options)===null||E===void 0?void 0:E.weekStartsOn)!==null&&y!==void 0?y:D.weekStartsOn)!==null&&v!==void 0?v:(w=D.locale)===null||w===void 0||(C=w.options)===null||C===void 0?void 0:C.weekStartsOn)!==null&&h!==void 0?h:0);if(!(j>=0&&j<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(O==="")return S===""?fe(r):new Date(NaN);var U={firstWeekContainsDate:R,weekStartsOn:j,locale:N},Q=[new bJ],X=O.match(iZ).map(function(Ce){var xe=Ce[0];if(xe in qb){var mt=qb[xe];return mt(Ce,N.formatLong)}return Ce}).join("").match(aZ),J=[],te=ST(X),ge;try{var H=function(){var xe=ge.value;!(n!=null&&n.useAdditionalWeekYearTokens)&&ZI(xe)&&Om(xe,O,e),!(n!=null&&n.useAdditionalDayOfYearTokens)&&JI(xe)&&Om(xe,O,e);var mt=xe[0],Nt=nZ[mt];if(Nt){var sr=Nt.incompatibleTokens;if(Array.isArray(sr)){var jr=J.find(function(er){return sr.includes(er.token)||er.token===mt});if(jr)throw new RangeError("The format string mustn't contain `".concat(jr.fullToken,"` and `").concat(xe,"` at the same time"))}else if(Nt.incompatibleTokens==="*"&&J.length>0)throw new RangeError("The format string mustn't contain `".concat(xe,"` and any other token at the same time"));J.push({token:mt,fullToken:xe});var Je=Nt.run(S,xe,N.match,U);if(!Je)return{v:new Date(NaN)};Q.push(Je.setter),S=Je.rest}else{if(mt.match(uZ))throw new RangeError("Format string contains an unescaped latin alphabet character `"+mt+"`");if(xe==="''"?xe="'":mt==="'"&&(xe=cZ(xe)),S.indexOf(xe)===0)S=S.slice(xe.length);else return{v:new Date(NaN)}}};for(te.s();!(ge=te.n()).done;){var ee=H();if(Ma(ee)==="object")return ee.v}}catch(Ce){te.e(Ce)}finally{te.f()}if(S.length>0&&lZ.test(S))return new Date(NaN);var ce=Q.map(function(Ce){return Ce.priority}).sort(function(Ce,xe){return xe-Ce}).filter(function(Ce,xe,mt){return mt.indexOf(Ce)===xe}).map(function(Ce){return Q.filter(function(xe){return xe.priority===Ce}).sort(function(xe,mt){return mt.subPriority-xe.subPriority})}).map(function(Ce){return Ce[0]}),_e=fe(r);if(isNaN(_e.getTime()))return new Date(NaN);var we=GI(_e,Sc(_e)),rt={},ye=ST(ce),Le;try{for(ye.s();!(Le=ye.n()).done;){var He=Le.value;if(!He.validate(we,U))return new Date(NaN);var lt=He.set(we,rt,U);Array.isArray(lt)?(we=lt[0],eS(rt,lt[1])):we=lt}}catch(Ce){ye.e(Ce)}finally{ye.f()}return we}function cZ(e){return e.match(oZ)[1].replace(sZ,"'")}function fZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()&&r.getMonth()===n.getMonth()}function dZ(e,t){le(2,arguments);var r=Kb(e),n=Kb(t);return r.getTime()===n.getTime()}function pZ(e,t){le(2,arguments);var r=fe(e),n=fe(t);return r.getFullYear()===n.getFullYear()}function a$(e,t){le(2,arguments);var r=fe(e).getTime(),n=fe(t.start).getTime(),a=fe(t.end).getTime();if(!(n<=a))throw new RangeError("Invalid interval");return r>=n&&r<=a}function hZ(e,t){le(2,arguments);var r=Ge(t);return Kc(e,-r)}function vZ(e,t){var r;le(1,arguments);var n=Ge((r=t==null?void 0:t.additionalDigits)!==null&&r!==void 0?r:2);if(n!==2&&n!==1&&n!==0)throw new RangeError("additionalDigits must be 0, 1 or 2");if(!(typeof e=="string"||Object.prototype.toString.call(e)==="[object String]"))return new Date(NaN);var a=wZ(e),i;if(a.date){var o=bZ(a.date,n);i=_Z(o.restDateString,o.year)}if(!i||isNaN(i.getTime()))return new Date(NaN);var s=i.getTime(),l=0,u;if(a.time&&(l=EZ(a.time),isNaN(l)))return new Date(NaN);if(a.timezone){if(u=SZ(a.timezone),isNaN(u))return new Date(NaN)}else{var c=new Date(s+l),f=new Date(0);return f.setFullYear(c.getUTCFullYear(),c.getUTCMonth(),c.getUTCDate()),f.setHours(c.getUTCHours(),c.getUTCMinutes(),c.getUTCSeconds(),c.getUTCMilliseconds()),f}return new Date(s+l+u)}var qh={dateTimeDelimiter:/[T ]/,timeZoneDelimiter:/[Z ]/i,timezone:/([Z+-].*)$/},mZ=/^-?(?:(\d{3})|(\d{2})(?:-?(\d{2}))?|W(\d{2})(?:-?(\d{1}))?|)$/,gZ=/^(\d{2}(?:[.,]\d*)?)(?::?(\d{2}(?:[.,]\d*)?))?(?::?(\d{2}(?:[.,]\d*)?))?$/,yZ=/^([+-])(\d{2})(?::?(\d{2}))?$/;function wZ(e){var t={},r=e.split(qh.dateTimeDelimiter),n;if(r.length>2)return t;if(/:/.test(r[0])?n=r[0]:(t.date=r[0],n=r[1],qh.timeZoneDelimiter.test(t.date)&&(t.date=e.split(qh.timeZoneDelimiter)[0],n=e.substr(t.date.length,e.length))),n){var a=qh.timezone.exec(n);a?(t.time=n.replace(a[1],""),t.timezone=a[1]):t.time=n}return t}function bZ(e,t){var r=new RegExp("^(?:(\\d{4}|[+-]\\d{"+(4+t)+"})|(\\d{2}|[+-]\\d{"+(2+t)+"})$)"),n=e.match(r);if(!n)return{year:NaN,restDateString:""};var a=n[1]?parseInt(n[1]):null,i=n[2]?parseInt(n[2]):null;return{year:i===null?a:i*100,restDateString:e.slice((n[1]||n[2]).length)}}function _Z(e,t){if(t===null)return new Date(NaN);var r=e.match(mZ);if(!r)return new Date(NaN);var n=!!r[4],a=_f(r[1]),i=_f(r[2])-1,o=_f(r[3]),s=_f(r[4]),l=_f(r[5])-1;if(n)return DZ(t,s,l)?xZ(t,s,l):new Date(NaN);var u=new Date(0);return!OZ(t,i,o)||!TZ(t,a)?new Date(NaN):(u.setUTCFullYear(t,i,Math.max(a,o)),u)}function _f(e){return e?parseInt(e):1}function EZ(e){var t=e.match(gZ);if(!t)return NaN;var r=W0(t[1]),n=W0(t[2]),a=W0(t[3]);return PZ(r,n,a)?r*QE+n*qE+a*1e3:NaN}function W0(e){return e&&parseFloat(e.replace(",","."))||0}function SZ(e){if(e==="Z")return 0;var t=e.match(yZ);if(!t)return 0;var r=t[1]==="+"?-1:1,n=parseInt(t[2]),a=t[3]&&parseInt(t[3])||0;return kZ(n,a)?r*(n*QE+a*qE):NaN}function xZ(e,t,r){var n=new Date(0);n.setUTCFullYear(e,0,4);var a=n.getUTCDay()||7,i=(t-1)*7+r+1-a;return n.setUTCDate(n.getUTCDate()+i),n}var CZ=[31,null,31,30,31,30,31,31,30,31,30,31];function i$(e){return e%400===0||e%4===0&&e%100!==0}function OZ(e,t,r){return t>=0&&t<=11&&r>=1&&r<=(CZ[t]||(i$(e)?29:28))}function TZ(e,t){return t>=1&&t<=(i$(e)?366:365)}function DZ(e,t,r){return t>=1&&t<=53&&r>=0&&r<=6}function PZ(e,t,r){return e===24?t===0&&r===0:r>=0&&r<60&&t>=0&&t<60&&e>=0&&e<25}function kZ(e,t){return t>=0&&t<=59}function Ya(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=r.getFullYear(),i=r.getDate(),o=new Date(0);o.setFullYear(a,n,15),o.setHours(0,0,0,0);var s=lJ(o);return r.setMonth(n,Math.min(i,s)),r}function ad(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setHours(n),r}function id(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setMinutes(n),r}function Mf(e,t){le(2,arguments);var r=fe(e),n=Ge(t),a=Math.floor(r.getMonth()/3)+1,i=n-a;return Ya(r,r.getMonth()+i*3)}function AZ(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return r.setSeconds(n),r}function Pm(e,t){le(2,arguments);var r=fe(e),n=Ge(t);return isNaN(r.getTime())?new Date(NaN):(r.setFullYear(n),r)}function _p(e,t){le(2,arguments);var r=Ge(t);return qi(e,-r)}function NZ(e,t){le(2,arguments);var r=Ge(t);return KE(e,-r)}function km(e,t){le(2,arguments);var r=Ge(t);return wp(e,-r)}const o$=wt(function({profile:t}){var s;const{profileStore:r,userStore:n}=Ft(),{updateFollowing:a,loading:i}=r;if(((s=n.user)==null?void 0:s.username)===t.username)return null;function o(l,u){l.preventDefault(),t.following?a(u,!1):a(u,!0)}return _.jsxs(Io,{animated:"move",children:[_.jsx(Io.Content,{visible:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,color:"teal",content:t.following?"Following":"Not following"})}),_.jsx(Io.Content,{hidden:!0,style:{width:"100%"},children:_.jsx($e,{fluid:!0,basic:!0,color:t.following?"red":"green",content:t.following?"Unfollow":"Follow",loading:i,onClick:l=>o(l,t.username)})})]})}),s$=wt(function({profile:t}){function r(n){if(n)return n.length>40?n.substring(0,37)+"...":n}return _.jsxs(nr,{as:an,to:`/profiles/${t.username}`,children:[_.jsx(qt,{src:t.image||"/assets/user.png"}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{children:t.displayName}),_.jsx(nr.Description,{children:r(t.bio)})]}),_.jsxs(nr.Content,{extra:!0,children:[_.jsx(jt,{name:"users"}),t.followersCount," followers"]}),_.jsx(o$,{profile:t})]})}),RZ=wt(function({attendees:t}){const r={border:"orange 3px solid"};return _.jsx(Ib,{horizontal:!0,children:t.map(n=>_.jsx(Vc,{hoverable:!0,trigger:_.jsx(Ib.Item,{as:an,to:`/profiles/${n.username}`,children:_.jsx(qt,{size:"mini",circular:!0,src:n.image||"/assets/user.png",style:n.following?r:null})},n.username),children:_.jsx(Gi,{children:_.jsx(s$,{profile:n})})},n.username))})});function MZ({activity:e}){var t,r;return _.jsxs(je.Group,{children:[_.jsxs(je,{children:[e.isCancelled&&_.jsx(Xt,{attached:"top",color:"red",content:"Cancelled",style:{textAlign:"center"}}),_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{style:{marginBottom:3},size:"tiny",circular:!0,src:((t=e.host)==null?void 0:t.image)||"/assets/user.png"}),_.jsxs(nt.Content,{children:[_.jsx(nt.Header,{as:an,to:`/activities/${e.id}`,children:e.title}),_.jsxs(nt.Description,{children:["Hosted by ",_.jsx(an,{to:`/profiles/${e.hostUsername}`,children:(r=e.host)==null?void 0:r.displayName})]}),e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"orange",children:"You are hosting the activty"})}),e.isGoing&&!e.isHost&&_.jsx(nt.Description,{children:_.jsx(Xt,{basic:!0,color:"green",children:"You are going to this activty"})})]})]})})]}),_.jsx(je,{children:_.jsxs("span",{children:[_.jsx(jt,{name:"clock"})," ",ci(e.date,"dd MMM yyyy h:mm aa"),_.jsx(jt,{name:"marker"})," ",e.venue]})}),_.jsx(je,{children:_.jsx(RZ,{attendees:e.attendees})}),_.jsxs(je,{clearing:!0,children:[_.jsx("span",{children:e.description}),_.jsx($e,{as:an,to:`/activities/${e.id}`,color:"teal",floated:"right",content:"View"})]})]})}const IZ=wt(function(){const{activityStore:t}=Ft(),{groupedAcivities:r}=t;return _.jsx(_.Fragment,{children:r.map(([n,a])=>_.jsxs(x.Fragment,{children:[_.jsx(qe,{sub:!0,color:"teal",children:n}),a.map(i=>_.jsx(MZ,{activity:i},i.id))]},n))})});function l$(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t-1}function oee(e,t){var r=this.__data__,n=Cy(r,e);return n<0?r.push([e,t]):r[n][1]=t,this}qc.prototype.clear=ree;qc.prototype.delete=nee;qc.prototype.get=aee;qc.prototype.has=iee;qc.prototype.set=oee;function Tl(e){var t=-1,r=e?e.length:0;for(this.clear();++t0,ee=te!=="century",ce=Jee(te,t),_e=ee?Zee(te,t):void 0,we=P$(te,t),rt=ee?ete(te,t):void 0,ye=function(){if(ce.getFullYear()<0)return!0;var Je=tte(te,t);return u&&u>=Je}(),Le=ee&&function(){if(_e.getFullYear()<0)return!0;var Je=rte(te,t);return u&&u>=Je}(),He=l&&le?t:r&&r=e}function ute(e,t){return e[0]<=t[0]&&e[1]>=t[1]}function M$(e,t){return xp(e[0],t)||xp(e[1],t)}function PT(e,t,r){var n=M$(t,e),a=[];if(n){a.push(r);var i=xp(e[0],t),o=xp(e[1],t);i&&a.push("".concat(r,"Start")),o&&a.push("".concat(r,"End")),i&&o&&a.push("".concat(r,"BothEnds"))}return a}function cte(e){return Array.isArray(e)?e[0]!==null&&e[1]!==null:e!==null}function fte(e){if(!e)throw new Error("args is required");var t=e.value,r=e.date,n=e.hover,a="react-calendar__tile",i=[a];if(!r)return i;var o=new Date,s=function(){if(Array.isArray(r))return r;var p=e.dateType;if(!p)throw new Error("dateType is required when date is not an array of two dates");return TT(p,r)}();if(xp(o,s)&&i.push("".concat(a,"--now")),!t||!cte(t))return i;var l=function(){if(Array.isArray(t))return t;var p=e.valueType;if(!p)throw new Error("valueType is required when value is not an array of two dates");return TT(p,t)}();ute(l,s)?i.push("".concat(a,"--active")):M$(l,s)&&i.push("".concat(a,"--hasActive"));var u=PT(l,s,"".concat(a,"--range"));i.push.apply(i,u);var c=Array.isArray(t)?t:[t];if(n&&c.length===1){var f=n>l[0]?[l[0],n]:[n,l[0]],d=PT(f,s,"".concat(a,"--hover"));i.push.apply(i,d)}return i}var dte=(jl={},jl[lu.ARABIC]=kt.ISLAMIC,jl[lu.HEBREW]=kt.HEBREW,jl[lu.ISO_8601]=kt.ISO_8601,jl[lu.US]=kt.GREGORY,jl);function pte(e){return e!==void 0&&e in lu}var kT=!1;function Ay(e){if(pte(e)){var t=dte[e];return ry(kT,'Specifying calendarType="'.concat(e,'" is deprecated. Use calendarType="').concat(t,'" instead.')),kT=!0,t}return e}function Ny(e){for(var t=e.className,r=e.count,n=r===void 0?3:r,a=e.dateTransform,i=e.dateType,o=e.end,s=e.hover,l=e.offset,u=e.renderTile,c=e.start,f=e.step,d=f===void 0?1:f,p=e.value,h=e.valueType,v=[],y=c;y<=o;y+=d){var m=a(y);v.push(u({classes:fte({date:m,dateType:i,hover:s,value:p,valueType:h}),date:m}))}return b.createElement(dS,{className:t,count:n,offset:l,wrap:!0},v)}function Ry(e){var t=e.activeStartDate,r=e.children,n=e.classes,a=e.date,i=e.formatAbbr,o=e.locale,s=e.maxDate,l=e.maxDateTransform,u=e.minDate,c=e.minDateTransform,f=e.onClick,d=e.onMouseOver,p=e.style,h=e.tileClassName,v=e.tileContent,y=e.tileDisabled,m=e.view,g=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof h=="function"?h(w):h},[t,a,h,m]),E=x.useMemo(function(){var w={activeStartDate:t,date:a,view:m};return typeof v=="function"?v(w):v},[t,a,v,m]);return b.createElement("button",{className:xy(n,g),disabled:u&&c(u)>a||s&&l(s)s?new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, minDate cannot be larger than maxDate.")):null},hS=function(t,r,n){var a=t,i=r,o=a[i];if(!o)return null;if(!(o instanceof Date))return new Error("Invalid prop `".concat(r,"` of type `").concat(typeof o,"` supplied to `").concat(n,"`, expected instance of `Date`."));var s=t.minDate;return s&&o0,ja=x.useCallback(function(De){var bt=function(){switch(er){case"start":return gS;case"end":return H$;case"range":return Kte;default:throw new Error("Invalid returnValue.")}}();return bt({maxDate:S,maxDetail:D,minDate:R,value:De})},[S,D,R,er]),bi=x.useCallback(function(De,bt){un(De);var Me={action:bt,activeStartDate:De,value:he,view:Re};ce&&!Jh(me,De)&&ce(Me)},[me,ce,he,Re]),oo=x.useCallback(function(De,bt){var Me=function(){switch(Re){case"century":return rt;case"decade":return He;case"year":return ye;case"month":return we;default:throw new Error("Invalid view: ".concat(Re,"."))}}();Me&&Me(De,bt)},[we,rt,ye,He,Re]),Cn=x.useCallback(function(De,bt){if(Tt){oo(De,bt);var Me=Ae[Ae.indexOf(Re)+1];if(!Me)throw new Error("Attempted to drill down from the lowest view.");un(De),Te(Me);var Fr={action:"drillDown",activeStartDate:De,value:he,view:Me};ce&&!Jh(me,De)&&ce(Fr),xe&&Re!==Me&&xe(Fr),lt&<(Fr)}},[me,Tt,ce,oo,lt,xe,he,Re,Ae]),On=x.useCallback(function(){if($a){var De=Ae[Ae.indexOf(Re)-1];if(!De)throw new Error("Attempted to drill up from the highest view.");var bt=Fs(De,me);un(bt),Te(De);var Me={action:"drillUp",activeStartDate:bt,value:he,view:De};ce&&!Jh(me,bt)&&ce(Me),xe&&Re!==De&&xe(Me),Ce&&Ce(Me)}},[me,$a,ce,Ce,xe,he,Re,Ae]),so=x.useCallback(function(De,bt){var Me=he;oo(De,bt);var Fr=Ut&&!G0(Me),cn;if(Ut)if(Fr)cn=Fs(gt,De);else{if(!Me)throw new Error("previousValue is required");if(Array.isArray(Me))throw new Error("previousValue must not be an array");cn=nte(gt,Me,De)}else cn=ja(De);var tf=!Ut||Fr||g?V$({maxDate:S,maxDetail:D,minDate:R,minDetail:U,value:cn,view:Re}):null;bt.persist(),un(tf),de(cn);var O2={action:"onChange",activeStartDate:tf,value:cn,view:Re};if(ce&&!Jh(me,tf)&&ce(O2),_e)if(Ut){var T2=G0(cn);if(!T2)_e(cn||null,bt);else if(a){if(Array.isArray(cn))throw new Error("value must not be an array");_e([cn||null,null],bt)}}else _e(cn||null,bt)},[me,a,ja,g,S,D,R,U,ce,_e,oo,Ut,he,gt,Re]);function ef(De){M(De)}function hs(){M(null)}x.useImperativeHandle(r,function(){return{activeStartDate:me,drillDown:Cn,drillUp:On,onChange:so,setActiveStartDate:bi,value:he,view:Re}},[me,Cn,On,so,bi,he,Re]);function Nl(De){var bt=De?P$(Re,me):Fs(Re,me),Me=Tt?Cn:so,Fr={activeStartDate:bt,hover:ut,locale:w,maxDate:S,minDate:R,onClick:Me,onMouseOver:Ut?ef:void 0,tileClassName:F,tileContent:Y,tileDisabled:pe,value:he,valueType:gt};switch(Re){case"century":return b.createElement(xte,cu({formatYear:y},Fr));case"decade":return b.createElement(Pte,cu({formatYear:y},Fr));case"year":return b.createElement(Mte,cu({formatMonth:d,formatMonthYear:p},Fr));case"month":return b.createElement(Wte,cu({calendarType:i,formatDay:c,formatLongDate:f,formatShortWeekday:h,formatWeekday:v,onClickWeekNumber:Le,onMouseLeave:Ut?hs:void 0,showFixedNumberOfWeeks:typeof Jr<"u"?Jr:lr,showNeighboringMonth:I,showWeekNumbers:ue},Fr));default:throw new Error("Invalid view: ".concat(Re,"."))}}function st(){return Ot?b.createElement(ote,{activeStartDate:me,drillUp:On,formatMonthYear:p,formatYear:y,locale:w,maxDate:S,minDate:R,navigationAriaLabel:Q,navigationAriaLive:X,navigationLabel:J,next2AriaLabel:te,next2Label:ge,nextAriaLabel:H,nextLabel:ee,prev2AriaLabel:mt,prev2Label:Nt,prevAriaLabel:sr,prevLabel:jr,setActiveStartDate:bi,showDoubleView:lr,view:Re,views:Ae}):null}var Tn=Array.isArray(he)?he:[he];return b.createElement("div",{className:xy(Xh,Ut&&Tn.length===1&&"".concat(Xh,"--selectRange"),lr&&"".concat(Xh,"--doubleView"),o),ref:E},st(),b.createElement("div",{className:"".concat(Xh,"__viewContainer"),onBlur:Ut?hs:void 0,onMouseLeave:Ut?hs:void 0},Nl(),lr?Nl(!0):null))}),BT=$.instanceOf(Date),zT=$.oneOfType([$.string,$.instanceOf(Date)]),WT=$.oneOfType([zT,Ste(zT)]);Y$.propTypes={activeStartDate:BT,allowPartialRange:$.bool,calendarType:I$,className:Am,defaultActiveStartDate:BT,defaultValue:WT,defaultView:Nm,formatDay:$.func,formatLongDate:$.func,formatMonth:$.func,formatMonthYear:$.func,formatShortWeekday:$.func,formatWeekday:$.func,formatYear:$.func,goToRangeStartOnSelect:$.bool,inputRef:bte,locale:$.string,maxDate:hS,maxDetail:$.oneOf(xu),minDate:pS,minDetail:$.oneOf(xu),navigationAriaLabel:$.string,navigationAriaLive:$.oneOf(["off","polite","assertive"]),navigationLabel:$.func,next2AriaLabel:$.string,next2Label:$.node,nextAriaLabel:$.string,nextLabel:$.node,onActiveStartDateChange:$.func,onChange:$.func,onClickDay:$.func,onClickDecade:$.func,onClickMonth:$.func,onClickWeekNumber:$.func,onClickYear:$.func,onDrillDown:$.func,onDrillUp:$.func,onViewChange:$.func,prev2AriaLabel:$.string,prev2Label:$.node,prevAriaLabel:$.string,prevLabel:$.node,returnValue:$.oneOf(["start","end","range"]),selectRange:$.bool,showDoubleView:$.bool,showFixedNumberOfWeeks:$.bool,showNavigation:$.bool,showNeighboringMonth:$.bool,showWeekNumbers:$.bool,tileClassName:$.oneOfType([$.func,Am]),tileContent:$.oneOfType([$.func,$.node]),tileDisabled:$.func,value:WT,view:Nm};const Qte=Y$,Xte=wt(function(){const{activityStore:{predicate:t,setPredicate:r}}=Ft();return _.jsxs(_.Fragment,{children:[_.jsxs(ba,{vertical:!0,size:"large",style:{width:"100%",marginTop:25},children:[_.jsx(qe,{icon:"filter",attached:!0,color:"teal",content:"Filters"}),_.jsx(ba.Item,{content:"All Activities",active:t.has("all"),onClick:()=>r("all","true")}),_.jsx(ba.Item,{content:"I'm going",active:t.has("isGoing"),onClick:()=>r("isGoing","true")}),_.jsx(ba.Item,{content:"I'm hosting",active:t.has("isHost"),onClick:()=>r("isHost","true")})]}),_.jsx(qe,{}),_.jsx(Qte,{onChange:n=>r("startDate",n),value:t.get("startDate")||new Date})]})});class Jte{constructor(t,r){Z(this,"data");Z(this,"pagination");this.data=t,this.pagination=r}}class l_{constructor(t=1,r=2){Z(this,"pageNumber");Z(this,"pageSize");this.pageNumber=t,this.pageSize=r}}class u_ extends x.Component{constructor(t){super(t),this.scrollListener=this.scrollListener.bind(this),this.eventListenerOptions=this.eventListenerOptions.bind(this),this.mousewheelListener=this.mousewheelListener.bind(this)}componentDidMount(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}componentDidUpdate(){if(this.props.isReverse&&this.loadMore){const t=this.getParentElement(this.scrollComponent);t.scrollTop=t.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}componentWillUnmount(){this.detachScrollListener(),this.detachMousewheelListener()}isPassiveSupported(){let t=!1;const r={get passive(){t=!0}};try{document.addEventListener("test",null,r),document.removeEventListener("test",null,r)}catch{}return t}eventListenerOptions(){let t=this.props.useCapture;return this.isPassiveSupported()?t={useCapture:this.props.useCapture,passive:!0}:t={passive:!1},t}setDefaultLoader(t){this.defaultLoader=t}detachMousewheelListener(){let t=window;this.props.useWindow===!1&&(t=this.scrollComponent.parentNode),t.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}detachScrollListener(){let t=window;this.props.useWindow===!1&&(t=this.getParentElement(this.scrollComponent)),t.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}getParentElement(t){const r=this.props.getScrollParent&&this.props.getScrollParent();return r??(t&&t.parentNode)}filterProps(t){return t}attachScrollListener(){const t=this.getParentElement(this.scrollComponent);if(!this.props.hasMore||!t)return;let r=window;this.props.useWindow===!1&&(r=t),r.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),r.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),r.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}mousewheelListener(t){t.deltaY===1&&!this.isPassiveSupported()&&t.preventDefault()}scrollListener(){const t=this.scrollComponent,r=window,n=this.getParentElement(t);let a;if(this.props.useWindow){const i=document.documentElement||document.body.parentNode||document.body,o=r.pageYOffset!==void 0?r.pageYOffset:i.scrollTop;this.props.isReverse?a=o:a=this.calculateOffset(t,o)}else this.props.isReverse?a=n.scrollTop:a=t.scrollHeight-n.scrollTop-n.clientHeight;a{this.scrollComponent=m,c&&c(m)};const y=[r];return a&&(s?o?y.unshift(s):y.push(s):this.defaultLoader&&(o?y.unshift(this.defaultLoader):y.push(this.defaultLoader))),b.createElement(n,v,y)}}Z(u_,"propTypes",{children:$.node.isRequired,element:$.node,hasMore:$.bool,initialLoad:$.bool,isReverse:$.bool,loader:$.node,loadMore:$.func.isRequired,pageStart:$.number,ref:$.func,getScrollParent:$.func,threshold:$.number,useCapture:$.bool,useWindow:$.bool}),Z(u_,"defaultProps",{element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null});function HT(){return _.jsx(_.Fragment,{children:_.jsx(xr,{fluid:!0,style:{marginTop:25},children:_.jsxs(je.Group,{children:[_.jsx(je,{style:{minHeight:110},children:_.jsxs(xr,{children:[_.jsxs(xr.Header,{image:!0,children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]}),_.jsx(xr.Paragraph,{children:_.jsx(xr.Line,{})})]})}),_.jsx(je,{children:_.jsxs(xr,{children:[_.jsx(xr.Line,{}),_.jsx(xr.Line,{})]})}),_.jsx(je,{secondary:!0,style:{minHeight:70}}),_.jsx(je,{clearing:!0,children:_.jsx($e,{disabled:!0,color:"blue",floated:"right",content:"View"})})]})})})}const Zte=wt(function(){const{activityStore:t}=Ft(),{loadActivities:r,activityRegistry:n,setPagingParams:a,pagination:i}=t,[o,s]=x.useState(!1);function l(){s(!0),a(new l_(i.currentPage+1)),r().then(()=>s(!1))}return x.useEffect(()=>{n.size<=1&&r()},[r,n.size]),_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"10",children:t.loadingInitial&&n.size===0&&!o?_.jsxs(_.Fragment,{children:[_.jsx(HT,{}),_.jsx(HT,{})]}):_.jsx(u_,{pageStart:0,loadMore:l,hasMore:!o&&!!i&&i.currentPagen.setValue(i.value),onBlur:()=>n.setTouched(!0),placeholder:e.placeholder}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const ore=[{text:"Drinks",value:"drinks"},{text:"Culture",value:"culture"},{text:"Film",value:"film"},{text:"Food",value:"food"},{text:"Music",value:"music"},{text:"Travel",value:"travel"}];var K$={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var n=[],a=0;a=0)&&(r[a]=e[a]);return r}function YT(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function cre(e,t,r){return e===t?!0:e.correspondingElement?e.correspondingElement.classList.contains(r):e.classList.contains(r)}function fre(e,t,r){if(e===t)return!0;for(;e.parentNode||e.host;){if(e.parentNode&&cre(e,t,r))return!0;e=e.parentNode||e.host}return e}function dre(e){return document.documentElement.clientWidth<=e.clientX||document.documentElement.clientHeight<=e.clientY}var pre=function(){if(!(typeof window>"u"||typeof window.addEventListener!="function")){var t=!1,r=Object.defineProperty({},"passive",{get:function(){t=!0}}),n=function(){};return window.addEventListener("testPassiveEventSupport",n,r),window.removeEventListener("testPassiveEventSupport",n,r),t}};function hre(e){return e===void 0&&(e=0),function(){return++e}}var vre=hre(),f_,ev={},K0={},mre=["touchstart","touchmove"],gre="ignore-react-onclickoutside";function GT(e,t){var r={},n=mre.indexOf(t)!==-1;return n&&f_&&(r.passive=!e.props.preventDefault),r}function Iy(e,t){var r,n,a=e.displayName||e.name||"Component";return n=r=function(i){lre(o,i);function o(l){var u;return u=i.call(this,l)||this,u.__outsideClickHandler=function(c){if(typeof u.__clickOutsideHandlerProp=="function"){u.__clickOutsideHandlerProp(c);return}var f=u.getInstance();if(typeof f.props.handleClickOutside=="function"){f.props.handleClickOutside(c);return}if(typeof f.handleClickOutside=="function"){f.handleClickOutside(c);return}throw new Error("WrappedComponent: "+a+" lacks a handleClickOutside(event) function for processing outside click events.")},u.__getComponentNode=function(){var c=u.getInstance();return t&&typeof t.setClickOutsideRef=="function"?t.setClickOutsideRef()(c):typeof c.setClickOutsideRef=="function"?c.setClickOutsideRef():Fo.findDOMNode(c)},u.enableOnClickOutside=function(){if(!(typeof document>"u"||K0[u._uid])){typeof f_>"u"&&(f_=pre()),K0[u._uid]=!0;var c=u.props.eventTypes;c.forEach||(c=[c]),ev[u._uid]=function(f){if(u.componentNode!==null&&(u.props.preventDefault&&f.preventDefault(),u.props.stopPropagation&&f.stopPropagation(),!(u.props.excludeScrollbar&&dre(f)))){var d=f.composed&&f.composedPath&&f.composedPath().shift()||f.target;fre(d,u.componentNode,u.props.outsideClickIgnoreClass)===document&&u.__outsideClickHandler(f)}},c.forEach(function(f){document.addEventListener(f,ev[u._uid],GT(YT(u),f))})}},u.disableOnClickOutside=function(){delete K0[u._uid];var c=ev[u._uid];if(c&&typeof document<"u"){var f=u.props.eventTypes;f.forEach||(f=[f]),f.forEach(function(d){return document.removeEventListener(d,c,GT(YT(u),d))}),delete ev[u._uid]}},u.getRef=function(c){return u.instanceRef=c},u._uid=vre(),u}var s=o.prototype;return s.getInstance=function(){if(e.prototype&&!e.prototype.isReactComponent)return this;var u=this.instanceRef;return u.getInstance?u.getInstance():u},s.componentDidMount=function(){if(!(typeof document>"u"||!document.createElement)){var u=this.getInstance();if(t&&typeof t.handleClickOutside=="function"&&(this.__clickOutsideHandlerProp=t.handleClickOutside(u),typeof this.__clickOutsideHandlerProp!="function"))throw new Error("WrappedComponent: "+a+" lacks a function for processing outside click events specified by the handleClickOutside config option.");this.componentNode=this.__getComponentNode(),!this.props.disableOnClickOutside&&this.enableOnClickOutside()}},s.componentDidUpdate=function(){this.componentNode=this.__getComponentNode()},s.componentWillUnmount=function(){this.disableOnClickOutside()},s.render=function(){var u=this.props;u.excludeScrollbar;var c=ure(u,["excludeScrollbar"]);return e.prototype&&e.prototype.isReactComponent?c.ref=this.getRef:c.wrappedRef=this.getRef,c.disableOnClickOutside=this.disableOnClickOutside,c.enableOnClickOutside=this.enableOnClickOutside,x.createElement(e,c)},o}(x.Component),r.displayName="OnClickOutside("+a+")",r.defaultProps={eventTypes:["mousedown","touchstart"],excludeScrollbar:t&&t.excludeScrollbar||!1,outsideClickIgnoreClass:gre,preventDefault:!1,stopPropagation:!1},r.getClass=function(){return e.getClass?e.getClass():e},n}var KT=Object.prototype.toString,q$=function(t){var r=KT.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&KT.call(t.callee)==="[object Function]"),n},q0,qT;function yre(){if(qT)return q0;qT=1;var e;if(!Object.keys){var t=Object.prototype.hasOwnProperty,r=Object.prototype.toString,n=q$,a=Object.prototype.propertyIsEnumerable,i=!a.call({toString:null},"toString"),o=a.call(function(){},"prototype"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],l=function(d){var p=d.constructor;return p&&p.prototype===d},u={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},c=function(){if(typeof window>"u")return!1;for(var d in window)try{if(!u["$"+d]&&t.call(window,d)&&window[d]!==null&&typeof window[d]=="object")try{l(window[d])}catch{return!0}}catch{return!0}return!1}(),f=function(d){if(typeof window>"u"||!c)return l(d);try{return l(d)}catch{return!1}};e=function(p){var h=p!==null&&typeof p=="object",v=r.call(p)==="[object Function]",y=n(p),m=h&&r.call(p)==="[object String]",g=[];if(!h&&!v&&!y)throw new TypeError("Object.keys called on a non-object");var E=o&&v;if(m&&p.length>0&&!t.call(p,0))for(var w=0;w0)for(var C=0;C"u"||!Sr?Fe:Sr(Uint8Array),Bs={"%AggregateError%":typeof AggregateError>"u"?Fe:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Fe:ArrayBuffer,"%ArrayIteratorPrototype%":Ll&&Sr?Sr([][Symbol.iterator]()):Fe,"%AsyncFromSyncIteratorPrototype%":Fe,"%AsyncFunction%":Wl,"%AsyncGenerator%":Wl,"%AsyncGeneratorFunction%":Wl,"%AsyncIteratorPrototype%":Wl,"%Atomics%":typeof Atomics>"u"?Fe:Atomics,"%BigInt%":typeof BigInt>"u"?Fe:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Fe:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Fe:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Fe:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Fe:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Fe:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Fe:FinalizationRegistry,"%Function%":J$,"%GeneratorFunction%":Wl,"%Int8Array%":typeof Int8Array>"u"?Fe:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Fe:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Fe:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Ll&&Sr?Sr(Sr([][Symbol.iterator]())):Fe,"%JSON%":typeof JSON=="object"?JSON:Fe,"%Map%":typeof Map>"u"?Fe:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Ll||!Sr?Fe:Sr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Fe:Promise,"%Proxy%":typeof Proxy>"u"?Fe:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Fe:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Fe:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Ll||!Sr?Fe:Sr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Fe:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Ll&&Sr?Sr(""[Symbol.iterator]()):Fe,"%Symbol%":Ll?Symbol:Fe,"%SyntaxError%":Cc,"%ThrowTypeError%":Rre,"%TypedArray%":Ire,"%TypeError%":Cu,"%Uint8Array%":typeof Uint8Array>"u"?Fe:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Fe:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Fe:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Fe:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Fe:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Fe:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Fe:WeakSet};if(Sr)try{null.error}catch(e){var $re=Sr(Sr(e));Bs["%Error.prototype%"]=$re}var jre=function e(t){var r;if(t==="%AsyncFunction%")r=X0("async function () {}");else if(t==="%GeneratorFunction%")r=X0("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=X0("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Sr&&(r=Sr(a.prototype))}return Bs[t]=r,r},eD={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fh=wS,jm=Nre,Lre=fh.call(Function.call,Array.prototype.concat),Fre=fh.call(Function.apply,Array.prototype.splice),tD=fh.call(Function.call,String.prototype.replace),Lm=fh.call(Function.call,String.prototype.slice),Ure=fh.call(Function.call,RegExp.prototype.exec),Bre=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,zre=/\\(\\)?/g,Wre=function(t){var r=Lm(t,0,1),n=Lm(t,-1);if(r==="%"&&n!=="%")throw new Cc("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Cc("invalid intrinsic syntax, expected opening `%`");var a=[];return tD(t,Bre,function(i,o,s,l){a[a.length]=s?tD(l,zre,"$1"):o||i}),a},Hre=function(t,r){var n=t,a;if(jm(eD,n)&&(a=eD[n],n="%"+a[0]+"%"),jm(Bs,n)){var i=Bs[n];if(i===Wl&&(i=jre(n)),typeof i>"u"&&!r)throw new Cu("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new Cc("intrinsic "+t+" does not exist!")},dh=function(t,r){if(typeof t!="string"||t.length===0)throw new Cu("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Cu('"allowMissing" argument must be a boolean');if(Ure(/^%?[^%]*%?$/,t)===null)throw new Cc("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Wre(t),a=n.length>0?n[0]:"",i=Hre("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],Fre(n,Lre([0,1],u)));for(var c=1,f=!0;c=n.length){var v=Us(s,d);f=!!v,f&&"get"in v&&!("originalValue"in v.get)?s=v.get:s=s[d]}else f=jm(s,d),s=s[d];f&&!l&&(Bs[o]=s)}}return s},Z$={exports:{}};(function(e){var t=wS,r=dh,n=r("%Function.prototype.apply%"),a=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(a,n),o=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),l=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(f){var d=i(t,a,arguments);if(o&&s){var p=o(d,"length");p.configurable&&s(d,"length",{value:1+l(0,f.length-(arguments.length-1))})}return d};var u=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:u}):e.exports.apply=u})(Z$);var bS=Z$.exports,ej=dh,tj=bS,Vre=tj(ej("String.prototype.indexOf")),rj=function(t,r){var n=ej(t,!!r);return typeof n=="function"&&Vre(t,".prototype.")>-1?tj(n):n},Yre=yS(),Gre=rj,d_=Gre("Object.prototype.toString"),$y=function(t){return Yre&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:d_(t)==="[object Arguments]"},nj=function(t){return $y(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&d_(t)!=="[object Array]"&&d_(t.callee)==="[object Function]"},Kre=function(){return $y(arguments)}();$y.isLegacyArguments=nj;var qre=Kre?$y:nj,Qre=dh,p_=Qre("%Object.defineProperty%",!0),h_=function(){if(p_)try{return p_({},"a",{value:1}),!0}catch{return!1}return!1};h_.hasArrayLengthDefineBug=function(){if(!h_())return null;try{return p_([],"length",{value:1}).length!==1}catch{return!0}};var _S=h_,Z0,rD;function Xre(){if(rD)return Z0;rD=1;var e=dh,t=e("%Object.getOwnPropertyDescriptor%",!0);if(t)try{t([],"length")}catch{t=null}return Z0=t,Z0}var Jre=_S(),ES=dh,nD=Jre&&ES("%Object.defineProperty%",!0),Zre=ES("%SyntaxError%"),Fl=ES("%TypeError%"),aD=Xre(),aj=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new Fl("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new Fl("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new Fl("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new Fl("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new Fl("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new Fl("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!aD&&aD(t,r);if(nD)nD(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new Zre("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ene=Q$,tne=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",rne=Object.prototype.toString,nne=Array.prototype.concat,iD=aj,ane=function(e){return typeof e=="function"&&rne.call(e)==="[object Function]"},ij=_S(),ine=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!ane(n)||!n())return}ij?iD(e,t,r,!0):iD(e,t,r)},oj=function(e,t){var r=arguments.length>2?arguments[2]:{},n=ene(t);tne&&(n=nne.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a2&&!!arguments[2];return(!n||Ene)&&(_ne?sD(t,"name",r,!0,!0):sD(t,"name",r)),t},Cne=xne,One=Object,Tne=TypeError,hj=Cne(function(){if(this!=null&&this!==One(this))throw new Tne("RegExp.prototype.flags getter called on non-object");var t="";return this.hasIndices&&(t+="d"),this.global&&(t+="g"),this.ignoreCase&&(t+="i"),this.multiline&&(t+="m"),this.dotAll&&(t+="s"),this.unicode&&(t+="u"),this.unicodeSets&&(t+="v"),this.sticky&&(t+="y"),t},"get flags",!0),Dne=hj,Pne=ph.supportsDescriptors,kne=Object.getOwnPropertyDescriptor,vj=function(){if(Pne&&/a/mig.flags==="gim"){var t=kne(RegExp.prototype,"flags");if(t&&typeof t.get=="function"&&typeof RegExp.prototype.dotAll=="boolean"&&typeof RegExp.prototype.hasIndices=="boolean"){var r="",n={};if(Object.defineProperty(n,"hasIndices",{get:function(){r+="d"}}),Object.defineProperty(n,"sticky",{get:function(){r+="y"}}),r==="dy")return t.get}}return Dne},Ane=ph.supportsDescriptors,Nne=vj,Rne=Object.getOwnPropertyDescriptor,Mne=Object.defineProperty,Ine=TypeError,lD=Object.getPrototypeOf,$ne=/a/,jne=function(){if(!Ane||!lD)throw new Ine("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var t=Nne(),r=lD($ne),n=Rne(r,"flags");return(!n||n.get!==t)&&Mne(r,"flags",{configurable:!0,enumerable:!1,get:t}),t},Lne=ph,Fne=bS,Une=hj,mj=vj,Bne=jne,gj=Fne(mj());Lne(gj,{getPolyfill:mj,implementation:Une,shim:Bne});var zne=gj,Wne=Date.prototype.getDay,Hne=function(t){try{return Wne.call(t),!0}catch{return!1}},Vne=Object.prototype.toString,Yne="[object Date]",Gne=yS(),Kne=function(t){return typeof t!="object"||t===null?!1:Gne?Hne(t):Vne.call(t)===Yne},uD=Q$,cD=qre,fD=hne,dD=yne,pD=zne,hD=Kne,vD=Date.prototype.getTime;function yj(e,t,r){var n=r||{};return(n.strict?fD(e,t):e===t)?!0:!e||!t||typeof e!="object"&&typeof t!="object"?n.strict?fD(e,t):e==t:qne(e,t,n)}function mD(e){return e==null}function gD(e){return!(!e||typeof e!="object"||typeof e.length!="number"||typeof e.copy!="function"||typeof e.slice!="function"||e.length>0&&typeof e[0]!="number")}function qne(e,t,r){var n,a;if(typeof e!=typeof t||mD(e)||mD(t)||e.prototype!==t.prototype||cD(e)!==cD(t))return!1;var i=dD(e),o=dD(t);if(i!==o)return!1;if(i||o)return e.source===t.source&&pD(e)===pD(t);if(hD(e)&&hD(t))return vD.call(e)===vD.call(t);var s=gD(e),l=gD(t);if(s!==l)return!1;if(s||l){if(e.length!==t.length)return!1;for(n=0;n=0;n--)if(u[n]!=c[n])return!1;for(n=u.length-1;n>=0;n--)if(a=u[n],!yj(e[a],t[a],r))return!1;return!0}var Qne=yj;const Xne=Xr(Qne);/**! + * @fileOverview Kickass library to create and place poppers near their reference elements. + * @version 1.16.1 + * @license + * Copyright (c) 2016 Federico Zivolo and contributors + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */var hh=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",Jne=function(){for(var e=["Edge","Trident","Firefox"],t=0;t=0)return 1;return 0}();function Zne(e){var t=!1;return function(){t||(t=!0,window.Promise.resolve().then(function(){t=!1,e()}))}}function eae(e){var t=!1;return function(){t||(t=!0,setTimeout(function(){t=!1,e()},Jne))}}var tae=hh&&window.Promise,rae=tae?Zne:eae;function wj(e){var t={};return e&&t.toString.call(e)==="[object Function]"}function Al(e,t){if(e.nodeType!==1)return[];var r=e.ownerDocument.defaultView,n=r.getComputedStyle(e,null);return t?n[t]:n}function SS(e){return e.nodeName==="HTML"?e:e.parentNode||e.host}function vh(e){if(!e)return document.body;switch(e.nodeName){case"HTML":case"BODY":return e.ownerDocument.body;case"#document":return e.body}var t=Al(e),r=t.overflow,n=t.overflowX,a=t.overflowY;return/(auto|scroll|overlay)/.test(r+a+n)?e:vh(SS(e))}function bj(e){return e&&e.referenceNode?e.referenceNode:e}var yD=hh&&!!(window.MSInputMethodContext&&document.documentMode),wD=hh&&/MSIE 10/.test(navigator.userAgent);function Xc(e){return e===11?yD:e===10?wD:yD||wD}function Oc(e){if(!e)return document.documentElement;for(var t=Xc(10)?document.body:null,r=e.offsetParent||null;r===t&&e.nextElementSibling;)r=(e=e.nextElementSibling).offsetParent;var n=r&&r.nodeName;return!n||n==="BODY"||n==="HTML"?e?e.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(r.nodeName)!==-1&&Al(r,"position")==="static"?Oc(r):r}function nae(e){var t=e.nodeName;return t==="BODY"?!1:t==="HTML"||Oc(e.firstElementChild)===e}function y_(e){return e.parentNode!==null?y_(e.parentNode):e}function Fm(e,t){if(!e||!e.nodeType||!t||!t.nodeType)return document.documentElement;var r=e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING,n=r?e:t,a=r?t:e,i=document.createRange();i.setStart(n,0),i.setEnd(a,0);var o=i.commonAncestorContainer;if(e!==o&&t!==o||n.contains(a))return nae(o)?o:Oc(o);var s=y_(e);return s.host?Fm(s.host,t):Fm(e,y_(t).host)}function Tc(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",r=t==="top"?"scrollTop":"scrollLeft",n=e.nodeName;if(n==="BODY"||n==="HTML"){var a=e.ownerDocument.documentElement,i=e.ownerDocument.scrollingElement||a;return i[r]}return e[r]}function aae(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=Tc(t,"top"),a=Tc(t,"left"),i=r?-1:1;return e.top+=n*i,e.bottom+=n*i,e.left+=a*i,e.right+=a*i,e}function bD(e,t){var r=t==="x"?"Left":"Top",n=r==="Left"?"Right":"Bottom";return parseFloat(e["border"+r+"Width"])+parseFloat(e["border"+n+"Width"])}function _D(e,t,r,n){return Math.max(t["offset"+e],t["scroll"+e],r["client"+e],r["offset"+e],r["scroll"+e],Xc(10)?parseInt(r["offset"+e])+parseInt(n["margin"+(e==="Height"?"Top":"Left")])+parseInt(n["margin"+(e==="Height"?"Bottom":"Right")]):0)}function _j(e){var t=e.body,r=e.documentElement,n=Xc(10)&&getComputedStyle(r);return{height:_D("Height",t,r,n),width:_D("Width",t,r,n)}}var iae=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},oae=function(){function e(t,r){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:!1,n=Xc(10),a=t.nodeName==="HTML",i=w_(e),o=w_(t),s=vh(e),l=Al(t),u=parseFloat(l.borderTopWidth),c=parseFloat(l.borderLeftWidth);r&&a&&(o.top=Math.max(o.top,0),o.left=Math.max(o.left,0));var f=ns({top:i.top-o.top-u,left:i.left-o.left-c,width:i.width,height:i.height});if(f.marginTop=0,f.marginLeft=0,!n&&a){var d=parseFloat(l.marginTop),p=parseFloat(l.marginLeft);f.top-=u-d,f.bottom-=u-d,f.left-=c-p,f.right-=c-p,f.marginTop=d,f.marginLeft=p}return(n&&!r?t.contains(s):t===s&&s.nodeName!=="BODY")&&(f=aae(f,t)),f}function sae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.ownerDocument.documentElement,n=xS(e,r),a=Math.max(r.clientWidth,window.innerWidth||0),i=Math.max(r.clientHeight,window.innerHeight||0),o=t?0:Tc(r),s=t?0:Tc(r,"left"),l={top:o-n.top+n.marginTop,left:s-n.left+n.marginLeft,width:a,height:i};return ns(l)}function Ej(e){var t=e.nodeName;if(t==="BODY"||t==="HTML")return!1;if(Al(e,"position")==="fixed")return!0;var r=SS(e);return r?Ej(r):!1}function Sj(e){if(!e||!e.parentElement||Xc())return document.documentElement;for(var t=e.parentElement;t&&Al(t,"transform")==="none";)t=t.parentElement;return t||document.documentElement}function CS(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,i={top:0,left:0},o=a?Sj(e):Fm(e,bj(t));if(n==="viewport")i=sae(o,a);else{var s=void 0;n==="scrollParent"?(s=vh(SS(t)),s.nodeName==="BODY"&&(s=e.ownerDocument.documentElement)):n==="window"?s=e.ownerDocument.documentElement:s=n;var l=xS(s,o,a);if(s.nodeName==="HTML"&&!Ej(o)){var u=_j(e.ownerDocument),c=u.height,f=u.width;i.top+=l.top-l.marginTop,i.bottom=c+l.top,i.left+=l.left-l.marginLeft,i.right=f+l.left}else i=l}r=r||0;var d=typeof r=="number";return i.left+=d?r:r.left||0,i.top+=d?r:r.top||0,i.right-=d?r:r.right||0,i.bottom-=d?r:r.bottom||0,i}function lae(e){var t=e.width,r=e.height;return t*r}function xj(e,t,r,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(e.indexOf("auto")===-1)return e;var o=CS(r,n,i,a),s={top:{width:o.width,height:t.top-o.top},right:{width:o.right-t.right,height:o.height},bottom:{width:o.width,height:o.bottom-t.bottom},left:{width:t.left-o.left,height:o.height}},l=Object.keys(s).map(function(d){return ra({key:d},s[d],{area:lae(s[d])})}).sort(function(d,p){return p.area-d.area}),u=l.filter(function(d){var p=d.width,h=d.height;return p>=r.clientWidth&&h>=r.clientHeight}),c=u.length>0?u[0].key:l[0].key,f=e.split("-")[1];return c+(f?"-"+f:"")}function Cj(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=n?Sj(t):Fm(t,bj(r));return xS(r,a,n)}function Oj(e){var t=e.ownerDocument.defaultView,r=t.getComputedStyle(e),n=parseFloat(r.marginTop||0)+parseFloat(r.marginBottom||0),a=parseFloat(r.marginLeft||0)+parseFloat(r.marginRight||0),i={width:e.offsetWidth+a,height:e.offsetHeight+n};return i}function Um(e){var t={left:"right",right:"left",bottom:"top",top:"bottom"};return e.replace(/left|right|bottom|top/g,function(r){return t[r]})}function Tj(e,t,r){r=r.split("-")[0];var n=Oj(e),a={width:n.width,height:n.height},i=["right","left"].indexOf(r)!==-1,o=i?"top":"left",s=i?"left":"top",l=i?"height":"width",u=i?"width":"height";return a[o]=t[o]+t[l]/2-n[l]/2,r===s?a[s]=t[s]-n[u]:a[s]=t[Um(s)],a}function mh(e,t){return Array.prototype.find?e.find(t):e.filter(t)[0]}function uae(e,t,r){if(Array.prototype.findIndex)return e.findIndex(function(a){return a[t]===r});var n=mh(e,function(a){return a[t]===r});return e.indexOf(n)}function Dj(e,t,r){var n=r===void 0?e:e.slice(0,uae(e,"name",r));return n.forEach(function(a){a.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var i=a.function||a.fn;a.enabled&&wj(i)&&(t.offsets.popper=ns(t.offsets.popper),t.offsets.reference=ns(t.offsets.reference),t=i(t,a))}),t}function cae(){if(!this.state.isDestroyed){var e={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};e.offsets.reference=Cj(this.state,this.popper,this.reference,this.options.positionFixed),e.placement=xj(this.options.placement,e.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),e.originalPlacement=e.placement,e.positionFixed=this.options.positionFixed,e.offsets.popper=Tj(this.popper,e.offsets.reference,e.placement),e.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",e=Dj(this.modifiers,e),this.state.isCreated?this.options.onUpdate(e):(this.state.isCreated=!0,this.options.onCreate(e))}}function Pj(e,t){return e.some(function(r){var n=r.name,a=r.enabled;return a&&n===t})}function OS(e){for(var t=[!1,"ms","Webkit","Moz","O"],r=e.charAt(0).toUpperCase()+e.slice(1),n=0;no[p]&&(e.offsets.popper[f]+=s[f]+h-o[p]),e.offsets.popper=ns(e.offsets.popper);var v=s[f]+s[u]/2-h/2,y=Al(e.instance.popper),m=parseFloat(y["margin"+c]),g=parseFloat(y["border"+c+"Width"]),E=v-e.offsets.popper[f]-m-g;return E=Math.max(Math.min(o[u]-h,E),0),e.arrowElement=n,e.offsets.arrow=(r={},Dc(r,f,Math.round(E)),Dc(r,d,""),r),e}function Sae(e){return e==="end"?"start":e==="start"?"end":e}var Rj=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],tw=Rj.slice(3);function ED(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=tw.indexOf(e),n=tw.slice(r+1).concat(tw.slice(0,r));return t?n.reverse():n}var rw={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function xae(e,t){if(Pj(e.instance.modifiers,"inner")||e.flipped&&e.placement===e.originalPlacement)return e;var r=CS(e.instance.popper,e.instance.reference,t.padding,t.boundariesElement,e.positionFixed),n=e.placement.split("-")[0],a=Um(n),i=e.placement.split("-")[1]||"",o=[];switch(t.behavior){case rw.FLIP:o=[n,a];break;case rw.CLOCKWISE:o=ED(n);break;case rw.COUNTERCLOCKWISE:o=ED(n,!0);break;default:o=t.behavior}return o.forEach(function(s,l){if(n!==s||o.length===l+1)return e;n=e.placement.split("-")[0],a=Um(n);var u=e.offsets.popper,c=e.offsets.reference,f=Math.floor,d=n==="left"&&f(u.right)>f(c.left)||n==="right"&&f(u.left)f(c.top)||n==="bottom"&&f(u.top)f(r.right),v=f(u.top)f(r.bottom),m=n==="left"&&p||n==="right"&&h||n==="top"&&v||n==="bottom"&&y,g=["top","bottom"].indexOf(n)!==-1,E=!!t.flipVariations&&(g&&i==="start"&&p||g&&i==="end"&&h||!g&&i==="start"&&v||!g&&i==="end"&&y),w=!!t.flipVariationsByContent&&(g&&i==="start"&&h||g&&i==="end"&&p||!g&&i==="start"&&y||!g&&i==="end"&&v),C=E||w;(d||m||C)&&(e.flipped=!0,(d||m)&&(n=o[l+1]),C&&(i=Sae(i)),e.placement=n+(i?"-"+i:""),e.offsets.popper=ra({},e.offsets.popper,Tj(e.instance.popper,e.offsets.reference,e.placement)),e=Dj(e.instance.modifiers,e,"flip"))}),e}function Cae(e){var t=e.offsets,r=t.popper,n=t.reference,a=e.placement.split("-")[0],i=Math.floor,o=["top","bottom"].indexOf(a)!==-1,s=o?"right":"bottom",l=o?"left":"top",u=o?"width":"height";return r[s]i(n[s])&&(e.offsets.popper[l]=i(n[s])),e}function Oae(e,t,r,n){var a=e.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),i=+a[1],o=a[2];if(!i)return e;if(o.indexOf("%")===0){var s=void 0;switch(o){case"%p":s=r;break;case"%":case"%r":default:s=n}var l=ns(s);return l[t]/100*i}else if(o==="vh"||o==="vw"){var u=void 0;return o==="vh"?u=Math.max(document.documentElement.clientHeight,window.innerHeight||0):u=Math.max(document.documentElement.clientWidth,window.innerWidth||0),u/100*i}else return i}function Tae(e,t,r,n){var a=[0,0],i=["right","left"].indexOf(n)!==-1,o=e.split(/(\+|\-)/).map(function(c){return c.trim()}),s=o.indexOf(mh(o,function(c){return c.search(/,|\s/)!==-1}));o[s]&&o[s].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var l=/\s*,\s*|\s+/,u=s!==-1?[o.slice(0,s).concat([o[s].split(l)[0]]),[o[s].split(l)[1]].concat(o.slice(s+1))]:[o];return u=u.map(function(c,f){var d=(f===1?!i:i)?"height":"width",p=!1;return c.reduce(function(h,v){return h[h.length-1]===""&&["+","-"].indexOf(v)!==-1?(h[h.length-1]=v,p=!0,h):p?(h[h.length-1]+=v,p=!1,h):h.concat(v)},[]).map(function(h){return Oae(h,d,t,r)})}),u.forEach(function(c,f){c.forEach(function(d,p){TS(d)&&(a[f]+=d*(c[p-1]==="-"?-1:1))})}),a}function Dae(e,t){var r=t.offset,n=e.placement,a=e.offsets,i=a.popper,o=a.reference,s=n.split("-")[0],l=void 0;return TS(+r)?l=[+r,0]:l=Tae(r,i,o,s),s==="left"?(i.top+=l[0],i.left-=l[1]):s==="right"?(i.top+=l[0],i.left+=l[1]):s==="top"?(i.left+=l[0],i.top-=l[1]):s==="bottom"&&(i.left+=l[0],i.top+=l[1]),e.popper=i,e}function Pae(e,t){var r=t.boundariesElement||Oc(e.instance.popper);e.instance.reference===r&&(r=Oc(r));var n=OS("transform"),a=e.instance.popper.style,i=a.top,o=a.left,s=a[n];a.top="",a.left="",a[n]="";var l=CS(e.instance.popper,e.instance.reference,t.padding,r,e.positionFixed);a.top=i,a.left=o,a[n]=s,t.boundaries=l;var u=t.priority,c=e.offsets.popper,f={primary:function(p){var h=c[p];return c[p]l[p]&&!t.escapeWithReference&&(v=Math.min(c[h],l[p]-(p==="right"?c.width:c.height))),Dc({},h,v)}};return u.forEach(function(d){var p=["left","top"].indexOf(d)!==-1?"primary":"secondary";c=ra({},c,f[p](d))}),e.offsets.popper=c,e}function kae(e){var t=e.placement,r=t.split("-")[0],n=t.split("-")[1];if(n){var a=e.offsets,i=a.reference,o=a.popper,s=["bottom","top"].indexOf(r)!==-1,l=s?"left":"top",u=s?"width":"height",c={start:Dc({},l,i[l]),end:Dc({},l,i[l]+i[u]-o[u])};e.offsets.popper=ra({},o,c[n])}return e}function Aae(e){if(!Nj(e.instance.modifiers,"hide","preventOverflow"))return e;var t=e.offsets.reference,r=mh(e.instance.modifiers,function(n){return n.name==="preventOverflow"}).boundaries;if(t.bottomr.right||t.top>r.bottom||t.right2&&arguments[2]!==void 0?arguments[2]:{};iae(this,e),this.scheduleUpdate=function(){return requestAnimationFrame(n.update)},this.update=rae(this.update.bind(this)),this.options=ra({},e.Defaults,a),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=t&&t.jquery?t[0]:t,this.popper=r&&r.jquery?r[0]:r,this.options.modifiers={},Object.keys(ra({},e.Defaults.modifiers,a.modifiers)).forEach(function(o){n.options.modifiers[o]=ra({},e.Defaults.modifiers[o]||{},a.modifiers?a.modifiers[o]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(o){return ra({name:o},n.options.modifiers[o])}).sort(function(o,s){return o.order-s.order}),this.modifiers.forEach(function(o){o.enabled&&wj(o.onLoad)&&o.onLoad(n.reference,n.popper,n.options,o,n.state)}),this.update();var i=this.options.eventsEnabled;i&&this.enableEventListeners(),this.state.eventsEnabled=i}return oae(e,[{key:"update",value:function(){return cae.call(this)}},{key:"destroy",value:function(){return fae.call(this)}},{key:"enableEventListeners",value:function(){return pae.call(this)}},{key:"disableEventListeners",value:function(){return vae.call(this)}}]),e}();jy.Utils=(typeof window<"u"?window:global).PopperUtils;jy.placements=Rj;jy.Defaults=Mae;const Mj=jy;var __={exports:{}},E_={exports:{}},SD="__global_unique_id__",Iae=function(){return et[SD]=(et[SD]||0)+1};(function(e,t){t.__esModule=!0;var r=x;l(r);var n=LR,a=l(n),i=Iae,o=l(i),s=uI;l(s);function l(m){return m&&m.__esModule?m:{default:m}}function u(m,g){if(!(m instanceof g))throw new TypeError("Cannot call a class as a function")}function c(m,g){if(!m)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g&&(typeof g=="object"||typeof g=="function")?g:m}function f(m,g){if(typeof g!="function"&&g!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof g);m.prototype=Object.create(g&&g.prototype,{constructor:{value:m,enumerable:!1,writable:!0,configurable:!0}}),g&&(Object.setPrototypeOf?Object.setPrototypeOf(m,g):m.__proto__=g)}var d=1073741823;function p(m,g){return m===g?m!==0||1/m===1/g:m!==m&&g!==g}function h(m){var g=[];return{on:function(w){g.push(w)},off:function(w){g=g.filter(function(C){return C!==w})},get:function(){return m},set:function(w,C){m=w,g.forEach(function(S){return S(m,C)})}}}function v(m){return Array.isArray(m)?m[0]:m}function y(m,g){var E,w,C="__create-react-context-"+(0,o.default)()+"__",S=function(D){f(N,D);function N(){var R,j,U;u(this,N);for(var Q=arguments.length,X=Array(Q),J=0;J1?r-1:0),a=1;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}();return function(){var r,n=S_(e);if(t){var a=S_(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return Hae(this,r)}}function TD(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}}function DD(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}}var Vae={p:DD,P:function(e,t){var r,n=e.match(/(P+)(p+)?/),a=n[1],i=n[2];if(!i)return TD(e,t);switch(a){case"P":r=t.dateTime({width:"short"});break;case"PP":r=t.dateTime({width:"medium"});break;case"PPP":r=t.dateTime({width:"long"});break;case"PPPP":default:r=t.dateTime({width:"full"})}return r.replace("{{date}}",TD(a,t)).replace("{{time}}",DD(i,t))}},Yae=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;function Ar(e){var t=e?typeof e=="string"||e instanceof String?vZ(e):fe(e):new Date;return mo(t)?t:null}function Gae(e,t,r,n){var a=null,i=Hs(r)||Ws(),o=!0;return Array.isArray(t)?(t.forEach(function(s){var l=z0(e,s,new Date,{locale:i});n&&(o=mo(l)&&e===ci(l,s,{awareOfUnicodeTokens:!0})),mo(l)&&o&&(a=l)}),a):(a=z0(e,t,new Date,{locale:i}),n?o=mo(a)&&e===ci(a,t,{awareOfUnicodeTokens:!0}):mo(a)||(t=t.match(Yae).map(function(s){var l=s[0];return l==="p"||l==="P"?i?(0,Vae[l])(s,i.formatLong):l:s}).join(""),e.length>0&&(a=z0(e,t.slice(0,e.length),new Date)),mo(a)||(a=new Date(e))),mo(a)&&o?a:null)}function mo(e){return VI(e)&&Qi(e,new Date("1/1/1000"))}function wr(e,t,r){if(r==="en")return ci(e,t,{awareOfUnicodeTokens:!0});var n=Hs(r);return r&&!n&&console.warn('A locale object was not found for the provided string ["'.concat(r,'"].')),!n&&Ws()&&Hs(Ws())&&(n=Hs(Ws())),ci(e,t,{locale:n||null,awareOfUnicodeTokens:!0})}function PD(e,t){var r=t.hour,n=r===void 0?0:r,a=t.minute,i=a===void 0?0:a,o=t.second;return ad(id(AZ(e,o===void 0?0:o),i),n)}function Kae(e,t){var r=t&&Hs(t)||Ws()&&Hs(Ws());return pJ(e,r?{locale:r}:null)}function qae(e,t){return wr(e,"ddd",t)}function Qae(e){return cl(e)}function DS(e,t){var r=Hs(t||Ws());return yp(e,{locale:r})}function zs(e){return XQ(e)}function $f(e){return JQ(e)}function Xae(e){return Kb(e)}function Wj(e,t){return e&&t?pZ(e,t):!e&&!t}function So(e,t){return e&&t?fZ(e,t):!e&&!t}function zm(e,t){return e&&t?dZ(e,t):!e&&!t}function hn(e,t){return e&&t?WQ(e,t):!e&&!t}function Ou(e,t){return e&&t?hJ(e,t):!e&&!t}function Pv(e,t,r){var n,a=cl(t),i=YI(r);try{n=a$(e,{start:a,end:i})}catch{n=!1}return n}function Ws(){return(typeof window<"u"?window:global).__localeId__}function Hs(e){if(typeof e=="string"){var t=typeof window<"u"?window:global;return t.__localeData__?t.__localeData__[e]:null}return e}function Hj(e,t){return wr(Ya(Ar(),e),"LLLL",t)}function Vj(e,t){return wr(Ya(Ar(),e),"LLL",t)}function Jae(e,t){return wr(Mf(Ar(),e),"QQQ",t)}function PS(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return hn(e,s)})||i&&!i.some(function(s){return hn(e,s)})||o&&!o(Ar(e))||!1}function Yj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeDates;return r&&r.some(function(n){return hn(e,n)})||!1}function Zae(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return So(e,s)})||i&&!i.some(function(s){return So(e,s)})||o&&!o(Ar(e))||!1}function eie(e,t,r,n){var a=xt(e),i=Sa(e),o=xt(t),s=Sa(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function tie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=t.excludeDates,i=t.includeDates,o=t.filterDate;return Ly(e,{minDate:r,maxDate:n})||a&&a.some(function(s){return zm(e,s)})||i&&!i.some(function(s){return zm(e,s)})||o&&!o(Ar(e))||!1}function rie(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate,a=new Date(e,0,1);return Ly(a,{minDate:r,maxDate:n})||!1}function nie(e,t,r,n){var a=xt(e),i=Gb(e),o=xt(t),s=Gb(t),l=xt(n);return a===o&&a===l?i<=r&&r<=s:a=r||la:void 0}function Ly(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.maxDate;return r&&xm(e,r)<0||n&&xm(e,n)>0}function kD(e,t){return t.some(function(r){return Pa(r)===Pa(e)&&ka(r)===ka(e)})}function AD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.excludeTimes,n=t.includeTimes,a=t.filterTime;return r&&kD(e,r)||n&&!kD(e,n)||a&&!a(e)||!1}function ND(e,t){var r=t.minTime,n=t.maxTime;if(!r||!n)throw new Error("Both minTime and maxTime props required");var a,i=Ar(),o=ad(id(i,ka(e)),Pa(e)),s=ad(id(i,ka(r)),Pa(r)),l=ad(id(i,ka(n)),Pa(n));try{a=!a$(o,{start:s,end:l})}catch{a=!1}return a}function RD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=_p(e,1);return r&&bp(r,a)>0||n&&n.every(function(i){return bp(i,a)>0})||!1}function MD(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=qi(e,1);return r&&bp(a,r)>0||n&&n.every(function(i){return bp(a,i)>0})||!1}function ID(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.minDate,n=t.includeDates,a=km(e,1);return r&&Cm(r,a)>0||n&&n.every(function(i){return Cm(i,a)>0})||!1}function $D(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.maxDate,n=t.includeDates,a=wp(e,1);return r&&Cm(a,r)>0||n&&n.every(function(i){return Cm(a,i)>0})||!1}function Gj(e){var t=e.minDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)>=0});return mT(n)}return r?mT(r):t}function Kj(e){var t=e.maxDate,r=e.includeDates;if(r&&t){var n=r.filter(function(a){return xm(a,t)<=0});return vT(n)}return r?vT(r):t}function jD(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"react-datepicker__day--highlighted",r=new Map,n=0,a=e.length;n1&&arguments[1]!==void 0?arguments[1]:12,r=Math.ceil(xt(e)/t)*t,n=r-(t-1);return{startPeriod:n,endPeriod:r}}function iie(e,t,r,n){for(var a=[],i=0;i<2*t+1;i++){var o=e+t-i,s=!0;r&&(s=xt(r)<=o),n&&s&&(s=xt(n)>=o),s&&a.push(o)}return a}var oie=Iy(function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;Mr(this,r),k(A(a=t.call(this,n)),"renderOptions",function(){var l=a.props.year,u=a.state.yearsList.map(function(d){return b.createElement("div",{className:l===d?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:d,onClick:a.onChange.bind(A(a),d)},l===d?b.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",d)}),c=a.props.minDate?xt(a.props.minDate):null,f=a.props.maxDate?xt(a.props.maxDate):null;return f&&a.state.yearsList.find(function(d){return d===f})||u.unshift(b.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:a.incrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),c&&a.state.yearsList.find(function(d){return d===c})||u.push(b.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:a.decrementYears},b.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),u}),k(A(a),"onChange",function(l){a.props.onChange(l)}),k(A(a),"handleClickOutside",function(){a.props.onCancel()}),k(A(a),"shiftYears",function(l){var u=a.state.yearsList.map(function(c){return c+l});a.setState({yearsList:u})}),k(A(a),"incrementYears",function(){return a.shiftYears(1)}),k(A(a),"decrementYears",function(){return a.shiftYears(-1)});var i=n.yearDropdownItemNumber,o=n.scrollableYearDropdown,s=i||(o?10:5);return a.state={yearsList:iie(a.props.year,s,a.props.minDate,a.props.maxDate)},a}return or(r,[{key:"render",value:function(){var n=Sn({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return b.createElement("div",{className:n},this.renderOptions())}}]),r}()),sie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},l=!1;n.getTabIndex()===0&&!s.isInputFocused&&n.isSameDay(n.props.preSelection)&&(document.activeElement&&document.activeElement!==document.body||n.props.inline||(l=!0),n.props.containerRef&&n.props.containerRef.current&&n.props.containerRef.current.contains(document.activeElement)&&document.activeElement.classList.contains("react-datepicker__day")&&(l=!0)),l&&n.dayEl.current.focus({preventScroll:!0})}),k(A(n),"renderDayContents",function(){return n.isOutsideMonth()&&(n.props.monthShowsDuplicateDaysEnd&&Kh(n.props.day)<10||n.props.monthShowsDuplicateDaysStart&&Kh(n.props.day)>20)?null:n.props.renderDayContents?n.props.renderDayContents(Kh(n.props.day),n.props.day):Kh(n.props.day)}),k(A(n),"render",function(){return b.createElement("div",{ref:n.dayEl,className:n.getClassNames(n.props.day),onKeyDown:n.handleOnKeyDown,onClick:n.handleClick,onMouseEnter:n.handleMouseEnter,tabIndex:n.getTabIndex(),"aria-label":n.getAriaLabel(),role:"button","aria-disabled":n.isDisabled()},n.renderDayContents())}),n}return or(r,[{key:"componentDidMount",value:function(){this.handleFocusDay()}},{key:"componentDidUpdate",value:function(n){this.handleFocusDay(n)}}]),r}(),hie=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o=6,p=!l&&!n.isWeekInMonth(u);if(d||p){if(!n.props.peekNextMonth)break;f=!0}}return s}),k(A(n),"onMonthClick",function(s,l){n.handleDayClick(zs(Ya(n.props.day,l)),s)}),k(A(n),"handleMonthNavigation",function(s,l){n.isDisabled(l)||n.isExcluded(l)||(n.props.setPreSelection(l),n.MONTH_REFS[s].current&&n.MONTH_REFS[s].current.focus())}),k(A(n),"onMonthKeyDown",function(s,l){var u=s.key;if(!n.props.disabledKeyboardNavigation)switch(u){case"Enter":n.onMonthClick(s,l),n.props.setPreSelection(n.props.selected);break;case"ArrowRight":n.handleMonthNavigation(l===11?0:l+1,qi(n.props.preSelection,1));break;case"ArrowLeft":n.handleMonthNavigation(l===0?11:l-1,_p(n.props.preSelection,1))}}),k(A(n),"onQuarterClick",function(s,l){n.handleDayClick(Xae(Mf(n.props.day,l)),s)}),k(A(n),"getMonthClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate,v=l.preSelection;return Sn("react-datepicker__month-text","react-datepicker__month-".concat(s),{"react-datepicker__month--disabled":(p||h)&&Zae(Ya(u,s),n.props),"react-datepicker__month--selected":Sa(u)===s&&xt(u)===xt(d),"react-datepicker__month-text--keyboard-selected":Sa(v)===s,"react-datepicker__month--in-range":eie(c,f,s,u),"react-datepicker__month--range-start":n.isRangeStartMonth(s),"react-datepicker__month--range-end":n.isRangeEndMonth(s)})}),k(A(n),"getTabIndex",function(s){var l=Sa(n.props.preSelection);return n.props.disabledKeyboardNavigation||s!==l?"-1":"0"}),k(A(n),"getAriaLabel",function(s){var l=n.props,u=l.ariaLabelPrefix,c=u===void 0?"Choose":u,f=l.disabledDayAriaLabelPrefix,d=f===void 0?"Not available":f,p=l.day,h=Ya(p,s),v=n.isDisabled(h)||n.isExcluded(h)?d:c;return"".concat(v," ").concat(wr(h,"MMMM yyyy"))}),k(A(n),"getQuarterClassNames",function(s){var l=n.props,u=l.day,c=l.startDate,f=l.endDate,d=l.selected,p=l.minDate,h=l.maxDate;return Sn("react-datepicker__quarter-text","react-datepicker__quarter-".concat(s),{"react-datepicker__quarter--disabled":(p||h)&&tie(Mf(u,s),n.props),"react-datepicker__quarter--selected":Gb(u)===s&&xt(u)===xt(d),"react-datepicker__quarter--in-range":nie(c,f,s,u),"react-datepicker__quarter--range-start":n.isRangeStartQuarter(s),"react-datepicker__quarter--range-end":n.isRangeEndQuarter(s)})}),k(A(n),"renderMonths",function(){var s=n.props,l=s.showFullMonthYearPicker,u=s.showTwoColumnMonthYearPicker,c=s.locale;return(u?[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]]:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]]).map(function(f,d){return b.createElement("div",{className:"react-datepicker__month-wrapper",key:d},f.map(function(p,h){return b.createElement("div",{ref:n.MONTH_REFS[p],key:h,onClick:function(v){n.onMonthClick(v,p)},onKeyDown:function(v){n.onMonthKeyDown(v,p)},tabIndex:n.getTabIndex(p),className:n.getMonthClassNames(p),role:"button","aria-label":n.getAriaLabel(p)},l?Hj(p,c):Vj(p,c))}))})}),k(A(n),"renderQuarters",function(){return b.createElement("div",{className:"react-datepicker__quarter-wrapper"},[1,2,3,4].map(function(s,l){return b.createElement("div",{key:l,onClick:function(u){n.onQuarterClick(u,s)},className:n.getQuarterClassNames(s)},Jae(s,n.props.locale))}))}),k(A(n),"getClassNames",function(){var s=n.props,l=s.day,u=s.selectingDate,c=s.selectsStart,f=s.selectsEnd,d=s.showMonthYearPicker,p=s.showQuarterYearPicker,h=s.monthClassName,v=h?h(l):void 0;return Sn("react-datepicker__month",v,{"react-datepicker__month--selecting-range":u&&(c||f)},{"react-datepicker__monthPicker":d},{"react-datepicker__quarterPicker":p})}),n}return or(r,[{key:"render",value:function(){var n=this.props,a=n.showMonthYearPicker,i=n.showQuarterYearPicker,o=n.day,s=n.ariaLabelPrefix,l=s===void 0?"month ":s;return b.createElement("div",{className:this.getClassNames(),onMouseLeave:this.handleMouseLeave,"aria-label":"".concat(l," ").concat(wr(o,"yyyy-MM"))},a?this.renderMonths():i?this.renderQuarters():this.renderWeeks())}}]),r}(),qj=function(e){Ir(r,b.Component);var t=$r(r);function r(){var n;Mr(this,r);for(var a=arguments.length,i=new Array(a),o=0;o0&&arguments[0]!==void 0?arguments[0]:{},s=(o.className||"").split(/\s+/);return bie.some(function(l){return s.indexOf(l)>=0})})(i.target)&&a.props.onDropdownFocus()}),k(A(a),"getDateInView",function(){var i=a.props,o=i.preSelection,s=i.selected,l=i.openToDate,u=Gj(a.props),c=Kj(a.props),f=Ar(),d=l||s||o;return d||(u&&Ls(f,u)?u:c&&Qi(f,c)?c:f)}),k(A(a),"increaseMonth",function(){a.setState(function(i){var o=i.date;return{date:qi(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"decreaseMonth",function(){a.setState(function(i){var o=i.date;return{date:_p(o,1)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"handleDayClick",function(i,o,s){a.props.onSelect(i,o,s),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleDayMouseEnter",function(i){a.setState({selectingDate:i}),a.props.onDayMouseEnter&&a.props.onDayMouseEnter(i)}),k(A(a),"handleMonthMouseLeave",function(){a.setState({selectingDate:null}),a.props.onMonthMouseLeave&&a.props.onMonthMouseLeave()}),k(A(a),"handleYearChange",function(i){a.props.onYearChange&&a.props.onYearChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthChange",function(i){a.props.onMonthChange&&a.props.onMonthChange(i),a.props.adjustDateOnChange&&(a.props.onSelect&&a.props.onSelect(i),a.props.setOpen&&a.props.setOpen(!0)),a.props.setPreSelection&&a.props.setPreSelection(i)}),k(A(a),"handleMonthYearChange",function(i){a.handleYearChange(i),a.handleMonthChange(i)}),k(A(a),"changeYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(s,i)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"changeMonth",function(i){a.setState(function(o){var s=o.date;return{date:Ya(s,i)}},function(){return a.handleMonthChange(a.state.date)})}),k(A(a),"changeMonthYear",function(i){a.setState(function(o){var s=o.date;return{date:Pm(Ya(s,Sa(i)),xt(i))}},function(){return a.handleMonthYearChange(a.state.date)})}),k(A(a),"header",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=DS(i,a.props.locale),s=[];return a.props.showWeekNumbers&&s.push(b.createElement("div",{key:"W",className:"react-datepicker__day-name"},a.props.weekLabel||"#")),s.concat([0,1,2,3,4,5,6].map(function(l){var u=Kc(o,l),c=a.formatWeekday(u,a.props.locale),f=a.props.weekDayClassName?a.props.weekDayClassName(u):void 0;return b.createElement("div",{key:l,className:Sn("react-datepicker__day-name",f)},c)}))}),k(A(a),"formatWeekday",function(i,o){return a.props.formatWeekDay?function(s,l,u){return l(wr(s,"EEEE",u))}(i,a.props.formatWeekDay,o):a.props.useWeekdaysShort?function(s,l){return wr(s,"EEE",l)}(i,o):function(s,l){return wr(s,"EEEEEE",l)}(i,o)}),k(A(a),"decreaseYear",function(){a.setState(function(i){var o=i.date;return{date:km(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderPreviousButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=ID(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.minDate,m=v.yearItemNumber,g=m===void 0?12:m,E=$f(km(h,g)),w=kv(E,g),C=w.endPeriod,S=y&&xt(y);return S&&S>C||!1}(a.state.date,a.props);break;default:i=RD(a.state.date,a.props)}if((a.props.forceShowMonthNavigation||a.props.showDisabledMonthNavigation||!i)&&!a.props.showTimeSelectOnly){var o=["react-datepicker__navigation","react-datepicker__navigation--previous"],s=a.decreaseMonth;(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker)&&(s=a.decreaseYear),i&&a.props.showDisabledMonthNavigation&&(o.push("react-datepicker__navigation--previous--disabled"),s=null);var l=a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker,u=a.props,c=u.previousMonthAriaLabel,f=c===void 0?"Previous Month":c,d=u.previousYearAriaLabel,p=d===void 0?"Previous Year":d;return b.createElement("button",{type:"button",className:o.join(" "),onClick:s,"aria-label":l?p:f},l?a.props.previousYearButtonLabel:a.props.previousMonthButtonLabel)}}}),k(A(a),"increaseYear",function(){a.setState(function(i){var o=i.date;return{date:wp(o,a.props.showYearPicker?a.props.yearItemNumber:1)}},function(){return a.handleYearChange(a.state.date)})}),k(A(a),"renderNextButton",function(){if(!a.props.renderCustomHeader){var i;switch(!0){case a.props.showMonthYearPicker:i=$D(a.state.date,a.props);break;case a.props.showYearPicker:i=function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},y=v.maxDate,m=v.yearItemNumber,g=m===void 0?12:m,E=wp(h,g),w=kv(E,g),C=w.startPeriod,S=y&&xt(y);return S&&S0&&arguments[0]!==void 0?arguments[0]:a.state.date,o=["react-datepicker__current-month"];return a.props.showYearDropdown&&o.push("react-datepicker__current-month--hasYearDropdown"),a.props.showMonthDropdown&&o.push("react-datepicker__current-month--hasMonthDropdown"),a.props.showMonthYearDropdown&&o.push("react-datepicker__current-month--hasMonthYearDropdown"),b.createElement("div",{className:o.join(" ")},wr(i,a.props.dateFormat,a.props.locale))}),k(A(a),"renderYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showYearDropdown&&!i)return b.createElement(sie,{adjustDateOnChange:a.props.adjustDateOnChange,date:a.state.date,onSelect:a.props.onSelect,setOpen:a.props.setOpen,dropdownMode:a.props.dropdownMode,onChange:a.changeYear,minDate:a.props.minDate,maxDate:a.props.maxDate,year:xt(a.state.date),scrollableYearDropdown:a.props.scrollableYearDropdown,yearDropdownItemNumber:a.props.yearDropdownItemNumber})}),k(A(a),"renderMonthDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthDropdown&&!i)return b.createElement(uie,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,onChange:a.changeMonth,month:Sa(a.state.date),useShortMonthInDropdown:a.props.useShortMonthInDropdown})}),k(A(a),"renderMonthYearDropdown",function(){var i=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(a.props.showMonthYearDropdown&&!i)return b.createElement(die,{dropdownMode:a.props.dropdownMode,locale:a.props.locale,dateFormat:a.props.dateFormat,onChange:a.changeMonthYear,minDate:a.props.minDate,maxDate:a.props.maxDate,date:a.state.date,scrollableMonthYearDropdown:a.props.scrollableMonthYearDropdown})}),k(A(a),"renderTodayButton",function(){if(a.props.todayButton&&!a.props.showTimeSelectOnly)return b.createElement("div",{className:"react-datepicker__today-button",onClick:function(i){return a.props.onSelect(cl(Ar()),i)}},a.props.todayButton)}),k(A(a),"renderDefaultHeader",function(i){var o=i.monthDate,s=i.i;return b.createElement("div",{className:"react-datepicker__header ".concat(a.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},a.renderCurrentMonth(o),b.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(a.props.dropdownMode),onFocus:a.handleDropdownFocus},a.renderMonthDropdown(s!==0),a.renderMonthYearDropdown(s!==0),a.renderYearDropdown(s!==0)),b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderCustomHeader",function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=i.monthDate,s=i.i;if(s!==0&&s!==void 0)return null;var l=RD(a.state.date,a.props),u=MD(a.state.date,a.props),c=ID(a.state.date,a.props),f=$D(a.state.date,a.props),d=!a.props.showMonthYearPicker&&!a.props.showQuarterYearPicker&&!a.props.showYearPicker;return b.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:a.props.onDropdownFocus},a.props.renderCustomHeader(OD(OD({},a.state),{},{changeMonth:a.changeMonth,changeYear:a.changeYear,decreaseMonth:a.decreaseMonth,increaseMonth:a.increaseMonth,decreaseYear:a.decreaseYear,increaseYear:a.increaseYear,prevMonthButtonDisabled:l,nextMonthButtonDisabled:u,prevYearButtonDisabled:c,nextYearButtonDisabled:f})),d&&b.createElement("div",{className:"react-datepicker__day-names"},a.header(o)))}),k(A(a),"renderYearHeader",function(){var i=a.state.date,o=a.props,s=o.showYearPicker,l=kv(i,o.yearItemNumber),u=l.startPeriod,c=l.endPeriod;return b.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},s?"".concat(u," - ").concat(c):xt(i))}),k(A(a),"renderHeader",function(i){switch(!0){case a.props.renderCustomHeader!==void 0:return a.renderCustomHeader(i);case(a.props.showMonthYearPicker||a.props.showQuarterYearPicker||a.props.showYearPicker):return a.renderYearHeader(i);default:return a.renderDefaultHeader(i)}}),k(A(a),"renderMonths",function(){if(!a.props.showTimeSelectOnly&&!a.props.showYearPicker){for(var i=[],o=a.props.showPreviousMonths?a.props.monthsShown-1:0,s=_p(a.state.date,o),l=0;l0;i.push(b.createElement("div",{key:f,ref:function(h){a.monthContainer=h},className:"react-datepicker__month-container"},a.renderHeader({monthDate:c,i:l}),b.createElement(mie,{chooseDayAriaLabelPrefix:a.props.chooseDayAriaLabelPrefix,disabledDayAriaLabelPrefix:a.props.disabledDayAriaLabelPrefix,weekAriaLabelPrefix:a.props.weekAriaLabelPrefix,onChange:a.changeMonthYear,day:c,dayClassName:a.props.dayClassName,monthClassName:a.props.monthClassName,onDayClick:a.handleDayClick,handleOnKeyDown:a.props.handleOnKeyDown,onDayMouseEnter:a.handleDayMouseEnter,onMouseLeave:a.handleMonthMouseLeave,onWeekSelect:a.props.onWeekSelect,orderInDisplay:l,formatWeekNumber:a.props.formatWeekNumber,locale:a.props.locale,minDate:a.props.minDate,maxDate:a.props.maxDate,excludeDates:a.props.excludeDates,highlightDates:a.props.highlightDates,selectingDate:a.state.selectingDate,includeDates:a.props.includeDates,inline:a.props.inline,fixedHeight:a.props.fixedHeight,filterDate:a.props.filterDate,preSelection:a.props.preSelection,setPreSelection:a.props.setPreSelection,selected:a.props.selected,selectsStart:a.props.selectsStart,selectsEnd:a.props.selectsEnd,selectsRange:a.props.selectsRange,showWeekNumbers:a.props.showWeekNumbers,startDate:a.props.startDate,endDate:a.props.endDate,peekNextMonth:a.props.peekNextMonth,setOpen:a.props.setOpen,shouldCloseOnSelect:a.props.shouldCloseOnSelect,renderDayContents:a.props.renderDayContents,disabledKeyboardNavigation:a.props.disabledKeyboardNavigation,showMonthYearPicker:a.props.showMonthYearPicker,showFullMonthYearPicker:a.props.showFullMonthYearPicker,showTwoColumnMonthYearPicker:a.props.showTwoColumnMonthYearPicker,showYearPicker:a.props.showYearPicker,showQuarterYearPicker:a.props.showQuarterYearPicker,isInputFocused:a.props.isInputFocused,containerRef:a.containerRef,monthShowsDuplicateDaysEnd:d,monthShowsDuplicateDaysStart:p})))}return i}}),k(A(a),"renderYears",function(){if(!a.props.showTimeSelectOnly)return a.props.showYearPicker?b.createElement("div",{className:"react-datepicker__year--container"},a.renderHeader(),b.createElement(gie,Tp({onDayClick:a.handleDayClick,date:a.state.date},a.props))):void 0}),k(A(a),"renderTimeSection",function(){if(a.props.showTimeSelect&&(a.state.monthContainer||a.props.showTimeSelectOnly))return b.createElement(qj,{selected:a.props.selected,openToDate:a.props.openToDate,onChange:a.props.onTimeChange,timeClassName:a.props.timeClassName,format:a.props.timeFormat,includeTimes:a.props.includeTimes,intervals:a.props.timeIntervals,minTime:a.props.minTime,maxTime:a.props.maxTime,excludeTimes:a.props.excludeTimes,filterTime:a.props.filterTime,timeCaption:a.props.timeCaption,todayButton:a.props.todayButton,showMonthDropdown:a.props.showMonthDropdown,showMonthYearDropdown:a.props.showMonthYearDropdown,showYearDropdown:a.props.showYearDropdown,withPortal:a.props.withPortal,monthRef:a.state.monthContainer,injectTimes:a.props.injectTimes,locale:a.props.locale,showTimeSelectOnly:a.props.showTimeSelectOnly})}),k(A(a),"renderInputTimeSection",function(){var i=new Date(a.props.selected),o=mo(i)&&a.props.selected?"".concat(LD(i.getHours()),":").concat(LD(i.getMinutes())):"";if(a.props.showTimeInput)return b.createElement(yie,{date:i,timeString:o,timeInputLabel:a.props.timeInputLabel,onChange:a.props.onTimeChange,customTimeInput:a.props.customTimeInput})}),a.containerRef=b.createRef(),a.state={date:a.getDateInView(),selectingDate:null,monthContainer:null},a}return or(r,null,[{key:"defaultProps",get:function(){return{onDropdownFocus:function(){},monthsShown:1,monthSelectedIn:0,forceShowMonthNavigation:!1,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",customTimeInput:null,yearItemNumber:12}}}]),or(r,[{key:"componentDidMount",value:function(){var n=this;this.props.showTimeSelect&&(this.assignMonthContainer=void n.setState({monthContainer:n.monthContainer}))}},{key:"componentDidUpdate",value:function(n){this.props.preSelection&&!hn(this.props.preSelection,n.preSelection)?this.setState({date:this.props.preSelection}):this.props.openToDate&&!hn(this.props.openToDate,n.openToDate)&&this.setState({date:this.props.openToDate})}},{key:"render",value:function(){var n=this.props.container||wie;return b.createElement("div",{ref:this.containerRef},b.createElement(n,{className:Sn("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showPopperArrow:this.props.showPopperArrow,arrowProps:this.props.arrowProps},this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.props.children))}}]),r}(),Eie=function(e){return!e.disabled&&e.tabIndex!==-1},Sie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getTabChildren",function(){return Array.prototype.slice.call(a.tabLoopRef.current.querySelectorAll("[tabindex], a, button, input, select, textarea"),1,-1).filter(Eie)}),k(A(a),"handleFocusStart",function(i){var o=a.getTabChildren();o&&o.length>1&&o[o.length-1].focus()}),k(A(a),"handleFocusEnd",function(i){var o=a.getTabChildren();o&&o.length>1&&o[0].focus()}),a.tabLoopRef=b.createRef(),a}return or(r,null,[{key:"defaultProps",get:function(){return{enableTabLoop:!0}}}]),or(r,[{key:"render",value:function(){return this.props.enableTabLoop?b.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},b.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:"0",onFocus:this.handleFocusStart}),this.props.children,b.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:"0",onFocus:this.handleFocusEnd})):this.props.children}}]),r}(),xie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),(a=t.call(this,n)).el=document.createElement("div"),a}return or(r,[{key:"componentDidMount",value:function(){this.portalRoot=document.getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),document.body.appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)}},{key:"componentWillUnmount",value:function(){this.portalRoot.removeChild(this.el)}},{key:"render",value:function(){return nU.createPortal(this.props.children,this.el)}}]),r}(),Cie=function(e){Ir(r,b.Component);var t=$r(r);function r(){return Mr(this,r),t.apply(this,arguments)}return or(r,[{key:"render",value:function(){var n,a=this.props,i=a.className,o=a.wrapperClassName,s=a.hidePopper,l=a.popperComponent,u=a.popperModifiers,c=a.popperPlacement,f=a.popperProps,d=a.targetComponent,p=a.enableTabLoop,h=a.popperOnKeyDown,v=a.portalId;if(!s){var y=Sn("react-datepicker-popper",i);n=b.createElement(Bae,Tp({modifiers:u,placement:c},f),function(g){var E=g.ref,w=g.style,C=g.placement,S=g.arrowProps;return b.createElement(Sie,{enableTabLoop:p},b.createElement("div",Tp({ref:E,style:w},{className:y,"data-placement":C,onKeyDown:h}),b.cloneElement(l,{arrowProps:S})))})}this.props.popperContainer&&(n=b.createElement(this.props.popperContainer,{},n)),v&&!s&&(n=b.createElement(xie,{portalId:v},n));var m=Sn("react-datepicker-wrapper",o);return b.createElement(Lae,{className:"react-datepicker-manager"},b.createElement(Wae,null,function(g){var E=g.ref;return b.createElement("div",{ref:E,className:m},d)}),n)}}],[{key:"defaultProps",get:function(){return{hidePopper:!0,popperModifiers:{preventOverflow:{enabled:!0,escapeWithReference:!0,boundariesElement:"viewport"}},popperProps:{},popperPlacement:"bottom-start"}}}]),r}(),Oie=Iy(_ie),Tie=function(e){Ir(r,b.Component);var t=$r(r);function r(n){var a;return Mr(this,r),k(A(a=t.call(this,n)),"getPreSelection",function(){return a.props.openToDate?a.props.openToDate:a.props.selectsEnd&&a.props.startDate?a.props.startDate:a.props.selectsStart&&a.props.endDate?a.props.endDate:Ar()}),k(A(a),"calcInitialState",function(){var i=a.getPreSelection(),o=Gj(a.props),s=Kj(a.props),l=o&&Ls(i,o)?o:s&&Qi(i,s)?s:i;return{open:a.props.startOpen||!1,preventFocus:!1,preSelection:a.props.selected?a.props.selected:l,highlightDates:jD(a.props.highlightDates),focused:!1}}),k(A(a),"clearPreventFocusTimeout",function(){a.preventFocusTimeout&&clearTimeout(a.preventFocusTimeout)}),k(A(a),"setFocus",function(){a.input&&a.input.focus&&a.input.focus({preventScroll:!0})}),k(A(a),"setBlur",function(){a.input&&a.input.blur&&a.input.blur(),a.cancelFocusInput()}),k(A(a),"setOpen",function(i){var o=arguments.length>1&&arguments[1]!==void 0&&arguments[1];a.setState({open:i,preSelection:i&&a.state.open?a.state.preSelection:a.calcInitialState().preSelection,lastPreSelectChange:nw},function(){i||a.setState(function(s){return{focused:!!o&&s.focused}},function(){!o&&a.setBlur(),a.setState({inputValue:null})})})}),k(A(a),"inputOk",function(){return XE(a.state.preSelection)}),k(A(a),"isCalendarOpen",function(){return a.props.open===void 0?a.state.open&&!a.props.disabled&&!a.props.readOnly:a.props.open}),k(A(a),"handleFocus",function(i){a.state.preventFocus||(a.props.onFocus(i),a.props.preventOpenOnFocus||a.props.readOnly||a.setOpen(!0)),a.setState({focused:!0})}),k(A(a),"cancelFocusInput",function(){clearTimeout(a.inputFocusTimeout),a.inputFocusTimeout=null}),k(A(a),"deferFocusInput",function(){a.cancelFocusInput(),a.inputFocusTimeout=setTimeout(function(){return a.setFocus()},1)}),k(A(a),"handleDropdownFocus",function(){a.cancelFocusInput()}),k(A(a),"handleBlur",function(i){(!a.state.open||a.props.withPortal||a.props.showTimeInput)&&a.props.onBlur(i),a.setState({focused:!1})}),k(A(a),"handleCalendarClickOutside",function(i){a.props.inline||a.setOpen(!1),a.props.onClickOutside(i),a.props.withPortal&&i.preventDefault()}),k(A(a),"handleChange",function(){for(var i=arguments.length,o=new Array(i),s=0;sn.setValue(a)}),r.touched&&r.error?_.jsx(Xt,{basic:!0,color:"red",children:r.error}):null]})}const FD=wt(function(){const{activityStore:t}=Ft(),{createActivity:r,updateActivity:n,loadActivity:a,loadingInitial:i}=t,{id:o}=eE(),s=Z1(),[l,u]=x.useState(new lC),c=ih({title:Pn().required("The activity title is required"),description:Pn().required("The activity description is required"),category:Pn().required(),date:Pn().required("date is required"),venue:Pn().required(),city:Pn().required()});x.useEffect(()=>{o&&a(o).then(d=>u(new lC(d)))},[o,a]);function f(d){d.id?n(d).then(()=>s(`/activities/${d.id}`)):(d.id=are(),r(d).then(()=>s(`/activities/${d.id}`)))}return i?_.jsx(Sy,{content:"Loading Activity ..."}):_.jsxs(je,{clearing:!0,children:[_.jsx(qe,{content:"Activity Details",sub:!0,color:"teal"}),_.jsx(ah,{validationSchema:c,enableReinitialize:!0,initialValues:l,onSubmit:d=>f(d),children:({handleSubmit:d,isValid:p,isSubmitting:h,dirty:v})=>_.jsxs(my,{className:"ui form",onSubmit:d,autoComplete:"off",children:[_.jsx(Xa,{name:"title",placeholder:"Title"}),_.jsx(G$,{rows:3,placeholder:"Description",name:"description"}),_.jsx(ire,{option:ore,placeholder:"Category",name:"category"}),_.jsx(kie,{placeholderText:"Date",name:"date",showTimeSelect:!0,timeCaption:"time",dateFormat:"MMMM d, yyyy h:mm aa"}),_.jsx(qe,{content:"Location Details",sub:!0,color:"teal"}),_.jsx(Xa,{placeholder:"City",name:"city"}),_.jsx(Xa,{placeholder:"Venue",name:"venue"}),_.jsx($e,{disabled:h||!v||!p,loading:h,floated:"right",positive:!0,type:"submit",content:"Submit"}),_.jsx($e,{as:an,to:"/activities",floated:"right",type:"button",content:"Cancel"})]})})]})}),Aie={filter:"brightness(30%)"},Nie={position:"absolute",bottom:"5%",left:"5%",width:"100%",height:"auto",color:"white"},Rie=wt(function({activity:t}){var i,o;const{activityStore:{updateAttendance:r,loading:n,cancelActivityToggle:a}}=Ft();return _.jsxs(je.Group,{children:[_.jsxs(je,{basic:!0,attached:"top",style:{padding:"0"},children:[t.isCancelled&&_.jsx(Xt,{style:{position:"absolute",zIndex:1e3,left:-14,top:20},ribbon:!0,color:"red",content:"Cancelled"}),_.jsx(qt,{src:`/assets/categoryImages/${t.category}.jpg`,fluid:!0,style:Aie}),_.jsx(je,{style:Nie,basic:!0,children:_.jsx(nt.Group,{children:_.jsx(nt,{children:_.jsxs(nt.Content,{children:[_.jsx(qe,{size:"huge",content:t.title,style:{color:"white"}}),_.jsx("p",{children:ci(t.date,"dd MMM yyyy")}),_.jsxs("p",{children:["Hosted by ",_.jsx("strong",{children:_.jsx(an,{to:`/profiles/${(i=t.host)==null?void 0:i.username}`,children:(o=t.host)==null?void 0:o.displayName})})]})]})})})})]}),_.jsx(je,{clearing:!0,attached:"bottom",children:t.isHost?_.jsxs(_.Fragment,{children:[_.jsx($e,{color:t.isCancelled?"green":"red",floated:"left",basic:!0,content:t.isCancelled?"Re-activate Activity":"Cancel Activity",onClick:a,loading:n}),_.jsx($e,{as:an,to:`/manage/${t.id}`,color:"orange",floated:"right",disabled:t.isCancelled,children:"Manage Event"})]}):t.isGoing?_.jsx($e,{loading:n,onClick:r,children:"Cancel attendance"}):_.jsx($e,{loading:n,color:"teal",onClick:r,disabled:t.isCancelled,children:"Join Activity"})})]})}),Mie=wt(function({activity:t}){return _.jsxs(je.Group,{children:[_.jsx(je,{attached:"top",children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{size:"large",color:"teal",name:"info"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("p",{children:t.description})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"calendar",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:15,children:_.jsx("span",{children:ci(t.date,"dd MMM yyyy h:mm aa")})})]})}),_.jsx(je,{attached:!0,children:_.jsxs(Oe,{verticalAlign:"middle",children:[_.jsx(Oe.Column,{width:1,children:_.jsx(jt,{name:"marker",size:"large",color:"teal"})}),_.jsx(Oe.Column,{width:11,children:_.jsxs("span",{children:[t.venue,", ",t.city]})})]})})]})}),Iie=wt(function({activityId:t}){const{commentStore:r}=Ft();return x.useEffect(()=>(t&&r.createHubConnection(t),()=>{r.clearComments()}),[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(je,{textAlign:"center",attached:"top",inverted:!0,color:"teal",style:{border:"none"},children:_.jsx(qe,{children:"Chat about this event"})}),_.jsxs(je,{attached:!0,clearing:!0,children:[_.jsx(ah,{onSubmit:(n,{resetForm:a})=>r.addComment(n).then(()=>a()),initialValues:{body:""},validationSchema:ih({body:Pn().required()}),children:({isSubmitting:n,isValid:a,handleSubmit:i})=>_.jsx(my,{className:"ui form",children:_.jsx(Cq,{name:"body",children:o=>_.jsxs("div",{style:{position:"relative"},children:[_.jsx(il,{active:n}),_.jsx("textarea",{placeholder:"Enter your comment (Enter to submit, SHIFT + Enter for new line)",rows:2,...o.field,onKeyDown:s=>{s.key==="Enter"&&s.shiftKey||s.key==="Enter"&&!s.shiftKey&&(s.preventDefault(),a&&i())}})]})})})}),_.jsx(mr.Group,{children:r.comments.map(n=>_.jsxs(mr,{children:[_.jsx(mr.Avatar,{src:n.image||"/assets/user.png"}),_.jsxs(mr.Content,{children:[_.jsx(mr.Author,{as:an,to:`/profiles/${n.username}`,children:n.displayName}),_.jsx(mr.Metadata,{children:_.jsxs("div",{children:[oJ(n.createdAt)," ago"]})}),_.jsx(mr.Text,{style:{whiteSpace:"pre-wrap"},children:n.body})]})]},n.id))})]})]})}),$ie=wt(function({activity:{attendees:t,host:r}}){return t?_.jsxs(_.Fragment,{children:[_.jsxs(je,{textAlign:"center",style:{border:"none"},attached:"top",secondary:!0,inverted:!0,color:"teal",children:[t.length," ",t.length===1?"Person":"People"," going"]}),_.jsx(je,{attached:!0,children:_.jsx(Ib,{relaxed:!0,divided:!0,children:t.map(n=>_.jsxs(nt,{style:{position:"relative"},children:[n.username===(r==null?void 0:r.username)&&_.jsx(Xt,{style:{position:"absolute"},color:"orange",ribbon:"right",children:"Host"}),_.jsx(qt,{size:"tiny",src:n.image||"/assets/user.png"}),_.jsxs(nt.Content,{verticalAlign:"middle",children:[_.jsx(nt.Header,{as:"h3",children:_.jsx(an,{to:`/profiles/${n.username}`,children:n.displayName})}),n.following&&_.jsx(nt.Extra,{style:{color:"orange"},children:"Following"})]})]},n.username))})})]}):null}),jie=wt(function(){const{activityStore:t}=Ft(),{selectedActivity:r,loadActivity:n,loadingInitial:a,clearSelectedActivity:i}=t,{id:o}=eE();return x.useEffect(()=>(o&&n(o),()=>i()),[o,n,i]),a||!r?_.jsx(Sy,{}):_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:10,children:[_.jsx(Rie,{activity:r}),_.jsx(Mie,{activity:r}),_.jsx(Iie,{activityId:r.id})]}),_.jsx(Oe.Column,{width:6,children:_.jsx($ie,{activity:r})})]})});function Lie(){const e="/api/",[t,r]=x.useState(null);function n(){tn.get(e+"buggy/not-found").catch(u=>console.log(u.response))}function a(){tn.get(e+"buggy/bad-request").catch(u=>console.log(u.response))}function i(){tn.get(e+"buggy/server-error").catch(u=>console.log(u.response))}function o(){tn.get(e+"buggy/unauthorised").catch(u=>console.log(u.response))}function s(){tn.get(e+"activities/notaguid").catch(u=>console.log(u.response))}function l(){tn.post(e+"activities",{}).catch(u=>r(u))}return _.jsxs(_.Fragment,{children:[_.jsx(qe,{as:"h1",content:"Test Error component"}),_.jsx(je,{children:_.jsxs($e.Group,{widths:"7",children:[_.jsx($e,{onClick:n,content:"Not Found",basic:!0,primary:!0}),_.jsx($e,{onClick:a,content:"Bad Request",basic:!0,primary:!0}),_.jsx($e,{onClick:l,content:"Validation Error",basic:!0,primary:!0}),_.jsx($e,{onClick:i,content:"Server Error",basic:!0,primary:!0}),_.jsx($e,{onClick:o,content:"Unauthorised",basic:!0,primary:!0}),_.jsx($e,{onClick:s,content:"Bad Guid",basic:!0,primary:!0})]})}),t&&_.jsx(LI,{errors:t})]})}function Fie(){return _.jsxs(je,{placeholder:!0,children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"search"}),"Oops -we've looked everywhere but could not find what you are looking for!"]}),_.jsx(je.Inline,{children:_.jsx($e,{as:an,to:"/activities",children:"Return to activities page"})})]})}const Uie=wt(function(){var r,n;const{commonStore:t}=Ft();return _.jsxs(Ko,{children:[_.jsx(qe,{as:"h1",content:"Server Error"}),_.jsx(qe,{sub:!0,as:"h5",color:"red",content:(r=t.error)==null?void 0:r.message}),((n=t.error)==null?void 0:n.details)&&_.jsxs(je,{children:[_.jsx(qe,{as:"h4",content:"Stack trace",color:"teal"}),_.jsx("code",{style:{marginTop:"10px"},children:t.error.details})]})]})}),Bie=wt(function({profile:t}){return _.jsx(je,{children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:12,children:_.jsx(nt.Group,{children:_.jsxs(nt,{children:[_.jsx(nt.Image,{avatar:!0,size:"small",src:t.image||"/assets/user.png"}),_.jsx(nt.Content,{verticalAlign:"middle",children:_.jsx(qe,{as:"h1",content:t.displayName})})]})})}),_.jsxs(Oe.Column,{width:4,children:[_.jsxs(In.Group,{widths:2,children:[_.jsx(In,{label:"Followers",value:t.followersCount}),_.jsx(In,{label:"Following",value:t.followingCount})]}),_.jsx(cc,{}),_.jsx(o$,{profile:t})]})]})})});function Jc(e,t,r,n){function a(i){return i instanceof r?i:new r(function(o){o(i)})}return new(r||(r=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(f){o(f)}}function l(c){try{u(n.throw(c))}catch(f){o(f)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(e,t||[])).next())})}function Zc(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(r=0)),r;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,a=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(i=r.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(r=n.return)&&r.call(n)}finally{if(o)throw o.error}}return i}function BD(e,t,r){if(r||arguments.length===2)for(var n=0,a=t.length,i;n0?n:e.name,writable:!1,configurable:!1,enumerable:!0})}return r}function Wie(e){var t=e.name,r=t&&t.lastIndexOf(".")!==-1;if(r&&!e.type){var n=t.split(".").pop().toLowerCase(),a=zie.get(n);a&&Object.defineProperty(e,"type",{value:a,writable:!1,configurable:!1,enumerable:!0})}return e}var Hie=[".DS_Store","Thumbs.db"];function Vie(e){return Jc(this,void 0,void 0,function(){return Zc(this,function(t){return Wm(e)&&Yie(e.dataTransfer)?[2,Qie(e.dataTransfer,e.type)]:Gie(e)?[2,Kie(e)]:Array.isArray(e)&&e.every(function(r){return"getFile"in r&&typeof r.getFile=="function"})?[2,qie(e)]:[2,[]]})})}function Yie(e){return Wm(e)}function Gie(e){return Wm(e)&&Wm(e.target)}function Wm(e){return typeof e=="object"&&e!==null}function Kie(e){return x_(e.target.files).map(function(t){return gh(t)})}function qie(e){return Jc(this,void 0,void 0,function(){var t;return Zc(this,function(r){switch(r.label){case 0:return[4,Promise.all(e.map(function(n){return n.getFile()}))];case 1:return t=r.sent(),[2,t.map(function(n){return gh(n)})]}})})}function Qie(e,t){return Jc(this,void 0,void 0,function(){var r,n;return Zc(this,function(a){switch(a.label){case 0:return e.items?(r=x_(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,r]:[4,Promise.all(r.map(Xie))]):[3,2];case 1:return n=a.sent(),[2,zD(Qj(n))];case 2:return[2,zD(x_(e.files).map(function(i){return gh(i)}))]}})})}function zD(e){return e.filter(function(t){return Hie.indexOf(t.name)===-1})}function x_(e){if(e===null)return[];for(var t=[],r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);rr)return[!1,GD(r)];if(e.sizer)return[!1,GD(r)]}return[!0,null]}function xs(e){return e!=null}function poe(e){var t=e.files,r=e.accept,n=e.minSize,a=e.maxSize,i=e.multiple,o=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&o>=1&&t.length>o?!1:t.every(function(l){var u=e2(l,r),c=Dp(u,1),f=c[0],d=t2(l,n,a),p=Dp(d,1),h=p[0],v=s?s(l):null;return f&&h&&!v})}function Hm(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function tv(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function qD(e){e.preventDefault()}function hoe(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function voe(e){return e.indexOf("Edge/")!==-1}function moe(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return hoe(e)||voe(e)}function Ua(){for(var e=arguments.length,t=new Array(e),r=0;r1?a-1:0),o=1;oe.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Roe(e,t){if(e==null)return{};var r={},n=Object.keys(e),a,i;for(i=0;i=0)&&(r[a]=e[a]);return r}var kS=x.forwardRef(function(e,t){var r=e.children,n=Vm(e,Eoe),a=o2(n),i=a.open,o=Vm(a,Soe);return x.useImperativeHandle(t,function(){return{open:i}},[i]),b.createElement(x.Fragment,null,r(zt(zt({},o),{},{open:i})))});kS.displayName="Dropzone";var i2={disabled:!1,getFilesFromEvent:Vie,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};kS.defaultProps=i2;kS.propTypes={children:$.func,accept:$.objectOf($.arrayOf($.string)),multiple:$.bool,preventDropOnDocument:$.bool,noClick:$.bool,noKeyboard:$.bool,noDrag:$.bool,noDragEventsBubbling:$.bool,minSize:$.number,maxSize:$.number,maxFiles:$.number,disabled:$.bool,getFilesFromEvent:$.func,onFileDialogCancel:$.func,onFileDialogOpen:$.func,useFsAccessApi:$.bool,autoFocus:$.bool,onDragEnter:$.func,onDragLeave:$.func,onDragOver:$.func,onDrop:$.func,onDropAccepted:$.func,onDropRejected:$.func,onError:$.func,validator:$.func};var D_={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function o2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=zt(zt({},i2),e),r=t.accept,n=t.disabled,a=t.getFilesFromEvent,i=t.maxSize,o=t.minSize,s=t.multiple,l=t.maxFiles,u=t.onDragEnter,c=t.onDragLeave,f=t.onDragOver,d=t.onDrop,p=t.onDropAccepted,h=t.onDropRejected,v=t.onFileDialogCancel,y=t.onFileDialogOpen,m=t.useFsAccessApi,g=t.autoFocus,E=t.preventDropOnDocument,w=t.noClick,C=t.noKeyboard,S=t.noDrag,O=t.noDragEventsBubbling,D=t.onError,N=t.validator,R=x.useMemo(function(){return woe(r)},[r]),j=x.useMemo(function(){return yoe(r)},[r]),U=x.useMemo(function(){return typeof y=="function"?y:XD},[y]),Q=x.useMemo(function(){return typeof v=="function"?v:XD},[v]),X=x.useRef(null),J=x.useRef(null),te=x.useReducer(Moe,D_),ge=aw(te,2),H=ge[0],ee=ge[1],ce=H.isFocused,_e=H.isFileDialogActive,we=x.useRef(typeof window<"u"&&window.isSecureContext&&m&&goe()),rt=function(){!we.current&&_e&&setTimeout(function(){if(J.current){var Y=J.current.files;Y.length||(ee({type:"closeDialog"}),Q())}},300)};x.useEffect(function(){return window.addEventListener("focus",rt,!1),function(){window.removeEventListener("focus",rt,!1)}},[J,_e,Q,we]);var ye=x.useRef([]),Le=function(Y){X.current&&X.current.contains(Y.target)||(Y.preventDefault(),ye.current=[])};x.useEffect(function(){return E&&(document.addEventListener("dragover",qD,!1),document.addEventListener("drop",Le,!1)),function(){E&&(document.removeEventListener("dragover",qD),document.removeEventListener("drop",Le))}},[X,E]),x.useEffect(function(){return!n&&g&&X.current&&X.current.focus(),function(){}},[X,g,n]);var He=x.useCallback(function(F){D?D(F):console.error(F)},[D]),lt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[].concat(Ooe(ye.current),[F.target]),tv(F)&&Promise.resolve(a(F)).then(function(Y){if(!(Hm(F)&&!O)){var pe=Y.length,be=pe>0&&poe({files:Y,accept:R,minSize:o,maxSize:i,multiple:s,maxFiles:l,validator:N}),Ne=pe>0&&!be;ee({isDragAccept:be,isDragReject:Ne,isDragActive:!0,type:"setDraggedFiles"}),u&&u(F)}}).catch(function(Y){return He(Y)})},[a,u,He,O,R,o,i,s,l,N]),Ce=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=tv(F);if(Y&&F.dataTransfer)try{F.dataTransfer.dropEffect="copy"}catch{}return Y&&f&&f(F),!1},[f,O]),xe=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F);var Y=ye.current.filter(function(be){return X.current&&X.current.contains(be)}),pe=Y.indexOf(F.target);pe!==-1&&Y.splice(pe,1),ye.current=Y,!(Y.length>0)&&(ee({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),tv(F)&&c&&c(F))},[X,c,O]),mt=x.useCallback(function(F,Y){var pe=[],be=[];F.forEach(function(Ne){var ur=e2(Ne,R),Zr=aw(ur,2),un=Zr[0],da=Zr[1],io=t2(Ne,o,i),M=aw(io,2),L=M[0],G=M[1],de=N?N(Ne):null;if(un&&L&&!de)pe.push(Ne);else{var Ee=[da,G];de&&(Ee=Ee.concat(de)),be.push({file:Ne,errors:Ee.filter(function(Se){return Se})})}}),(!s&&pe.length>1||s&&l>=1&&pe.length>l)&&(pe.forEach(function(Ne){be.push({file:Ne,errors:[doe]})}),pe.splice(0)),ee({acceptedFiles:pe,fileRejections:be,type:"setFiles"}),d&&d(pe,be,Y),be.length>0&&h&&h(be,Y),pe.length>0&&p&&p(pe,Y)},[ee,s,R,o,i,l,d,p,h,N]),Nt=x.useCallback(function(F){F.preventDefault(),F.persist(),Ot(F),ye.current=[],tv(F)&&Promise.resolve(a(F)).then(function(Y){Hm(F)&&!O||mt(Y,F)}).catch(function(Y){return He(Y)}),ee({type:"reset"})},[a,mt,He,O]),sr=x.useCallback(function(){if(we.current){ee({type:"openDialog"}),U();var F={multiple:s,types:j};window.showOpenFilePicker(F).then(function(Y){return a(Y)}).then(function(Y){mt(Y,null),ee({type:"closeDialog"})}).catch(function(Y){boe(Y)?(Q(Y),ee({type:"closeDialog"})):_oe(Y)?(we.current=!1,J.current?(J.current.value=null,J.current.click()):He(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."))):He(Y)});return}J.current&&(ee({type:"openDialog"}),U(),J.current.value=null,J.current.click())},[ee,U,Q,m,mt,He,j,s]),jr=x.useCallback(function(F){!X.current||!X.current.isEqualNode(F.target)||(F.key===" "||F.key==="Enter"||F.keyCode===32||F.keyCode===13)&&(F.preventDefault(),sr())},[X,sr]),Je=x.useCallback(function(){ee({type:"focus"})},[]),er=x.useCallback(function(){ee({type:"blur"})},[]),Ut=x.useCallback(function(){w||(moe()?setTimeout(sr,0):sr())},[w,sr]),lr=function(Y){return n?null:Y},Jr=function(Y){return C?null:lr(Y)},Lr=function(Y){return S?null:lr(Y)},Ot=function(Y){O&&Y.stopPropagation()},ln=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.role,Ne=F.onKeyDown,ur=F.onFocus,Zr=F.onBlur,un=F.onClick,da=F.onDragEnter,io=F.onDragOver,M=F.onDragLeave,L=F.onDrop,G=Vm(F,xoe);return zt(zt(T_({onKeyDown:Jr(Ua(Ne,jr)),onFocus:Jr(Ua(ur,Je)),onBlur:Jr(Ua(Zr,er)),onClick:lr(Ua(un,Ut)),onDragEnter:Lr(Ua(da,lt)),onDragOver:Lr(Ua(io,Ce)),onDragLeave:Lr(Ua(M,xe)),onDrop:Lr(Ua(L,Nt)),role:typeof be=="string"&&be!==""?be:"presentation"},pe,X),!n&&!C?{tabIndex:0}:{}),G)}},[X,jr,Je,er,Ut,lt,Ce,xe,Nt,C,S,n]),I=x.useCallback(function(F){F.stopPropagation()},[]),ue=x.useMemo(function(){return function(){var F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},Y=F.refKey,pe=Y===void 0?"ref":Y,be=F.onChange,Ne=F.onClick,ur=Vm(F,Coe),Zr=T_({accept:R,multiple:s,type:"file",style:{display:"none"},onChange:lr(Ua(be,Nt)),onClick:lr(Ua(Ne,I)),tabIndex:-1},pe,J);return zt(zt({},Zr),ur)}},[J,r,s,Nt,n]);return zt(zt({},H),{},{isFocused:ce&&!n,getRootProps:ln,getInputProps:ue,rootRef:X,inputRef:J,open:lr(sr)})}function Moe(e,t){switch(t.type){case"focus":return zt(zt({},e),{},{isFocused:!0});case"blur":return zt(zt({},e),{},{isFocused:!1});case"openDialog":return zt(zt({},D_),{},{isFileDialogActive:!0});case"closeDialog":return zt(zt({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return zt(zt({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return zt(zt({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return zt({},D_);default:return e}}function XD(){}function Ioe({setFiles:e}){const t={border:"dashed 3px #eee",borderColor:"#eee",borderRadius:"5px",paddingTop:"30px",textAlign:"center",height:"200px"},r={borderColor:"green"},n=x.useCallback(s=>{e(s.map(l=>Object.assign(l,{preview:URL.createObjectURL(l)})))},[e]),{getRootProps:a,getInputProps:i,isDragActive:o}=o2({onDrop:n});return _.jsxs("div",{...a(),style:o?{...t,...r}:t,children:[_.jsx("input",{...i()}),_.jsx(jt,{name:"upload",size:"huge"}),_.jsx(qe,{content:"Drop image here"})]})}/*! + * Cropper.js v1.6.1 + * https://fengyuanchen.github.io/cropperjs + * + * Copyright 2015-present Chen Fengyuan + * Released under the MIT license + * + * Date: 2023-09-17T03:44:19.860Z + */function JD(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function s2(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r
',Zoe=Number.isNaN||fi.isNaN;function Ue(e){return typeof e=="number"&&!Zoe(e)}var fP=function(t){return t>0&&t<1/0};function iw(e){return typeof e>"u"}function pl(e){return P_(e)==="object"&&e!==null}var ese=Object.prototype.hasOwnProperty;function fu(e){if(!pl(e))return!1;try{var t=e.constructor,r=t.prototype;return t&&r&&ese.call(r,"isPrototypeOf")}catch{return!1}}function fn(e){return typeof e=="function"}var tse=Array.prototype.slice;function g2(e){return Array.from?Array.from(e):tse.call(e)}function dr(e,t){return e&&fn(t)&&(Array.isArray(e)||Ue(e.length)?g2(e).forEach(function(r,n){t.call(e,r,n,e)}):pl(e)&&Object.keys(e).forEach(function(r){t.call(e,e[r],r,e)})),e}var It=Object.assign||function(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a0&&n.forEach(function(i){pl(i)&&Object.keys(i).forEach(function(o){t[o]=i[o]})}),t},rse=/\.\d*(?:0|9){12}\d*$/;function Tu(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return rse.test(e)?Math.round(e*t)/t:e}var nse=/^width|height|left|top|marginLeft|marginTop$/;function xo(e,t){var r=e.style;dr(t,function(n,a){nse.test(a)&&Ue(n)&&(n="".concat(n,"px")),r[a]=n})}function ase(e,t){return e.classList?e.classList.contains(t):e.className.indexOf(t)>-1}function Cr(e,t){if(t){if(Ue(e.length)){dr(e,function(n){Cr(n,t)});return}if(e.classList){e.classList.add(t);return}var r=e.className.trim();r?r.indexOf(t)<0&&(e.className="".concat(r," ").concat(t)):e.className=t}}function si(e,t){if(t){if(Ue(e.length)){dr(e,function(r){si(r,t)});return}if(e.classList){e.classList.remove(t);return}e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,""))}}function du(e,t,r){if(t){if(Ue(e.length)){dr(e,function(n){du(n,t,r)});return}r?Cr(e,t):si(e,t)}}var ise=/([a-z\d])([A-Z])/g;function IS(e){return e.replace(ise,"$1-$2").toLowerCase()}function L_(e,t){return pl(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(IS(t)))}function kp(e,t,r){pl(r)?e[t]=r:e.dataset?e.dataset[t]=r:e.setAttribute("data-".concat(IS(t)),r)}function ose(e,t){if(pl(e[t]))try{delete e[t]}catch{e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch{e.dataset[t]=void 0}else e.removeAttribute("data-".concat(IS(t)))}var y2=/\s\s*/,w2=function(){var e=!1;if(Fy){var t=!1,r=function(){},n=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(i){t=i}});fi.addEventListener("test",r,n),fi.removeEventListener("test",r,n)}return e}();function ha(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(!w2){var o=e.listeners;o&&o[i]&&o[i][r]&&(a=o[i][r],delete o[i][r],Object.keys(o[i]).length===0&&delete o[i],Object.keys(o).length===0&&delete e.listeners)}e.removeEventListener(i,a,n)})}function Vn(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=r;t.trim().split(y2).forEach(function(i){if(n.once&&!w2){var o=e.listeners,s=o===void 0?{}:o;a=function(){delete s[i][r],e.removeEventListener(i,a,n);for(var u=arguments.length,c=new Array(u),f=0;fMath.abs(r)&&(r=d)})}),r}function nv(e,t){var r=e.pageX,n=e.pageY,a={endX:r,endY:n};return t?a:s2({startX:r,startY:n},a)}function use(e){var t=0,r=0,n=0;return dr(e,function(a){var i=a.startX,o=a.startY;t+=i,r+=o,n+=1}),t/=n,r/=n,{pageX:t,pageY:r}}function Co(e){var t=e.aspectRatio,r=e.height,n=e.width,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",i=fP(n),o=fP(r);if(i&&o){var s=r*t;a==="contain"&&s>n||a==="cover"&&s90?{width:l,height:s}:{width:s,height:l}}function fse(e,t,r,n){var a=t.aspectRatio,i=t.naturalWidth,o=t.naturalHeight,s=t.rotate,l=s===void 0?0:s,u=t.scaleX,c=u===void 0?1:u,f=t.scaleY,d=f===void 0?1:f,p=r.aspectRatio,h=r.naturalWidth,v=r.naturalHeight,y=n.fillColor,m=y===void 0?"transparent":y,g=n.imageSmoothingEnabled,E=g===void 0?!0:g,w=n.imageSmoothingQuality,C=w===void 0?"low":w,S=n.maxWidth,O=S===void 0?1/0:S,D=n.maxHeight,N=D===void 0?1/0:D,R=n.minWidth,j=R===void 0?0:R,U=n.minHeight,Q=U===void 0?0:U,X=document.createElement("canvas"),J=X.getContext("2d"),te=Co({aspectRatio:p,width:O,height:N}),ge=Co({aspectRatio:p,width:j,height:Q},"cover"),H=Math.min(te.width,Math.max(ge.width,h)),ee=Math.min(te.height,Math.max(ge.height,v)),ce=Co({aspectRatio:a,width:O,height:N}),_e=Co({aspectRatio:a,width:j,height:Q},"cover"),we=Math.min(ce.width,Math.max(_e.width,i)),rt=Math.min(ce.height,Math.max(_e.height,o)),ye=[-we/2,-rt/2,we,rt];return X.width=Tu(H),X.height=Tu(ee),J.fillStyle=m,J.fillRect(0,0,H,ee),J.save(),J.translate(H/2,ee/2),J.rotate(l*Math.PI/180),J.scale(c,d),J.imageSmoothingEnabled=E,J.imageSmoothingQuality=C,J.drawImage.apply(J,[e].concat(l2(ye.map(function(Le){return Math.floor(Tu(Le))})))),J.restore(),X}var _2=String.fromCharCode;function dse(e,t,r){var n="";r+=t;for(var a=t;a0;)r.push(_2.apply(null,g2(a.subarray(0,n)))),a=a.subarray(n);return"data:".concat(t,";base64,").concat(btoa(r.join("")))}function mse(e){var t=new DataView(e),r;try{var n,a,i;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var o=t.byteLength,s=2;s+1=8&&(i=u+f)}}}if(i){var d=t.getUint16(i,n),p,h;for(h=0;h=0?i:v2),height:Math.max(n.offsetHeight,o>=0?o:m2)};this.containerData=s,xo(a,{width:s.width,height:s.height}),Cr(t,dn),si(a,dn)},initCanvas:function(){var t=this.containerData,r=this.imageData,n=this.options.viewMode,a=Math.abs(r.rotate)%180===90,i=a?r.naturalHeight:r.naturalWidth,o=a?r.naturalWidth:r.naturalHeight,s=i/o,l=t.width,u=t.height;t.height*s>t.width?n===3?l=t.height*s:u=t.width/s:n===3?u=t.width/s:l=t.height*s;var c={aspectRatio:s,naturalWidth:i,naturalHeight:o,width:l,height:u};this.canvasData=c,this.limited=n===1||n===2,this.limitCanvas(!0,!0),c.width=Math.min(Math.max(c.width,c.minWidth),c.maxWidth),c.height=Math.min(Math.max(c.height,c.minHeight),c.maxHeight),c.left=(t.width-c.width)/2,c.top=(t.height-c.height)/2,c.oldLeft=c.left,c.oldTop=c.top,this.initialCanvasData=It({},c)},limitCanvas:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=n.viewMode,l=i.aspectRatio,u=this.cropped&&o;if(t){var c=Number(n.minCanvasWidth)||0,f=Number(n.minCanvasHeight)||0;s>1?(c=Math.max(c,a.width),f=Math.max(f,a.height),s===3&&(f*l>c?c=f*l:f=c/l)):s>0&&(c?c=Math.max(c,u?o.width:0):f?f=Math.max(f,u?o.height:0):u&&(c=o.width,f=o.height,f*l>c?c=f*l:f=c/l));var d=Co({aspectRatio:l,width:c,height:f});c=d.width,f=d.height,i.minWidth=c,i.minHeight=f,i.maxWidth=1/0,i.maxHeight=1/0}if(r)if(s>(u?0:1)){var p=a.width-i.width,h=a.height-i.height;i.minLeft=Math.min(0,p),i.minTop=Math.min(0,h),i.maxLeft=Math.max(0,p),i.maxTop=Math.max(0,h),u&&this.limited&&(i.minLeft=Math.min(o.left,o.left+(o.width-i.width)),i.minTop=Math.min(o.top,o.top+(o.height-i.height)),i.maxLeft=o.left,i.maxTop=o.top,s===2&&(i.width>=a.width&&(i.minLeft=Math.min(0,p),i.maxLeft=Math.max(0,p)),i.height>=a.height&&(i.minTop=Math.min(0,h),i.maxTop=Math.max(0,h))))}else i.minLeft=-i.width,i.minTop=-i.height,i.maxLeft=a.width,i.maxTop=a.height},renderCanvas:function(t,r){var n=this.canvasData,a=this.imageData;if(r){var i=cse({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=i.width,s=i.height,l=n.width*(o/n.naturalWidth),u=n.height*(s/n.naturalHeight);n.left-=(l-n.width)/2,n.top-=(u-n.height)/2,n.width=l,n.height=u,n.aspectRatio=o/s,n.naturalWidth=o,n.naturalHeight=s,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightr.width?i.height=i.width/n:i.width=i.height*n),this.cropBoxData=i,this.limitCropBox(!0,!0),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),i.width=Math.max(i.minWidth,i.width*a),i.height=Math.max(i.minHeight,i.height*a),i.left=r.left+(r.width-i.width)/2,i.top=r.top+(r.height-i.height)/2,i.oldLeft=i.left,i.oldTop=i.top,this.initialCropBoxData=It({},i)},limitCropBox:function(t,r){var n=this.options,a=this.containerData,i=this.canvasData,o=this.cropBoxData,s=this.limited,l=n.aspectRatio;if(t){var u=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,f=s?Math.min(a.width,i.width,i.width+i.left,a.width-i.left):a.width,d=s?Math.min(a.height,i.height,i.height+i.top,a.height-i.top):a.height;u=Math.min(u,a.width),c=Math.min(c,a.height),l&&(u&&c?c*l>u?c=u/l:u=c*l:u?c=u/l:c&&(u=c*l),d*l>f?d=f/l:f=d*l),o.minWidth=Math.min(u,f),o.minHeight=Math.min(c,d),o.maxWidth=f,o.maxHeight=d}r&&(s?(o.minLeft=Math.max(0,i.left),o.minTop=Math.max(0,i.top),o.maxLeft=Math.min(a.width,i.left+i.width)-o.width,o.maxTop=Math.min(a.height,i.top+i.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,r=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=r.width&&n.height>=r.height?f2:RS),xo(this.cropBox,It({width:n.width,height:n.height},sd({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Du(this.element,R_,this.getData())}},wse={initPreview:function(){var t=this.element,r=this.crossOrigin,n=this.options.preview,a=r?this.crossOriginUrl:this.url,i=t.alt||"The image to preview",o=document.createElement("img");if(r&&(o.crossOrigin=r),o.src=a,o.alt=i,this.viewBox.appendChild(o),this.viewBoxImage=o,!!n){var s=n;typeof n=="string"?s=t.ownerDocument.querySelectorAll(n):n.querySelector&&(s=[n]),this.previews=s,dr(s,function(l){var u=document.createElement("img");kp(l,rv,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),r&&(u.crossOrigin=r),u.src=a,u.alt=i,u.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',l.innerHTML="",l.appendChild(u)})}},resetPreview:function(){dr(this.previews,function(t){var r=L_(t,rv);xo(t,{width:r.width,height:r.height}),t.innerHTML=r.html,ose(t,rv)})},preview:function(){var t=this.imageData,r=this.canvasData,n=this.cropBoxData,a=n.width,i=n.height,o=t.width,s=t.height,l=n.left-r.left-t.left,u=n.top-r.top-t.top;!this.cropped||this.disabled||(xo(this.viewBoxImage,It({width:o,height:s},sd(It({translateX:-l,translateY:-u},t)))),dr(this.previews,function(c){var f=L_(c,rv),d=f.width,p=f.height,h=d,v=p,y=1;a&&(y=d/a,v=i*y),i&&v>p&&(y=p/i,h=a*y,v=p),xo(c,{width:h,height:v}),xo(c.getElementsByTagName("img")[0],It({width:o*y,height:s*y},sd(It({translateX:-l*y,translateY:-u*y},t))))}))}},bse={bind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&Vn(t,$_,r.cropstart),fn(r.cropmove)&&Vn(t,I_,r.cropmove),fn(r.cropend)&&Vn(t,M_,r.cropend),fn(r.crop)&&Vn(t,R_,r.crop),fn(r.zoom)&&Vn(t,j_,r.zoom),Vn(n,nP,this.onCropStart=this.cropStart.bind(this)),r.zoomable&&r.zoomOnWheel&&Vn(n,lP,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&Vn(n,rP,this.onDblclick=this.dblclick.bind(this)),Vn(t.ownerDocument,aP,this.onCropMove=this.cropMove.bind(this)),Vn(t.ownerDocument,iP,this.onCropEnd=this.cropEnd.bind(this)),r.responsive&&Vn(window,sP,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,r=this.options,n=this.cropper;fn(r.cropstart)&&ha(t,$_,r.cropstart),fn(r.cropmove)&&ha(t,I_,r.cropmove),fn(r.cropend)&&ha(t,M_,r.cropend),fn(r.crop)&&ha(t,R_,r.crop),fn(r.zoom)&&ha(t,j_,r.zoom),ha(n,nP,this.onCropStart),r.zoomable&&r.zoomOnWheel&&ha(n,lP,this.onWheel,{passive:!1,capture:!0}),r.toggleDragModeOnDblclick&&ha(n,rP,this.onDblclick),ha(t.ownerDocument,aP,this.onCropMove),ha(t.ownerDocument,iP,this.onCropEnd),r.responsive&&ha(window,sP,this.onResize)}},_se={resize:function(){if(!this.disabled){var t=this.options,r=this.container,n=this.containerData,a=r.offsetWidth/n.width,i=r.offsetHeight/n.height,o=Math.abs(a-1)>Math.abs(i-1)?a:i;if(o!==1){var s,l;t.restore&&(s=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(dr(s,function(u,c){s[c]=u*o})),this.setCropBoxData(dr(l,function(u,c){l[c]=u*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===h2||this.setDragMode(ase(this.dragBox,A_)?p2:MS)},wheel:function(t){var r=this,n=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){r.wheeling=!1},50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*n,t)))},cropStart:function(t){var r=t.buttons,n=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(Ue(r)&&r!==1||Ue(n)&&n!==0||t.ctrlKey))){var a=this.options,i=this.pointers,o;t.changedTouches?dr(t.changedTouches,function(s){i[s.identifier]=nv(s)}):i[t.pointerId||0]=nv(t),Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?o=d2:o=L_(t.target,Pp),Koe.test(o)&&Du(this.element,$_,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===c2&&(this.cropping=!0,Cr(this.dragBox,Ym)))}},cropMove:function(t){var r=this.action;if(!(this.disabled||!r)){var n=this.pointers;t.preventDefault(),Du(this.element,I_,{originalEvent:t,action:r})!==!1&&(t.changedTouches?dr(t.changedTouches,function(a){It(n[a.identifier]||{},nv(a,!0))}):It(n[t.pointerId||0]||{},nv(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var r=this.action,n=this.pointers;t.changedTouches?dr(t.changedTouches,function(a){delete n[a.identifier]}):delete n[t.pointerId||0],r&&(t.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,du(this.dragBox,Ym,this.cropped&&this.options.modal)),Du(this.element,M_,{originalEvent:t,action:r}))}}},Ese={change:function(t){var r=this.options,n=this.canvasData,a=this.containerData,i=this.cropBoxData,o=this.pointers,s=this.action,l=r.aspectRatio,u=i.left,c=i.top,f=i.width,d=i.height,p=u+f,h=c+d,v=0,y=0,m=a.width,g=a.height,E=!0,w;!l&&t.shiftKey&&(l=f&&d?f/d:1),this.limited&&(v=i.minLeft,y=i.minTop,m=v+Math.min(a.width,n.width,n.left+n.width),g=y+Math.min(a.height,n.height,n.top+n.height));var C=o[Object.keys(o)[0]],S={x:C.endX-C.startX,y:C.endY-C.startY},O=function(N){switch(N){case gs:p+S.x>m&&(S.x=m-p);break;case ys:u+S.xg&&(S.y=g-h);break}};switch(s){case RS:u+=S.x,c+=S.y;break;case gs:if(S.x>=0&&(p>=m||l&&(c<=y||h>=g))){E=!1;break}O(gs),f+=S.x,f<0&&(s=ys,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case fo:if(S.y<=0&&(c<=y||l&&(u<=v||p>=m))){E=!1;break}O(fo),d-=S.y,c+=S.y,d<0&&(s=Ul,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case ys:if(S.x<=0&&(u<=v||l&&(c<=y||h>=g))){E=!1;break}O(ys),f-=S.x,u+=S.x,f<0&&(s=gs,f=-f,u-=f),l&&(d=f/l,c+=(i.height-d)/2);break;case Ul:if(S.y>=0&&(h>=g||l&&(u<=v||p>=m))){E=!1;break}O(Ul),d+=S.y,d<0&&(s=fo,d=-d,c-=d),l&&(f=d*l,u+=(i.width-f)/2);break;case Sf:if(l){if(S.y<=0&&(c<=y||p>=m)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l}else O(fo),O(gs),S.x>=0?py&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Of,d=-d,f=-f,c-=d,u-=f):f<0?(s=xf,f=-f,u-=f):d<0&&(s=Cf,d=-d,c-=d);break;case xf:if(l){if(S.y<=0&&(c<=y||u<=v)){E=!1;break}O(fo),d-=S.y,c+=S.y,f=d*l,u+=i.width-f}else O(fo),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y<=0&&c<=y&&(E=!1):(f-=S.x,u+=S.x),S.y<=0?c>y&&(d-=S.y,c+=S.y):(d-=S.y,c+=S.y);f<0&&d<0?(s=Cf,d=-d,f=-f,c-=d,u-=f):f<0?(s=Sf,f=-f,u-=f):d<0&&(s=Of,d=-d,c-=d);break;case Of:if(l){if(S.x<=0&&(u<=v||h>=g)){E=!1;break}O(ys),f-=S.x,u+=S.x,d=f/l}else O(Ul),O(ys),S.x<=0?u>v?(f-=S.x,u+=S.x):S.y>=0&&h>=g&&(E=!1):(f-=S.x,u+=S.x),S.y>=0?h=0&&(p>=m||h>=g)){E=!1;break}O(gs),f+=S.x,d=f/l}else O(Ul),O(gs),S.x>=0?p=0&&h>=g&&(E=!1):f+=S.x,S.y>=0?h0?s=S.y>0?Cf:Sf:S.x<0&&(u-=f,s=S.y>0?Of:xf),S.y<0&&(c-=d),this.cropped||(si(this.cropBox,dn),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}E&&(i.width=f,i.height=d,i.left=u,i.top=c,this.action=s,this.renderCropBox()),dr(o,function(D){D.startX=D.endX,D.startY=D.endY})}},Sse={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Cr(this.dragBox,Ym),si(this.cropBox,dn),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=It({},this.initialImageData),this.canvasData=It({},this.initialCanvasData),this.cropBoxData=It({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(It(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),si(this.dragBox,Ym),Cr(this.cropBox,dn)),this},replace:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),r?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,dr(this.previews,function(n){n.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,si(this.cropper,eP)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Cr(this.cropper,eP)),this},destroy:function(){var t=this.element;return t[Rt]?(t[Rt]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=n.left,i=n.top;return this.moveTo(iw(t)?t:a+Number(t),iw(r)?r:i+Number(r))},moveTo:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.canvasData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.movable&&(Ue(t)&&(n.left=t,a=!0),Ue(r)&&(n.top=r,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,r){var n=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(n.width*t/n.naturalWidth,null,r)},zoomTo:function(t,r,n){var a=this.options,i=this.canvasData,o=i.width,s=i.height,l=i.naturalWidth,u=i.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&a.zoomable){var c=l*t,f=u*t;if(Du(this.element,j_,{ratio:t,oldRatio:o/l,originalEvent:n})===!1)return this;if(n){var d=this.pointers,p=b2(this.cropper),h=d&&Object.keys(d).length?use(d):{pageX:n.pageX,pageY:n.pageY};i.left-=(c-o)*((h.pageX-p.left-i.left)/o),i.top-=(f-s)*((h.pageY-p.top-i.top)/s)}else fu(r)&&Ue(r.x)&&Ue(r.y)?(i.left-=(c-o)*((r.x-i.left)/o),i.top-=(f-s)*((r.y-i.top)/s)):(i.left-=(c-o)/2,i.top-=(f-s)/2);i.width=c,i.height=f,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),Ue(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var r=this.imageData.scaleY;return this.scale(t,Ue(r)?r:1)},scaleY:function(t){var r=this.imageData.scaleX;return this.scale(Ue(r)?r:1,t)},scale:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,n=this.imageData,a=!1;return t=Number(t),r=Number(r),this.ready&&!this.disabled&&this.options.scalable&&(Ue(t)&&(n.scaleX=t,a=!0),Ue(r)&&(n.scaleY=r,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,r=this.options,n=this.imageData,a=this.canvasData,i=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:i.left-a.left,y:i.top-a.top,width:i.width,height:i.height};var s=n.width/n.naturalWidth;if(dr(o,function(c,f){o[f]=c/s}),t){var l=Math.round(o.y+o.height),u=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=u-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return r.rotatable&&(o.rotate=n.rotate||0),r.scalable&&(o.scaleX=n.scaleX||1,o.scaleY=n.scaleY||1),o},setData:function(t){var r=this.options,n=this.imageData,a=this.canvasData,i={};if(this.ready&&!this.disabled&&fu(t)){var o=!1;r.rotatable&&Ue(t.rotate)&&t.rotate!==n.rotate&&(n.rotate=t.rotate,o=!0),r.scalable&&(Ue(t.scaleX)&&t.scaleX!==n.scaleX&&(n.scaleX=t.scaleX,o=!0),Ue(t.scaleY)&&t.scaleY!==n.scaleY&&(n.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var s=n.width/n.naturalWidth;Ue(t.x)&&(i.left=t.x*s+a.left),Ue(t.y)&&(i.top=t.y*s+a.top),Ue(t.width)&&(i.width=t.width*s),Ue(t.height)&&(i.height=t.height*s),this.setCropBoxData(i)}return this},getContainerData:function(){return this.ready?It({},this.containerData):{}},getImageData:function(){return this.sized?It({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,r={};return this.ready&&dr(["left","top","width","height","naturalWidth","naturalHeight"],function(n){r[n]=t[n]}),r},setCanvasData:function(t){var r=this.canvasData,n=r.aspectRatio;return this.ready&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)?(r.width=t.width,r.height=t.width/n):Ue(t.height)&&(r.height=t.height,r.width=t.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,r;return this.ready&&this.cropped&&(r={left:t.left,top:t.top,width:t.width,height:t.height}),r||{}},setCropBoxData:function(t){var r=this.cropBoxData,n=this.options.aspectRatio,a,i;return this.ready&&this.cropped&&!this.disabled&&fu(t)&&(Ue(t.left)&&(r.left=t.left),Ue(t.top)&&(r.top=t.top),Ue(t.width)&&t.width!==r.width&&(a=!0,r.width=t.width),Ue(t.height)&&t.height!==r.height&&(i=!0,r.height=t.height),n&&(a?r.height=r.width/n:i&&(r.width=r.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var r=this.canvasData,n=fse(this.image,this.imageData,r,t);if(!this.cropped)return n;var a=this.getData(t.rounded),i=a.x,o=a.y,s=a.width,l=a.height,u=n.width/Math.floor(r.naturalWidth);u!==1&&(i*=u,o*=u,s*=u,l*=u);var c=s/l,f=Co({aspectRatio:c,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Co({aspectRatio:c,width:t.minWidth||0,height:t.minHeight||0},"cover"),p=Co({aspectRatio:c,width:t.width||(u!==1?n.width:s),height:t.height||(u!==1?n.height:l)}),h=p.width,v=p.height;h=Math.min(f.width,Math.max(d.width,h)),v=Math.min(f.height,Math.max(d.height,v));var y=document.createElement("canvas"),m=y.getContext("2d");y.width=Tu(h),y.height=Tu(v),m.fillStyle=t.fillColor||"transparent",m.fillRect(0,0,h,v);var g=t.imageSmoothingEnabled,E=g===void 0?!0:g,w=t.imageSmoothingQuality;m.imageSmoothingEnabled=E,w&&(m.imageSmoothingQuality=w);var C=n.width,S=n.height,O=i,D=o,N,R,j,U,Q,X;O<=-s||O>C?(O=0,N=0,j=0,Q=0):O<=0?(j=-O,O=0,N=Math.min(C,s+O),Q=N):O<=C&&(j=0,N=Math.min(s,C-O),Q=N),N<=0||D<=-l||D>S?(D=0,R=0,U=0,X=0):D<=0?(U=-D,D=0,R=Math.min(S,l+D),X=R):D<=S&&(U=0,R=Math.min(l,S-D),X=R);var J=[O,D,N,R];if(Q>0&&X>0){var te=h/s;J.push(j*te,U*te,Q*te,X*te)}return m.drawImage.apply(m,[n].concat(l2(J.map(function(ge){return Math.floor(Tu(ge))})))),y},setAspectRatio:function(t){var r=this.options;return!this.disabled&&!iw(t)&&(r.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var r=this.options,n=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var i=t===MS,o=r.movable&&t===p2;t=i||o?t:h2,r.dragMode=t,kp(n,Pp,t),du(n,A_,i),du(n,N_,o),r.cropBoxMovable||(kp(a,Pp,t),du(a,A_,i),du(a,N_,o))}return this}},xse=fi.Cropper,E2=function(){function e(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if($oe(this,e),!t||!Xoe.test(t.tagName))throw new Error("The first argument is required and must be an or element.");this.element=t,this.options=It({},cP,fu(r)&&r),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return joe(e,[{key:"init",value:function(){var r=this.element,n=r.tagName.toLowerCase(),a;if(!r[Rt]){if(r[Rt]=this,n==="img"){if(this.isImg=!0,a=r.getAttribute("src")||"",this.originalUrl=a,!a)return;a=r.src}else n==="canvas"&&window.HTMLCanvasElement&&(a=r.toDataURL());this.load(a)}}},{key:"load",value:function(r){var n=this;if(r){this.url=r,this.imageData={};var a=this.element,i=this.options;if(!i.rotatable&&!i.scalable&&(i.checkOrientation=!1),!i.checkOrientation||!window.ArrayBuffer){this.clone();return}if(qoe.test(r)){Qoe.test(r)?this.read(hse(r)):this.clone();return}var o=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=s,o.onerror=s,o.ontimeout=s,o.onprogress=function(){o.getResponseHeader("content-type")!==uP&&o.abort()},o.onload=function(){n.read(o.response)},o.onloadend=function(){n.reloading=!1,n.xhr=null},i.checkCrossOrigin&&dP(r)&&a.crossOrigin&&(r=pP(r)),o.open("GET",r,!0),o.responseType="arraybuffer",o.withCredentials=a.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(r){var n=this.options,a=this.imageData,i=mse(r),o=0,s=1,l=1;if(i>1){this.url=vse(r,uP);var u=gse(i);o=u.rotate,s=u.scaleX,l=u.scaleY}n.rotatable&&(a.rotate=o),n.scalable&&(a.scaleX=s,a.scaleY=l),this.clone()}},{key:"clone",value:function(){var r=this.element,n=this.url,a=r.crossOrigin,i=n;this.options.checkCrossOrigin&&dP(n)&&(a||(a="anonymous"),i=pP(n)),this.crossOrigin=a,this.crossOriginUrl=i;var o=document.createElement("img");a&&(o.crossOrigin=a),o.src=i||n,o.alt=r.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),Cr(o,tP),r.parentNode.insertBefore(o,r.nextSibling)}},{key:"start",value:function(){var r=this,n=this.image;n.onload=null,n.onerror=null,this.sizing=!0;var a=fi.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(fi.navigator.userAgent),i=function(u,c){It(r.imageData,{naturalWidth:u,naturalHeight:c,aspectRatio:u/c}),r.initialImageData=It({},r.imageData),r.sizing=!1,r.sized=!0,r.build()};if(n.naturalWidth&&!a){i(n.naturalWidth,n.naturalHeight);return}var o=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){i(o.width,o.height),a||s.removeChild(o)},o.src=n.src,a||(o.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",s.appendChild(o))}},{key:"stop",value:function(){var r=this.image;r.onload=null,r.onerror=null,r.parentNode.removeChild(r),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var r=this.element,n=this.options,a=this.image,i=r.parentNode,o=document.createElement("div");o.innerHTML=Joe;var s=o.querySelector(".".concat(Rt,"-container")),l=s.querySelector(".".concat(Rt,"-canvas")),u=s.querySelector(".".concat(Rt,"-drag-box")),c=s.querySelector(".".concat(Rt,"-crop-box")),f=c.querySelector(".".concat(Rt,"-face"));this.container=i,this.cropper=s,this.canvas=l,this.dragBox=u,this.cropBox=c,this.viewBox=s.querySelector(".".concat(Rt,"-view-box")),this.face=f,l.appendChild(a),Cr(r,dn),i.insertBefore(s,r.nextSibling),si(a,tP),this.initPreview(),this.bind(),n.initialAspectRatio=Math.max(0,n.initialAspectRatio)||NaN,n.aspectRatio=Math.max(0,n.aspectRatio)||NaN,n.viewMode=Math.max(0,Math.min(3,Math.round(n.viewMode)))||0,Cr(c,dn),n.guides||Cr(c.getElementsByClassName("".concat(Rt,"-dashed")),dn),n.center||Cr(c.getElementsByClassName("".concat(Rt,"-center")),dn),n.background&&Cr(s,"".concat(Rt,"-bg")),n.highlight||Cr(f,Hoe),n.cropBoxMovable&&(Cr(f,N_),kp(f,Pp,RS)),n.cropBoxResizable||(Cr(c.getElementsByClassName("".concat(Rt,"-line")),dn),Cr(c.getElementsByClassName("".concat(Rt,"-point")),dn)),this.render(),this.ready=!0,this.setDragMode(n.dragMode),n.autoCrop&&this.crop(),this.setData(n.data),fn(n.ready)&&Vn(r,oP,n.ready,{once:!0}),Du(r,oP)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var r=this.cropper.parentNode;r&&r.removeChild(this.cropper),si(this.element,dn)}}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=xse,e}},{key:"setDefaults",value:function(r){It(cP,fu(r)&&r)}}]),e}();It(E2.prototype,yse,wse,bse,_se,Ese,Sse);var Cs=function(){return Cs=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&D.zoomTo(ge)}(O.currentTarget.cropper,E),y&&y(O)}}));m&&m(S)}return function(){var O,D;(D=(O=w.current)===null||O===void 0?void 0:O.cropper)===null||D===void 0||D.destroy()}},[w]);var C=function(S){return Cse.reduce(function(O,D){var N=O,R=D;return N[R],sw(N,[typeof R=="symbol"?R:R+""])},S)}(Cs(Cs({},g),{crossOrigin:l,src:i,alt:v}));return b.createElement("div",{style:o,className:s},b.createElement("img",Cs({},C,{style:Ose,ref:w})))});function Dse({imagePreview:e,setCropper:t}){return _.jsx(Tse,{src:e,style:{height:200,width:"100%"},initialAspectRatio:1,aspectRatio:1,preview:".img-preview",guides:!1,viewMode:1,autoCropArea:1,background:!1,onInitialized:r=>t(r)})}function Pse({loading:e,uploadPhoto:t}){const[r,n]=x.useState([]),[a,i]=x.useState();function o(){a&&a.getCroppedCanvas().toBlob(s=>t(s))}return x.useEffect(()=>()=>{r.forEach(s=>URL.revokeObjectURL(s.preview))},[r]),_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 1 - Add Photo"}),_.jsx(Ioe,{setFiles:n})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 2 - Resize Image"}),r&&r.length>0&&_.jsx(Dse,{setCropper:i,imagePreview:r[0].preview})]}),_.jsx(Oe.Column,{width:1}),_.jsxs(Oe.Column,{width:4,children:[_.jsx(qe,{sub:!0,color:"teal",content:"Step 3 - preview & Upload"}),r&&r.length>0&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:"img-preview",style:{minHeight:200,overflow:"hidden"}}),_.jsxs($e.Group,{widths:2,children:[_.jsx($e,{loading:e,onClick:o,positive:!0,icon:"check"}),_.jsx($e,{disabled:e,onClick:()=>n([]),icon:"close"})]})]})]})]})}const kse=wt(function({profile:t}){var v;const{profileStore:{isCurrentUser:r,uploadPhoto:n,uploading:a,loading:i,setMainPhoto:o,deletePhoto:s}}=Ft(),[l,u]=x.useState(!1),[c,f]=x.useState("");function d(y){n(y).then(()=>u(!1))}function p(y,m){f(m.currentTarget.name),o(y)}function h(y,m){f(m.currentTarget.name),s(y)}return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:16,children:[_.jsx(qe,{floated:"left",icon:"image",content:"Photos"}),r&&_.jsx($e,{floated:"right",basic:!0,content:l?"Cancel":"Add Photo",onClick:()=>u(!l)})]}),_.jsx(Oe.Column,{width:16,children:l?_.jsx(Pse,{uploadPhoto:d,loading:a}):_.jsx(nr.Group,{itemsPerRow:5,children:(v=t.photos)==null?void 0:v.map(y=>_.jsxs(nr,{children:[_.jsx(qt,{src:y.url||"/assets/user.png"}),r&&_.jsxs($e.Group,{fluid:!0,widths:2,children:[_.jsx($e,{basic:!0,color:"green",content:"Main",name:"main"+y.id,disabled:y.isMain,loading:c==="main"+y.id&&i,onClick:m=>p(y,m)}),_.jsx($e,{basic:!0,color:"red",icon:"trash",name:y.id,loading:c===y.id&&i,onClick:m=>h(y,m),disabled:y.isMain})]})]},y.id))})})]})})}),Ase=wt(function({setEditMode:t}){const{profileStore:{profile:r,updateProfile:n}}=Ft();return _.jsx(ah,{initialValues:{displayName:r==null?void 0:r.displayName,bio:(r==null?void 0:r.bio)||""},onSubmit:a=>{n(a).then(()=>{t(!1)})},validationSchema:ih({displayName:Pn().required()}),children:({isSubmitting:a,isValid:i,dirty:o})=>_.jsxs(my,{className:"ui form",children:[_.jsx(Xa,{placeholder:"Display Name",name:"displayName"}),_.jsx(G$,{rows:3,placeholder:"Add your bio",name:"bio"}),_.jsx($e,{positive:!0,type:"submit",loading:a,content:"Update profile",floated:"right",disabled:!i||!o})]})})}),Nse=wt(function(){const{profileStore:t}=Ft(),{isCurrentUser:r,profile:n}=t,[a,i]=x.useState(!1);return _.jsx(mc.Pane,{children:_.jsxs(Oe,{children:[_.jsxs(Oe.Column,{width:"16",children:[_.jsx(qe,{floated:"left",icon:"user",content:`About ${n==null?void 0:n.displayName}`}),r&&_.jsx($e,{floated:"right",basic:!0,content:a?"Cancel":"Edit Profile",onClick:()=>i(!a)})]}),_.jsx(Oe.Column,{width:"16",children:a?_.jsx(Ase,{setEditMode:i}):_.jsx("span",{style:{whiteSpace:"pre-wrap"},children:n==null?void 0:n.bio})})]})})}),hP=wt(function(){const{profileStore:t}=Ft(),{profile:r,followings:n,loadingFollowings:a,activeTab:i}=t;return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:"16",children:_.jsx(qe,{floated:"left",icon:"user",content:i===3?`People following ${r.displayName}`:`People ${r==null?void 0:r.displayName} is following`})}),_.jsx(Oe.Column,{width:16,children:_.jsx(nr.Group,{itemsPerRow:4,children:n.map(o=>_.jsx(s$,{profile:o},o.username))})})]})})}),vP=[{menuItem:"Future Events",pane:{key:"future"}},{menuItem:"Past Events",pane:{key:"past"}},{menuItem:"Hosting",pane:{key:"hosting"}}],Rse=wt(function(){const{profileStore:t}=Ft(),{loadUserActivities:r,profile:n,loadingActivities:a,userActivities:i}=t;x.useEffect(()=>{r(n.username)},[r,n]);const o=(s,l)=>{r(n.username,vP[l.activeIndex].pane.key)};return _.jsx(mc.Pane,{loading:a,children:_.jsxs(Oe,{children:[_.jsx(Oe.Column,{width:16,children:_.jsx(qe,{floated:"left",icon:"calendar",content:"Activities"})}),_.jsxs(Oe.Column,{width:16,children:[_.jsx(mc,{panes:vP,menu:{secondary:!0,pointing:!0},onTabChange:(s,l)=>o(s,l)}),_.jsx("br",{}),_.jsx(nr.Group,{itemsPerRow:4,children:i.map(s=>_.jsxs(nr,{as:an,to:`/activities/${s.id}`,children:[_.jsx(qt,{src:`/assets/categoryImages/${s.category}.jpg`,style:{minHeight:100,objectFit:"cover"}}),_.jsxs(nr.Content,{children:[_.jsx(nr.Header,{textAlign:"center",children:s.title}),_.jsxs(nr.Meta,{textAlign:"center",children:[_.jsx("div",{children:ci(new Date(s.date),"do LLL")}),_.jsx("div",{children:ci(new Date(s.date),"h:mm a")})]})]})]},s.id))})]})]})})}),Mse=wt(function({profile:t}){const{profileStore:r}=Ft(),n=[{menuItem:"About",render:()=>_.jsx(Nse,{})},{menuItem:"Photos",render:()=>_.jsx(kse,{profile:t})},{menuItem:"Events",render:()=>_.jsx(Rse,{})},{menuItem:"Followers",render:()=>_.jsx(hP,{})},{menuItem:"Following",render:()=>_.jsx(hP,{})}];return _.jsx(mc,{menu:{fluid:!0,vertical:!0},menuPosition:"right",panes:n,onTabChange:(a,i)=>r.setActiveTab(i.activeIndex)})}),Ise=wt(function(){const{username:t}=eE(),{profileStore:r}=Ft(),{loadProfile:n,loadingProfile:a,profile:i,setActiveTab:o}=r;return x.useEffect(()=>(t&&n(t),()=>{o(0)}),[n,t]),a?_.jsx(Sy,{content:"Loading Profile..."}):_.jsx(Oe,{children:_.jsx(Oe.Column,{width:16,children:i&&_.jsxs(_.Fragment,{children:[_.jsx(Bie,{profile:i}),_.jsx(Mse,{profile:i})]})})})});function $se(){const{userStore:{isLoggedIn:e}}=Ft(),t=hi();return e?_.jsx(ER,{}):_.jsx(_R,{to:"/",state:{from:t}})}function F_(){return new URLSearchParams(hi().search)}function jse(){const e=F_().get("email");function t(){Vt.Account.resendEmailConfirm(e).then(()=>{ct.success("verification email resent - please check your email")}).catch(r=>console.log(r))}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,color:"green",children:[_.jsx(jt,{name:"check"}),"Successfully registered!"]}),_.jsx("p",{children:"Please check your email (including junk email) fot the verification email"}),e&&_.jsxs(_.Fragment,{children:[_.jsx("p",{children:"Didn't receive the email? Click the below button to resend"}),_.jsx($e,{primary:!0,onClick:t,content:"Resend Email",size:"huge"})]})]})}function Lse(){const{modalStore:e}=Ft(),t=F_().get("email"),r=F_().get("token"),n={Verifying:"Verifying",Failed:"Failed",Success:"Success"},[a,i]=x.useState(n.Verifying);function o(){Vt.Account.resendEmailConfirm(t).then(()=>{ct.success("verification email resent - please check your email")}).catch(l=>console.log(l))}x.useEffect(()=>{Vt.Account.verifyEmail(r,t).then(()=>{i(n.Success)}).catch(()=>{i(n.Failed)})},[n.Verifying,n.Failed,n.Success,r,t]);function s(){switch(a){case n.Verifying:return _.jsx("p",{children:"Verifying..."});case n.Failed:return _.jsxs("div",{children:[_.jsx("p",{children:"Verification failed. You can try resending the verify link to your email"}),_.jsx($e,{primary:!0,onClick:o,size:"huge",content:"Resend email"})]});case n.Success:return _.jsxs("div",{children:[_.jsx("p",{children:"Email has been verified - you can now login"}),_.jsx($e,{primary:!0,onClick:()=>e.openModal(_.jsx(PI,{})),size:"huge",content:"Login"})]})}}return _.jsxs(je,{placeholder:!0,textAlign:"center",children:[_.jsxs(qe,{icon:!0,children:[_.jsx(jt,{name:"envelope"}),"Email verification"]}),_.jsx(je.Inline,{children:s()})]})}const Fse=[{path:"/",element:_.jsx($Q,{}),children:[{element:_.jsx($se,{}),children:[{path:"activities",element:_.jsx(Zte,{})},{path:"activities/:id",element:_.jsx(jie,{})},{path:"createActivity",element:_.jsx(FD,{},"create")},{path:"manage/:id",element:_.jsx(FD,{},"manage")},{path:"profiles/:username",element:_.jsx(Ise,{})},{path:"errors",element:_.jsx(Lie,{})}]},{path:"not-found",element:_.jsx(Fie,{})},{path:"server-error",element:_.jsx(Uie,{})},{path:"account/userRegisterSuccess",element:_.jsx(jse,{})},{path:"account/verifyEmail",element:_.jsx(Lse,{})},{path:"*",element:_.jsx(_R,{replace:!0,to:"/not-found"})}]}],Oo=P4(Fse);tn.defaults.baseURL="/api";tn.interceptors.request.use(e=>{const t=yt.commonStore.token;return t&&e.headers&&(e.headers.Authorization=`Bearer ${t}`),e});tn.interceptors.response.use(async e=>{const t=e.headers.pagination;return t&&(e.data=new Jte(e.data,JSON.parse(t))),e},e=>{var i;console.log(e);const{data:t,status:r,config:n,headers:a}=e.response;switch(r){case 400:if(n.method==="get"&&Object.prototype.hasOwnProperty.call(t.errors,"id")&&Oo.navigate("/not-found"),t.errors){const o=[];for(const s in t.errors)t.errors[s]&&o.push(t.errors[s]);throw o.flat()}else ct.error(t);break;case 401:r===401&&((i=a["www-authenticate"])!=null&&i.startsWith('Bearer error="invalid_token"'))?(yt.userStore.logout(),ct.error("Session expired - please login again")):ct.error("unauthorized");break;case 403:ct.error("forbiddent");break;case 404:Oo.navigate("/not-found");break;case 500:yt.commonStore.setServerError(t),Oo.navigate("/server-error");break}return Promise.reject(e)});const jf=e=>e.data,gr={get:e=>tn.get(e).then(jf),post:(e,t)=>tn.post(e,t).then(jf),put:(e,t)=>tn.put(e,t).then(jf),del:e=>tn.delete(e).then(jf)},Use={list:e=>tn.get("/activities",{params:e}).then(jf),details:e=>gr.get(`/activities/${e}`),create:e=>gr.post("/activities",e),update:e=>gr.put(`/activities/${e.id}`,e),delete:e=>gr.del(`/activities/${e}`),attend:e=>gr.post(`/activities/${e}/attend`,{})},Bse={current:()=>gr.get("/account"),login:e=>gr.post("/account/login",e),register:e=>gr.post("/account/register",e),fbLogin:e=>gr.post(`/account/fbLogin?accessToken=${e}`,{}),refreshToken:()=>gr.post("/account/refreshToken",{}),verifyEmail:(e,t)=>gr.post(`/account/verifyEmail?token=${e}&email=${t}`,{}),resendEmailConfirm:e=>gr.get(`/account/resendEmailConfirmationLink?email=${e}`)},zse={get:e=>gr.get(`/profiles/${e}`),uploadPhoto:e=>{let t=new FormData;return t.append("File",e),tn.post("photos",t,{headers:{"Content-Type":"multipart/form-data"}})},setMainPhoto:e=>gr.post(`/photos/${e}/setMain`,{}),deletePhoto:e=>gr.del(`/photos/${e}`),updateProfile:e=>gr.put("/profiles",e),updateFollowing:e=>gr.post(`/follow/${e}`,{}),listFollowings:(e,t)=>gr.get(`/follow/${e}?predicate=${t}`),listActivities:(e,t)=>gr.get(`/profiles/${e}/activities?predicate=${t}`)},Vt={Activities:Use,Account:Bse,Profiles:zse};class mP{constructor(t){Z(this,"username");Z(this,"displayName");Z(this,"image");Z(this,"bio");Z(this,"followersCount",0);Z(this,"followingCount",0);Z(this,"following",!1);Z(this,"photos");this.username=t.username,this.displayName=t.displayName,this.image=t.image}}class Wse{constructor(){Z(this,"activityRegistry",new Map);Z(this,"selectedActivity");Z(this,"editMode",!1);Z(this,"loading",!1);Z(this,"loadingInitial",!1);Z(this,"pagination",null);Z(this,"pagingParams",new l_);Z(this,"predicate",new Map().set("all",!0));Z(this,"setPredicate",(t,r)=>{const n=()=>{this.predicate.forEach((a,i)=>{i!=="startDate"&&this.predicate.delete(i)})};switch(t){case"all":n(),this.predicate.set("all",!0);break;case"isGoing":n(),this.predicate.set("isGoing",!0);break;case"isHost":n(),this.predicate.set("isHost",!0);break;case"startDate":this.predicate.delete("startDate"),this.predicate.set("startDate",r);break}});Z(this,"setPagingParams",t=>{this.pagingParams=t});Z(this,"loadActivities",async()=>{this.setLoadingInitial(!0);try{const t=await Vt.Activities.list(this.axiosParams);t.data.forEach(r=>{this.setActivity(r)}),this.setPagination(t.pagination),this.setLoadingInitial(!1)}catch(t){console.log(t),this.setLoadingInitial(!1)}});Z(this,"setPagination",t=>{this.pagination=t});Z(this,"loadActivity",async t=>{let r=this.getActivity(t);if(r)return this.selectedActivity=r,r;this.setLoadingInitial(!0);try{return r=await Vt.Activities.details(t),this.setActivity(r),Ze(()=>this.selectedActivity=r),this.setLoadingInitial(!1),r}catch(n){console.log(n),this.setLoadingInitial(!1)}});Z(this,"getActivity",t=>this.activityRegistry.get(t));Z(this,"setActivity",t=>{var n;const r=yt.userStore.user;r&&(t.isGoing=t.attendees.some(a=>a.username===r.username),t.isHost=t.hostUsername===r.username,t.host=(n=t.attendees)==null?void 0:n.find(a=>a.username===t.hostUsername)),t.date=new Date(t.date),this.activityRegistry.set(t.id,t)});Z(this,"setLoadingInitial",t=>{this.loadingInitial=t});Z(this,"createActivity",async t=>{const r=yt.userStore.user,n=new mP(r);try{await Vt.Activities.create(t);const a=new H3(t);a.hostUsername=r==null?void 0:r.username,a.attendees=[n],this.setActivity(a),Ze(()=>{this.selectedActivity=a})}catch(a){console.log(a)}});Z(this,"updateActivity",async t=>{try{await Vt.Activities.update(t),Ze(()=>{if(t.id){const r={...this.getActivity(t.id),...t};this.activityRegistry.set(t.id,r),this.selectedActivity=r}})}catch(r){console.log(r)}});Z(this,"deleteActivity",async t=>{this.loading=!0;try{await Vt.Activities.delete(t),Ze(()=>{this.activityRegistry.delete(t),this.loading=!1})}catch(r){console.log(r),Ze(()=>{this.loading=!1})}});Z(this,"updateAttendance",async()=>{const t=yt.userStore.user;this.loading=!0;try{await Vt.Activities.attend(this.selectedActivity.id),Ze(()=>{var r,n,a,i;if((r=this.selectedActivity)!=null&&r.isGoing)this.selectedActivity.attendees=(n=this.selectedActivity.attendees)==null?void 0:n.filter(o=>o.username!==(t==null?void 0:t.username)),this.selectedActivity.isGoing=!1;else{const o=new mP(t);(i=(a=this.selectedActivity)==null?void 0:a.attendees)==null||i.push(o),this.selectedActivity.isGoing=!0}this.activityRegistry.set(this.selectedActivity.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>this.loading=!1)}});Z(this,"cancelActivityToggle",async()=>{var t;this.loading=!0;try{await Vt.Activities.attend((t=this.selectedActivity)==null?void 0:t.id),Ze(()=>{var r,n;this.selectedActivity.isCancelled=!((r=this.selectedActivity)!=null&&r.isCancelled),this.activityRegistry.set((n=this.selectedActivity)==null?void 0:n.id,this.selectedActivity)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"clearSelectedActivity",()=>{this.selectedActivity=void 0});Z(this,"updateAttendeeFollowing",t=>{this.activityRegistry.forEach(r=>{r.attendees.forEach(n=>{n.username==t&&(n.following?n.followersCount--:n.followersCount++,n.following=!n.following)})})});Ic(this),B1(()=>this.predicate.keys(),()=>{this.pagingParams=new l_,this.activityRegistry.clear(),this.loadActivities()})}get axiosParams(){const t=new URLSearchParams;return t.append("pageNumber",this.pagingParams.pageNumber.toString()),t.append("pageSize",this.pagingParams.pageSize.toString()),this.predicate.forEach((r,n)=>{n==="startDate"?t.append(n,r.toISOString()):t.append(n,r)}),t}get activitiesByDate(){return Array.from(this.activityRegistry.values()).sort((t,r)=>t.date.getTime()-r.date.getTime())}get groupedAcivities(){return Object.entries(this.activitiesByDate.reduce((t,r)=>{const n=ci(r.date,"dd MMM yyyy");return t[n]=t[n]?[...t[n],r]:[r],t},{}))}}class Hse{constructor(){Z(this,"error",null);Z(this,"token",localStorage.getItem("jwt"));Z(this,"appLoaded",!1);Z(this,"setToken",t=>{this.token=t});Z(this,"setAppLoaded",()=>{this.appLoaded=!0});Ic(this),B1(()=>this.token,t=>{t?localStorage.setItem("jwt",t):localStorage.removeItem("jwt")})}setServerError(t){this.error=t}}class Vse{constructor(){Z(this,"user",null);Z(this,"fbLoading",!1);Z(this,"refreshTokenTimeout");Z(this,"login",async t=>{const r=await Vt.Account.login(t);yt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>this.user=r),Oo.navigate("/activities"),yt.modalStore.closeModal()});Z(this,"register",async t=>{await Vt.Account.register(t),Oo.navigate(`/account/userRegisterSuccess?email=${t.email}`),yt.modalStore.closeModal()});Z(this,"logout",()=>{yt.commonStore.setToken(null),this.user=null,Oo.navigate("/")});Z(this,"getUser",async()=>{try{const t=await Vt.Account.current();yt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t),Ze(()=>{this.user=t})}catch(t){console.log(t)}});Z(this,"setImage",t=>{this.user&&(this.user.image=t)});Z(this,"setDisplayName",t=>{this.user&&(this.user.displayName=t)});Z(this,"facebookLogin",async t=>{try{this.fbLoading=!0;const r=await Vt.Account.fbLogin(t);yt.commonStore.setToken(r.token),this.startRefreshTokenTimer(r),Ze(()=>{this.user=r,this.fbLoading=!1}),Oo.navigate("/activities")}catch(r){console.log(r),Ze(()=>{this.fbLoading=!1})}});Z(this,"refreshToken",async()=>{this.stopRefreshTokenTimer();try{const t=await Vt.Account.refreshToken();Ze(()=>this.user=t),yt.commonStore.setToken(t.token),this.startRefreshTokenTimer(t)}catch(t){console.log(t)}});Ic(this)}get isLoggedIn(){return!!this.user}startRefreshTokenTimer(t){const r=JSON.parse(atob(t.token.split(".")[1])),a=new Date(r.exp*1e3).getTime()-Date.now()-60*1e3;this.refreshTokenTimeout=setTimeout(this.refreshToken,a),console.log({refreshTimeout:this.refreshTokenTimeout})}stopRefreshTokenTimer(){clearTimeout(this.refreshTokenTimeout)}}class Yse{constructor(){Z(this,"modal",{open:!1,body:null});Z(this,"openModal",t=>{this.modal.open=!0,this.modal.body=t});Z(this,"closeModal",()=>{this.modal.open=!1,this.modal.body=null});Ic(this)}}class Gse{constructor(){Z(this,"profile",null);Z(this,"loadingProfile",!1);Z(this,"uploading",!1);Z(this,"loading",!1);Z(this,"followings",[]);Z(this,"loadingFollowings",!1);Z(this,"activeTab",0);Z(this,"userActivities",[]);Z(this,"loadingActivities",!1);Z(this,"setActiveTab",t=>{this.activeTab=t});Z(this,"loadProfile",async t=>{this.loadingProfile=!0;try{const r=await Vt.Profiles.get(t);Ze(()=>{this.profile=r})}catch(r){console.log(r)}finally{Ze(()=>{this.loadingProfile=!1})}});Z(this,"uploadPhoto",async t=>{this.uploading=!0;try{const n=(await Vt.Profiles.uploadPhoto(t)).data;Ze(()=>{var a;this.profile&&((a=this.profile.photos)==null||a.push(n),n.isMain&&yt.userStore.user&&(yt.userStore.setImage(n.url),this.profile.image=n.url))})}catch(r){console.log(r)}finally{Ze(()=>{this.uploading=!1})}});Z(this,"setMainPhoto",async t=>{this.loading=!0;try{await Vt.Profiles.setMainPhoto(t.id),yt.userStore.setImage(t.url),Ze(()=>{this.profile&&this.profile.photos&&(this.profile.photos.find(r=>r.isMain).isMain=!1,this.profile.photos.find(r=>r.id===t.id).isMain=!0,this.profile.image=t.url)})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"deletePhoto",async t=>{this.loading=!0;try{await Vt.Profiles.deletePhoto(t.id),Ze(()=>{var r;this.profile&&(this.profile.photos=(r=this.profile.photos)==null?void 0:r.filter(n=>n.id!==t.id))})}catch(r){console.log(r)}finally{Ze(()=>{this.loading=!1})}});Z(this,"updateProfile",async t=>{this.loading=!0;try{await Vt.Profiles.updateProfile(t),Ze(()=>{var r;t.displayName&&t.displayName!==((r=yt.userStore.user)==null?void 0:r.displayName)&&yt.userStore.setDisplayName(t.displayName),this.profile={...this.profile,...t},this.loading=!1})}catch(r){console.log(r),Ze(()=>this.loading=!1)}});Z(this,"updateFollowing",async(t,r)=>{this.loading=!0;try{await Vt.Profiles.updateFollowing(t),yt.activityStore.updateAttendeeFollowing(t),Ze(()=>{var n,a;this.profile&&this.profile.username!==((n=yt.userStore.user)==null?void 0:n.username)&&this.profile.username===t&&(r?this.profile.followersCount++:this.profile.followersCount--,this.profile.following=!this.profile.following),this.profile&&this.profile.username===((a=yt.userStore.user)==null?void 0:a.username)&&(r?this.profile.followersCount++:this.profile.followersCount--),this.followings.forEach(i=>{i.username==t&&(i.following?i.followersCount--:i.followersCount++,i.following=!i.following)}),this.loading=!1})}catch(n){console.log(n),Ze(()=>this.loading=!1)}});Z(this,"loadFollowings",async t=>{this.loadingFollowings=!0;try{const r=await Vt.Profiles.listFollowings(this.profile.username,t);Ze(()=>{this.followings=r,this.loadingFollowings=!1})}catch(r){console.log(r),Ze(()=>this.loadingFollowings=!1)}});Z(this,"loadUserActivities",async(t,r)=>{this.loadingActivities=!0;try{const n=await Vt.Profiles.listActivities(t,r);Ze(()=>{this.userActivities=n,this.loadingActivities=!1})}catch(n){console.log(n),Ze(()=>{this.loadingActivities=!1})}});Ic(this),B1(()=>this.activeTab,t=>{if(t===3||t===4){const r=t===3?"followers":"following";this.loadFollowings(r)}else this.followings=[]})}get isCurrentUser(){return yt.userStore.user&&this.profile?yt.userStore.user.username===this.profile.username:!1}}class Pc extends Error{constructor(t,r){const n=new.target.prototype;super(`${t}: Status code '${r}'`),this.statusCode=r,this.__proto__=n}}class $S extends Error{constructor(t="A timeout occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class xa extends Error{constructor(t="An abort occurred."){const r=new.target.prototype;super(t),this.__proto__=r}}class Kse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="UnsupportedTransportError",this.__proto__=n}}class qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="DisabledTransportError",this.__proto__=n}}class Qse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.transport=r,this.errorType="FailedToStartTransportError",this.__proto__=n}}class Xse extends Error{constructor(t){const r=new.target.prototype;super(t),this.errorType="FailedToNegotiateWithServerError",this.__proto__=r}}class Jse extends Error{constructor(t,r){const n=new.target.prototype;super(t),this.innerErrors=r,this.__proto__=n}}class S2{constructor(t,r,n){this.statusCode=t,this.statusText=r,this.content=n}}class Uy{get(t,r){return this.send({...r,method:"GET",url:t})}post(t,r){return this.send({...r,method:"POST",url:t})}delete(t,r){return this.send({...r,method:"DELETE",url:t})}getCookieString(t){return""}}var B;(function(e){e[e.Trace=0]="Trace",e[e.Debug=1]="Debug",e[e.Information=2]="Information",e[e.Warning=3]="Warning",e[e.Error=4]="Error",e[e.Critical=5]="Critical",e[e.None=6]="None"})(B||(B={}));class Ap{constructor(){}log(t,r){}}Ap.instance=new Ap;const Zse="7.0.12";class Dr{static isRequired(t,r){if(t==null)throw new Error(`The '${r}' argument is required.`)}static isNotEmpty(t,r){if(!t||t.match(/^\s*$/))throw new Error(`The '${r}' argument should not be empty.`)}static isIn(t,r,n){if(!(t in r))throw new Error(`Unknown ${n} value: ${t}.`)}}class Tr{static get isBrowser(){return typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return typeof self=="object"&&"importScripts"in self}static get isReactNative(){return typeof window=="object"&&typeof window.document>"u"}static get isNode(){return!this.isBrowser&&!this.isWebWorker&&!this.isReactNative}}function Np(e,t){let r="";return yh(e)?(r=`Binary data of length ${e.byteLength}`,t&&(r+=`. Content: '${ele(e)}'`)):typeof e=="string"&&(r=`String data of length ${e.length}`,t&&(r+=`. Content: '${e}'`)),r}function ele(e){const t=new Uint8Array(e);let r="";return t.forEach(n=>{const a=n<16?"0":"";r+=`0x${a}${n.toString(16)} `}),r.substr(0,r.length-1)}function yh(e){return e&&typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||e.constructor&&e.constructor.name==="ArrayBuffer")}async function x2(e,t,r,n,a,i){const o={},[s,l]=kc();o[s]=l,e.log(B.Trace,`(${t} transport) sending data. ${Np(a,i.logMessageContent)}.`);const u=yh(a)?"arraybuffer":"text",c=await r.post(n,{content:a,headers:{...o,...i.headers},responseType:u,timeout:i.timeout,withCredentials:i.withCredentials});e.log(B.Trace,`(${t} transport) request complete. Response status: ${c.statusCode}.`)}function tle(e){return e===void 0?new Gm(B.Information):e===null?Ap.instance:e.log!==void 0?e:new Gm(e)}class rle{constructor(t,r){this._subject=t,this._observer=r}dispose(){const t=this._subject.observers.indexOf(this._observer);t>-1&&this._subject.observers.splice(t,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(r=>{})}}class Gm{constructor(t){this._minLevel=t,this.out=console}log(t,r){if(t>=this._minLevel){const n=`[${new Date().toISOString()}] ${B[t]}: ${r}`;switch(t){case B.Critical:case B.Error:this.out.error(n);break;case B.Warning:this.out.warn(n);break;case B.Information:this.out.info(n);break;default:this.out.log(n);break}}}}function kc(){let e="X-SignalR-User-Agent";return Tr.isNode&&(e="User-Agent"),[e,nle(Zse,ale(),ole(),ile())]}function nle(e,t,r,n){let a="Microsoft SignalR/";const i=e.split(".");return a+=`${i[0]}.${i[1]}`,a+=` (${e}; `,t&&t!==""?a+=`${t}; `:a+="Unknown OS; ",a+=`${r}`,n?a+=`; ${n}`:a+="; Unknown Runtime Version",a+=")",a}function ale(){if(Tr.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function ile(){if(Tr.isNode)return process.versions.node}function ole(){return Tr.isNode?"NodeJS":"Browser"}function gP(e){return e.stack?e.stack:e.message?e.message:`${e}`}function sle(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class lle extends Uy{constructor(t){if(super(),this._logger=t,typeof fetch>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(r("tough-cookie")).CookieJar,this._fetchType=r("node-fetch"),this._fetchType=r("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(sle());if(typeof AbortController>"u"){const r=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=r("abort-controller")}else this._abortControllerType=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new xa;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const r=new this._abortControllerType;let n;t.abortSignal&&(t.abortSignal.onabort=()=>{r.abort(),n=new xa});let a=null;if(t.timeout){const l=t.timeout;a=setTimeout(()=>{r.abort(),this._logger.log(B.Warning,"Timeout from HTTP request."),n=new $S},l)}t.content===""&&(t.content=void 0),t.content&&(t.headers=t.headers||{},yh(t.content)?t.headers["Content-Type"]="application/octet-stream":t.headers["Content-Type"]="text/plain;charset=UTF-8");let i;try{i=await this._fetchType(t.url,{body:t.content,cache:"no-cache",credentials:t.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:r.signal})}catch(l){throw n||(this._logger.log(B.Warning,`Error from HTTP request. ${l}.`),l)}finally{a&&clearTimeout(a),t.abortSignal&&(t.abortSignal.onabort=null)}if(!i.ok){const l=await yP(i,"text");throw new Pc(l||i.statusText,i.status)}const s=await yP(i,t.responseType);return new S2(i.status,i.statusText,s)}getCookieString(t){let r="";return Tr.isNode&&this._jar&&this._jar.getCookies(t,(n,a)=>r=a.join("; ")),r}}function yP(e,t){let r;switch(t){case"arraybuffer":r=e.arrayBuffer();break;case"text":r=e.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:r=e.text();break}return r}class ule extends Uy{constructor(t){super(),this._logger=t}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?new Promise((r,n)=>{const a=new XMLHttpRequest;a.open(t.method,t.url,!0),a.withCredentials=t.withCredentials===void 0?!0:t.withCredentials,a.setRequestHeader("X-Requested-With","XMLHttpRequest"),t.content===""&&(t.content=void 0),t.content&&(yh(t.content)?a.setRequestHeader("Content-Type","application/octet-stream"):a.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const i=t.headers;i&&Object.keys(i).forEach(o=>{a.setRequestHeader(o,i[o])}),t.responseType&&(a.responseType=t.responseType),t.abortSignal&&(t.abortSignal.onabort=()=>{a.abort(),n(new xa)}),t.timeout&&(a.timeout=t.timeout),a.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),a.status>=200&&a.status<300?r(new S2(a.status,a.statusText,a.response||a.responseText)):n(new Pc(a.response||a.responseText||a.statusText,a.status))},a.onerror=()=>{this._logger.log(B.Warning,`Error from HTTP request. ${a.status}: ${a.statusText}.`),n(new Pc(a.statusText,a.status))},a.ontimeout=()=>{this._logger.log(B.Warning,"Timeout from HTTP request."),n(new $S)},a.send(t.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class cle extends Uy{constructor(t){if(super(),typeof fetch<"u"||Tr.isNode)this._httpClient=new lle(t);else if(typeof XMLHttpRequest<"u")this._httpClient=new ule(t);else throw new Error("No usable HttpClient found.")}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new xa):t.method?t.url?this._httpClient.send(t):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(t){return this._httpClient.getCookieString(t)}}class An{static write(t){return`${t}${An.RecordSeparator}`}static parse(t){if(t[t.length-1]!==An.RecordSeparator)throw new Error("Message is incomplete.");const r=t.split(An.RecordSeparator);return r.pop(),r}}An.RecordSeparatorCode=30;An.RecordSeparator=String.fromCharCode(An.RecordSeparatorCode);class fle{writeHandshakeRequest(t){return An.write(JSON.stringify(t))}parseHandshakeResponse(t){let r,n;if(yh(t)){const s=new Uint8Array(t),l=s.indexOf(An.RecordSeparatorCode);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),n=s.byteLength>u?s.slice(u).buffer:null}else{const s=t,l=s.indexOf(An.RecordSeparator);if(l===-1)throw new Error("Message is incomplete.");const u=l+1;r=s.substring(0,u),n=s.length>u?s.substring(u):null}const a=An.parse(r),i=JSON.parse(a[0]);if(i.type)throw new Error("Expected a handshake response from the server.");return[n,i]}}var Et;(function(e){e[e.Invocation=1]="Invocation",e[e.StreamItem=2]="StreamItem",e[e.Completion=3]="Completion",e[e.StreamInvocation=4]="StreamInvocation",e[e.CancelInvocation=5]="CancelInvocation",e[e.Ping=6]="Ping",e[e.Close=7]="Close"})(Et||(Et={}));class dle{constructor(){this.observers=[]}next(t){for(const r of this.observers)r.next(t)}error(t){for(const r of this.observers)r.error&&r.error(t)}complete(){for(const t of this.observers)t.complete&&t.complete()}subscribe(t){return this.observers.push(t),new rle(this,t)}}const ple=30*1e3,hle=15*1e3;var Bt;(function(e){e.Disconnected="Disconnected",e.Connecting="Connecting",e.Connected="Connected",e.Disconnecting="Disconnecting",e.Reconnecting="Reconnecting"})(Bt||(Bt={}));class jS{constructor(t,r,n,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.log(B.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},Dr.isRequired(t,"connection"),Dr.isRequired(r,"logger"),Dr.isRequired(n,"protocol"),this.serverTimeoutInMilliseconds=ple,this.keepAliveIntervalInMilliseconds=hle,this._logger=r,this._protocol=n,this.connection=t,this._reconnectPolicy=a,this._handshakeProtocol=new fle,this.connection.onreceive=i=>this._processIncomingData(i),this.connection.onclose=i=>this._connectionClosed(i),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Bt.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Et.Ping})}static create(t,r,n,a){return new jS(t,r,n,a)}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(t){if(this._connectionState!==Bt.Disconnected&&this._connectionState!==Bt.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!t)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=t}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Bt.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Bt.Connecting,this._logger.log(B.Debug,"Starting HubConnection.");try{await this._startInternal(),Tr.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Bt.Connected,this._connectionStarted=!0,this._logger.log(B.Debug,"HubConnection connected successfully.")}catch(t){return this._connectionState=Bt.Disconnected,this._logger.log(B.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const t=new Promise((r,n)=>{this._handshakeResolver=r,this._handshakeRejecter=n});await this.connection.start(this._protocol.transferFormat);try{const r={protocol:this._protocol.name,version:this._protocol.version};if(this._logger.log(B.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(B.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await t,this._stopDuringStartError)throw this._stopDuringStartError;this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(r){throw this._logger.log(B.Debug,`Hub handshake failed with error '${r}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(r),r}}async stop(){const t=this._startPromise;this._stopPromise=this._stopInternal(),await this._stopPromise;try{await t}catch{}}_stopInternal(t){return this._connectionState===Bt.Disconnected?(this._logger.log(B.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this._connectionState===Bt.Disconnecting?(this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise):(this._connectionState=Bt.Disconnecting,this._logger.log(B.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(B.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=t||new xa("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createStreamInvocation(t,r,a);let o;const s=new dle;return s.cancelCallback=()=>{const l=this._createCancelInvocation(i.invocationId);return delete this._callbacks[i.invocationId],o.then(()=>this._sendWithProtocol(l))},this._callbacks[i.invocationId]=(l,u)=>{if(u){s.error(u);return}else l&&(l.type===Et.Completion?l.error?s.error(new Error(l.error)):s.complete():s.next(l.item))},o=this._sendWithProtocol(i).catch(l=>{s.error(l),delete this._callbacks[i.invocationId]}),this._launchStreams(n,o),s}_sendMessage(t){return this._resetKeepAliveInterval(),this.connection.send(t)}_sendWithProtocol(t){return this._sendMessage(this._protocol.writeMessage(t))}send(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._sendWithProtocol(this._createInvocation(t,r,!0,a));return this._launchStreams(n,i),i}invoke(t,...r){const[n,a]=this._replaceStreamingParams(r),i=this._createInvocation(t,r,!1,a);return new Promise((s,l)=>{this._callbacks[i.invocationId]=(c,f)=>{if(f){l(f);return}else c&&(c.type===Et.Completion?c.error?l(new Error(c.error)):s(c.result):l(new Error(`Unexpected message type: ${c.type}`)))};const u=this._sendWithProtocol(i).catch(c=>{l(c),delete this._callbacks[i.invocationId]});this._launchStreams(n,u)})}on(t,r){!t||!r||(t=t.toLowerCase(),this._methods[t]||(this._methods[t]=[]),this._methods[t].indexOf(r)===-1&&this._methods[t].push(r))}off(t,r){if(!t)return;t=t.toLowerCase();const n=this._methods[t];if(n)if(r){const a=n.indexOf(r);a!==-1&&(n.splice(a,1),n.length===0&&delete this._methods[t])}else delete this._methods[t]}onclose(t){t&&this._closedCallbacks.push(t)}onreconnecting(t){t&&this._reconnectingCallbacks.push(t)}onreconnected(t){t&&this._reconnectedCallbacks.push(t)}_processIncomingData(t){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(t=this._processHandshakeResponse(t),this._receivedHandshakeResponse=!0),t){const r=this._protocol.parseMessages(t,this._logger);for(const n of r)switch(n.type){case Et.Invocation:this._invokeClientMethod(n);break;case Et.StreamItem:case Et.Completion:{const a=this._callbacks[n.invocationId];if(a){n.type===Et.Completion&&delete this._callbacks[n.invocationId];try{a(n)}catch(i){this._logger.log(B.Error,`Stream callback threw error: ${gP(i)}`)}}break}case Et.Ping:break;case Et.Close:{this._logger.log(B.Information,"Close message received from server.");const a=n.error?new Error("Server returned an error on close: "+n.error):void 0;n.allowReconnect===!0?this.connection.stop(a):this._stopPromise=this._stopInternal(a);break}default:this._logger.log(B.Warning,`Invalid message type: ${n.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(t){let r,n;try{[n,r]=this._handshakeProtocol.parseHandshakeResponse(t)}catch(a){const i="Error parsing handshake response: "+a;this._logger.log(B.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}if(r.error){const a="Server returned handshake error: "+r.error;this._logger.log(B.Error,a);const i=new Error(a);throw this._handshakeRejecter(i),i}else this._logger.log(B.Debug,"Server handshake complete.");return this._handshakeResolver(),n}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if((!this.connection.features||!this.connection.features.inherentKeepAlive)&&(this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),this._pingServerHandle===void 0)){let t=this._nextKeepAlive-new Date().getTime();t<0&&(t=0),this._pingServerHandle=setTimeout(async()=>{if(this._connectionState===Bt.Connected)try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}},t)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(t){const r=t.target.toLowerCase(),n=this._methods[r];if(!n){this._logger.log(B.Warning,`No client method with the name '${r}' found.`),t.invocationId&&(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)));return}const a=n.slice(),i=!!t.invocationId;let o,s,l;for(const u of a)try{const c=o;o=await u.apply(this,t.arguments),i&&o&&c&&(this._logger.log(B.Error,`Multiple results provided for '${r}'. Sending error to server.`),l=this._createCompletionMessage(t.invocationId,"Client provided multiple results.",null)),s=void 0}catch(c){s=c,this._logger.log(B.Error,`A callback for the method '${r}' threw error '${c}'.`)}l?await this._sendWithProtocol(l):i?(s?l=this._createCompletionMessage(t.invocationId,`${s}`,null):o!==void 0?l=this._createCompletionMessage(t.invocationId,null,o):(this._logger.log(B.Warning,`No result given for '${r}' method and invocation ID '${t.invocationId}'.`),l=this._createCompletionMessage(t.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(l)):o&&this._logger.log(B.Error,`Result given for '${r}' method but server is not expecting a result.`)}_connectionClosed(t){this._logger.log(B.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||t||new xa("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(t||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Bt.Disconnecting?this._completeClose(t):this._connectionState===Bt.Connected&&this._reconnectPolicy?this._reconnect(t):this._connectionState===Bt.Connected&&this._completeClose(t)}_completeClose(t){if(this._connectionStarted){this._connectionState=Bt.Disconnected,this._connectionStarted=!1,Tr.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(r=>r.apply(this,[t]))}catch(r){this._logger.log(B.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async _reconnect(t){const r=Date.now();let n=0,a=t!==void 0?t:new Error("Attempting to reconnect due to a unknown error."),i=this._getNextRetryDelay(n++,0,a);if(i===null){this._logger.log(B.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(t);return}if(this._connectionState=Bt.Reconnecting,t?this._logger.log(B.Information,`Connection reconnecting because of error '${t}'.`):this._logger.log(B.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(o=>o.apply(this,[t]))}catch(o){this._logger.log(B.Error,`An onreconnecting callback called with error '${t}' threw error '${o}'.`)}if(this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;i!==null;){if(this._logger.log(B.Information,`Reconnect attempt number ${n} will start in ${i} ms.`),await new Promise(o=>{this._reconnectDelayHandle=setTimeout(o,i)}),this._reconnectDelayHandle=void 0,this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Bt.Connected,this._logger.log(B.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(o=>o.apply(this,[this.connection.connectionId]))}catch(o){this._logger.log(B.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${o}'.`)}return}catch(o){if(this._logger.log(B.Information,`Reconnect attempt failed because of error '${o}'.`),this._connectionState!==Bt.Reconnecting){this._logger.log(B.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Bt.Disconnecting&&this._completeClose();return}a=o instanceof Error?o:new Error(o.toString()),i=this._getNextRetryDelay(n++,Date.now()-r,a)}}this._logger.log(B.Information,`Reconnect retries have been exhausted after ${Date.now()-r} ms and ${n} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(t,r,n){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:r,previousRetryCount:t,retryReason:n})}catch(a){return this._logger.log(B.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${r}) threw error '${a}'.`),null}}_cancelCallbacksWithError(t){const r=this._callbacks;this._callbacks={},Object.keys(r).forEach(n=>{const a=r[n];try{a(null,t)}catch(i){this._logger.log(B.Error,`Stream 'error' callback called with '${t}' threw error: ${gP(i)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(t,r,n,a){if(n)return a.length!==0?{arguments:r,streamIds:a,target:t,type:Et.Invocation}:{arguments:r,target:t,type:Et.Invocation};{const i=this._invocationId;return this._invocationId++,a.length!==0?{arguments:r,invocationId:i.toString(),streamIds:a,target:t,type:Et.Invocation}:{arguments:r,invocationId:i.toString(),target:t,type:Et.Invocation}}}_launchStreams(t,r){if(t.length!==0){r||(r=Promise.resolve());for(const n in t)t[n].subscribe({complete:()=>{r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n)))},error:a=>{let i;a instanceof Error?i=a.message:a&&a.toString?i=a.toString():i="Unknown error",r=r.then(()=>this._sendWithProtocol(this._createCompletionMessage(n,i)))},next:a=>{r=r.then(()=>this._sendWithProtocol(this._createStreamItemMessage(n,a)))}})}}_replaceStreamingParams(t){const r=[],n=[];for(let a=0;a0)&&(r=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(t);const n=await this._innerClient.send(t);return r&&n.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(t),await this._innerClient.send(t)):n}_setAuthorizationHeader(t){t.headers||(t.headers={}),this._accessToken?t.headers[Vs.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&t.headers[Vs.Authorization]&&delete t.headers[Vs.Authorization]}getCookieString(t){return this._innerClient.getCookieString(t)}}var Er;(function(e){e[e.None=0]="None",e[e.WebSockets=1]="WebSockets",e[e.ServerSentEvents=2]="ServerSentEvents",e[e.LongPolling=4]="LongPolling"})(Er||(Er={}));var qr;(function(e){e[e.Text=1]="Text",e[e.Binary=2]="Binary"})(qr||(qr={}));let gle=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class bP{constructor(t,r,n){this._httpClient=t,this._logger=r,this._pollAbort=new gle,this._options=n,this._running=!1,this.onreceive=null,this.onclose=null}get pollAborted(){return this._pollAbort.aborted}async connect(t,r){if(Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._url=t,this._logger.log(B.Trace,"(LongPolling transport) Connecting."),r===qr.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[n,a]=kc(),i={[n]:a,...this._options.headers},o={abortSignal:this._pollAbort.signal,headers:i,timeout:1e5,withCredentials:this._options.withCredentials};r===qr.Binary&&(o.responseType="arraybuffer");const s=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${s}.`);const l=await this._httpClient.get(s,o);l.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${l.statusCode}.`),this._closeError=new Pc(l.statusText||"",l.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,o)}async _poll(t,r){try{for(;this._running;)try{const n=`${t}&_=${Date.now()}`;this._logger.log(B.Trace,`(LongPolling transport) polling: ${n}.`);const a=await this._httpClient.get(n,r);a.statusCode===204?(this._logger.log(B.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):a.statusCode!==200?(this._logger.log(B.Error,`(LongPolling transport) Unexpected response code: ${a.statusCode}.`),this._closeError=new Pc(a.statusText||"",a.statusCode),this._running=!1):a.content?(this._logger.log(B.Trace,`(LongPolling transport) data received. ${Np(a.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(a.content)):this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(n){this._running?n instanceof $S?this._logger.log(B.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=n,this._running=!1):this._logger.log(B.Trace,`(LongPolling transport) Poll errored after shutdown: ${n.message}`)}}finally{this._logger.log(B.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(t){return this._running?x2(this._logger,"LongPolling",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(B.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(B.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const t={},[r,n]=kc();t[r]=n;const a={headers:{...t,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};await this._httpClient.delete(this._url,a),this._logger.log(B.Trace,"(LongPolling transport) DELETE request sent.")}finally{this._logger.log(B.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this._closeError&&(t+=" Error: "+this._closeError),this._logger.log(B.Trace,t),this.onclose(this._closeError)}}}class yle{constructor(t,r,n,a){this._httpClient=t,this._accessToken=r,this._logger=n,this._options=a,this.onreceive=null,this.onclose=null}async connect(t,r){return Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(SSE transport) Connecting."),this._url=t,this._accessToken&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((n,a)=>{let i=!1;if(r!==qr.Text){a(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let o;if(Tr.isBrowser||Tr.isWebWorker)o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials});else{const s=this._httpClient.getCookieString(t),l={};l.Cookie=s;const[u,c]=kc();l[u]=c,o=new this._options.EventSource(t,{withCredentials:this._options.withCredentials,headers:{...l,...this._options.headers}})}try{o.onmessage=s=>{if(this.onreceive)try{this._logger.log(B.Trace,`(SSE transport) data received. ${Np(s.data,this._options.logMessageContent)}.`),this.onreceive(s.data)}catch(l){this._close(l);return}},o.onerror=s=>{i?this._close():a(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))},o.onopen=()=>{this._logger.log(B.Information,`SSE connected to ${this._url}`),this._eventSource=o,i=!0,n()}}catch(s){a(s);return}})}async send(t){return this._eventSource?x2(this._logger,"SSE",this._httpClient,this._url,t,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(t){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(t))}}class wle{constructor(t,r,n,a,i,o){this._logger=n,this._accessTokenFactory=r,this._logMessageContent=a,this._webSocketConstructor=i,this._httpClient=t,this.onreceive=null,this.onclose=null,this._headers=o}async connect(t,r){Dr.isRequired(t,"url"),Dr.isRequired(r,"transferFormat"),Dr.isIn(r,qr,"transferFormat"),this._logger.log(B.Trace,"(WebSockets transport) Connecting.");let n;return this._accessTokenFactory&&(n=await this._accessTokenFactory()),new Promise((a,i)=>{t=t.replace(/^http/,"ws");let o;const s=this._httpClient.getCookieString(t);let l=!1;if(Tr.isNode||Tr.isReactNative){const u={},[c,f]=kc();u[c]=f,n&&(u[Vs.Authorization]=`Bearer ${n}`),s&&(u[Vs.Cookie]=s),o=new this._webSocketConstructor(t,void 0,{headers:{...u,...this._headers}})}else n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`);o||(o=new this._webSocketConstructor(t)),r===qr.Binary&&(o.binaryType="arraybuffer"),o.onopen=u=>{this._logger.log(B.Information,`WebSocket connected to ${t}.`),this._webSocket=o,l=!0,a()},o.onerror=u=>{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="There was an error with the transport",this._logger.log(B.Information,`(WebSockets transport) ${c}.`)},o.onmessage=u=>{if(this._logger.log(B.Trace,`(WebSockets transport) data received. ${Np(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(c){this._close(c);return}},o.onclose=u=>{if(l)this._close(u);else{let c=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?c=u.error:c="WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.",i(new Error(c))}}})}send(t){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(B.Trace,`(WebSockets transport) sending data. ${Np(t,this._logMessageContent)}.`),this._webSocket.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(t){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(B.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(t)&&(t.wasClean===!1||t.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)):t instanceof Error?this.onclose(t):this.onclose())}_isCloseEvent(t){return t&&typeof t.wasClean=="boolean"&&typeof t.code=="number"}}const _P=100;class ble{constructor(t,r={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,Dr.isRequired(t,"url"),this._logger=tle(r.logger),this.baseUrl=this._resolveUrl(t),r=r||{},r.logMessageContent=r.logMessageContent===void 0?!1:r.logMessageContent,typeof r.withCredentials=="boolean"||r.withCredentials===void 0)r.withCredentials=r.withCredentials===void 0?!0:r.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");r.timeout=r.timeout===void 0?100*1e3:r.timeout;let n=null,a=null;if(Tr.isNode&&typeof require<"u"){const i=typeof __webpack_require__=="function"?__non_webpack_require__:require;n=i("ws"),a=i("eventsource")}!Tr.isNode&&typeof WebSocket<"u"&&!r.WebSocket?r.WebSocket=WebSocket:Tr.isNode&&!r.WebSocket&&n&&(r.WebSocket=n),!Tr.isNode&&typeof EventSource<"u"&&!r.EventSource?r.EventSource=EventSource:Tr.isNode&&!r.EventSource&&typeof a<"u"&&(r.EventSource=a),this._httpClient=new mle(r.httpClient||new cle(this._logger),r.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=r,this.onreceive=null,this.onclose=null}async start(t){if(t=t||qr.Binary,Dr.isIn(t,qr,"transferFormat"),this._logger.log(B.Debug,`Starting connection with transfer format '${qr[t]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(t),await this._startInternalPromise,this._connectionState==="Disconnecting"){const r="Failed to start the HttpConnection before stop() was called.";return this._logger.log(B.Error,r),await this._stopPromise,Promise.reject(new xa(r))}else if(this._connectionState!=="Connected"){const r="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(B.Error,r),Promise.reject(new xa(r))}this._connectionStarted=!0}send(t){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new LS(this.transport)),this._sendQueue.send(t))}async stop(t){if(this._connectionState==="Disconnected")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(B.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(r=>{this._stopPromiseResolver=r}),await this._stopInternal(t),await this._stopPromise}async _stopInternal(t){this._stopError=t;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(r){this._logger.log(B.Error,`HttpConnection.transport.stop() threw error '${r}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(B.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(t){let r=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===Er.WebSockets)this.transport=this._constructTransport(Er.WebSockets),await this._startTransport(r,t);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let n=null,a=0;do{if(n=await this._getNegotiationResponse(r),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xa("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(r=n.url),n.accessToken){const i=n.accessToken;this._accessTokenFactory=()=>i,this._httpClient._accessToken=i,this._httpClient._accessTokenFactory=void 0}a++}while(n.url&&a<_P);if(a===_P&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(r,this._options.transport,n,t)}this.transport instanceof bP&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(B.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(n){return this._logger.log(B.Error,"Failed to start the connection: "+n),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(n)}}async _getNegotiationResponse(t){const r={},[n,a]=kc();r[n]=a;const i=this._resolveNegotiateUrl(t);this._logger.log(B.Debug,`Sending negotiation request: ${i}.`);try{const o=await this._httpClient.post(i,{content:"",headers:{...r,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(o.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${o.statusCode}'`));const s=JSON.parse(o.content);return(!s.negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),s}catch(o){let s="Failed to complete negotiation with the server: "+o;return o instanceof Pc&&o.statusCode===404&&(s=s+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(B.Error,s),Promise.reject(new Xse(s))}}_createConnectUrl(t,r){return r?t+(t.indexOf("?")===-1?"?":"&")+`id=${r}`:t}async _createTransport(t,r,n,a){let i=this._createConnectUrl(t,n.connectionToken);if(this._isITransport(r)){this._logger.log(B.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=r,await this._startTransport(i,a),this.connectionId=n.connectionId;return}const o=[],s=n.availableTransports||[];let l=n;for(const u of s){const c=this._resolveTransportOrError(u,r,a);if(c instanceof Error)o.push(`${u.transport} failed:`),o.push(c);else if(this._isITransport(c)){if(this.transport=c,!l){try{l=await this._getNegotiationResponse(t)}catch(f){return Promise.reject(f)}i=this._createConnectUrl(t,l.connectionToken)}try{await this._startTransport(i,a),this.connectionId=l.connectionId;return}catch(f){if(this._logger.log(B.Error,`Failed to start the transport '${u.transport}': ${f}`),l=void 0,o.push(new Qse(`${u.transport} failed: ${f}`,Er[u.transport])),this._connectionState!=="Connecting"){const d="Failed to select transport before stop() was called.";return this._logger.log(B.Debug,d),Promise.reject(new xa(d))}}}}return o.length>0?Promise.reject(new Jse(`Unable to connect to the server with any of the available transports. ${o.join(" ")}`,o)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(t){switch(t){case Er.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new wle(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case Er.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new yle(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case Er.LongPolling:return new bP(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${t}.`)}}_startTransport(t,r){return this.transport.onreceive=this.onreceive,this.transport.onclose=n=>this._stopConnection(n),this.transport.connect(t,r)}_resolveTransportOrError(t,r,n){const a=Er[t.transport];if(a==null)return this._logger.log(B.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(_le(r,a))if(t.transferFormats.map(o=>qr[o]).indexOf(n)>=0){if(a===Er.WebSockets&&!this._options.WebSocket||a===Er.ServerSentEvents&&!this._options.EventSource)return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it is not supported in your environment.'`),new Kse(`'${Er[a]}' is not supported in your environment.`,a);this._logger.log(B.Debug,`Selecting transport '${Er[a]}'.`);try{return this._constructTransport(a)}catch(o){return o}}else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it does not support the requested transfer format '${qr[n]}'.`),new Error(`'${Er[a]}' does not support ${qr[n]}.`);else return this._logger.log(B.Debug,`Skipping transport '${Er[a]}' because it was disabled by the client.`),new qse(`'${Er[a]}' is disabled by the client.`,a)}_isITransport(t){return t&&typeof t=="object"&&"connect"in t}_stopConnection(t){if(this._logger.log(B.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this._connectionState}.`),this.transport=void 0,t=this._stopError||t,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(B.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(B.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),t?this._logger.log(B.Error,`Connection disconnected with error '${t}'.`):this._logger.log(B.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(r=>{this._logger.log(B.Error,`TransportSendQueue.stop() threw error '${r}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(t)}catch(r){this._logger.log(B.Error,`HttpConnection.onclose(${t}) threw error '${r}'.`)}}}_resolveUrl(t){if(t.lastIndexOf("https://",0)===0||t.lastIndexOf("http://",0)===0)return t;if(!Tr.isBrowser)throw new Error(`Cannot resolve '${t}'.`);const r=window.document.createElement("a");return r.href=t,this._logger.log(B.Information,`Normalizing '${t}' to '${r.href}'.`),r.href}_resolveNegotiateUrl(t){const r=t.indexOf("?");let n=t.substring(0,r===-1?t.length:r);return n[n.length-1]!=="/"&&(n+="/"),n+="negotiate",n+=r===-1?"":t.substring(r),n.indexOf("negotiateVersion")===-1&&(n+=r===-1?"?":"&",n+="negotiateVersion="+this._negotiateVersion),n}}function _le(e,t){return!e||(t&e)!==0}class LS{constructor(t){this._transport=t,this._buffer=[],this._executing=!0,this._sendBufferedData=new av,this._transportResult=new av,this._sendLoopPromise=this._sendLoop()}send(t){return this._bufferData(t),this._transportResult||(this._transportResult=new av),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(t){if(this._buffer.length&&typeof this._buffer[0]!=typeof t)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof t}`);this._buffer.push(t),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new av;const t=this._transportResult;this._transportResult=void 0;const r=typeof this._buffer[0]=="string"?this._buffer.join(""):LS._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(r),t.resolve()}catch(n){t.reject(n)}}}static _concatBuffers(t){const r=t.map(i=>i.byteLength).reduce((i,o)=>i+o),n=new Uint8Array(r);let a=0;for(const i of t)n.set(new Uint8Array(i),a),a+=i.byteLength;return n.buffer}}class av{constructor(){this.promise=new Promise((t,r)=>[this._resolver,this._rejecter]=[t,r])}resolve(){this._resolver()}reject(t){this._rejecter(t)}}const Ele="json";class Sle{constructor(){this.name=Ele,this.version=1,this.transferFormat=qr.Text}parseMessages(t,r){if(typeof t!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!t)return[];r===null&&(r=Ap.instance);const n=An.parse(t),a=[];for(const i of n){const o=JSON.parse(i);if(typeof o.type!="number")throw new Error("Invalid payload.");switch(o.type){case Et.Invocation:this._isInvocationMessage(o);break;case Et.StreamItem:this._isStreamItemMessage(o);break;case Et.Completion:this._isCompletionMessage(o);break;case Et.Ping:break;case Et.Close:break;default:r.log(B.Information,"Unknown message type '"+o.type+"' ignored.");continue}a.push(o)}return a}writeMessage(t){return An.write(JSON.stringify(t))}_isInvocationMessage(t){this._assertNotEmptyString(t.target,"Invalid payload for Invocation message."),t.invocationId!==void 0&&this._assertNotEmptyString(t.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(t){if(this._assertNotEmptyString(t.invocationId,"Invalid payload for StreamItem message."),t.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(t){if(t.result&&t.error)throw new Error("Invalid payload for Completion message.");!t.result&&t.error&&this._assertNotEmptyString(t.error,"Invalid payload for Completion message."),this._assertNotEmptyString(t.invocationId,"Invalid payload for Completion message.")}_assertNotEmptyString(t,r){if(typeof t!="string"||t==="")throw new Error(r)}}const xle={trace:B.Trace,debug:B.Debug,info:B.Information,information:B.Information,warn:B.Warning,warning:B.Warning,error:B.Error,critical:B.Critical,none:B.None};function Cle(e){const t=xle[e.toLowerCase()];if(typeof t<"u")return t;throw new Error(`Unknown log level: ${e}`)}class Ole{configureLogging(t){if(Dr.isRequired(t,"logging"),Tle(t))this.logger=t;else if(typeof t=="string"){const r=Cle(t);this.logger=new Gm(r)}else this.logger=new Gm(t);return this}withUrl(t,r){return Dr.isRequired(t,"url"),Dr.isNotEmpty(t,"url"),this.url=t,typeof r=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...r}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:r},this}withHubProtocol(t){return Dr.isRequired(t,"protocol"),this.protocol=t,this}withAutomaticReconnect(t){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return t?Array.isArray(t)?this.reconnectPolicy=new wP(t):this.reconnectPolicy=t:this.reconnectPolicy=new wP,this}build(){const t=this.httpConnectionOptions||{};if(t.logger===void 0&&(t.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const r=new ble(this.url,t);return jS.create(r,this.logger||Ap.instance,this.protocol||new Sle,this.reconnectPolicy)}}function Tle(e){return e.log!==void 0}class Dle{constructor(){Z(this,"comments",[]);Z(this,"hubConnection",null);Z(this,"createHubConnection",t=>{yt.activityStore.selectedActivity&&(this.hubConnection=new Ole().withUrl(`/chat?activityId=${t}`,{accessTokenFactory:()=>{var r;return(r=yt.userStore.user)==null?void 0:r.token}}).withAutomaticReconnect().configureLogging(B.Information).build(),this.hubConnection.start().catch(r=>console.log("Error establishing the connection: "+r)),this.hubConnection.on("LoadComments",r=>{Ze(()=>{r.forEach(n=>{n.createdAt=new Date(n.createdAt)}),this.comments=r})}),this.hubConnection.on("ReceiveComment",r=>{Ze(()=>{r.createdAt=new Date(r.createdAt),this.comments.unshift(r)})}))});Z(this,"stopHubConnection",()=>{var t;(t=this.hubConnection)==null||t.stop().catch(r=>console.log("Error stopping connection: ",r))});Z(this,"clearComments",()=>{this.comments=[],this.stopHubConnection()});Z(this,"addComment",async t=>{var r,n;t.activityId=(r=yt.activityStore.selectedActivity)==null?void 0:r.id;try{await((n=this.hubConnection)==null?void 0:n.invoke("SendComment",t))}catch(a){console.log(a)}});Ic(this)}}const yt={activityStore:new Wse,commonStore:new Hse,userStore:new Vse,modalStore:new Yse,profileStore:new Gse,commentStore:new Dle},C2=x.createContext(yt);function Ft(){return x.useContext(C2)}lw.createRoot(document.getElementById("root")).render(_.jsx(b.StrictMode,{children:_.jsx(C2.Provider,{value:yt,children:_.jsx(_4,{router:Oo})})}))});export default Ple(); diff --git a/API/wwwroot/index.html b/API/wwwroot/index.html index c695e7b..3d92505 100644 --- a/API/wwwroot/index.html +++ b/API/wwwroot/index.html @@ -5,7 +5,7 @@ Reactivities - +