diff --git a/assets/Latin-Merriweather-Bold-IIXuWTHu.woff2 b/assets/Latin-Merriweather-Bold-IIXuWTHu.woff2 new file mode 100644 index 00000000..b71dc5a0 Binary files /dev/null and b/assets/Latin-Merriweather-Bold-IIXuWTHu.woff2 differ diff --git a/assets/Latin-Merriweather-BoldItalic-lANwydSD.woff2 b/assets/Latin-Merriweather-BoldItalic-lANwydSD.woff2 new file mode 100644 index 00000000..36d3abfc Binary files /dev/null and b/assets/Latin-Merriweather-BoldItalic-lANwydSD.woff2 differ diff --git a/assets/Latin-Merriweather-Italic-DTbnHiv6.woff2 b/assets/Latin-Merriweather-Italic-DTbnHiv6.woff2 new file mode 100644 index 00000000..09916326 Binary files /dev/null and b/assets/Latin-Merriweather-Italic-DTbnHiv6.woff2 differ diff --git a/assets/Latin-Merriweather-Light-8OcT7uuF.woff2 b/assets/Latin-Merriweather-Light-8OcT7uuF.woff2 new file mode 100644 index 00000000..a0eadc33 Binary files /dev/null and b/assets/Latin-Merriweather-Light-8OcT7uuF.woff2 differ diff --git a/assets/Latin-Merriweather-LightItalic-B_O6_0Zw.woff2 b/assets/Latin-Merriweather-LightItalic-B_O6_0Zw.woff2 new file mode 100644 index 00000000..5112dab4 Binary files /dev/null and b/assets/Latin-Merriweather-LightItalic-B_O6_0Zw.woff2 differ diff --git a/assets/Latin-Merriweather-Regular-BwwdRmdN.woff2 b/assets/Latin-Merriweather-Regular-BwwdRmdN.woff2 new file mode 100644 index 00000000..9a9bd644 Binary files /dev/null and b/assets/Latin-Merriweather-Regular-BwwdRmdN.woff2 differ diff --git a/assets/hero-9qBhH4BY.jpg b/assets/hero-9qBhH4BY.jpg new file mode 100644 index 00000000..62320c42 Binary files /dev/null and b/assets/hero-9qBhH4BY.jpg differ diff --git a/assets/index-7-K9hXJI.js b/assets/index-7-K9hXJI.js new file mode 100644 index 00000000..dc7c40d2 --- /dev/null +++ b/assets/index-7-K9hXJI.js @@ -0,0 +1,633 @@ +var EL=Object.defineProperty;var j_=e=>{throw TypeError(e)};var CL=(e,t,n)=>t in e?EL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>CL(e,typeof t!="symbol"?t+"":t,n),Lp=(e,t,n)=>t.has(e)||j_("Cannot "+n);var P=(e,t,n)=>(Lp(e,t,"read from private field"),n?n.call(e):t.get(e)),Se=(e,t,n)=>t.has(e)?j_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),he=(e,t,n,r)=>(Lp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Me=(e,t,n)=>(Lp(e,t,"access private method"),n);var fd=(e,t,n,r)=>({set _(i){he(e,t,i,n)},get _(){return P(e,t,r)}});function AL(e,t){for(var n=0;nr[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var Uo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Si(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function RL(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var zE={exports:{}},o0={},BE={exports:{}},ke={};/** + * @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 Lc=Symbol.for("react.element"),$L=Symbol.for("react.portal"),kL=Symbol.for("react.fragment"),TL=Symbol.for("react.strict_mode"),ML=Symbol.for("react.profiler"),NL=Symbol.for("react.provider"),LL=Symbol.for("react.context"),OL=Symbol.for("react.forward_ref"),PL=Symbol.for("react.suspense"),IL=Symbol.for("react.memo"),DL=Symbol.for("react.lazy"),F_=Symbol.iterator;function jL(e){return e===null||typeof e!="object"?null:(e=F_&&e[F_]||e["@@iterator"],typeof e=="function"?e:null)}var HE={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},WE=Object.assign,qE={};function yl(e,t,n){this.props=e,this.context=t,this.refs=qE,this.updater=n||HE}yl.prototype.isReactComponent={};yl.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")};yl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function GE(){}GE.prototype=yl.prototype;function d1(e,t,n){this.props=e,this.context=t,this.refs=qE,this.updater=n||HE}var f1=d1.prototype=new GE;f1.constructor=d1;WE(f1,yl.prototype);f1.isPureReactComponent=!0;var U_=Array.isArray,KE=Object.prototype.hasOwnProperty,h1={current:null},YE={key:!0,ref:!0,__self:!0,__source:!0};function QE(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)KE.call(t,r)&&!YE.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,N=U[X];if(0>>1;Xi(ie,q))Ki(pe,ie)?(U[X]=pe,U[K]=q,X=K):(U[X]=ie,U[G]=q,X=G);else if(Ki(pe,q))U[X]=pe,U[K]=q,X=K;else break e}}return W}function i(U,W){var q=U.sortIndex-W.sortIndex;return q!==0?q:U.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,d=null,f=3,h=!1,g=!1,y=!1,_=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,p=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function v(U){for(var W=n(u);W!==null;){if(W.callback===null)r(u);else if(W.startTime<=U)r(u),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(u)}}function x(U){if(y=!1,v(U),!g)if(n(l)!==null)g=!0,H(S);else{var W=n(u);W!==null&&Q(x,W.startTime-U)}}function S(U,W){g=!1,y&&(y=!1,m(C),C=-1),h=!0;var q=f;try{for(v(W),d=n(l);d!==null&&(!(d.expirationTime>W)||U&&!M());){var X=d.callback;if(typeof X=="function"){d.callback=null,f=d.priorityLevel;var N=X(d.expirationTime<=W);W=e.unstable_now(),typeof N=="function"?d.callback=N:d===n(l)&&r(l),v(W)}else r(l);d=n(l)}if(d!==null)var B=!0;else{var G=n(u);G!==null&&Q(x,G.startTime-W),B=!1}return B}finally{d=null,f=q,h=!1}}var w=!1,b=null,C=-1,k=5,A=-1;function M(){return!(e.unstable_now()-AU||125X?(U.sortIndex=q,t(u,U),n(l)===null&&U===n(u)&&(y?(m(C),C=-1):y=!0,Q(x,q-X))):(U.sortIndex=N,t(l,U),g||h||(g=!0,H(S))),U},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(U){var W=f;return function(){var q=f;f=W;try{return U.apply(this,arguments)}finally{f=q}}}})(eC);JE.exports=eC;var QL=JE.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 tC=V,kn=QL;function J(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Cm=Object.prototype.hasOwnProperty,XL=/^[: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]*$/,z_={},B_={};function ZL(e){return Cm.call(B_,e)?!0:Cm.call(z_,e)?!1:XL.test(e)?B_[e]=!0:(z_[e]=!0,!1)}function JL(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function eO(e,t,n,r){if(t===null||typeof t>"u"||JL(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.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 tn(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var Ot={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ot[e]=new tn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ot[t]=new tn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ot[e]=new tn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ot[e]=new tn(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){Ot[e]=new tn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ot[e]=new tn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ot[e]=new tn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ot[e]=new tn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ot[e]=new tn(e,5,!1,e.toLowerCase(),null,!1,!1)});var g1=/[\-:]([a-z])/g;function m1(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(g1,m1);Ot[t]=new tn(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(g1,m1);Ot[t]=new tn(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(g1,m1);Ot[t]=new tn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ot[e]=new tn(e,1,!1,e.toLowerCase(),null,!1,!1)});Ot.xlinkHref=new tn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ot[e]=new tn(e,1,!1,e.toLowerCase(),null,!0,!0)});function y1(e,t,n,r){var i=Ot.hasOwnProperty(t)?Ot[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` +`+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{Ip=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?hu(e):""}function tO(e){switch(e.tag){case 5:return hu(e.type);case 16:return hu("Lazy");case 13:return hu("Suspense");case 19:return hu("SuspenseList");case 0:case 2:case 15:return e=Dp(e.type,!1),e;case 11:return e=Dp(e.type.render,!1),e;case 1:return e=Dp(e.type,!0),e;default:return""}}function km(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 ta:return"Fragment";case ea:return"Portal";case Am:return"Profiler";case v1:return"StrictMode";case Rm:return"Suspense";case $m:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case iC:return(e.displayName||"Context")+".Consumer";case rC:return(e._context.displayName||"Context")+".Provider";case _1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x1:return t=e.displayName||null,t!==null?t:km(e.type)||"Memo";case Ii:t=e._payload,e=e._init;try{return km(e(t))}catch{}}return null}function nO(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 km(t);case 8:return t===v1?"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 vo(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function sC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function rO(e){var t=sC(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gd(e){e._valueTracker||(e._valueTracker=rO(e))}function aC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=sC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Of(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 Tm(e,t){var n=t.checked;return rt({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function W_(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=vo(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function lC(e,t){t=t.checked,t!=null&&y1(e,"checked",t,!1)}function Mm(e,t){lC(e,t);var n=vo(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Nm(e,t.type,n):t.hasOwnProperty("defaultValue")&&Nm(e,t.type,vo(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function q_(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Nm(e,t,n){(t!=="number"||Of(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var pu=Array.isArray;function _a(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=md.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Au={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},iO=["Webkit","ms","Moz","O"];Object.keys(Au).forEach(function(e){iO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Au[t]=Au[e]})});function fC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Au.hasOwnProperty(e)&&Au[e]?(""+t).trim():t+"px"}function hC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=fC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var oO=rt({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 Pm(e,t){if(t){if(oO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(J(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(J(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(J(61))}if(t.style!=null&&typeof t.style!="object")throw Error(J(62))}}function Im(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 Dm=null;function S1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var jm=null,xa=null,Sa=null;function Y_(e){if(e=Ic(e)){if(typeof jm!="function")throw Error(J(280));var t=e.stateNode;t&&(t=c0(t),jm(e.stateNode,e.type,t))}}function pC(e){xa?Sa?Sa.push(e):Sa=[e]:xa=e}function gC(){if(xa){var e=xa,t=Sa;if(Sa=xa=null,Y_(e),t)for(e=0;e>>=0,e===0?32:31-(mO(e)/yO|0)|0}var yd=64,vd=4194304;function gu(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 jf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=gu(a):(o&=s,o!==0&&(r=gu(o)))}else s=n&~i,s!==0?r=gu(s):o!==0&&(r=gu(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Oc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gr(t),e[t]=n}function SO(e,t){var n=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 r=e.eventTimes;for(e=e.expirationTimes;0=$u),ix=" ",ox=!1;function PC(e,t){switch(e){case"keyup":return YO.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var na=!1;function XO(e,t){switch(e){case"compositionend":return IC(t);case"keypress":return t.which!==32?null:(ox=!0,ix);case"textInput":return e=t.data,e===ix&&ox?null:e;default:return null}}function ZO(e,t){if(na)return e==="compositionend"||!k1&&PC(e,t)?(e=LC(),sf=A1=Zi=null,na=!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:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=ux(n)}}function UC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?UC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function VC(){for(var e=window,t=Of();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Of(e.document)}return t}function T1(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 aP(e){var t=VC(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&UC(n.ownerDocument.documentElement,n)){if(r!==null&&T1(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=cx(n,o);var s=cx(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,ra=null,Hm=null,Tu=null,Wm=!1;function dx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wm||ra==null||ra!==Of(r)||(r=ra,"selectionStart"in r&&T1(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Tu&&Xu(Tu,r)||(Tu=r,r=Vf(Hm,"onSelect"),0sa||(e.current=Xm[sa],Xm[sa]=null,sa--)}function We(e,t){sa++,Xm[sa]=e.current,e.current=t}var _o={},zt=Co(_o),fn=Co(!1),fs=_o;function Ka(e,t){var n=e.type.contextTypes;if(!n)return _o;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function hn(e){return e=e.childContextTypes,e!=null}function Bf(){Ye(fn),Ye(zt)}function vx(e,t,n){if(zt.current!==_o)throw Error(J(168));We(zt,t),We(fn,n)}function QC(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(J(108,nO(e)||"Unknown",i));return rt({},n,r)}function Hf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||_o,fs=zt.current,We(zt,e),We(fn,fn.current),!0}function _x(e,t,n){var r=e.stateNode;if(!r)throw Error(J(169));n?(e=QC(e,t,fs),r.__reactInternalMemoizedMergedChildContext=e,Ye(fn),Ye(zt),We(zt,e)):Ye(fn),We(fn,n)}var oi=null,d0=!1,Xp=!1;function XC(e){oi===null?oi=[e]:oi.push(e)}function _P(e){d0=!0,XC(e)}function Ao(){if(!Xp&&oi!==null){Xp=!0;var e=0,t=Ue;try{var n=oi;for(Ue=1;e>=s,i-=s,si=1<<32-gr(t)+i|n<C?(k=b,b=null):k=b.sibling;var A=f(m,b,v[C],x);if(A===null){b===null&&(b=k);break}e&&b&&A.alternate===null&&t(m,b),p=o(A,p,C),w===null?S=A:w.sibling=A,w=A,b=k}if(C===v.length)return n(m,b),Ze&&Lo(m,C),S;if(b===null){for(;CC?(k=b,b=null):k=b.sibling;var M=f(m,b,A.value,x);if(M===null){b===null&&(b=k);break}e&&b&&M.alternate===null&&t(m,b),p=o(M,p,C),w===null?S=M:w.sibling=M,w=M,b=k}if(A.done)return n(m,b),Ze&&Lo(m,C),S;if(b===null){for(;!A.done;C++,A=v.next())A=d(m,A.value,x),A!==null&&(p=o(A,p,C),w===null?S=A:w.sibling=A,w=A);return Ze&&Lo(m,C),S}for(b=r(m,b);!A.done;C++,A=v.next())A=h(b,m,C,A.value,x),A!==null&&(e&&A.alternate!==null&&b.delete(A.key===null?C:A.key),p=o(A,p,C),w===null?S=A:w.sibling=A,w=A);return e&&b.forEach(function($){return t(m,$)}),Ze&&Lo(m,C),S}function _(m,p,v,x){if(typeof v=="object"&&v!==null&&v.type===ta&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case pd:e:{for(var S=v.key,w=p;w!==null;){if(w.key===S){if(S=v.type,S===ta){if(w.tag===7){n(m,w.sibling),p=i(w,v.props.children),p.return=m,m=p;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ii&&Ax(S)===w.type){n(m,w.sibling),p=i(w,v.props),p.ref=Kl(m,w,v),p.return=m,m=p;break e}n(m,w);break}else t(m,w);w=w.sibling}v.type===ta?(p=is(v.props.children,m.mode,x,v.key),p.return=m,m=p):(x=pf(v.type,v.key,v.props,null,m.mode,x),x.ref=Kl(m,p,v),x.return=m,m=x)}return s(m);case ea:e:{for(w=v.key;p!==null;){if(p.key===w)if(p.tag===4&&p.stateNode.containerInfo===v.containerInfo&&p.stateNode.implementation===v.implementation){n(m,p.sibling),p=i(p,v.children||[]),p.return=m,m=p;break e}else{n(m,p);break}else t(m,p);p=p.sibling}p=og(v,m.mode,x),p.return=m,m=p}return s(m);case Ii:return w=v._init,_(m,p,w(v._payload),x)}if(pu(v))return g(m,p,v,x);if(Bl(v))return y(m,p,v,x);Cd(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,p!==null&&p.tag===6?(n(m,p.sibling),p=i(p,v),p.return=m,m=p):(n(m,p),p=ig(v,m.mode,x),p.return=m,m=p),s(m)):n(m,p)}return _}var Qa=oA(!0),sA=oA(!1),Dc={},jr=Co(Dc),tc=Co(Dc),nc=Co(Dc);function Bo(e){if(e===Dc)throw Error(J(174));return e}function F1(e,t){switch(We(nc,t),We(tc,e),We(jr,Dc),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Om(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Om(t,e)}Ye(jr),We(jr,t)}function Xa(){Ye(jr),Ye(tc),Ye(nc)}function aA(e){Bo(nc.current);var t=Bo(jr.current),n=Om(t,e.type);t!==n&&(We(tc,e),We(jr,n))}function U1(e){tc.current===e&&(Ye(jr),Ye(tc))}var et=Co(0);function Qf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.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 Zp=[];function V1(){for(var e=0;en?n:4,e(!0);var r=Jp.transition;Jp.transition={};try{e(!1),t()}finally{Ue=n,Jp.transition=r}}function bA(){return Qn().memoizedState}function bP(e,t,n){var r=uo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},EA(e))CA(t,n);else if(n=tA(e,t,n,r),n!==null){var i=Zt();mr(n,e,r,i),AA(n,t,r)}}function EP(e,t,n){var r=uo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(EA(e))CA(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,vr(a,s)){var l=t.interleaved;l===null?(i.next=i,D1(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=tA(e,t,i,r),n!==null&&(i=Zt(),mr(n,e,r,i),AA(n,t,r))}}function EA(e){var t=e.alternate;return e===tt||t!==null&&t===tt}function CA(e,t){Mu=Xf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function AA(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,b1(e,n)}}var Zf={readContext:Yn,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},CP={readContext:Yn,useCallback:function(e,t){return br().memoizedState=[e,t===void 0?null:t],e},useContext:Yn,useEffect:$x,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,cf(4194308,4,vA.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cf(4194308,4,e,t)},useInsertionEffect:function(e,t){return cf(4,2,e,t)},useMemo:function(e,t){var n=br();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=br();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=bP.bind(null,tt,e),[r.memoizedState,e]},useRef:function(e){var t=br();return e={current:e},t.memoizedState=e},useState:Rx,useDebugValue:q1,useDeferredValue:function(e){return br().memoizedState=e},useTransition:function(){var e=Rx(!1),t=e[0];return e=wP.bind(null,e[1]),br().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=tt,i=br();if(Ze){if(n===void 0)throw Error(J(407));n=n()}else{if(n=t(),Rt===null)throw Error(J(349));ps&30||cA(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,$x(fA.bind(null,r,o,e),[e]),r.flags|=2048,oc(9,dA.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=br(),t=Rt.identifierPrefix;if(Ze){var n=ai,r=si;n=(r&~(1<<32-gr(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=rc++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Mr]=t,e[ec]=r,PA(e,t,!1,!1),t.stateNode=e;e:{switch(s=Im(n,r),n){case"dialog":qe("cancel",e),qe("close",e),i=r;break;case"iframe":case"object":case"embed":qe("load",e),i=r;break;case"video":case"audio":for(i=0;iJa&&(t.flags|=128,r=!0,Yl(o,!1),t.lanes=4194304)}else{if(!r)if(e=Qf(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Yl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!Ze)return It(t),null}else 2*ct()-o.renderingStartTime>Ja&&n!==1073741824&&(t.flags|=128,r=!0,Yl(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ct(),t.sibling=null,n=et.current,We(et,r?n&1|2:n&1),t):(It(t),null);case 22:case 23:return Z1(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Cn&1073741824&&(It(t),t.subtreeFlags&6&&(t.flags|=8192)):It(t),null;case 24:return null;case 25:return null}throw Error(J(156,t.tag))}function LP(e,t){switch(N1(t),t.tag){case 1:return hn(t.type)&&Bf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xa(),Ye(fn),Ye(zt),V1(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return U1(t),null;case 13:if(Ye(et),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(J(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(et),null;case 4:return Xa(),null;case 10:return I1(t.type._context),null;case 22:case 23:return Z1(),null;case 24:return null;default:return null}}var Rd=!1,Vt=!1,OP=typeof WeakSet=="function"?WeakSet:Set,ce=null;function ca(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){st(e,t,r)}else n.current=null}function uy(e,t,n){try{n()}catch(r){st(e,t,r)}}var Dx=!1;function PP(e,t){if(qm=Ff,e=VC(),T1(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(a=s+i),d!==o||r!==0&&d.nodeType!==3||(l=s+r),d.nodeType===3&&(s+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===e)break t;if(f===n&&++u===i&&(a=s),f===o&&++c===r&&(l=s),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gm={focusedElem:e,selectionRange:n},Ff=!1,ce=t;ce!==null;)if(t=ce,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ce=e;else for(;ce!==null;){t=ce;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,_=g.memoizedState,m=t.stateNode,p=m.getSnapshotBeforeUpdate(t.elementType===t.type?y:or(t.type,y),_);m.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(J(163))}}catch(x){st(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,ce=e;break}ce=t.return}return g=Dx,Dx=!1,g}function Nu(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&uy(t,n,o)}i=i.next}while(i!==r)}}function p0(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cy(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function jA(e){var t=e.alternate;t!==null&&(e.alternate=null,jA(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Mr],delete t[ec],delete t[Qm],delete t[yP],delete t[vP])),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 FA(e){return e.tag===5||e.tag===3||e.tag===4}function jx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||FA(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 dy(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=zf));else if(r!==4&&(e=e.child,e!==null))for(dy(e,t,n),e=e.sibling;e!==null;)dy(e,t,n),e=e.sibling}function fy(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(fy(e,t,n),e=e.sibling;e!==null;)fy(e,t,n),e=e.sibling}var Mt=null,ar=!1;function Mi(e,t,n){for(n=n.child;n!==null;)UA(e,t,n),n=n.sibling}function UA(e,t,n){if(Dr&&typeof Dr.onCommitFiberUnmount=="function")try{Dr.onCommitFiberUnmount(s0,n)}catch{}switch(n.tag){case 5:Vt||ca(n,t);case 6:var r=Mt,i=ar;Mt=null,Mi(e,t,n),Mt=r,ar=i,Mt!==null&&(ar?(e=Mt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Mt.removeChild(n.stateNode));break;case 18:Mt!==null&&(ar?(e=Mt,n=n.stateNode,e.nodeType===8?Qp(e.parentNode,n):e.nodeType===1&&Qp(e,n),Yu(e)):Qp(Mt,n.stateNode));break;case 4:r=Mt,i=ar,Mt=n.stateNode.containerInfo,ar=!0,Mi(e,t,n),Mt=r,ar=i;break;case 0:case 11:case 14:case 15:if(!Vt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&(o&2||o&4)&&uy(n,t,s),i=i.next}while(i!==r)}Mi(e,t,n);break;case 1:if(!Vt&&(ca(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){st(n,t,a)}Mi(e,t,n);break;case 21:Mi(e,t,n);break;case 22:n.mode&1?(Vt=(r=Vt)||n.memoizedState!==null,Mi(e,t,n),Vt=r):Mi(e,t,n);break;default:Mi(e,t,n)}}function Fx(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new OP),t.forEach(function(r){var i=HP.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function rr(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=ct()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*DP(r/1960))-r,10e?16:e,Ji===null)var r=!1;else{if(e=Ji,Ji=null,th=0,Pe&6)throw Error(J(331));var i=Pe;for(Pe|=4,ce=e.current;ce!==null;){var o=ce,s=o.child;if(ce.flags&16){var a=o.deletions;if(a!==null){for(var l=0;lct()-Q1?rs(e,0):Y1|=n),pn(e,t)}function KA(e,t){t===0&&(e.mode&1?(t=vd,vd<<=1,!(vd&130023424)&&(vd=4194304)):t=1);var n=Zt();e=pi(e,t),e!==null&&(Oc(e,t,n),pn(e,n))}function BP(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),KA(e,n)}function HP(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(J(314))}r!==null&&r.delete(t),KA(e,n)}var YA;YA=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fn.current)dn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return dn=!1,MP(e,t,n);dn=!!(e.flags&131072)}else dn=!1,Ze&&t.flags&1048576&&ZC(t,qf,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;df(e,t),e=t.pendingProps;var i=Ka(t,zt.current);ba(t,n),i=B1(null,t,r,e,i,n);var o=H1();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,hn(r)?(o=!0,Hf(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,j1(t),i.updater=f0,t.stateNode=i,i._reactInternals=t,ny(t,r,e,n),t=oy(null,t,r,!0,o,n)):(t.tag=0,Ze&&o&&M1(t),Kt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(df(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=qP(r),e=or(r,e),i){case 0:t=iy(null,t,r,e,n);break e;case 1:t=Ox(null,t,r,e,n);break e;case 11:t=Nx(null,t,r,e,n);break e;case 14:t=Lx(null,t,r,or(r.type,e),n);break e}throw Error(J(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:or(r,i),iy(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:or(r,i),Ox(e,t,r,i,n);case 3:e:{if(NA(t),e===null)throw Error(J(387));r=t.pendingProps,o=t.memoizedState,i=o.element,nA(e,t),Yf(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=Za(Error(J(423)),t),t=Px(e,t,r,n,i);break e}else if(r!==i){i=Za(Error(J(424)),t),t=Px(e,t,r,n,i);break e}else for(An=so(t.stateNode.containerInfo.firstChild),$n=t,Ze=!0,ur=null,n=sA(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ya(),r===i){t=gi(e,t,n);break e}Kt(e,t,r,n)}t=t.child}return t;case 5:return aA(t),e===null&&Jm(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Km(r,i)?s=null:o!==null&&Km(r,o)&&(t.flags|=32),MA(e,t),Kt(e,t,s,n),t.child;case 6:return e===null&&Jm(t),null;case 13:return LA(e,t,n);case 4:return F1(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):Kt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:or(r,i),Nx(e,t,r,i,n);case 7:return Kt(e,t,t.pendingProps,n),t.child;case 8:return Kt(e,t,t.pendingProps.children,n),t.child;case 12:return Kt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,We(Gf,r._currentValue),r._currentValue=s,o!==null)if(vr(o.value,s)){if(o.children===i.children&&!fn.current){t=gi(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=ci(-1,n&-n),l.tag=2;var u=o.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}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ey(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(J(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),ey(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Kt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ba(t,n),i=Yn(i),r=r(i),t.flags|=1,Kt(e,t,r,n),t.child;case 14:return r=t.type,i=or(r,t.pendingProps),i=or(r.type,i),Lx(e,t,r,i,n);case 15:return kA(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:or(r,i),df(e,t),t.tag=1,hn(r)?(e=!0,Hf(t)):e=!1,ba(t,n),iA(t,r,i),ny(t,r,i,n),oy(null,t,r,!0,e,n);case 19:return OA(e,t,n);case 22:return TA(e,t,n)}throw Error(J(156,t.tag))};function QA(e,t){return wC(e,t)}function WP(e,t,n,r){this.tag=e,this.key=n,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=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wn(e,t,n,r){return new WP(e,t,n,r)}function e2(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qP(e){if(typeof e=="function")return e2(e)?1:0;if(e!=null){if(e=e.$$typeof,e===_1)return 11;if(e===x1)return 14}return 2}function co(e,t){var n=e.alternate;return n===null?(n=Wn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function pf(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")e2(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case ta:return is(n.children,i,o,t);case v1:s=8,i|=8;break;case Am:return e=Wn(12,n,t,i|2),e.elementType=Am,e.lanes=o,e;case Rm:return e=Wn(13,n,t,i),e.elementType=Rm,e.lanes=o,e;case $m:return e=Wn(19,n,t,i),e.elementType=$m,e.lanes=o,e;case oC:return m0(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rC:s=10;break e;case iC:s=9;break e;case _1:s=11;break e;case x1:s=14;break e;case Ii:s=16,r=null;break e}throw Error(J(130,e==null?e:typeof e,""))}return t=Wn(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function is(e,t,n,r){return e=Wn(7,e,r,t),e.lanes=n,e}function m0(e,t,n,r){return e=Wn(22,e,r,t),e.elementType=oC,e.lanes=n,e.stateNode={isHidden:!1},e}function ig(e,t,n){return e=Wn(6,e,null,t),e.lanes=n,e}function og(e,t,n){return t=Wn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function GP(e,t,n,r,i){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=Fp(0),this.expirationTimes=Fp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fp(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function t2(e,t,n,r,i,o,s,a,l){return e=new GP(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=Wn(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},j1(o),e}function KP(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(eR)}catch(e){console.error(e)}}eR(),ZE.exports=Mn;var tR=ZE.exports;const JP=Si(tR);var Gx=tR;Em.createRoot=Gx.createRoot,Em.hydrateRoot=Gx.hydrateRoot;function eI(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var sg={exports:{}};const tI={},nI=Object.freeze(Object.defineProperty({__proto__:null,default:tI},Symbol.toStringTag,{value:"Module"})),rI=RL(nI);var Kx;function S0(){return Kx||(Kx=1,function(e,t){(function(n,r){e.exports=r()})(Uo,function(){var n=n||function(r,i){var o;if(typeof window<"u"&&window.crypto&&(o=window.crypto),typeof self<"u"&&self.crypto&&(o=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(o=globalThis.crypto),!o&&typeof window<"u"&&window.msCrypto&&(o=window.msCrypto),!o&&typeof Uo<"u"&&Uo.crypto&&(o=Uo.crypto),!o&&typeof eI=="function")try{o=rI}catch{}var s=function(){if(o){if(typeof o.getRandomValues=="function")try{return o.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof o.randomBytes=="function")try{return o.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function p(){}return function(v){var x;return p.prototype=v,x=new p,p.prototype=null,x}}(),l={},u=l.lib={},c=u.Base=function(){return{extend:function(p){var v=a(this);return p&&v.mixIn(p),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var p=this.extend();return p.init.apply(p,arguments),p},init:function(){},mixIn:function(p){for(var v in p)p.hasOwnProperty(v)&&(this[v]=p[v]);p.hasOwnProperty("toString")&&(this.toString=p.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=c.extend({init:function(p,v){p=this.words=p||[],v!=i?this.sigBytes=v:this.sigBytes=p.length*4},toString:function(p){return(p||h).stringify(this)},concat:function(p){var v=this.words,x=p.words,S=this.sigBytes,w=p.sigBytes;if(this.clamp(),S%4)for(var b=0;b>>2]>>>24-b%4*8&255;v[S+b>>>2]|=C<<24-(S+b)%4*8}else for(var k=0;k>>2]=x[k>>>2];return this.sigBytes+=w,this},clamp:function(){var p=this.words,v=this.sigBytes;p[v>>>2]&=4294967295<<32-v%4*8,p.length=r.ceil(v/4)},clone:function(){var p=c.clone.call(this);return p.words=this.words.slice(0),p},random:function(p){for(var v=[],x=0;x>>2]>>>24-w%4*8&255;S.push((b>>>4).toString(16)),S.push((b&15).toString(16))}return S.join("")},parse:function(p){for(var v=p.length,x=[],S=0;S>>3]|=parseInt(p.substr(S,2),16)<<24-S%8*4;return new d.init(x,v/2)}},g=f.Latin1={stringify:function(p){for(var v=p.words,x=p.sigBytes,S=[],w=0;w>>2]>>>24-w%4*8&255;S.push(String.fromCharCode(b))}return S.join("")},parse:function(p){for(var v=p.length,x=[],S=0;S>>2]|=(p.charCodeAt(S)&255)<<24-S%4*8;return new d.init(x,v)}},y=f.Utf8={stringify:function(p){try{return decodeURIComponent(escape(g.stringify(p)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(p){return g.parse(unescape(encodeURIComponent(p)))}},_=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(p){typeof p=="string"&&(p=y.parse(p)),this._data.concat(p),this._nDataBytes+=p.sigBytes},_process:function(p){var v,x=this._data,S=x.words,w=x.sigBytes,b=this.blockSize,C=b*4,k=w/C;p?k=r.ceil(k):k=r.max((k|0)-this._minBufferSize,0);var A=k*b,M=r.min(A*4,w);if(A){for(var $=0;$>>7)^(k<<14|k>>>18)^k>>>3,M=d[C-2],$=(M<<15|M>>>17)^(M<<13|M>>>19)^M>>>10;d[C]=A+d[C-7]+$+d[C-16]}var T=x&S^~x&w,D=_&m^_&p^m&p,O=(_<<30|_>>>2)^(_<<19|_>>>13)^(_<<10|_>>>22),H=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),Q=b+H+T+c[C]+d[C],U=O+D;b=w,w=S,S=x,x=v+Q|0,v=p,p=m,m=_,_=Q+U|0}y[0]=y[0]+_|0,y[1]=y[1]+m|0,y[2]=y[2]+p|0,y[3]=y[3]+v|0,y[4]=y[4]+x|0,y[5]=y[5]+S|0,y[6]=y[6]+w|0,y[7]=y[7]+b|0},_doFinalize:function(){var h=this._data,g=h.words,y=this._nDataBytes*8,_=h.sigBytes*8;return g[_>>>5]|=128<<24-_%32,g[(_+64>>>9<<4)+14]=r.floor(y/4294967296),g[(_+64>>>9<<4)+15]=y,h.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var h=a.clone.call(this);return h._hash=this._hash.clone(),h}});i.SHA256=a._createHelper(f),i.HmacSHA256=a._createHmacHelper(f)}(Math),n.SHA256})})(nR);var sI=nR.exports;const aI=Si(sI);var rR={exports:{}};(function(e,t){(function(n,r){e.exports=r(S0())})(Uo,function(n){return function(){var r=n,i=r.lib,o=i.WordArray,s=r.enc;s.Base64={stringify:function(l){var u=l.words,c=l.sigBytes,d=this._map;l.clamp();for(var f=[],h=0;h>>2]>>>24-h%4*8&255,y=u[h+1>>>2]>>>24-(h+1)%4*8&255,_=u[h+2>>>2]>>>24-(h+2)%4*8&255,m=g<<16|y<<8|_,p=0;p<4&&h+p*.75>>6*(3-p)&63));var v=d.charAt(64);if(v)for(;f.length%4;)f.push(v);return f.join("")},parse:function(l){var u=l.length,c=this._map,d=this._reverseMap;if(!d){d=this._reverseMap=[];for(var f=0;f>>6-h%4*2,_=g|y;d[f>>>2]|=_<<24-f%4*8,f++}return o.create(d,f)}}(),n.enc.Base64})})(rR);var lI=rR.exports;const Yx=Si(lI);var iR={exports:{}};(function(e,t){(function(n,r){e.exports=r(S0())})(Uo,function(n){return n.enc.Utf8})})(iR);var uI=iR.exports;const cI=Si(uI);function yy(e){this.message=e}yy.prototype=new Error,yy.prototype.name="InvalidCharacterError";var Qx=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new yy("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,s="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?s+=String.fromCharCode(255&n>>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return s};function dI(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(Qx(n).replace(/(.)/g,function(r,i){var o=i.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch{return Qx(t)}}function ih(e){this.message=e}function fI(e,t){if(typeof e!="string")throw new ih("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(dI(e.split(".")[n]))}catch(r){throw new ih("Invalid token specified: "+r.message)}}ih.prototype=new Error,ih.prototype.name="InvalidTokenError";var hI={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},Er,Cr,oh=(e=>(e[e.NONE=0]="NONE",e[e.ERROR=1]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=3]="INFO",e[e.DEBUG=4]="DEBUG",e))(oh||{});(e=>{function t(){Er=3,Cr=hI}e.reset=t;function n(i){if(!(0<=i&&i<=4))throw new Error("Invalid log level");Er=i}e.setLevel=n;function r(i){Cr=i}e.setLogger=r})(oh||(oh={}));var be=class{constructor(e){this._name=e}debug(...e){Er>=4&&Cr.debug(be._format(this._name,this._method),...e)}info(...e){Er>=3&&Cr.info(be._format(this._name,this._method),...e)}warn(...e){Er>=2&&Cr.warn(be._format(this._name,this._method),...e)}error(...e){Er>=1&&Cr.error(be._format(this._name,this._method),...e)}throw(e){throw this.error(e),e}create(e){const t=Object.create(this);return t._method=e,t.debug("begin"),t}static createStatic(e,t){const n=new be(`${e}.${t}`);return n.debug("begin"),n}static _format(e,t){const n=`[${e}]`;return t?`${n} ${t}:`:n}static debug(e,...t){Er>=4&&Cr.debug(be._format(e),...t)}static info(e,...t){Er>=3&&Cr.info(be._format(e),...t)}static warn(e,...t){Er>=2&&Cr.warn(be._format(e),...t)}static error(e,...t){Er>=1&&Cr.error(be._format(e),...t)}};oh.reset();var pI="10000000-1000-4000-8000-100000000000",Or=class{static _randomWord(){return oI.lib.WordArray.random(1).words[0]}static generateUUIDv4(){return pI.replace(/[018]/g,t=>(+t^Or._randomWord()&15>>+t/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return Or.generateUUIDv4()+Or.generateUUIDv4()+Or.generateUUIDv4()}static generateCodeChallenge(e){try{const t=aI(e);return Yx.stringify(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){throw be.error("CryptoUtils.generateCodeChallenge",t),t}}static generateBasicAuth(e,t){const n=cI.parse([e,t].join(":"));return Yx.stringify(n)}},ji=class{constructor(e){this._name=e,this._logger=new be(`Event('${this._name}')`),this._callbacks=[]}addHandler(e){return this._callbacks.push(e),()=>this.removeHandler(e)}removeHandler(e){const t=this._callbacks.lastIndexOf(e);t>=0&&this._callbacks.splice(t,1)}raise(...e){this._logger.debug("raise:",...e);for(const t of this._callbacks)t(...e)}},vy=class{static decode(e){try{return fI(e)}catch(t){throw be.error("JwtUtils.decode",t),t}}},Xx=class{static center({...e}){var t,n,r;return e.width==null&&(e.width=(t=[800,720,600,480].find(i=>i<=window.outerWidth/1.618))!=null?t:360),(n=e.left)!=null||(e.left=Math.max(0,Math.round(window.screenX+(window.outerWidth-e.width)/2))),e.height!=null&&((r=e.top)!=null||(e.top=Math.max(0,Math.round(window.screenY+(window.outerHeight-e.height)/2)))),e}static serialize(e){return Object.entries(e).filter(([,t])=>t!=null).map(([t,n])=>`${t}=${typeof n!="boolean"?n:n?"yes":"no"}`).join(",")}},Gn=class extends ji{constructor(){super(...arguments),this._logger=new be(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const e=this._expiration-Gn.getEpochTime();this._logger.debug("timer completes in",e),this._expiration<=Gn.getEpochTime()&&(this.cancel(),super.raise())}}static getEpochTime(){return Math.floor(Date.now()/1e3)}init(e){const t=this._logger.create("init");e=Math.max(Math.floor(e),1);const n=Gn.getEpochTime()+e;if(this.expiration===n&&this._timerHandle){t.debug("skipping since already initialized for expiration at",this.expiration);return}this.cancel(),t.debug("using duration",e),this._expiration=n;const r=Math.min(e,5);this._timerHandle=setInterval(this._callback,r*1e3)}get expiration(){return this._expiration}cancel(){this._logger.create("cancel"),this._timerHandle&&(clearInterval(this._timerHandle),this._timerHandle=null)}},_y=class{static readParams(e,t="query"){if(!e)throw new TypeError("Invalid URL");const r=new URL(e,"http://127.0.0.1")[t==="fragment"?"hash":"search"];return new URLSearchParams(r.slice(1))}},xy=";",ys=class extends Error{constructor(e,t){var n,r,i;if(super(e.error_description||e.error||""),this.form=t,this.name="ErrorResponse",!e.error)throw be.error("ErrorResponse","No error passed"),new Error("No error passed");this.error=e.error,this.error_description=(n=e.error_description)!=null?n:null,this.error_uri=(r=e.error_uri)!=null?r:null,this.state=e.userState,this.session_state=(i=e.session_state)!=null?i:null,this.url_state=e.url_state}},o2=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},gI=class{constructor(e){this._logger=new be("AccessTokenEvents"),this._expiringTimer=new Gn("Access token expiring"),this._expiredTimer=new Gn("Access token expired"),this._expiringNotificationTimeInSeconds=e.expiringNotificationTimeInSeconds}load(e){const t=this._logger.create("load");if(e.access_token&&e.expires_in!==void 0){const n=e.expires_in;if(t.debug("access token present, remaining duration:",n),n>0){let i=n-this._expiringNotificationTimeInSeconds;i<=0&&(i=1),t.debug("registering expiring timer, raising in",i,"seconds"),this._expiringTimer.init(i)}else t.debug("canceling existing expiring timer because we're past expiration."),this._expiringTimer.cancel();const r=n+1;t.debug("registering expired timer, raising in",r,"seconds"),this._expiredTimer.init(r)}else this._expiringTimer.cancel(),this._expiredTimer.cancel()}unload(){this._logger.debug("unload: canceling existing access token timers"),this._expiringTimer.cancel(),this._expiredTimer.cancel()}addAccessTokenExpiring(e){return this._expiringTimer.addHandler(e)}removeAccessTokenExpiring(e){this._expiringTimer.removeHandler(e)}addAccessTokenExpired(e){return this._expiredTimer.addHandler(e)}removeAccessTokenExpired(e){this._expiredTimer.removeHandler(e)}},mI=class{constructor(e,t,n,r,i){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=i,this._logger=new be("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=s=>{s.origin===this._frame_origin&&s.source===this._frame.contentWindow&&(s.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):s.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(s.data+" message from check session op iframe"))};const o=new URL(n);this._frame_origin=o.origin,this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="fixed",this._frame.style.left="-1000px",this._frame.style.top="0",this._frame.width="0",this._frame.height="0",this._frame.src=o.href}load(){return new Promise(e=>{this._frame.onload=()=>{e()},window.document.body.appendChild(this._frame),window.addEventListener("message",this._message,!1)})}start(e){if(this._session_state===e)return;this._logger.create("start"),this.stop(),this._session_state=e;const t=()=>{!this._frame.contentWindow||!this._session_state||this._frame.contentWindow.postMessage(this._client_id+" "+this._session_state,this._frame_origin)};t(),this._timer=setInterval(t,this._intervalInSeconds*1e3)}stop(){this._logger.create("stop"),this._session_state=null,this._timer&&(clearInterval(this._timer),this._timer=null)}},oR=class{constructor(){this._logger=new be("InMemoryWebStorage"),this._data={}}clear(){this._logger.create("clear"),this._data={}}getItem(e){return this._logger.create(`getItem('${e}')`),this._data[e]}setItem(e,t){this._logger.create(`setItem('${e}')`),this._data[e]=t}removeItem(e){this._logger.create(`removeItem('${e}')`),delete this._data[e]}get length(){return Object.getOwnPropertyNames(this._data).length}key(e){return Object.getOwnPropertyNames(this._data)[e]}},s2=class{constructor(e=[],t=null,n={}){this._jwtHandler=t,this._extraHeaders=n,this._logger=new be("JsonService"),this._contentTypes=[],this._contentTypes.push(...e,"application/json"),t&&this._contentTypes.push("application/jwt")}async fetchWithTimeout(e,t={}){const{timeoutInSeconds:n,...r}=t;if(!n)return await fetch(e,r);const i=new AbortController,o=setTimeout(()=>i.abort(),n*1e3);try{return await fetch(e,{...t,signal:i.signal})}catch(s){throw s instanceof DOMException&&s.name==="AbortError"?new o2("Network timed out"):s}finally{clearTimeout(o)}}async getJson(e,{token:t,credentials:n}={}){const r=this._logger.create("getJson"),i={Accept:this._contentTypes.join(", ")};t&&(r.debug("token passed, setting Authorization header"),i.Authorization="Bearer "+t),this.appendExtraHeaders(i);let o;try{r.debug("url:",e),o=await this.fetchWithTimeout(e,{method:"GET",headers:i,credentials:n})}catch(l){throw r.error("Network Error"),l}r.debug("HTTP response received, status",o.status);const s=o.headers.get("Content-Type");if(s&&!this._contentTypes.find(l=>s.startsWith(l))&&r.throw(new Error(`Invalid response Content-Type: ${s??"undefined"}, from URL: ${e}`)),o.ok&&this._jwtHandler&&(s!=null&&s.startsWith("application/jwt")))return await this._jwtHandler(await o.text());let a;try{a=await o.json()}catch(l){throw r.error("Error parsing JSON response",l),o.ok?l:new Error(`${o.statusText} (${o.status})`)}if(!o.ok)throw r.error("Error from server:",a),a.error?new ys(a):new Error(`${o.statusText} (${o.status}): ${JSON.stringify(a)}`);return a}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:i}){const o=this._logger.create("postForm"),s={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"};n!==void 0&&(s.Authorization="Basic "+n),this.appendExtraHeaders(s);let a;try{o.debug("url:",e),a=await this.fetchWithTimeout(e,{method:"POST",headers:s,body:t,timeoutInSeconds:r,credentials:i})}catch(d){throw o.error("Network error"),d}o.debug("HTTP response received, status",a.status);const l=a.headers.get("Content-Type");if(l&&!this._contentTypes.find(d=>l.startsWith(d)))throw new Error(`Invalid response Content-Type: ${l??"undefined"}, from URL: ${e}`);const u=await a.text();let c={};if(u)try{c=JSON.parse(u)}catch(d){throw o.error("Error parsing JSON response",d),a.ok?d:new Error(`${a.statusText} (${a.status})`)}if(!a.ok)throw o.error("Error from server:",c),c.error?new ys(c,t):new Error(`${a.statusText} (${a.status}): ${JSON.stringify(c)}`);return c}appendExtraHeaders(e){const t=this._logger.create("appendExtraHeaders"),n=Object.keys(this._extraHeaders),r=["authorization","accept","content-type"];n.length!==0&&n.forEach(i=>{if(r.includes(i.toLocaleLowerCase())){t.warn("Protected header could not be overridden",i,r);return}const o=typeof this._extraHeaders[i]=="function"?this._extraHeaders[i]():this._extraHeaders[i];o&&o!==""&&(e[i]=o)})}},yI=class{constructor(e){this._settings=e,this._logger=new be("MetadataService"),this._signingKeys=null,this._metadata=null,this._metadataUrl=this._settings.metadataUrl,this._jsonService=new s2(["application/jwk-set+json"],null,this._settings.extraHeaders),this._settings.signingKeys&&(this._logger.debug("using signingKeys from settings"),this._signingKeys=this._settings.signingKeys),this._settings.metadata&&(this._logger.debug("using metadata from settings"),this._metadata=this._settings.metadata),this._settings.fetchRequestCredentials&&(this._logger.debug("using fetchRequestCredentials from settings"),this._fetchRequestCredentials=this._settings.fetchRequestCredentials)}resetSigningKeys(){this._signingKeys=null}async getMetadata(){const e=this._logger.create("getMetadata");if(this._metadata)return e.debug("using cached values"),this._metadata;if(!this._metadataUrl)throw e.throw(new Error("No authority or metadataUrl configured on settings")),null;e.debug("getting metadata from",this._metadataUrl);const t=await this._jsonService.getJson(this._metadataUrl,{credentials:this._fetchRequestCredentials});return e.debug("merging remote JSON with seed metadata"),this._metadata=Object.assign({},this._settings.metadataSeed,t),this._metadata}getIssuer(){return this._getMetadataProperty("issuer")}getAuthorizationEndpoint(){return this._getMetadataProperty("authorization_endpoint")}getUserInfoEndpoint(){return this._getMetadataProperty("userinfo_endpoint")}getTokenEndpoint(e=!0){return this._getMetadataProperty("token_endpoint",e)}getCheckSessionIframe(){return this._getMetadataProperty("check_session_iframe",!0)}getEndSessionEndpoint(){return this._getMetadataProperty("end_session_endpoint",!0)}getRevocationEndpoint(e=!0){return this._getMetadataProperty("revocation_endpoint",e)}getKeysEndpoint(e=!0){return this._getMetadataProperty("jwks_uri",e)}async _getMetadataProperty(e,t=!1){const n=this._logger.create(`_getMetadataProperty('${e}')`),r=await this.getMetadata();if(n.debug("resolved"),r[e]===void 0){if(t===!0){n.warn("Metadata does not contain optional property");return}n.throw(new Error("Metadata does not contain property "+e))}return r[e]}async getSigningKeys(){const e=this._logger.create("getSigningKeys");if(this._signingKeys)return e.debug("returning signingKeys from cache"),this._signingKeys;const t=await this.getKeysEndpoint(!1);e.debug("got jwks_uri",t);const n=await this._jsonService.getJson(t);if(e.debug("got key set",n),!Array.isArray(n.keys))throw e.throw(new Error("Missing keys on keyset")),null;return this._signingKeys=n.keys,this._signingKeys}},a2=class{constructor({prefix:e="oidc.",store:t=localStorage}={}){this._logger=new be("WebStorageStateStore"),this._store=t,this._prefix=e}async set(e,t){this._logger.create(`set('${e}')`),e=this._prefix+e,await this._store.setItem(e,t)}async get(e){return this._logger.create(`get('${e}')`),e=this._prefix+e,await this._store.getItem(e)}async remove(e){this._logger.create(`remove('${e}')`),e=this._prefix+e;const t=await this._store.getItem(e);return await this._store.removeItem(e),t}async getAllKeys(){this._logger.create("getAllKeys");const e=await this._store.length,t=[];for(let n=0;n{const r=this._logger.create("_getClaimsFromJwt");try{const i=vy.decode(n);return r.debug("JWT decoding successful"),i}catch(i){throw r.error("Error parsing JWT response"),i}},this._jsonService=new s2(void 0,this._getClaimsFromJwt,this._settings.extraHeaders)}async getClaims(e){const t=this._logger.create("getClaims");e||this._logger.throw(new Error("No token passed"));const n=await this._metadataService.getUserInfoEndpoint();t.debug("got userinfo url",n);const r=await this._jsonService.getJson(n,{token:e,credentials:this._settings.fetchRequestCredentials});return t.debug("got claims",r),r}},sR=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new be("TokenClient"),this._jsonService=new s2(this._settings.revokeTokenAdditionalContentTypes,null,this._settings.extraHeaders)}async exchangeCode({grant_type:e="authorization_code",redirect_uri:t=this._settings.redirect_uri,client_id:n=this._settings.client_id,client_secret:r=this._settings.client_secret,...i}){const o=this._logger.create("exchangeCode");n||o.throw(new Error("A client_id is required")),t||o.throw(new Error("A redirect_uri is required")),i.code||o.throw(new Error("A code is required"));const s=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[c,d]of Object.entries(i))d!=null&&s.set(c,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!r)throw o.throw(new Error("A client_secret is required")),null;a=Or.generateBasicAuth(n,r);break;case"client_secret_post":s.append("client_id",n),r&&s.append("client_secret",r);break}const l=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:s,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeCredentials({grant_type:e="password",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,scope:r=this._settings.scope,...i}){const o=this._logger.create("exchangeCredentials");t||o.throw(new Error("A client_id is required"));const s=new URLSearchParams({grant_type:e,scope:r});for(const[c,d]of Object.entries(i))d!=null&&s.set(c,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw o.throw(new Error("A client_secret is required")),null;a=Or.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const l=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:s,basicAuth:a,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async exchangeRefreshToken({grant_type:e="refresh_token",client_id:t=this._settings.client_id,client_secret:n=this._settings.client_secret,timeoutInSeconds:r,...i}){const o=this._logger.create("exchangeRefreshToken");t||o.throw(new Error("A client_id is required")),i.refresh_token||o.throw(new Error("A refresh_token is required"));const s=new URLSearchParams({grant_type:e});for(const[c,d]of Object.entries(i))Array.isArray(d)?d.forEach(f=>s.append(c,f)):d!=null&&s.set(c,d);let a;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw o.throw(new Error("A client_secret is required")),null;a=Or.generateBasicAuth(t,n);break;case"client_secret_post":s.append("client_id",t),n&&s.append("client_secret",n);break}const l=await this._metadataService.getTokenEndpoint(!1);o.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:s,basicAuth:a,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials});return o.debug("got response"),u}async revoke(e){var t;const n=this._logger.create("revoke");e.token||n.throw(new Error("A token is required"));const r=await this._metadataService.getRevocationEndpoint(!1);n.debug(`got revocation endpoint, revoking ${(t=e.token_type_hint)!=null?t:"default token type"}`);const i=new URLSearchParams;for(const[o,s]of Object.entries(e))s!=null&&i.set(o,s);i.set("client_id",this._settings.client_id),this._settings.client_secret&&i.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(r,{body:i}),n.debug("got response")}},CI=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new be("ResponseValidator"),this._userInfoService=new EI(this._settings,this._metadataService),this._tokenClient=new sR(this._settings,this._metadataService)}async validateSigninResponse(e,t){const n=this._logger.create("validateSigninResponse");this._processSigninState(e,t),n.debug("state processed"),await this._processCode(e,t),n.debug("code processed"),e.isOpenId&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t==null?void 0:t.skipUserInfo,e.isOpenId),n.debug("claims processed")}async validateCredentialsResponse(e,t){const n=this._logger.create("validateCredentialsResponse");e.isOpenId&&e.id_token&&this._validateIdTokenAttributes(e),n.debug("tokens validated"),await this._processClaims(e,t,e.isOpenId),n.debug("claims processed")}async validateRefreshResponse(e,t){var n,r;const i=this._logger.create("validateRefreshResponse");e.userState=t.data,(n=e.session_state)!=null||(e.session_state=t.session_state),(r=e.scope)!=null||(e.scope=t.scope),e.isOpenId&&e.id_token&&(this._validateIdTokenAttributes(e,t.id_token),i.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const o=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,o),i.debug("claims processed")}validateSignoutResponse(e,t){const n=this._logger.create("validateSignoutResponse");if(t.id!==e.state&&n.throw(new Error("State does not match")),n.debug("state validated"),e.userState=t.data,e.error)throw n.warn("Response was error",e.error),new ys(e)}_processSigninState(e,t){var n;const r=this._logger.create("_processSigninState");if(t.id!==e.state&&r.throw(new Error("State does not match")),t.client_id||r.throw(new Error("No client_id on state")),t.authority||r.throw(new Error("No authority on state")),this._settings.authority!==t.authority&&r.throw(new Error("authority mismatch on settings vs. signin state")),this._settings.client_id&&this._settings.client_id!==t.client_id&&r.throw(new Error("client_id mismatch on settings vs. signin state")),r.debug("state validated"),e.userState=t.data,e.url_state=t.url_state,(n=e.scope)!=null||(e.scope=t.scope),e.error)throw r.warn("Response was error",e.error),new ys(e);t.code_verifier&&!e.code&&r.throw(new Error("Expected code in response"))}async _processClaims(e,t=!1,n=!0){const r=this._logger.create("_processClaims");if(e.profile=this._claimsService.filterProtocolClaims(e.profile),t||!this._settings.loadUserInfo||!e.access_token){r.debug("not loading user info");return}r.debug("loading user info");const i=await this._userInfoService.getClaims(e.access_token);r.debug("user info claims received from user info endpoint"),n&&i.sub!==e.profile.sub&&r.throw(new Error("subject from UserInfo response does not match subject in ID Token")),e.profile=this._claimsService.mergeClaims(e.profile,this._claimsService.filterProtocolClaims(i)),r.debug("user info claims received, updated profile:",e.profile)}async _processCode(e,t){const n=this._logger.create("_processCode");if(e.code){n.debug("Validating code");const r=await this._tokenClient.exchangeCode({client_id:t.client_id,client_secret:t.client_secret,code:e.code,redirect_uri:t.redirect_uri,code_verifier:t.code_verifier,...t.extraTokenParams});Object.assign(e,r)}else n.debug("No code to process")}_validateIdTokenAttributes(e,t){var n;const r=this._logger.create("_validateIdTokenAttributes");r.debug("decoding ID Token JWT");const i=vy.decode((n=e.id_token)!=null?n:"");if(i.sub||r.throw(new Error("ID Token is missing a subject claim")),t){const o=vy.decode(t);i.sub!==o.sub&&r.throw(new Error("sub in id_token does not match current sub")),i.auth_time&&i.auth_time!==o.auth_time&&r.throw(new Error("auth_time in id_token does not match original auth_time")),i.azp&&i.azp!==o.azp&&r.throw(new Error("azp in id_token does not match original azp")),!i.azp&&o.azp&&r.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=i}},el=class{constructor(e){this.id=e.id||Or.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=Gn.getEpochTime(),this.request_type=e.request_type,this.url_state=e.url_state}toStorageString(){return new be("State").create("toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,url_state:this.url_state})}static fromStorageString(e){return be.createStatic("State","fromStorageString"),new el(JSON.parse(e))}static async clearStaleState(e,t){const n=be.createStatic("State","clearStaleState"),r=Gn.getEpochTime()-t,i=await e.getAllKeys();n.debug("got keys",i);for(let o=0;op.searchParams.append("resource",S));for(const[x,S]of Object.entries({response_mode:a,...m,...g}))S!=null&&p.searchParams.append(x,S.toString());this.url=p.href}},RI="openid",ag=class{constructor(e){if(this.access_token="",this.token_type="",this.profile={},this.state=e.get("state"),this.session_state=e.get("session_state"),this.state){const t=decodeURIComponent(this.state).split(xy);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(xy))}this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri"),this.code=e.get("code")}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Gn.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+Gn.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(RI))||!!this.id_token}},$I=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:i,request_type:o,client_id:s}){if(this._logger=new be("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const a=new URL(e);n&&a.searchParams.append("id_token_hint",n),s&&a.searchParams.append("client_id",s),r&&(a.searchParams.append("post_logout_redirect_uri",r),t&&(this.state=new el({data:t,request_type:o}),a.searchParams.append("state",this.state.id)));for(const[l,u]of Object.entries({...i}))u!=null&&a.searchParams.append(l,u.toString());this.url=a.href}},kI=class{constructor(e){this.state=e.get("state"),this.error=e.get("error"),this.error_description=e.get("error_description"),this.error_uri=e.get("error_uri")}},TI=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],MI=["sub","iss","aud","exp","iat"],NI=class{constructor(e){this._settings=e,this._logger=new be("ClaimsService")}filterProtocolClaims(e){const t={...e};if(this._settings.filterProtocolClaims){let n;Array.isArray(this._settings.filterProtocolClaims)?n=this._settings.filterProtocolClaims:n=TI;for(const r of n)MI.includes(r)||delete t[r]}return t}mergeClaims(e,t){const n={...e};for(const[r,i]of Object.entries(t))for(const o of Array.isArray(i)?i:[i]){const s=n[r];s===void 0?n[r]=o:Array.isArray(s)?s.includes(o)||s.push(o):n[r]!==o&&(typeof o=="object"&&this._settings.mergeClaims?n[r]=this.mergeClaims(s,o):n[r]=[s,o])}return n}},LI=class{constructor(e,t){this._logger=new be("OidcClient"),this.settings=e instanceof Sy?e:new Sy(e),this.metadataService=t??new yI(this.settings),this._claimsService=new NI(this.settings),this._validator=new CI(this.settings,this.metadataService,this._claimsService),this._tokenClient=new sR(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:i,login_hint:o,skipUserInfo:s,nonce:a,url_state:l,response_type:u=this.settings.response_type,scope:c=this.settings.scope,redirect_uri:d=this.settings.redirect_uri,prompt:f=this.settings.prompt,display:h=this.settings.display,max_age:g=this.settings.max_age,ui_locales:y=this.settings.ui_locales,acr_values:_=this.settings.acr_values,resource:m=this.settings.resource,response_mode:p=this.settings.response_mode,extraQueryParams:v=this.settings.extraQueryParams,extraTokenParams:x=this.settings.extraTokenParams}){const S=this._logger.create("createSigninRequest");if(u!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const w=await this.metadataService.getAuthorizationEndpoint();S.debug("Received authorization endpoint",w);const b=new AI({url:w,authority:this.settings.authority,client_id:this.settings.client_id,redirect_uri:d,response_type:u,scope:c,state_data:e,url_state:l,prompt:f,display:h,max_age:g,ui_locales:y,id_token_hint:i,login_hint:o,acr_values:_,resource:m,request:t,request_uri:n,extraQueryParams:v,extraTokenParams:x,request_type:r,response_mode:p,client_secret:this.settings.client_secret,skipUserInfo:s,nonce:a,disablePKCE:this.settings.disablePKCE});await this.clearStaleState();const C=b.state;return await this.settings.stateStore.set(C.id,C.toStorageString()),b}async readSigninResponseState(e,t=!1){const n=this._logger.create("readSigninResponseState"),r=new ag(_y.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(new Error("No state in response")),null;const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:l2.fromStorageString(i),response:r}}async processSigninResponse(e){const t=this._logger.create("processSigninResponse"),{state:n,response:r}=await this.readSigninResponseState(e,!0);return t.debug("received state from storage; validating response"),await this._validator.validateSigninResponse(r,n),r}async processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n=!1,extraTokenParams:r={}}){const i=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),o=new ag(new URLSearchParams);return Object.assign(o,i),await this._validator.validateCredentialsResponse(o,n),o}async useRefreshToken({state:e,timeoutInSeconds:t}){var n;const r=this._logger.create("useRefreshToken");let i;if(this.settings.refreshTokenAllowedScope===void 0)i=e.scope;else{const a=this.settings.refreshTokenAllowedScope.split(" ");i=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(u=>a.includes(u)).join(" ")}const o=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,resource:e.resource,scope:i,timeoutInSeconds:t}),s=new ag(new URLSearchParams);return Object.assign(s,o),r.debug("validating response",s),await this._validator.validateRefreshResponse(s,{...e,scope:i}),s}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,post_logout_redirect_uri:i=this.settings.post_logout_redirect_uri,extraQueryParams:o=this.settings.extraQueryParams}={}){const s=this._logger.create("createSignoutRequest"),a=await this.metadataService.getEndSessionEndpoint();if(!a)throw s.throw(new Error("No end session endpoint")),null;s.debug("Received end session endpoint",a),!n&&i&&!t&&(n=this.settings.client_id);const l=new $I({url:a,id_token_hint:t,client_id:n,post_logout_redirect_uri:i,state_data:e,extraQueryParams:o,request_type:r});await this.clearStaleState();const u=l.state;return u&&(s.debug("Signout request has state to persist"),await this.settings.stateStore.set(u.id,u.toStorageString())),l}async readSignoutResponseState(e,t=!1){const n=this._logger.create("readSignoutResponseState"),r=new kI(_y.readParams(e,this.settings.response_mode));if(!r.state){if(n.debug("No state in response"),r.error)throw n.warn("Response was error:",r.error),new ys(r);return{state:void 0,response:r}}const i=await this.settings.stateStore[t?"remove":"get"](r.state);if(!i)throw n.throw(new Error("No matching state found in storage")),null;return{state:el.fromStorageString(i),response:r}}async processSignoutResponse(e){const t=this._logger.create("processSignoutResponse"),{state:n,response:r}=await this.readSignoutResponseState(e,!0);return n?(t.debug("Received state from storage; validating response"),this._validator.validateSignoutResponse(r,n)):t.debug("No state from storage; skipping response validation"),r}clearStaleState(){return this._logger.create("clearStaleState"),el.clearStaleState(this.settings.stateStore,this.settings.staleStateAgeInSeconds)}async revokeToken(e,t){return this._logger.create("revokeToken"),await this._tokenClient.revoke({token:e,token_type_hint:t})}},OI=class{constructor(e){this._userManager=e,this._logger=new be("SessionMonitor"),this._start=async t=>{const n=t.session_state;if(!n)return;const r=this._logger.create("_start");if(t.profile?(this._sub=t.profile.sub,this._sid=t.profile.sid,r.debug("session_state",n,", sub",this._sub)):(this._sub=void 0,this._sid=void 0,r.debug("session_state",n,", anonymous user")),this._checkSessionIFrame){this._checkSessionIFrame.start(n);return}try{const i=await this._userManager.metadataService.getCheckSessionIframe();if(i){r.debug("initializing check session iframe");const o=this._userManager.settings.client_id,s=this._userManager.settings.checkSessionIntervalInSeconds,a=this._userManager.settings.stopCheckSessionOnError,l=new mI(this._callback,o,i,s,a);await l.load(),this._checkSessionIFrame=l,l.start(n)}else r.warn("no check session iframe found in the metadata")}catch(i){r.error("Error from getCheckSessionIframe:",i instanceof Error?i.message:i)}},this._stop=()=>{const t=this._logger.create("_stop");if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&this._checkSessionIFrame.stop(),this._userManager.settings.monitorAnonymousSession){const n=setInterval(async()=>{clearInterval(n);try{const r=await this._userManager.querySessionStatus();if(r){const i={session_state:r.session_state,profile:r.sub&&r.sid?{sub:r.sub,sid:r.sid}:null};this._start(i)}}catch(r){t.error("error from querySessionStatus",r instanceof Error?r.message:r)}},1e3)}},this._callback=async()=>{const t=this._logger.create("_callback");try{const n=await this._userManager.querySessionStatus();let r=!0;n&&this._checkSessionIFrame?n.sub===this._sub?(r=!1,this._checkSessionIFrame.start(n.session_state),n.sid===this._sid?t.debug("same sub still logged in at OP, restarting check session iframe; session_state",n.session_state):(t.debug("same sub still logged in at OP, session state has changed, restarting check session iframe; session_state",n.session_state),this._userManager.events._raiseUserSessionChanged())):t.debug("different subject signed into OP",n.sub):t.debug("subject no longer signed into OP"),r?this._sub?this._userManager.events._raiseUserSignedOut():this._userManager.events._raiseUserSignedIn():t.debug("no change in session detected, no event to raise")}catch(n){this._sub&&(t.debug("Error calling queryCurrentSigninSession; raising signed out event",n),this._userManager.events._raiseUserSignedOut())}},e||this._logger.throw(new Error("No user manager passed")),this._userManager.events.addUserLoaded(this._start),this._userManager.events.addUserUnloaded(this._stop),this._init().catch(t=>{this._logger.error(t)})}async _init(){this._logger.create("_init");const e=await this._userManager.getUser();if(e)this._start(e);else if(this._userManager.settings.monitorAnonymousSession){const t=await this._userManager.querySessionStatus();if(t){const n={session_state:t.session_state,profile:t.sub&&t.sid?{sub:t.sub,sid:t.sid}:null};this._start(n)}}}},gf=class{constructor(e){var t;this.id_token=e.id_token,this.session_state=(t=e.session_state)!=null?t:null,this.access_token=e.access_token,this.refresh_token=e.refresh_token,this.token_type=e.token_type,this.scope=e.scope,this.profile=e.profile,this.expires_at=e.expires_at,this.state=e.userState,this.url_state=e.url_state}get expires_in(){if(this.expires_at!==void 0)return this.expires_at-Gn.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+Gn.getEpochTime())}get expired(){const e=this.expires_in;if(e!==void 0)return e<=0}get scopes(){var e,t;return(t=(e=this.scope)==null?void 0:e.split(" "))!=null?t:[]}toStorageString(){return new be("User").create("toStorageString"),JSON.stringify({id_token:this.id_token,session_state:this.session_state,access_token:this.access_token,refresh_token:this.refresh_token,token_type:this.token_type,scope:this.scope,profile:this.profile,expires_at:this.expires_at})}static fromStorageString(e){return be.createStatic("User","fromStorageString"),new gf(JSON.parse(e))}},Zx="oidc-client",aR=class{constructor(){this._abort=new ji("Window navigation aborted"),this._disposeHandlers=new Set,this._window=null}async navigate(e){const t=this._logger.create("navigate");if(!this._window)throw new Error("Attempted to navigate on a disposed window");t.debug("setting URL in window"),this._window.location.replace(e.url);const{url:n,keepOpen:r}=await new Promise((i,o)=>{const s=a=>{var l;const u=a.data,c=(l=e.scriptOrigin)!=null?l:window.location.origin;if(!(a.origin!==c||(u==null?void 0:u.source)!==Zx)){try{const d=_y.readParams(u.url,e.response_mode).get("state");if(d||t.warn("no state found in response url"),a.source!==this._window&&d!==e.state)return}catch{this._dispose(),o(new Error("Invalid response from window"))}i(u)}};window.addEventListener("message",s,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",s,!1)),this._disposeHandlers.add(this._abort.addHandler(a=>{this._dispose(),o(a)}))});return t.debug("got response from window"),this._dispose(),r||this.close(),{url:n}}_dispose(){this._logger.create("_dispose");for(const e of this._disposeHandlers)e();this._disposeHandlers.clear()}static _notifyParent(e,t,n=!1,r=window.location.origin){e.postMessage({source:Zx,url:t,keepOpen:n},r)}},lR={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},uR="_blank",PI=60,II=2,cR=10,DI=class extends Sy{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=lR,popupWindowTarget:i=uR,redirectMethod:o="assign",redirectTarget:s="self",iframeNotifyParentOrigin:a=e.iframeNotifyParentOrigin,iframeScriptOrigin:l=e.iframeScriptOrigin,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:c=cR,automaticSilentRenew:d=!0,validateSubOnSilentRenew:f=!0,includeIdTokenInSilentRenew:h=!1,monitorSession:g=!1,monitorAnonymousSession:y=!1,checkSessionIntervalInSeconds:_=II,query_status_response_type:m="code",stopCheckSessionOnError:p=!0,revokeTokenTypes:v=["access_token","refresh_token"],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:S=!1,accessTokenExpiringNotificationTimeInSeconds:w=PI,userStore:b}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=i,this.redirectMethod=o,this.redirectTarget=s,this.iframeNotifyParentOrigin=a,this.iframeScriptOrigin=l,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=c,this.automaticSilentRenew=d,this.validateSubOnSilentRenew=f,this.includeIdTokenInSilentRenew=h,this.monitorSession=g,this.monitorAnonymousSession=y,this.checkSessionIntervalInSeconds=_,this.stopCheckSessionOnError=p,this.query_status_response_type=m,this.revokeTokenTypes=v,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=S,this.accessTokenExpiringNotificationTimeInSeconds=w,b)this.userStore=b;else{const C=typeof window<"u"?window.sessionStorage:new oR;this.userStore=new a2({store:C})}}},wy=class extends aR{constructor({silentRequestTimeoutInSeconds:e=cR}){super(),this._logger=new be("IFrameWindow"),this._timeoutInSeconds=e,this._frame=wy.createHiddenIframe(),this._window=this._frame.contentWindow}static createHiddenIframe(){const e=window.document.createElement("iframe");return e.style.visibility="hidden",e.style.position="fixed",e.style.left="-1000px",e.style.top="0",e.width="0",e.height="0",window.document.body.appendChild(e),e}async navigate(e){this._logger.debug("navigate: Using timeout of:",this._timeoutInSeconds);const t=setTimeout(()=>this._abort.raise(new o2("IFrame timed out without a response")),this._timeoutInSeconds*1e3);return this._disposeHandlers.add(()=>clearTimeout(t)),await super.navigate(e)}close(){var e;this._frame&&(this._frame.parentNode&&(this._frame.addEventListener("load",t=>{var n;const r=t.target;(n=r.parentNode)==null||n.removeChild(r),this._abort.raise(new Error("IFrame removed from DOM"))},!0),(e=this._frame.contentWindow)==null||e.location.replace("about:blank")),this._frame=null),this._window=null}static notifyParent(e,t){return super._notifyParent(window.parent,e,!1,t)}},jI=class{constructor(e){this._settings=e,this._logger=new be("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new wy({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),wy.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},FI=500,UI=1e3,Jx=class extends aR{constructor({popupWindowTarget:e=uR,popupWindowFeatures:t={}}){super(),this._logger=new be("PopupWindow");const n=Xx.center({...lR,...t});this._window=window.open(void 0,e,Xx.serialize(n)),t.closePopupWindowAfterInSeconds&&t.closePopupWindowAfterInSeconds>0&&setTimeout(()=>{if(!this._window||typeof this._window.closed!="boolean"||this._window.closed){this._abort.raise(new Error("Popup blocked by user"));return}this.close()},t.closePopupWindowAfterInSeconds*UI)}async navigate(e){var t;(t=this._window)==null||t.focus();const n=setInterval(()=>{(!this._window||this._window.closed)&&this._abort.raise(new Error("Popup closed by user"))},FI);return this._disposeHandlers.add(()=>clearInterval(n)),await super.navigate(e)}close(){this._window&&(this._window.closed||(this._window.close(),this._abort.raise(new Error("Popup closed")))),this._window=null}static notifyOpener(e,t){if(!window.opener)throw new Error("No window.opener. Can't complete notification.");return super._notifyParent(window.opener,e,t)}},VI=class{constructor(e){this._settings=e,this._logger=new be("PopupNavigator")}async prepare({popupWindowFeatures:e=this._settings.popupWindowFeatures,popupWindowTarget:t=this._settings.popupWindowTarget}){return new Jx({popupWindowFeatures:e,popupWindowTarget:t})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),Jx.notifyOpener(e,t)}},zI=class{constructor(e){this._settings=e,this._logger=new be("RedirectNavigator")}async prepare({redirectMethod:e=this._settings.redirectMethod,redirectTarget:t=this._settings.redirectTarget}){var n;this._logger.create("prepare");let r=window.self;t==="top"&&(r=(n=window.top)!=null?n:window.self);const i=r.location[e].bind(r.location);let o;return{navigate:async s=>{this._logger.create("navigate");const a=new Promise((l,u)=>{o=u});return i(s.url),await a},close:()=>{this._logger.create("close"),o==null||o(new Error("Redirect aborted")),r.stop()}}}async callback(){}},BI=class extends gI{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new be("UserManagerEvents"),this._userLoaded=new ji("User loaded"),this._userUnloaded=new ji("User unloaded"),this._silentRenewError=new ji("Silent renew error"),this._userSignedIn=new ji("User signed in"),this._userSignedOut=new ji("User signed out"),this._userSessionChanged=new ji("User session changed")}load(e,t=!0){super.load(e),t&&this._userLoaded.raise(e)}unload(){super.unload(),this._userUnloaded.raise()}addUserLoaded(e){return this._userLoaded.addHandler(e)}removeUserLoaded(e){return this._userLoaded.removeHandler(e)}addUserUnloaded(e){return this._userUnloaded.addHandler(e)}removeUserUnloaded(e){return this._userUnloaded.removeHandler(e)}addSilentRenewError(e){return this._silentRenewError.addHandler(e)}removeSilentRenewError(e){return this._silentRenewError.removeHandler(e)}_raiseSilentRenewError(e){this._silentRenewError.raise(e)}addUserSignedIn(e){return this._userSignedIn.addHandler(e)}removeUserSignedIn(e){this._userSignedIn.removeHandler(e)}_raiseUserSignedIn(){this._userSignedIn.raise()}addUserSignedOut(e){return this._userSignedOut.addHandler(e)}removeUserSignedOut(e){this._userSignedOut.removeHandler(e)}_raiseUserSignedOut(){this._userSignedOut.raise()}addUserSessionChanged(e){return this._userSessionChanged.addHandler(e)}removeUserSessionChanged(e){this._userSessionChanged.removeHandler(e)}_raiseUserSessionChanged(){this._userSessionChanged.raise()}},HI=class{constructor(e){this._userManager=e,this._logger=new be("SilentRenewService"),this._isStarted=!1,this._retryTimer=new Gn("Retry Silent Renew"),this._tokenExpiring=async()=>{const t=this._logger.create("_tokenExpiring");try{await this._userManager.signinSilent(),t.debug("silent token renewal successful")}catch(n){if(n instanceof o2){t.warn("ErrorTimeout from signinSilent:",n,"retry in 5s"),this._retryTimer.init(5);return}t.error("Error from signinSilent:",n),this._userManager.events._raiseSilentRenewError(n)}}}async start(){const e=this._logger.create("start");if(!this._isStarted){this._isStarted=!0,this._userManager.events.addAccessTokenExpiring(this._tokenExpiring),this._retryTimer.addHandler(this._tokenExpiring);try{await this._userManager.getUser()}catch(t){e.error("getUser error",t)}}}stop(){this._isStarted&&(this._retryTimer.cancel(),this._retryTimer.removeHandler(this._tokenExpiring),this._userManager.events.removeAccessTokenExpiring(this._tokenExpiring),this._isStarted=!1)}},WI=class{constructor(e,t){this.refresh_token=e.refresh_token,this.id_token=e.id_token,this.session_state=e.session_state,this.scope=e.scope,this.profile=e.profile,this.resource=t,this.data=e.state}},qI=class{constructor(e,t,n,r){this._logger=new be("UserManager"),this.settings=new DI(e),this._client=new LI(e),this._redirectNavigator=t??new zI(this.settings),this._popupNavigator=n??new VI(this.settings),this._iframeNavigator=r??new jI(this.settings),this._events=new BI(this.settings),this._silentRenewService=new HI(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new OI(this))}get events(){return this._events}get metadataService(){return this._client.metadataService}async getUser(){const e=this._logger.create("getUser"),t=await this._loadUser();return t?(e.info("user loaded"),this._events.load(t,!1),t):(e.info("user not found in storage"),null)}async removeUser(){const e=this._logger.create("removeUser");await this.storeUser(null),e.info("user removed from storage"),this._events.unload()}async signinRedirect(e={}){this._logger.create("signinRedirect");const{redirectMethod:t,...n}=e,r=await this._redirectNavigator.prepare({redirectMethod:t});await this._signinStart({request_type:"si:r",...n},r)}async signinRedirectCallback(e=window.location.href){const t=this._logger.create("signinRedirectCallback"),n=await this._signinEnd(e);return n.profile&&n.profile.sub?t.info("success, signed in subject",n.profile.sub):t.info("no subject"),n}async signinResourceOwnerCredentials({username:e,password:t,skipUserInfo:n=!1}){const r=this._logger.create("signinResourceOwnerCredential"),i=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug("got signin response");const o=await this._buildUser(i);return o.profile&&o.profile.sub?r.info("success, signed in subject",o.profile.sub):r.info("no subject"),o}async signinPopup(e={}){const t=this._logger.create("signinPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...i}=e,o=this.settings.popup_redirect_uri;o||t.throw(new Error("No popup_redirect_uri configured"));const s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r}),a=await this._signin({request_type:"si:p",redirect_uri:o,display:"popup",...i},s);return a&&(a.profile&&a.profile.sub?t.info("success, signed in subject",a.profile.sub):t.info("no subject")),a}async signinPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signinPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),n.info("success")}async signinSilent(e={}){var t;const n=this._logger.create("signinSilent"),{silentRequestTimeoutInSeconds:r,resource:i,...o}=e;let s=await this._loadUser();if(s!=null&&s.refresh_token){n.debug("using refresh token");const c=new WI(s,i);return await this._useRefreshToken(c)}const a=this.settings.silent_redirect_uri;a||n.throw(new Error("No silent_redirect_uri configured"));let l;s&&this.settings.validateSubOnSilentRenew&&(n.debug("subject prior to silent renew:",s.profile.sub),l=s.profile.sub);const u=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});return s=await this._signin({request_type:"si:s",redirect_uri:a,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?s==null?void 0:s.id_token:void 0,...o},u,l),s&&((t=s.profile)!=null&&t.sub?n.info("success, signed in subject",s.profile.sub):n.info("no subject")),s}async _useRefreshToken(e){const t=await this._client.useRefreshToken({state:e,timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds}),n=new gf({...e,...t});return await this.storeUser(n),this._events.load(n),n}async signinSilentCallback(e=window.location.href){const t=this._logger.create("signinSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async signinCallback(e=window.location.href){const{state:t}=await this._client.readSigninResponseState(e);switch(t.request_type){case"si:r":return await this.signinRedirectCallback(e);case"si:p":return await this.signinPopupCallback(e);case"si:s":return await this.signinSilentCallback(e);default:throw new Error("invalid response_type in state")}}async signoutCallback(e=window.location.href,t=!1){const{state:n}=await this._client.readSignoutResponseState(e);if(n)switch(n.request_type){case"so:r":await this.signoutRedirectCallback(e);break;case"so:p":await this.signoutPopupCallback(e,t);break;case"so:s":await this.signoutSilentCallback(e);break;default:throw new Error("invalid response_type in state")}}async querySessionStatus(e={}){const t=this._logger.create("querySessionStatus"),{silentRequestTimeoutInSeconds:n,...r}=e,i=this.settings.silent_redirect_uri;i||t.throw(new Error("No silent_redirect_uri configured"));const o=await this._loadUser(),s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),a=await this._signinStart({request_type:"si:s",redirect_uri:i,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?o==null?void 0:o.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...r},s);try{const l=await this._client.processSigninResponse(a.url);return t.debug("got signin response"),l.session_state&&l.profile.sub?(t.info("success for subject",l.profile.sub),{session_state:l.session_state,sub:l.profile.sub,sid:l.profile.sid}):(t.info("success, user not authenticated"),null)}catch(l){if(this.settings.monitorAnonymousSession&&l instanceof ys)switch(l.error){case"login_required":case"consent_required":case"interaction_required":case"account_selection_required":return t.info("success for anonymous user"),{session_state:l.session_state}}throw l}}async _signin(e,t,n){const r=await this._signinStart(e,t);return await this._signinEnd(r.url,n)}async _signinStart(e,t){const n=this._logger.create("_signinStart");try{const r=await this._client.createSigninRequest(e);return n.debug("got signin request"),await t.navigate({url:r.url,state:r.state.id,response_mode:r.state.response_mode,scriptOrigin:this.settings.iframeScriptOrigin})}catch(r){throw n.debug("error after preparing navigator, closing navigator window"),t.close(),r}}async _signinEnd(e,t){const n=this._logger.create("_signinEnd"),r=await this._client.processSigninResponse(e);return n.debug("got signin response"),await this._buildUser(r,t)}async _buildUser(e,t){const n=this._logger.create("_buildUser"),r=new gf(e);if(t){if(t!==r.profile.sub)throw n.debug("current user does not match user returned from signin. sub from signin:",r.profile.sub),new ys({...e,error:"login_required"});n.debug("current user matches user returned from signin")}return await this.storeUser(r),n.debug("user stored"),this._events.load(r),r}async signoutRedirect(e={}){const t=this._logger.create("signoutRedirect"),{redirectMethod:n,...r}=e,i=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},i),t.info("success")}async signoutRedirectCallback(e=window.location.href){const t=this._logger.create("signoutRedirectCallback"),n=await this._signoutEnd(e);return t.info("success"),n}async signoutPopup(e={}){const t=this._logger.create("signoutPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...i}=e,o=this.settings.popup_post_logout_redirect_uri,s=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r});await this._signout({request_type:"so:p",post_logout_redirect_uri:o,state:o==null?void 0:{},...i},s),t.info("success")}async signoutPopupCallback(e=window.location.href,t=!1){const n=this._logger.create("signoutPopupCallback");await this._popupNavigator.callback(e,{keepOpen:t}),n.info("success")}async _signout(e,t){const n=await this._signoutStart(e,t);return await this._signoutEnd(n.url)}async _signoutStart(e={},t){var n;const r=this._logger.create("_signoutStart");try{const i=await this._loadUser();r.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(i);const o=e.id_token_hint||i&&i.id_token;o&&(r.debug("setting id_token_hint in signout request"),e.id_token_hint=o),await this.removeUser(),r.debug("user removed, creating signout request");const s=await this._client.createSignoutRequest(e);return r.debug("got signout request"),await t.navigate({url:s.url,state:(n=s.state)==null?void 0:n.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(i){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),i}}async _signoutEnd(e){const t=this._logger.create("_signoutEnd"),n=await this._client.processSignoutResponse(e);return t.debug("got signout response"),n}async signoutSilent(e={}){var t;const n=this._logger.create("signoutSilent"),{silentRequestTimeoutInSeconds:r,...i}=e,o=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,s=this.settings.popup_post_logout_redirect_uri,a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});await this._signout({request_type:"so:s",post_logout_redirect_uri:s,id_token_hint:o,...i},a),n.info("success")}async signoutSilentCallback(e=window.location.href){const t=this._logger.create("signoutSilentCallback");await this._iframeNavigator.callback(e),t.info("success")}async revokeTokens(e){const t=await this._loadUser();await this._revokeInternal(t,e)}async _revokeInternal(e,t=this.settings.revokeTokenTypes){const n=this._logger.create("_revokeInternal");if(!e)return;const r=t.filter(i=>typeof e[i]=="string");if(!r.length){n.debug("no need to revoke due to no token(s)");return}for(const i of r)await this._client.revokeToken(e[i],i),n.info(`${i} revoked successfully`),i!=="access_token"&&(e[i]=null);await this.storeUser(e),n.debug("user stored"),this._events.load(e)}startSilentRenew(){this._logger.create("startSilentRenew"),this._silentRenewService.start()}stopSilentRenew(){this._silentRenewService.stop()}get _userStoreKey(){return`user:${this.settings.authority}:${this.settings.client_id}`}async _loadUser(){const e=this._logger.create("_loadUser"),t=await this.settings.userStore.get(this._userStoreKey);return t?(e.debug("user storageString loaded"),gf.fromStorageString(t)):(e.debug("no user storageString"),null)}async storeUser(e){const t=this._logger.create("storeUser");if(e){t.debug("storing user");const n=e.toStorageString();await this.settings.userStore.set(this._userStoreKey,n)}else this._logger.debug("removing user"),await this.settings.userStore.remove(this._userStoreKey)}async clearStaleState(){await this._client.clearStaleState()}},u2=E.createContext(void 0);u2.displayName="AuthContext";var GI={isLoading:!0,isAuthenticated:!1},KI=(e,t)=>{switch(t.type){case"INITIALISED":case"USER_LOADED":return{...e,user:t.user,isLoading:!1,isAuthenticated:t.user?!t.user.expired:!1,error:void 0};case"USER_UNLOADED":return{...e,user:void 0,isAuthenticated:!1};case"NAVIGATOR_INIT":return{...e,isLoading:!0,activeNavigator:t.method};case"NAVIGATOR_CLOSE":return{...e,isLoading:!1,activeNavigator:void 0};case"ERROR":return{...e,isLoading:!1,error:t.error};default:return{...e,isLoading:!1,error:new Error(`unknown type ${t.type}`)}}},YI=(e=window.location)=>{let t=new URLSearchParams(e.search);return!!((t.get("code")||t.get("error"))&&t.get("state")||(t=new URLSearchParams(e.hash.replace("#","?")),(t.get("code")||t.get("error"))&&t.get("state")))},QI=e=>t=>t instanceof Error?t:new Error(e),XI=QI("Login failed"),ZI=["clearStaleState","querySessionStatus","revokeTokens","startSilentRenew","stopSilentRenew"],JI=["signinPopup","signinSilent","signinRedirect","signinResourceOwnerCredentials","signoutPopup","signoutRedirect","signoutSilent"],lg=e=>()=>{throw new Error(`UserManager#${e} was called from an unsupported context. If this is a server-rendered page, defer this call with useEffect() or pass a custom UserManager implementation.`)},eD=typeof window>"u"?null:qI,tD=e=>{const{children:t,onSigninCallback:n,skipSigninCallback:r,onRemoveUser:i,onSignoutRedirect:o,onSignoutPopup:s,implementation:a=eD,userManager:l,...u}=e,[c]=V.useState(()=>l??(a?new a(u):{settings:u})),[d,f]=V.useReducer(KI,GI),h=V.useMemo(()=>Object.assign({settings:c.settings,events:c.events},Object.fromEntries(ZI.map(v=>{var x,S;return[v,(S=(x=c[v])==null?void 0:x.bind(c))!=null?S:lg(v)]})),Object.fromEntries(JI.map(v=>[v,c[v]?async x=>{f({type:"NAVIGATOR_INIT",method:v});try{return await c[v](x)}catch(S){return f({type:"ERROR",error:S}),null}finally{f({type:"NAVIGATOR_CLOSE"})}}:lg(v)]))),[c]),g=V.useRef(!1);V.useEffect(()=>{!c||g.current||(g.current=!0,(async()=>{let v=null;try{YI()&&!r&&(v=await c.signinCallback(),n&&await n(v)),v=v||await c.getUser(),f({type:"INITIALISED",user:v})}catch(x){f({type:"ERROR",error:XI(x)})}})())},[c,r,n]),V.useEffect(()=>{if(!c)return;const v=w=>{f({type:"USER_LOADED",user:w})};c.events.addUserLoaded(v);const x=()=>{f({type:"USER_UNLOADED"})};c.events.addUserUnloaded(x);const S=w=>{f({type:"ERROR",error:w})};return c.events.addSilentRenewError(S),()=>{c.events.removeUserLoaded(v),c.events.removeUserUnloaded(x),c.events.removeSilentRenewError(S)}},[c]);const y=V.useCallback(c?()=>c.removeUser().then(i):lg("removeUser"),[c,i]),_=V.useCallback(v=>h.signoutRedirect(v).then(o),[h.signoutRedirect,o]),m=V.useCallback(v=>h.signoutPopup(v).then(s),[h.signoutPopup,s]),p=V.useCallback(v=>h.signoutSilent(v),[h.signoutSilent]);return E.createElement(u2.Provider,{value:{...d,...h,removeUser:y,signoutRedirect:_,signoutPopup:m,signoutSilent:p}},t)},nD=()=>{const e=E.useContext(u2);return e||console.warn("AuthProvider context is undefined, please verify you are calling useAuth() as child of a component."),e};/** + * @remix-run/router v1.16.1 + * + * 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 ac(){return ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function dR(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function iD(){return Math.random().toString(36).substr(2,8)}function tS(e,t){return{usr:e.state,key:e.key,idx:t}}function by(e,t,n,r){return n===void 0&&(n=null),ac({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?xl(t):t,{state:n,key:t&&t.key||r||iD()})}function sh(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function xl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function oD(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=eo.Pop,l=null,u=c();u==null&&(u=0,s.replaceState(ac({},s.state,{idx:u}),""));function c(){return(s.state||{idx:null}).idx}function d(){a=eo.Pop;let _=c(),m=_==null?null:_-u;u=_,l&&l({action:a,location:y.location,delta:m})}function f(_,m){a=eo.Push;let p=by(y.location,_,m);n&&n(p,_),u=c()+1;let v=tS(p,u),x=y.createHref(p);try{s.pushState(v,"",x)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;i.location.assign(x)}o&&l&&l({action:a,location:y.location,delta:1})}function h(_,m){a=eo.Replace;let p=by(y.location,_,m);n&&n(p,_),u=c();let v=tS(p,u),x=y.createHref(p);s.replaceState(v,"",x),o&&l&&l({action:a,location:y.location,delta:0})}function g(_){let m=i.location.origin!=="null"?i.location.origin:i.location.href,p=typeof _=="string"?_:sh(_);return p=p.replace(/ $/,"%20"),nt(m,"No window.location.(origin|href) available to create URL for href: "+p),new URL(p,m)}let y={get action(){return a},get location(){return e(i,s)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(eS,d),l=_,()=>{i.removeEventListener(eS,d),l=null}},createHref(_){return t(i,_)},createURL:g,encodeLocation(_){let m=g(_);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:f,replace:h,go(_){return s.go(_)}};return y}var nS;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(nS||(nS={}));function sD(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?xl(t):t,i=tl(r.pathname||"/",n);if(i==null)return null;let o=fR(e);aD(o);let s=null;for(let a=0;s==null&&a{let l={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:s,route:o};l.relativePath.startsWith("/")&&(nt(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let u=fo([r,l.relativePath]),c=n.concat(l);o.children&&o.children.length>0&&(nt(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),fR(o.children,t,c,u)),!(o.path==null&&!o.index)&&t.push({path:u,score:pD(u,o.index),routesMeta:c})};return e.forEach((o,s)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))i(o,s);else for(let l of hR(o.path))i(o,s,l)}),t}function hR(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return i?[o,""]:[o];let s=hR(r.join("/")),a=[];return a.push(...s.map(l=>l===""?o:[o,l].join("/"))),i&&a.push(...s),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function aD(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:gD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lD=/^:[\w-]+$/,uD=3,cD=2,dD=1,fD=10,hD=-2,rS=e=>e==="*";function pD(e,t){let n=e.split("/"),r=n.length;return n.some(rS)&&(r+=hD),t&&(r+=cD),n.filter(i=>!rS(i)).reduce((i,o)=>i+(lD.test(o)?uD:o===""?dD:fD),r)}function gD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function mD(e,t){let{routesMeta:n}=e,r={},i="/",o=[];for(let s=0;s{let{paramName:f,isOptional:h}=c;if(f==="*"){let y=a[d]||"";s=o.slice(0,o.length-y.length).replace(/(.)\/+$/,"$1")}const g=a[d];return h&&!g?u[f]=void 0:u[f]=(g||"").replace(/%2F/g,"/"),u},{}),pathname:o,pathnameBase:s,pattern:e}}function yD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),dR(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 r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function vD(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return dR(!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 tl(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function _D(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?xl(e):e;return{pathname:n?n.startsWith("/")?n:xD(n,t):t,search:bD(r),hash:ED(i)}}function xD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function ug(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function SD(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function c2(e,t){let n=SD(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function d2(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=xl(e):(i=ac({},e),nt(!i.pathname||!i.pathname.includes("?"),ug("?","pathname","search",i)),nt(!i.pathname||!i.pathname.includes("#"),ug("#","pathname","hash",i)),nt(!i.search||!i.search.includes("#"),ug("#","search","hash",i)));let o=e===""||i.pathname==="",s=o?"/":i.pathname,a;if(s==null)a=n;else{let d=t.length-1;if(!r&&s.startsWith("..")){let f=s.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}a=d>=0?t[d]:"/"}let l=_D(i,a),u=s&&s!=="/"&&s.endsWith("/"),c=(o||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const fo=e=>e.join("/").replace(/\/\/+/g,"/"),wD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),bD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,ED=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function CD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const pR=["post","put","patch","delete"];new Set(pR);const AD=["get",...pR];new Set(AD);/** + * React Router v6.23.1 + * + * 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 lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),V.useCallback(function(u,c){if(c===void 0&&(c={}),!a.current)return;if(typeof u=="number"){r.go(u);return}let d=d2(u,JSON.parse(s),o,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:fo([t,d.pathname])),(c.replace?r.replace:r.push)(d,c.state,c)},[t,r,s,o,e])}const kD=V.createContext(null);function TD(e){let t=V.useContext(zr).outlet;return t&&V.createElement(kD.Provider,{value:e},t)}function MD(){let{matches:e}=V.useContext(zr),t=e[e.length-1];return t?t.params:{}}function C0(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=V.useContext(bi),{matches:i}=V.useContext(zr),{pathname:o}=Rs(),s=JSON.stringify(c2(i,r.v7_relativeSplatPath));return V.useMemo(()=>d2(e,JSON.parse(s),o,n==="path"),[e,s,o,n])}function ND(e,t){return LD(e,t)}function LD(e,t,n,r){Sl()||nt(!1);let{navigator:i}=V.useContext(bi),{matches:o}=V.useContext(zr),s=o[o.length-1],a=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let u=Rs(),c;if(t){var d;let _=typeof t=="string"?xl(t):t;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||nt(!1),c=_}else c=u;let f=c.pathname||"/",h=f;if(l!=="/"){let _=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(_.length).join("/")}let g=sD(e,{pathname:h}),y=jD(g&&g.map(_=>Object.assign({},_,{params:Object.assign({},a,_.params),pathname:fo([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:fo([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),o,n,r);return t&&y?V.createElement(b0.Provider,{value:{location:lc({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:eo.Pop}},y):y}function OD(){let e=zD(),t=CD(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},t),n?V.createElement("pre",{style:i},n):null,null)}const PD=V.createElement(OD,null);class ID extends V.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,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?V.createElement(zr.Provider,{value:this.props.routeContext},V.createElement(mR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function DD(e){let{routeContext:t,match:n,children:r}=e,i=V.useContext(w0);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),V.createElement(zr.Provider,{value:t},r)}function jD(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let s=e,a=(i=n)==null?void 0:i.errors;if(a!=null){let c=s.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);c>=0||nt(!1),s=s.slice(0,Math.min(s.length,c+1))}let l=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c=0?s=s.slice(0,u+1):s=[s[0]];break}}}return s.reduceRight((c,d,f)=>{let h,g=!1,y=null,_=null;n&&(h=a&&d.route.id?a[d.route.id]:void 0,y=d.route.errorElement||PD,l&&(u<0&&f===0?(HD("route-fallback",!1),g=!0,_=null):u===f&&(g=!0,_=d.route.hydrateFallbackElement||null)));let m=t.concat(s.slice(0,f+1)),p=()=>{let v;return h?v=y:g?v=_:d.route.Component?v=V.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=c,V.createElement(DD,{match:d,routeContext:{outlet:c,matches:m,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?V.createElement(ID,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:p(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):p()},null)}var vR=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(vR||{}),ah=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}(ah||{});function FD(e){let t=V.useContext(w0);return t||nt(!1),t}function UD(e){let t=V.useContext(gR);return t||nt(!1),t}function VD(e){let t=V.useContext(zr);return t||nt(!1),t}function _R(e){let t=VD(),n=t.matches[t.matches.length-1];return n.route.id||nt(!1),n.route.id}function zD(){var e;let t=V.useContext(mR),n=UD(ah.UseRouteError),r=_R(ah.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function BD(){let{router:e}=FD(vR.UseNavigateStable),t=_R(ah.UseNavigateStable),n=V.useRef(!1);return yR(()=>{n.current=!0}),V.useCallback(function(i,o){o===void 0&&(o={}),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,lc({fromRouteId:t},o)))},[e,t])}const iS={};function HD(e,t,n){!t&&!iS[e]&&(iS[e]=!0)}function WD(e){let{to:t,replace:n,state:r,relative:i}=e;Sl()||nt(!1);let{future:o,static:s}=V.useContext(bi),{matches:a}=V.useContext(zr),{pathname:l}=Rs(),u=E0(),c=d2(t,c2(a,o.v7_relativeSplatPath),l,i==="path"),d=JSON.stringify(c);return V.useEffect(()=>u(JSON.parse(d),{replace:n,state:r,relative:i}),[u,d,i,n,r]),null}function qD(e){return TD(e.context)}function Po(e){nt(!1)}function GD(e){let{basename:t="/",children:n=null,location:r,navigationType:i=eo.Pop,navigator:o,static:s=!1,future:a}=e;Sl()&&nt(!1);let l=t.replace(/^\/*/,"/"),u=V.useMemo(()=>({basename:l,navigator:o,static:s,future:lc({v7_relativeSplatPath:!1},a)}),[l,a,o,s]);typeof r=="string"&&(r=xl(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:g="default"}=r,y=V.useMemo(()=>{let _=tl(c,l);return _==null?null:{location:{pathname:_,search:d,hash:f,state:h,key:g},navigationType:i}},[l,c,d,f,h,g,i]);return y==null?null:V.createElement(bi.Provider,{value:u},V.createElement(b0.Provider,{children:n,value:y}))}function KD(e){let{children:t,location:n}=e;return ND(Cy(t),n)}new Promise(()=>{});function Cy(e,t){t===void 0&&(t=[]);let n=[];return V.Children.forEach(e,(r,i)=>{if(!V.isValidElement(r))return;let o=[...t,i];if(r.type===V.Fragment){n.push.apply(n,Cy(r.props.children,o));return}r.type!==Po&&nt(!1),!r.props.index||!r.props.children||nt(!1);let s={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(s.children=Cy(r.props.children,o)),n.push(s)}),n}/** + * React Router DOM v6.23.1 + * + * 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 lh(){return lh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function YD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function QD(e,t){return e.button===0&&(!t||t==="_self")&&!YD(e)}const XD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],ZD=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],JD="6";try{window.__reactRouterVersion=JD}catch{}const ej=V.createContext({isTransitioning:!1}),tj="startTransition",oS=BL[tj];function nj(e){let{basename:t,children:n,future:r,window:i}=e,o=V.useRef();o.current==null&&(o.current=rD({window:i,v5Compat:!0}));let s=o.current,[a,l]=V.useState({action:s.action,location:s.location}),{v7_startTransition:u}=r||{},c=V.useCallback(d=>{u&&oS?oS(()=>l(d)):l(d)},[l,u]);return V.useLayoutEffect(()=>s.listen(c),[s,c]),V.createElement(GD,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s,future:r})}const rj=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ij=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,SR=V.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:o,replace:s,state:a,target:l,to:u,preventScrollReset:c,unstable_viewTransition:d}=t,f=xR(t,XD),{basename:h}=V.useContext(bi),g,y=!1;if(typeof u=="string"&&ij.test(u)&&(g=u,rj))try{let v=new URL(window.location.href),x=u.startsWith("//")?new URL(v.protocol+u):new URL(u),S=tl(x.pathname,h);x.origin===v.origin&&S!=null?u=S+x.search+x.hash:y=!0}catch{}let _=RD(u,{relative:i}),m=sj(u,{replace:s,state:a,target:l,preventScrollReset:c,relative:i,unstable_viewTransition:d});function p(v){r&&r(v),v.defaultPrevented||m(v)}return V.createElement("a",lh({},f,{href:g||_,onClick:y||o?r:p,ref:n,target:l}))}),mf=V.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:o="",end:s=!1,style:a,to:l,unstable_viewTransition:u,children:c}=t,d=xR(t,ZD),f=C0(l,{relative:d.relative}),h=Rs(),g=V.useContext(gR),{navigator:y,basename:_}=V.useContext(bi),m=g!=null&&aj(f)&&u===!0,p=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,v=h.pathname,x=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;i||(v=v.toLowerCase(),x=x?x.toLowerCase():null,p=p.toLowerCase()),x&&_&&(x=tl(x,_)||x);const S=p!=="/"&&p.endsWith("/")?p.length-1:p.length;let w=v===p||!s&&v.startsWith(p)&&v.charAt(S)==="/",b=x!=null&&(x===p||!s&&x.startsWith(p)&&x.charAt(p.length)==="/"),C={isActive:w,isPending:b,isTransitioning:m},k=w?r:void 0,A;typeof o=="function"?A=o(C):A=[o,w?"active":null,b?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let M=typeof a=="function"?a(C):a;return V.createElement(SR,lh({},d,{"aria-current":k,className:A,ref:n,style:M,to:l,unstable_viewTransition:u}),typeof c=="function"?c(C):c)});var Ay;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ay||(Ay={}));var sS;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sS||(sS={}));function oj(e){let t=V.useContext(w0);return t||nt(!1),t}function sj(e,t){let{target:n,replace:r,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a}=t===void 0?{}:t,l=E0(),u=Rs(),c=C0(e,{relative:s});return V.useCallback(d=>{if(QD(d,n)){d.preventDefault();let f=r!==void 0?r:sh(u)===sh(c);l(e,{replace:f,state:i,preventScrollReset:o,relative:s,unstable_viewTransition:a})}},[u,l,c,r,i,n,e,o,s,a])}function aj(e,t){t===void 0&&(t={});let n=V.useContext(ej);n==null&&nt(!1);let{basename:r}=oj(Ay.useViewTransitionState),i=C0(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=tl(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=tl(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ey(i.pathname,s)!=null||Ey(i.pathname,o)!=null}var wR={};function lj(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var uj=lj,Ae=uj;function cj(e){return!!e&&typeof e.then=="function"}var Ke=cj;function dj(e,t){if(e!=null)return e;throw Ae(t??"Got unexpected null or undefined")}var Je=dj;function Ce(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class A0{getValue(){throw Ae("BaseLoadable")}toPromise(){throw Ae("BaseLoadable")}valueMaybe(){throw Ae("BaseLoadable")}valueOrThrow(){throw Ae(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw Ae("BaseLoadable")}promiseOrThrow(){throw Ae(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw Ae("BaseLoadable")}errorOrThrow(){throw Ae(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw Ae("BaseLoadable")}}class fj extends A0{constructor(t){super(),Ce(this,"state","hasValue"),Ce(this,"contents",void 0),this.contents=t}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(t){try{const n=t(this.contents);return Ke(n)?vs(n):nl(n)?n:jc(n)}catch(n){return Ke(n)?vs(n.next(()=>this.map(t))):R0(n)}}}class hj extends A0{constructor(t){super(),Ce(this,"state","hasError"),Ce(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(t){return this}}class bR extends A0{constructor(t){super(),Ce(this,"state","loading"),Ce(this,"contents",void 0),this.contents=t}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(t){return vs(this.contents.then(n=>{const r=t(n);if(nl(r)){const i=r;switch(i.state){case"hasValue":return i.contents;case"hasError":throw i.contents;case"loading":return i.contents}}return r}).catch(n=>{if(Ke(n))return n.then(()=>this.map(t).contents);throw n}))}}function jc(e){return Object.freeze(new fj(e))}function R0(e){return Object.freeze(new hj(e))}function vs(e){return Object.freeze(new bR(e))}function ER(){return Object.freeze(new bR(new Promise(()=>{})))}function pj(e){return e.every(t=>t.state==="hasValue")?jc(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?R0(Je(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):vs(Promise.all(e.map(t=>t.contents)))}function CR(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(i=>e[i])).map(i=>nl(i)?i:Ke(i)?vs(i):jc(i)),r=pj(n);return Array.isArray(e)?r:r.map(i=>Object.getOwnPropertyNames(e).reduce((o,s,a)=>({...o,[s]:i[a]}),{}))}function nl(e){return e instanceof A0}const gj={of:e=>Ke(e)?vs(e):nl(e)?e:jc(e),error:e=>R0(e),loading:()=>ER(),all:CR,isLoadable:nl};var $s={loadableWithValue:jc,loadableWithError:R0,loadableWithPromise:vs,loadableLoading:ER,loadableAll:CR,isLoadable:nl,RecoilLoadable:gj},mj=$s.loadableWithValue,yj=$s.loadableWithError,vj=$s.loadableWithPromise,_j=$s.loadableLoading,xj=$s.loadableAll,Sj=$s.isLoadable,wj=$s.RecoilLoadable,Fc=Object.freeze({__proto__:null,loadableWithValue:mj,loadableWithError:yj,loadableWithPromise:vj,loadableLoading:_j,loadableAll:xj,isLoadable:Sj,RecoilLoadable:wj});const Ry={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:!0,RECOIL_GKS_ENABLED:new Set(["recoil_hamt_2020","recoil_sync_external_store","recoil_suppress_rerender_in_callback","recoil_memory_managament_2020"])};function bj(e,t){var n,r;const i=(n=wR[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(i==null||i==="")return;if(!["true","false"].includes(i))throw Ae(`process.env.${e} value must be 'true', 'false', or empty: ${i}`);t(i==="true")}function Ej(e,t){var n;const r=(n=wR[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function Cj(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(bj("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{Ry.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),Ej("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{Ry.RECOIL_GKS_ENABLED.add(n)})}))}Cj();var wl=Ry;function $0(e){return wl.RECOIL_GKS_ENABLED.has(e)}$0.setPass=e=>{wl.RECOIL_GKS_ENABLED.add(e)};$0.setFail=e=>{wl.RECOIL_GKS_ENABLED.delete(e)};$0.clear=()=>{wl.RECOIL_GKS_ENABLED.clear()};var Be=$0;function Aj(e,t,{error:n}={}){return null}var Rj=Aj,f2=Rj,cg,dg,fg;const $j=(cg=E.createMutableSource)!==null&&cg!==void 0?cg:E.unstable_createMutableSource,AR=(dg=E.useMutableSource)!==null&&dg!==void 0?dg:E.unstable_useMutableSource,RR=(fg=E.useSyncExternalStore)!==null&&fg!==void 0?fg:E.unstable_useSyncExternalStore;function kj(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;return((e=t==null?void 0:t.current)!==null&&e!==void 0?e:n.currentDispatcher).useSyncExternalStore!=null}function Tj(){return Be("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Be("recoil_sync_external_store")&&RR!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Be("recoil_mutable_source")&&AR!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Be("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Be("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function Mj(){return!1}var Uc={createMutableSource:$j,useMutableSource:AR,useSyncExternalStore:RR,currentRendererSupportsUseSyncExternalStore:kj,reactMode:Tj,isFastRefreshEnabled:Mj};class h2{constructor(t){Ce(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class $R extends h2{}class kR extends h2{}function Nj(e){return e instanceof $R||e instanceof kR}var k0={AbstractRecoilValue:h2,RecoilState:$R,RecoilValueReadOnly:kR,isRecoilValue:Nj},Lj=k0.AbstractRecoilValue,Oj=k0.RecoilState,Pj=k0.RecoilValueReadOnly,Ij=k0.isRecoilValue,rl=Object.freeze({__proto__:null,AbstractRecoilValue:Lj,RecoilState:Oj,RecoilValueReadOnly:Pj,isRecoilValue:Ij});function Dj(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var T0=Dj;class TR{}const jj=new TR,_s=new Map,p2=new Map;function Fj(e){return T0(e,t=>Je(p2.get(t)))}function Uj(e){if(_s.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in + production. But it is safe to ignore this warning if it occurred because of + hot module replacement.`;console.warn(t)}}function Vj(e){wl.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&Uj(e.key),_s.set(e.key,e);const t=e.set==null?new rl.RecoilValueReadOnly(e.key):new rl.RecoilState(e.key);return p2.set(e.key,t),t}class MR extends Error{}function zj(e){const t=_s.get(e);if(t==null)throw new MR(`Missing definition for RecoilValue: "${e}""`);return t}function Bj(e){return _s.get(e)}const uh=new Map;function Hj(e){var t;if(!Be("recoil_memory_managament_2020"))return;const n=_s.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;_s.delete(e),(r=NR(e))===null||r===void 0||r(),uh.delete(e)}}function Wj(e,t){Be("recoil_memory_managament_2020")&&(t===void 0?uh.delete(e):uh.set(e,t))}function NR(e){return uh.get(e)}var vn={nodes:_s,recoilValues:p2,registerNode:Vj,getNode:zj,getNodeMaybe:Bj,deleteNodeConfigIfPossible:Hj,setConfigDeletionHandler:Wj,getConfigDeletionHandler:NR,recoilValuesForKeys:Fj,NodeMissingError:MR,DefaultValue:TR,DEFAULT_VALUE:jj};function qj(e,t){t()}var Gj={enqueueExecution:qj};function Kj(e,t){return t={exports:{}},e(t,t.exports),t.exports}var Yj=Kj(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(j){return typeof j}:function(j){return j&&typeof Symbol=="function"&&j.constructor===Symbol&&j!==Symbol.prototype?"symbol":typeof j},n={},r=5,i=Math.pow(2,r),o=i-1,s=i/2,a=i/4,l={},u=function(I){return function(){return I}},c=n.hash=function(j){var I=typeof j>"u"?"undefined":t(j);if(I==="number")return j;I!=="string"&&(j+="");for(var Z=0,se=0,ae=j.length;se>1&1431655765,I=(I&858993459)+(I>>2&858993459),I=I+(I>>4)&252645135,I+=I>>8,I+=I>>16,I&127},f=function(I,Z){return Z>>>I&o},h=function(I){return 1<=Z;)ae[xe--]=ae[xe];return ae[Z]=se,ae}for(var me=0,ye=0,Re=new Array(fe+1);me>>=1;return xe[Z]=se,M(I,ye+1,xe)},D=function(I,Z,se,ae){for(var fe=new Array(Z-1),xe=0,me=0,ye=0,Re=ae.length;ye1?k(I,this.hash,Re):Re[0]}var Xe=ae();return Xe===l?this:(++me.value,O(I,se,this.hash,this,fe,C(I,fe,xe,Xe)))},q=function(I,Z,se,ae,fe,xe,me){var ye=this.mask,Re=this.children,Xe=f(se,fe),nn=h(Xe),Et=g(ye,nn),Dn=ye&nn,nr=Dn?Re[Et]:w,Vs=nr._modify(I,Z,se+r,ae,fe,xe,me);if(nr===Vs)return this;var dd=Q(I,this),Vl=ye,zl=void 0;if(Dn&&b(Vs)){if(Vl&=~nn,!Vl)return w;if(Re.length<=2&&$(Re[Et^1]))return Re[Et^1];zl=_(dd,Et,Re)}else if(!Dn&&!b(Vs)){if(Re.length>=s)return T(I,Xe,Vs,ye,Re);Vl|=nn,zl=m(dd,Et,Vs,Re)}else zl=y(dd,Et,Vs,Re);return dd?(this.mask=Vl,this.children=zl,this):A(I,Vl,zl)},X=function(I,Z,se,ae,fe,xe,me){var ye=this.size,Re=this.children,Xe=f(se,fe),nn=Re[Xe],Et=(nn||w)._modify(I,Z,se+r,ae,fe,xe,me);if(nn===Et)return this;var Dn=Q(I,this),nr=void 0;if(b(nn)&&!b(Et))++ye,nr=y(Dn,Xe,Et,Re);else if(!b(nn)&&b(Et)){if(--ye,ye<=a)return D(I,ye,Xe,Re);nr=y(Dn,Xe,w,Re)}else nr=y(Dn,Xe,Et,Re);return Dn?(this.size=ye,this.children=nr,this):M(I,ye,nr)};w._modify=function(j,I,Z,se,ae,fe,xe){var me=se();return me===l?w:(++xe.value,C(j,ae,fe,me))};function N(j,I,Z,se,ae){this._editable=j,this._edit=I,this._config=Z,this._root=se,this._size=ae}N.prototype.setTree=function(j,I){return this._editable?(this._root=j,this._size=I,this):j===this._root?this:new N(this._editable,this._edit,this._config,j,I)};var B=n.tryGetHash=function(j,I,Z,se){for(var ae=se._root,fe=0,xe=se._config.keyEq;;)switch(ae.type){case p:return xe(Z,ae.key)?ae.value:j;case v:{if(I===ae.hash)for(var me=ae.children,ye=0,Re=me.length;ye{n.set(i,t(r,i))}),n}var ch=tF;function nF(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function rF(e){return{nodeDeps:ch(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:ch(e.nodeToNodeSubscriptions,t=>new Set(t))}}function hg(e,t,n,r){const{nodeDeps:i,nodeToNodeSubscriptions:o}=n,s=i.get(e);if(s&&r&&s!==r.nodeDeps.get(e))return;i.set(e,t);const a=s==null?t:Pu(t,s);for(const l of a)o.has(l)||o.set(l,new Set),Je(o.get(l)).add(e);if(s){const l=Pu(s,t);for(const u of l){if(!o.has(u))return;const c=Je(o.get(u));c.delete(e),c.size===0&&o.delete(u)}}}function iF(e,t,n,r){var i,o,s,a;const l=n.getState();r===l.currentTree.version||r===((i=l.nextTree)===null||i===void 0?void 0:i.version)||((o=l.previousTree)===null||o===void 0||o.version);const u=n.getGraph(r);if(hg(e,t,u),r===((s=l.previousTree)===null||s===void 0?void 0:s.version)){const d=n.getGraph(l.currentTree.version);hg(e,t,d,u)}if(r===((a=l.previousTree)===null||a===void 0?void 0:a.version)||r===l.currentTree.version){var c;const d=(c=l.nextTree)===null||c===void 0?void 0:c.version;if(d!==void 0){const f=n.getGraph(d);hg(e,t,f,u)}}}var Vc={cloneGraph:rF,graph:nF,saveDepsToStore:iF};let oF=0;const sF=()=>oF++;let aF=0;const lF=()=>aF++;let uF=0;const cF=()=>uF++;var M0={getNextTreeStateVersion:sF,getNextStoreID:lF,getNextComponentID:cF};const{persistentMap:aS}=Jj,{graph:dF}=Vc,{getNextTreeStateVersion:LR}=M0;function OR(){const e=LR();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:aS(),nonvalidatedAtoms:aS()}}function fF(){const e=OR();return{currentTree:e,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set,knownSelectors:new Set,transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(e.version,dF()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var PR={makeEmptyTreeState:OR,makeEmptyStoreState:fF,getNextTreeStateVersion:LR};class IR{}function hF(){return new IR}var N0={RetentionZone:IR,retentionZone:hF};function pF(e,t){const n=new Set(e);return n.add(t),n}function gF(e,t){const n=new Set(e);return n.delete(t),n}function mF(e,t,n){const r=new Map(e);return r.set(t,n),r}function yF(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function vF(e,t){const n=new Map(e);return n.delete(t),n}function _F(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var DR={setByAddingToSet:pF,setByDeletingFromSet:gF,mapBySettingInMap:mF,mapByUpdatingInMap:yF,mapByDeletingFromMap:vF,mapByDeletingMultipleFromMap:_F};function*xF(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var y2=xF;function SF(e,t){return new Proxy(e,{get:(r,i)=>(!(i in r)&&i in t&&(r[i]=t[i]()),r[i]),ownKeys:r=>Object.keys(r)})}var jR=SF;const{getNode:zc,getNodeMaybe:wF,recoilValuesForKeys:lS}=vn,{RetentionZone:uS}=N0,{setByAddingToSet:bF}=DR,EF=Object.freeze(new Set);class CF extends Error{}function AF(e,t,n){if(!Be("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function i(o){let s=r.get(o);s||r.set(o,s=new Set),s.add(t)}if(n instanceof uS)i(n);else if(Array.isArray(n))for(const o of n)i(o);return()=>{if(!Be("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function s(a){const l=o.nodesRetainedByZone.get(a);l==null||l.delete(t),l&&l.size===0&&o.nodesRetainedByZone.delete(a)}if(n instanceof uS)s(n);else if(Array.isArray(n))for(const a of n)s(a)}}function v2(e,t,n,r){const i=e.getState();if(i.nodeCleanupFunctions.has(n))return;const o=zc(n),s=AF(e,n,o.retainedBy),a=o.init(e,t,r);i.nodeCleanupFunctions.set(n,()=>{a(),s()})}function RF(e,t,n){v2(e,e.getState().currentTree,t,n)}function $F(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function kF(e,t,n){return v2(e,t,n,"get"),zc(n).get(e,t)}function FR(e,t,n){return zc(n).peek(e,t)}function TF(e,t,n){var r;const i=wF(t);return i==null||(r=i.invalidate)===null||r===void 0||r.call(i,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:bF(e.dirtyAtoms,t)}}function MF(e,t,n,r){const i=zc(n);if(i.set==null)throw new CF(`Attempt to set read-only RecoilValue: ${n}`);const o=i.set;return v2(e,t,n,"set"),o(e,t,r)}function NF(e,t,n){const r=e.getState(),i=e.getGraph(t.version),o=zc(n).nodeType;return jR({type:o},{loadable:()=>FR(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>o==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var s;return lS((s=i.nodeDeps.get(n))!==null&&s!==void 0?s:[])},subscribers:()=>{var s,a;return{nodes:lS(y2(UR(e,t,new Set([n])),l=>l!==n)),components:T0((s=(a=r.nodeToComponentSubscriptions.get(n))===null||a===void 0?void 0:a.values())!==null&&s!==void 0?s:[],([l])=>({name:l}))}}})}function UR(e,t,n){const r=new Set,i=Array.from(n),o=e.getGraph(t.version);for(let a=i.pop();a;a=i.pop()){var s;r.add(a);const l=(s=o.nodeToNodeSubscriptions.get(a))!==null&&s!==void 0?s:EF;for(const u of l)r.has(u)||i.push(u)}return r}var Ro={getNodeLoadable:kF,peekNodeLoadable:FR,setNodeValue:MF,initializeNode:RF,cleanUpNode:$F,setUnvalidatedAtomValue_DEPRECATED:TF,peekNodeInfo:NF,getDownstreamNodes:UR};let VR=null;function LF(e){VR=e}function OF(){var e;(e=VR)===null||e===void 0||e()}var zR={setInvalidateMemoizedSnapshot:LF,invalidateMemoizedSnapshot:OF};const{getDownstreamNodes:PF,getNodeLoadable:BR,setNodeValue:IF}=Ro,{getNextComponentID:DF}=M0,{getNode:jF,getNodeMaybe:HR}=vn,{DefaultValue:_2}=vn,{reactMode:FF}=Uc,{AbstractRecoilValue:UF,RecoilState:VF,RecoilValueReadOnly:zF,isRecoilValue:BF}=rl,{invalidateMemoizedSnapshot:HF}=zR;function WF(e,{key:t},n=e.getState().currentTree){var r,i;const o=e.getState();n.version===o.currentTree.version||n.version===((r=o.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(i=o.previousTree)===null||i===void 0||i.version);const s=BR(e,n,t);return s.state==="loading"&&s.contents.catch(()=>{}),s}function qF(e,t){const n=e.clone();return t.forEach((r,i)=>{r.state==="hasValue"&&r.contents instanceof _2?n.delete(i):n.set(i,r)}),n}function GF(e,t,{key:n},r){if(typeof r=="function"){const i=BR(e,t,n);if(i.state==="loading"){const o=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw Ae(o)}else if(i.state==="hasError")throw i.contents;return r(i.contents)}else return r}function KF(e,t,n){if(n.type==="set"){const{recoilValue:i,valueOrUpdater:o}=n,s=GF(e,t,i,o),a=IF(e,t,i.key,s);for(const[l,u]of a.entries())$y(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:i},loadable:o}=n;$y(t,i,o)}else if(n.type==="markModified"){const{recoilValue:{key:i}}=n;t.dirtyAtoms.add(i)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:i},unvalidatedValue:o}=n,s=HR(i);s==null||(r=s.invalidate)===null||r===void 0||r.call(s,t),t.atomValues.delete(i),t.nonvalidatedAtoms.set(i,o),t.dirtyAtoms.add(i)}else f2(`Unknown action ${n.type}`)}function $y(e,t,n){n.state==="hasValue"&&n.contents instanceof _2?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function WR(e,t){e.replaceState(n=>{const r=qR(n);for(const i of t)KF(e,r,i);return GR(e,r),HF(),r})}function L0(e,t){if(Iu.length){const n=Iu[Iu.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else WR(e,[t])}const Iu=[];function YF(){const e=new Map;return Iu.push(e),()=>{for(const[t,n]of e)WR(t,n);Iu.pop()}}function qR(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function GR(e,t){const n=PF(e,t,t.dirtyAtoms);for(const o of n){var r,i;(r=HR(o))===null||r===void 0||(i=r.invalidate)===null||i===void 0||i.call(r,t)}}function KR(e,t,n){L0(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function QF(e,t,n){if(n instanceof _2)return KR(e,t,n);L0(e,{type:"setLoadable",recoilValue:t,loadable:n})}function XF(e,t){L0(e,{type:"markModified",recoilValue:t})}function ZF(e,t,n){L0(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function JF(e,{key:t},n,r=null){const i=DF(),o=e.getState();o.nodeToComponentSubscriptions.has(t)||o.nodeToComponentSubscriptions.set(t,new Map),Je(o.nodeToComponentSubscriptions.get(t)).set(i,[r??"",n]);const s=FF();if(s.early&&(s.mode==="LEGACY"||s.mode==="MUTABLE_SOURCE")){const a=e.getState().nextTree;a&&a.dirtyAtoms.has(t)&&n(a)}return{release:()=>{const a=e.getState(),l=a.nodeToComponentSubscriptions.get(t);l===void 0||!l.has(i)||(l.delete(i),l.size===0&&a.nodeToComponentSubscriptions.delete(t))}}}function e8(e,t){var n;const{currentTree:r}=e.getState(),i=jF(t.key);(n=i.clearCache)===null||n===void 0||n.call(i,e,r)}var Br={RecoilValueReadOnly:zF,AbstractRecoilValue:UF,RecoilState:VF,getRecoilValueAsLoadable:WF,setRecoilValue:KR,setRecoilValueLoadable:QF,markRecoilValueModified:XF,setUnvalidatedRecoilValue:ZF,subscribeToRecoilValue:JF,isRecoilValue:BF,applyAtomValueWrites:qF,batchStart:YF,writeLoadableToTreeState:$y,invalidateDownstreams:GR,copyTreeState:qR,refreshRecoilValue:e8};function t8(e,t,n){const r=e.entries();let i=r.next();for(;!i.done;){const o=i.value;if(t.call(n,o[1],o[0],e))return!0;i=r.next()}return!1}var n8=t8;const{cleanUpNode:r8}=Ro,{deleteNodeConfigIfPossible:i8,getNode:YR}=vn,{RetentionZone:QR}=N0,o8=12e4,XR=new Set;function ZR(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const i=new Set;for(const s of t)if(s instanceof QR)for(const a of u8(n,s))i.add(a);else i.add(s);const o=s8(e,i);for(const s of o)l8(e,r,s)}function s8(e,t){const n=e.getState(),r=n.currentTree,i=e.getGraph(r.version),o=new Set,s=new Set;return a(t),o;function a(l){const u=new Set,c=a8(e,r,l,o,s);for(const g of c){var d;if(YR(g).retainedBy==="recoilRoot"){s.add(g);continue}if(((d=n.retention.referenceCounts.get(g))!==null&&d!==void 0?d:0)>0){s.add(g);continue}if(JR(g).some(_=>n.retention.referenceCounts.get(_))){s.add(g);continue}const y=i.nodeToNodeSubscriptions.get(g);if(y&&n8(y,_=>s.has(_))){s.add(g);continue}o.add(g),u.add(g)}const f=new Set;for(const g of u)for(const y of(h=i.nodeDeps.get(g))!==null&&h!==void 0?h:XR){var h;o.has(y)||f.add(y)}f.size&&a(f)}}function a8(e,t,n,r,i){const o=e.getGraph(t.version),s=[],a=new Set;for(;n.size>0;)l(Je(n.values().next().value));return s;function l(u){if(r.has(u)||i.has(u)){n.delete(u);return}if(a.has(u))return;const c=o.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)l(d);a.add(u),n.delete(u),s.push(u)}}function l8(e,t,n){if(!Be("recoil_memory_managament_2020"))return;r8(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const i=JR(n);for(const l of i){var o;(o=r.retention.nodesRetainedByZone.get(l))===null||o===void 0||o.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const s=r.graphsByVersion.get(t.version);if(s){const l=s.nodeDeps.get(n);if(l!==void 0){s.nodeDeps.delete(n);for(const u of l){var a;(a=s.nodeToNodeSubscriptions.get(u))===null||a===void 0||a.delete(n)}}s.nodeToNodeSubscriptions.delete(n)}i8(n)}function u8(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:XR}function JR(e){const t=YR(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof QR?[t]:t}function c8(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):ZR(e,new Set([t]))}function d8(e,t,n){var r;if(!Be("recoil_memory_managament_2020"))return;const i=e.getState().retention.referenceCounts,o=((r=i.get(t))!==null&&r!==void 0?r:0)+n;o===0?e$(e,t):i.set(t,o)}function e$(e,t){if(!Be("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),c8(e,t)}function f8(e){if(!Be("recoil_memory_managament_2020"))return;const t=e.getState();ZR(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function h8(e){return e===void 0?"recoilRoot":e}var ks={SUSPENSE_TIMEOUT_MS:o8,updateRetainCount:d8,updateRetainCountToZero:e$,releaseScheduledRetainablesNow:f8,retainedByOptionWithDefault:h8};const{unstable_batchedUpdates:p8}=JP;var g8={unstable_batchedUpdates:p8};const{unstable_batchedUpdates:m8}=g8;var y8={unstable_batchedUpdates:m8};const{batchStart:v8}=Br,{unstable_batchedUpdates:_8}=y8;let x2=_8||(e=>e());const x8=e=>{x2=e},S8=()=>x2,w8=e=>{x2(()=>{let t=()=>{};try{t=v8(),e()}finally{t()}})};var O0={getBatcher:S8,setBatcher:x8,batchUpdates:w8};function*b8(e){for(const t of e)for(const n of t)yield n}var t$=b8;const n$=typeof Window>"u"||typeof window>"u",E8=e=>!n$&&(e===window||e instanceof Window),C8=typeof navigator<"u"&&navigator.product==="ReactNative";var P0={isSSR:n$,isReactNative:C8,isWindow:E8};function A8(e,t){let n;return(...r)=>{n||(n={});const i=t(...r);return Object.hasOwnProperty.call(n,i)||(n[i]=e(...r)),n[i]}}function R8(e,t){let n,r;return(...i)=>{const o=t(...i);return n===o||(n=o,r=e(...i)),r}}function $8(e,t){let n,r;return[(...s)=>{const a=t(...s);return n===a||(n=a,r=e(...s)),r},()=>{n=null}]}var k8={memoizeWithArgsHash:A8,memoizeOneWithArgsHash:R8,memoizeOneWithArgsHashAndInvalidation:$8};const{batchUpdates:ky}=O0,{initializeNode:T8,peekNodeInfo:M8}=Ro,{graph:N8}=Vc,{getNextStoreID:L8}=M0,{DEFAULT_VALUE:O8,recoilValues:cS,recoilValuesForKeys:dS}=vn,{AbstractRecoilValue:P8,getRecoilValueAsLoadable:I8,setRecoilValue:fS,setUnvalidatedRecoilValue:D8}=Br,{updateRetainCount:yf}=ks,{setInvalidateMemoizedSnapshot:j8}=zR,{getNextTreeStateVersion:F8,makeEmptyStoreState:U8}=PR,{isSSR:V8}=P0,{memoizeOneWithArgsHashAndInvalidation:z8}=k8;class I0{constructor(t,n){Ce(this,"_store",void 0),Ce(this,"_refCount",1),Ce(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),I8(this._store,r))),Ce(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),Ce(this,"getNodes_UNSTABLE",r=>{if(this.checkRefCount_INTERNAL(),(r==null?void 0:r.isModified)===!0){if((r==null?void 0:r.isInitialized)===!1)return[];const s=this._store.getState().currentTree;return dS(s.dirtyAtoms)}const i=this._store.getState().knownAtoms,o=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?cS.values():r.isInitialized===!0?dS(t$([i,o])):y2(cS.values(),({key:s})=>!i.has(s)&&!o.has(s))}),Ce(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),M8(this._store,this._store.getState().currentTree,r))),Ce(this,"map",r=>{this.checkRefCount_INTERNAL();const i=new Ty(this,ky);return r(i),i}),Ce(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const i=new Ty(this,ky);return i.retain(),await r(i),i.autoRelease_INTERNAL(),i}),this._store={storeID:L8(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const i=t.graphsByVersion;if(i.has(r))return Je(i.get(r));const o=N8();return i.set(r,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ae("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)T8(this._store,r,"get"),yf(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){V8||window.setTimeout(()=>this._release(),10)}_release(){if(this._refCount--,this._refCount===0){if(this._store.getState().nodeCleanupFunctions.forEach(t=>t()),this._store.getState().nodeCleanupFunctions.clear(),!Be("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Be("recoil_memory_managament_2020")&&this._refCount<=0}getStore_INTERNAL(){return this.checkRefCount_INTERNAL(),this._store}getID(){return this.checkRefCount_INTERNAL(),this._store.getState().currentTree.stateID}getStoreID(){return this.checkRefCount_INTERNAL(),this._store.storeID}}function r$(e,t,n=!1){const r=e.getState(),i=n?F8():t.version;return{currentTree:{version:n?i:t.version,stateID:n?i:t.stateID,transactionMetadata:{...t.transactionMetadata},dirtyAtoms:new Set(t.dirtyAtoms),atomValues:t.atomValues.clone(),nonvalidatedAtoms:t.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(r.knownAtoms),knownSelectors:new Set(r.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:new Map().set(i,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(T0(r.nodeCleanupFunctions.entries(),([o])=>[o,()=>{}]))}}function B8(e){const t=new I0(U8());return e!=null?t.map(e):t}const[hS,i$]=z8((e,t)=>{var n;const r=e.getState(),i=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Je(r.previousTree);return new I0(r$(e,i),e.storeID)},(e,t)=>{var n,r;return String(t)+String(e.storeID)+String((n=e.getState().nextTree)===null||n===void 0?void 0:n.version)+String(e.getState().currentTree.version)+String((r=e.getState().previousTree)===null||r===void 0?void 0:r.version)});j8(i$);function H8(e,t="latest"){const n=hS(e,t);return n.isRetained()?n:(i$(),hS(e,t))}class Ty extends I0{constructor(t,n){super(r$(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),Ce(this,"_batch",void 0),Ce(this,"set",(r,i)=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{yf(o,r.key,1),fS(this.getStore_INTERNAL(),r,i)})}),Ce(this,"reset",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{yf(i,r.key,1),fS(this.getStore_INTERNAL(),r,O8)})}),Ce(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();ky(()=>{for(const[o,s]of r.entries())yf(i,o,1),D8(i,new P8(o),s)})}),this._batch=n}}var D0={Snapshot:I0,MutableSnapshot:Ty,freshSnapshot:B8,cloneSnapshot:H8},W8=D0.Snapshot,q8=D0.MutableSnapshot,G8=D0.freshSnapshot,K8=D0.cloneSnapshot,j0=Object.freeze({__proto__:null,Snapshot:W8,MutableSnapshot:q8,freshSnapshot:G8,cloneSnapshot:K8});function Y8(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var Q8=Y8;const{useRef:X8}=E;function Z8(e){const t=X8(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var pS=Z8;const{getNextTreeStateVersion:J8,makeEmptyStoreState:o$}=PR,{cleanUpNode:e9,getDownstreamNodes:t9,initializeNode:n9,setNodeValue:r9,setUnvalidatedAtomValue_DEPRECATED:i9}=Ro,{graph:o9}=Vc,{cloneGraph:s9}=Vc,{getNextStoreID:s$}=M0,{createMutableSource:pg,reactMode:a$}=Uc,{applyAtomValueWrites:a9}=Br,{releaseScheduledRetainablesNow:l$}=ks,{freshSnapshot:l9}=j0,{useCallback:u9,useContext:u$,useEffect:My,useMemo:c9,useRef:d9,useState:f9}=E;function Xl(){throw Ae("This component must be used inside a component.")}const c$=Object.freeze({storeID:s$(),getState:Xl,replaceState:Xl,getGraph:Xl,subscribeToTransactions:Xl,addTransactionMetadata:Xl});let Ny=!1;function gS(e){if(Ny)throw Ae("An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.");const t=e.getState();if(t.nextTree===null){Be("recoil_memory_managament_2020")&&Be("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&l$(e);const n=t.currentTree.version,r=J8();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,s9(Je(t.graphsByVersion.get(n))))}}const d$=E.createContext({current:c$}),F0=()=>u$(d$),f$=E.createContext(null);function h9(){return u$(f$)}function S2(e,t,n){const r=t9(e,n,n.dirtyAtoms);for(const i of r){const o=t.nodeToComponentSubscriptions.get(i);if(o)for(const[s,[a,l]]of o)l(n)}}function h$(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[i,o]of t.nodeTransactionSubscriptions)if(r.has(i))for(const[s,a]of o)a(e);for(const[i,o]of t.transactionSubscriptions)o(e);(!a$().early||t.suspendedComponentResolvers.size>0)&&(S2(e,t,n),t.suspendedComponentResolvers.forEach(i=>i()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(i=>i(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function p9(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(n==null)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,h$(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):f2("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Be("recoil_memory_managament_2020")&&n==null&&l$(e)}finally{t.commitDepth--}}function g9({setNotifyBatcherOfChange:e}){const t=F0(),[,n]=f9([]);return e(()=>n({})),My(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),My(()=>{Gj.enqueueExecution("Batcher",()=>{p9(t.current)})}),null}function m9(e,t){const n=o$();return t({set:(r,i)=>{const o=n.currentTree,s=r9(e,o,r.key,i),a=new Set(s.keys()),l=o.nonvalidatedAtoms.clone();for(const u of a)l.delete(u);n.currentTree={...o,dirtyAtoms:Q8(o.dirtyAtoms,a),atomValues:a9(o.atomValues,s),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((i,o)=>{n.currentTree=i9(n.currentTree,o,i)})}}),n}function y9(e){const t=l9(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let mS=0;function v9({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let i;const o=h=>{const g=i.current.graphsByVersion;if(g.has(h))return Je(g.get(h));const y=o9();return g.set(h,y),y},s=(h,g)=>{if(g==null){const{transactionSubscriptions:y}=d.current.getState(),_=mS++;return y.set(_,h),{release:()=>{y.delete(_)}}}else{const{nodeTransactionSubscriptions:y}=d.current.getState();y.has(g)||y.set(g,new Map);const _=mS++;return Je(y.get(g)).set(_,h),{release:()=>{const m=y.get(g);m&&(m.delete(_),m.size===0&&y.delete(g))}}}},a=h=>{gS(d.current);for(const g of Object.keys(h))Je(d.current.getState().nextTree).transactionMetadata[g]=h[g]},l=h=>{gS(d.current);const g=Je(i.current.nextTree);let y;try{Ny=!0,y=h(g)}finally{Ny=!1}y!==g&&(i.current.nextTree=y,a$().early&&S2(d.current,i.current,y),Je(u.current)())},u=d9(null),c=u9(h=>{u.current=h},[u]),d=pS(()=>n??{storeID:s$(),getState:()=>i.current,replaceState:l,getGraph:o,subscribeToTransactions:s,addTransactionMetadata:a});n!=null&&(d.current=n),i=pS(()=>e!=null?m9(d.current,e):t!=null?y9(t):o$());const f=c9(()=>pg==null?void 0:pg(i,()=>i.current.currentTree.version),[i]);return My(()=>{const h=d.current;for(const g of new Set(h.getState().knownAtoms))n9(h,g,"get");return()=>{for(const g of h.getState().knownAtoms)e9(h,g)}},[d]),E.createElement(d$.Provider,{value:d},E.createElement(f$.Provider,{value:f},E.createElement(g9,{setNotifyBatcherOfChange:c}),r))}function _9(e){const{override:t,...n}=e,r=F0();return t===!1&&r.current!==c$?e.children:E.createElement(v9,n)}function x9(){return F0().current.storeID}var Ei={RecoilRoot:_9,useStoreRef:F0,useRecoilMutableSource:h9,useRecoilStoreID:x9,notifyComponents_FOR_TESTING:S2,sendEndOfBatchNotifications_FOR_TESTING:h$};function S9(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n{t.current=e}),t.current}var p$=C9;const{useStoreRef:A9}=Ei,{SUSPENSE_TIMEOUT_MS:R9}=ks,{updateRetainCount:Zl}=ks,{RetentionZone:$9}=N0,{useEffect:k9,useRef:T9}=E,{isSSR:yS}=P0;function M9(e){if(Be("recoil_memory_managament_2020"))return N9(e)}function N9(e){const n=(Array.isArray(e)?e:[e]).map(s=>s instanceof $9?s:s.key),r=A9();k9(()=>{if(!Be("recoil_memory_managament_2020"))return;const s=r.current;if(i.current&&!yS)window.clearTimeout(i.current),i.current=null;else for(const a of n)Zl(s,a,1);return()=>{for(const a of n)Zl(s,a,-1)}},[r,...n]);const i=T9(),o=p$(n);if(!yS&&(o===void 0||!w9(o,n))){const s=r.current;for(const a of n)Zl(s,a,1);if(o)for(const a of o)Zl(s,a,-1);i.current&&window.clearTimeout(i.current),i.current=window.setTimeout(()=>{i.current=null;for(const a of n)Zl(s,a,-1)},R9)}}var w2=M9;function L9(){return""}var Bc=L9;const{batchUpdates:O9}=O0,{DEFAULT_VALUE:g$}=vn,{currentRendererSupportsUseSyncExternalStore:P9,reactMode:bl,useMutableSource:I9,useSyncExternalStore:D9}=Uc,{useRecoilMutableSource:j9,useStoreRef:Hr}=Ei,{AbstractRecoilValue:Ly,getRecoilValueAsLoadable:Hc,setRecoilValue:dh,setUnvalidatedRecoilValue:F9,subscribeToRecoilValue:il}=Br,{useCallback:gn,useEffect:ol,useMemo:m$,useRef:Du,useState:b2}=E,{setByAddingToSet:U9}=DR,{isSSR:V9}=P0;function E2(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(i=>{const o=n.current.getState().suspendedComponentResolvers;o.add(i),V9&&Ke(e.contents)&&e.contents.finally(()=>{o.delete(i)})}):e.state==="hasError"?e.contents:Ae(`Invalid value of loadable atom "${t.key}"`)}function z9(){const e=Bc(),t=Hr(),[,n]=b2([]),r=Du(new Set);r.current=new Set;const i=Du(new Set),o=Du(new Map),s=gn(l=>{const u=o.current.get(l);u&&(u.release(),o.current.delete(l))},[o]),a=gn((l,u)=>{o.current.has(u)&&n([])},[]);return ol(()=>{const l=t.current;Pu(r.current,i.current).forEach(u=>{if(o.current.has(u))return;const c=il(l,new Ly(u),f=>a(f,u),e);o.current.set(u,c),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a(l.getState(),u)}):a(l.getState(),u)}),Pu(i.current,r.current).forEach(u=>{s(u)}),i.current=r.current}),ol(()=>{const l=o.current;return Pu(r.current,new Set(l.keys())).forEach(u=>{const c=il(t.current,new Ly(u),d=>a(d,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>s(c))},[e,t,s,a]),m$(()=>{function l(g){return y=>{dh(t.current,g,y)}}function u(g){return()=>dh(t.current,g,g$)}function c(g){var y;r.current.has(g.key)||(r.current=U9(r.current,g.key));const _=t.current.getState();return Hc(t.current,g,bl().early&&(y=_.nextTree)!==null&&y!==void 0?y:_.currentTree)}function d(g){const y=c(g);return E2(y,g,t)}function f(g){return[d(g),l(g)]}function h(g){return[c(g),l(g)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:f,getRecoilStateLoadable:h,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const B9={current:0};function H9(e){const t=Hr(),n=Bc(),r=gn(()=>{var a;const l=t.current,u=l.getState(),c=bl().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return{loadable:Hc(l,e,c),key:e.key}},[t,e]),i=gn(a=>{let l;return()=>{var u,c;const d=a();return(u=l)!==null&&u!==void 0&&u.loadable.is(d.loadable)&&((c=l)===null||c===void 0?void 0:c.key)===d.key?l:(l=d,d)}},[]),o=m$(()=>i(r),[r,i]),s=gn(a=>{const l=t.current;return il(l,e,a,n).release},[t,e,n]);return D9(s,o,o).loadable}function W9(e){const t=Hr(),n=gn(()=>{var u;const c=t.current,d=c.getState(),f=bl().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return Hc(c,e,f)},[t,e]),r=gn(()=>n(),[n]),i=Bc(),o=gn((u,c)=>{const d=t.current;return il(d,e,()=>{if(!Be("recoil_suppress_rerender_in_callback"))return c();const h=n();l.current.is(h)||c(),l.current=h},i).release},[t,e,i,n]),s=j9();if(s==null)throw Ae("Recoil hooks must be used in components contained within a component.");const a=I9(s,r,o),l=Du(a);return ol(()=>{l.current=a}),a}function Oy(e){const t=Hr(),n=Bc(),r=gn(()=>{var l;const u=t.current,c=u.getState(),d=bl().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return Hc(u,e,d)},[t,e]),i=gn(()=>({loadable:r(),key:e.key}),[r,e.key]),o=gn(l=>{const u=i();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[i]);ol(()=>{const l=il(t.current,e,u=>{a(o)},n);return a(o),l.release},[n,e,t,o]);const[s,a]=b2(i);return s.key!==e.key?i().loadable:s.loadable}function q9(e){const t=Hr(),[,n]=b2([]),r=Bc(),i=gn(()=>{var a;const l=t.current,u=l.getState(),c=bl().early&&(a=u.nextTree)!==null&&a!==void 0?a:u.currentTree;return Hc(l,e,c)},[t,e]),o=i(),s=Du(o);return ol(()=>{s.current=o}),ol(()=>{const a=t.current,l=a.getState(),u=il(a,e,d=>{var f;if(!Be("recoil_suppress_rerender_in_callback"))return n([]);const h=i();(f=s.current)!==null&&f!==void 0&&f.is(h)||n(h),s.current=h},r);if(l.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s.current=null,n([])});else{var c;if(!Be("recoil_suppress_rerender_in_callback"))return n([]);const d=i();(c=s.current)!==null&&c!==void 0&&c.is(d)||n(d),s.current=d}return u.release},[r,i,e,t]),o}function C2(e){return Be("recoil_memory_managament_2020")&&w2(e),{TRANSITION_SUPPORT:Oy,SYNC_EXTERNAL_STORE:P9()?H9:Oy,MUTABLE_SOURCE:W9,LEGACY:q9}[bl().mode](e)}function y$(e){const t=Hr(),n=C2(e);return E2(n,e,t)}function U0(e){const t=Hr();return gn(n=>{dh(t.current,e,n)},[t,e])}function G9(e){const t=Hr();return gn(()=>{dh(t.current,e,g$)},[t,e])}function K9(e){return[y$(e),U0(e)]}function Y9(e){return[C2(e),U0(e)]}function Q9(){const e=Hr();return(t,n={})=>{O9(()=>{e.current.addTransactionMetadata(n),t.forEach((r,i)=>F9(e.current,new Ly(i),r))})}}function v$(e){return Be("recoil_memory_managament_2020")&&w2(e),Oy(e)}function _$(e){const t=Hr(),n=v$(e);return E2(n,e,t)}function X9(e){return[_$(e),U0(e)]}var Z9={recoilComponentGetRecoilValueCount_FOR_TESTING:B9,useRecoilInterface:z9,useRecoilState:K9,useRecoilStateLoadable:Y9,useRecoilValue:y$,useRecoilValueLoadable:C2,useResetRecoilState:G9,useSetRecoilState:U0,useSetUnvalidatedAtomValues:Q9,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:v$,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:_$,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:X9};function J9(e,t){const n=new Map;for(const[r,i]of e)t(i,r)&&n.set(r,i);return n}var e7=J9;function t7(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var n7=t7;function r7(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function xS(e){const t=e.atomValues.toMap(),n=ch(e7(t,(r,i)=>{const s=x$(i).persistence_UNSTABLE;return s!=null&&s.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return i7(e.nonvalidatedAtoms.toMap(),n)}function f7(e){z0(V0(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const i=xS(r),o=xS(n),s=ch(a7,l=>{var u,c,d,f;return{persistence_UNSTABLE:{type:(u=(c=l.persistence_UNSTABLE)===null||c===void 0?void 0:c.type)!==null&&u!==void 0?u:"none",backButton:(d=(f=l.persistence_UNSTABLE)===null||f===void 0?void 0:f.backButton)!==null&&d!==void 0?d:!1}}}),a=n7(r.dirtyAtoms,l=>i.has(l)||o.has(l));e({atomValues:i,previousAtomValues:o,atomInfo:s,modifiedAtoms:a,transactionMetadata:{...r.transactionMetadata}})},[e]))}function h7(e){z0(V0(t=>{const n=fh(t,"latest"),r=fh(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function p7(){const e=A2(),[t,n]=d7(()=>fh(e.current)),r=p$(t),i=vS(),o=vS();if(z0(V0(a=>n(fh(a)),[])),S$(()=>{const a=t.retain();if(i.current&&!_S){var l;window.clearTimeout(i.current),i.current=null,(l=o.current)===null||l===void 0||l.call(o),o.current=null}return()=>{window.setTimeout(a,10)}},[t]),r!==t&&!_S){if(i.current){var s;window.clearTimeout(i.current),i.current=null,(s=o.current)===null||s===void 0||s.call(o),o.current=null}o.current=t.retain(),i.current=window.setTimeout(()=>{var a;i.current=null,(a=o.current)===null||a===void 0||a.call(o),o.current=null},c7)}return t}function w$(e,t){var n;const r=e.getState(),i=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,o=t.getStore_INTERNAL().getState().currentTree;o7(()=>{const s=new Set;for(const u of[i.atomValues.keys(),o.atomValues.keys()])for(const c of u){var a,l;((a=i.atomValues.get(c))===null||a===void 0?void 0:a.contents)!==((l=o.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&x$(c).shouldRestoreFromSnapshots&&s.add(c)}s.forEach(u=>{u7(e,new l7(u),o.atomValues.has(u)?Je(o.atomValues.get(u)):s7)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function g7(){const e=A2();return V0(t=>w$(e.current,t),[e])}var b$={useRecoilSnapshot:p7,gotoSnapshot:w$,useGotoRecoilSnapshot:g7,useRecoilTransactionObserver:h7,useTransactionObservation_DEPRECATED:f7,useTransactionSubscription_DEPRECATED:z0};const{peekNodeInfo:m7}=Ro,{useStoreRef:y7}=Ei;function v7(){const e=y7();return({key:t})=>m7(e.current,e.current.getState().currentTree,t)}var _7=v7;const{reactMode:x7}=Uc,{RecoilRoot:S7,useStoreRef:w7}=Ei,{useMemo:b7}=E;function E7(){x7().mode==="MUTABLE_SOURCE"&&console.warn("Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.");const e=w7().current;return b7(()=>{function t({children:n}){return E.createElement(S7,{store_INTERNAL:e},n)}return t},[e])}var C7=E7;const{loadableWithValue:A7}=Fc,{initializeNode:R7}=Ro,{DEFAULT_VALUE:$7,getNode:k7}=vn,{copyTreeState:T7,getRecoilValueAsLoadable:M7,invalidateDownstreams:N7,writeLoadableToTreeState:L7}=Br;function SS(e){return k7(e.key).nodeType==="atom"}class O7{constructor(t,n){Ce(this,"_store",void 0),Ce(this,"_treeState",void 0),Ce(this,"_changes",void 0),Ce(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!SS(r))throw Ae("Reading selectors within atomicUpdate is not supported");const i=M7(this._store,r,this._treeState);if(i.state==="hasValue")return i.contents;throw i.state==="hasError"?i.contents:Ae(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),Ce(this,"set",(r,i)=>{if(!SS(r))throw Ae("Setting selectors within atomicUpdate is not supported");if(typeof i=="function"){const o=this.get(r);this._changes.set(r.key,i(o))}else R7(this._store,r.key,"set"),this._changes.set(r.key,i)}),Ce(this,"reset",r=>{this.set(r,$7)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=T7(this._treeState);for(const[n,r]of this._changes)L7(t,n,A7(r));return N7(this._store,t),t}}function P7(e){return t=>{e.replaceState(n=>{const r=new O7(e,n);return t(r),r.newTreeState_INTERNAL()})}}var I7={atomicUpdater:P7},D7=I7.atomicUpdater,E$=Object.freeze({__proto__:null,atomicUpdater:D7});function j7(e,t){if(!e)throw new Error(t)}var F7=j7,yu=F7;const{atomicUpdater:U7}=E$,{batchUpdates:V7}=O0,{DEFAULT_VALUE:z7}=vn,{useStoreRef:B7}=Ei,{refreshRecoilValue:H7,setRecoilValue:wS}=Br,{cloneSnapshot:W7}=j0,{gotoSnapshot:q7}=b$,{useCallback:G7}=E;class C${}const K7=new C$;function A$(e,t,n,r){let i=K7,o;if(V7(()=>{const a="useRecoilCallback() expects a function that returns a function: it accepts a function of the type (RecoilInterface) => (Args) => ReturnType and returns a callback function (Args) => ReturnType, where RecoilInterface is an object {snapshot, set, ...} and Args and ReturnType are the argument and return types of the callback you want to create. Please see the docs at recoiljs.org for details.";if(typeof t!="function")throw Ae(a);const l=jR({...r??{},set:(c,d)=>wS(e,c,d),reset:c=>wS(e,c,z7),refresh:c=>H7(e,c),gotoSnapshot:c=>q7(e,c),transact_UNSTABLE:c=>U7(e)(c)},{snapshot:()=>{const c=W7(e);return o=c.retain(),c}}),u=t(l);if(typeof u!="function")throw Ae(a);i=u(...n)}),i instanceof C$&&yu(!1),Ke(i))i=i.finally(()=>{var a;(a=o)===null||a===void 0||a()});else{var s;(s=o)===null||s===void 0||s()}return i}function Y7(e,t){const n=B7();return G7((...r)=>A$(n.current,e,r),t!=null?[...t,n]:void 0)}var R$={recoilCallback:A$,useRecoilCallback:Y7};const{useStoreRef:Q7}=Ei,{refreshRecoilValue:X7}=Br,{useCallback:Z7}=E;function J7(e){const t=Q7();return Z7(()=>{const n=t.current;X7(n,e)},[e,t])}var eU=J7;const{atomicUpdater:tU}=E$,{useStoreRef:nU}=Ei,{useMemo:rU}=E;function iU(e,t){const n=nU();return rU(()=>(...r)=>{tU(n.current)(o=>{e(o)(...r)})},t!=null?[...t,n]:void 0)}var oU=iU;class sU{constructor(t){Ce(this,"value",void 0),this.value=t}}var aU={WrappedValue:sU},lU=aU.WrappedValue,$$=Object.freeze({__proto__:null,WrappedValue:lU});const{isFastRefreshEnabled:uU}=Uc;class bS extends Error{}class cU{constructor(t){var n,r,i;Ce(this,"_name",void 0),Ce(this,"_numLeafs",void 0),Ce(this,"_root",void 0),Ce(this,"_onHit",void 0),Ce(this,"_onSet",void 0),Ce(this,"_mapNodeValue",void 0),this._name=t==null?void 0:t.name,this._numLeafs=0,this._root=null,this._onHit=(n=t==null?void 0:t.onHit)!==null&&n!==void 0?n:()=>{},this._onSet=(r=t==null?void 0:t.onSet)!==null&&r!==void 0?r:()=>{},this._mapNodeValue=(i=t==null?void 0:t.mapNodeValue)!==null&&i!==void 0?i:o=>o}size(){return this._numLeafs}root(){return this._root}get(t,n){var r;return(r=this.getLeafNode(t,n))===null||r===void 0?void 0:r.value}getLeafNode(t,n){if(this._root==null)return;let r=this._root;for(;r;){if(n==null||n.onNodeVisit(r),r.type==="leaf")return this._onHit(r),r;const i=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(i)}}set(t,n,r){const i=()=>{var o,s,a,l;let u,c;for(const[_,m]of t){var d,f,h;const p=this._root;if((p==null?void 0:p.type)==="leaf")throw this.invalidCacheError();const v=u;if(u=v?v.branches.get(c):p,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:_,parent:v,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==_)throw this.invalidCacheError();v==null||v.branches.set(c,u),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,u),c=this._mapNodeValue(m),this._root=(h=this._root)!==null&&h!==void 0?h:u}const g=u?(o=u)===null||o===void 0?void 0:o.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.branchKey!==c))throw this.invalidCacheError();const y={type:"leaf",value:n,parent:u,branchKey:c};(s=u)===null||s===void 0||s.branches.set(c,y),this._root=(a=this._root)!==null&&a!==void 0?a:y,this._numLeafs++,this._onSet(y),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,y)};try{i()}catch(o){if(o instanceof bS)this.clear(),i();else throw o}}delete(t){const n=this.root();if(!n)return!1;if(t===n)return this._root=null,this._numLeafs=0,!0;let r=t.parent,i=t.branchKey;for(;r;){var o;if(r.branches.delete(i),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;i=(o=r)===null||o===void 0?void 0:o.branchKey,r=r.parent}for(;r!==n;r=r.parent)if(r==null)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const t=uU()?"Possible Fast Refresh module reload detected. This may also be caused by an selector returning inconsistent values. Resetting cache.":"Invalid cache values. This happens when selectors do not return consistent values for the same input dependency values. That may also be caused when using Fast Refresh to change a selector implementation. Resetting cache.";throw f2(t+(this._name!=null?` - ${this._name}`:"")),new bS}}var dU={TreeCache:cU},fU=dU.TreeCache,k$=Object.freeze({__proto__:null,TreeCache:fU});class hU{constructor(t){var n;Ce(this,"_maxSize",void 0),Ce(this,"_size",void 0),Ce(this,"_head",void 0),Ce(this,"_tail",void 0),Ce(this,"_map",void 0),Ce(this,"_keyMapper",void 0),this._maxSize=t.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=(n=t.mapKey)!==null&&n!==void 0?n:r=>r}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(t){return this._map.has(this._keyMapper(t))}get(t){const n=this._keyMapper(t),r=this._map.get(n);if(r)return this.set(t,r.value),r.value}set(t,n){const r=this._keyMapper(t);this._map.get(r)&&this.delete(t);const o=this.head(),s={key:t,right:o,left:null,value:n};o?o.left=s:this._tail=s,this._map.set(r,s),this._head=s,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const t=this.tail();t&&this.delete(t.key)}delete(t){const n=this._keyMapper(t);if(!this._size||!this._map.has(n))return;const r=Je(this._map.get(n)),i=r.right,o=r.left;i&&(i.left=r.left),o&&(o.right=r.right),r===this.head()&&(this._head=i),r===this.tail()&&(this._tail=o),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var pU={LRUCache:hU},gU=pU.LRUCache,T$=Object.freeze({__proto__:null,LRUCache:gU});const{LRUCache:mU}=T$,{TreeCache:yU}=k$;function vU({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new mU({maxSize:t}),i=new yU({name:e,mapNodeValue:n,onHit:o=>{r.set(o,!0)},onSet:o=>{const s=r.tail();r.set(o,!0),s&&i.size()>t&&i.delete(s.key)}});return i}var ES=vU;function ir(e,t,n){if(typeof e=="string"&&!e.includes('"')&&!e.includes("\\"))return`"${e}"`;switch(typeof e){case"undefined":return"";case"boolean":return e?"true":"false";case"number":case"symbol":return String(e);case"string":return JSON.stringify(e);case"function":if((t==null?void 0:t.allowFunctions)!==!0)throw Ae("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(e===null)return"null";if(typeof e!="object"){var r;return(r=JSON.stringify(e))!==null&&r!==void 0?r:""}if(Ke(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((i,o)=>ir(i,t,o.toString()))}]`;if(typeof e.toJSON=="function")return ir(e.toJSON(n),t,n);if(e instanceof Map){const i={};for(const[o,s]of e)i[typeof o=="string"?o:ir(o,t)]=s;return ir(i,t,n)}return e instanceof Set?ir(Array.from(e).sort((i,o)=>ir(i,t).localeCompare(ir(o,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?ir(Array.from(e),t,n):`{${Object.keys(e).filter(i=>e[i]!==void 0).sort().map(i=>`${ir(i,t)}:${ir(e[i],t,i)}`).join(",")}}`}function _U(e,t={allowFunctions:!1}){return ir(e,t)}var B0=_U;const{TreeCache:xU}=k$,Td={equality:"reference",eviction:"keep-all",maxSize:1/0};function SU({equality:e=Td.equality,eviction:t=Td.eviction,maxSize:n=Td.maxSize}=Td,r){const i=wU(e);return bU(t,n,i,r)}function wU(e){switch(e){case"reference":return t=>t;case"value":return t=>B0(t)}throw Ae(`Unrecognized equality policy ${e}`)}function bU(e,t,n,r){switch(e){case"keep-all":return new xU({name:r,mapNodeValue:n});case"lru":return ES({name:r,maxSize:Je(t),mapNodeValue:n});case"most-recent":return ES({name:r,maxSize:1,mapNodeValue:n})}throw Ae(`Unrecognized eviction policy ${e}`)}var EU=SU;function CU(e){return()=>null}var AU={startPerfBlock:CU};const{isLoadable:RU,loadableWithError:Md,loadableWithPromise:$U,loadableWithValue:gg}=Fc,{WrappedValue:M$}=$$,{getNodeLoadable:Nd,peekNodeLoadable:kU,setNodeValue:TU}=Ro,{saveDepsToStore:MU}=Vc,{DEFAULT_VALUE:NU,getConfigDeletionHandler:LU,getNode:OU,registerNode:CS}=vn,{isRecoilValue:PU}=rl,{markRecoilValueModified:AS}=Br,{retainedByOptionWithDefault:IU}=ks,{recoilCallback:DU}=R$,{startPerfBlock:jU}=AU;class N${}const Jl=new N$,eu=[],Ld=new Map,FU=(()=>{let e=0;return()=>e++})();function L$(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:i}=e,o=e.set!=null?e.set:void 0,s=new Set,a=EU(i??{equality:"reference",eviction:"keep-all"},n),l=IU(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!Be("recoil_memory_managament_2020")||c>0}function f(N){return N.getState().knownSelectors.add(n),c++,()=>{c--}}function h(){return LU(n)!==void 0&&!d()}function g(N,B,G,ie,K){H(B,ie,K),y(N,G)}function y(N,B){D(N,B)&&T(N),m(B,!0)}function _(N,B){D(N,B)&&(Je(A(N)).stateVersions.clear(),m(B,!1))}function m(N,B){const G=Ld.get(N);if(G!=null){for(const ie of G)AS(ie,Je(t));B&&Ld.delete(N)}}function p(N,B){let G=Ld.get(B);G==null&&Ld.set(B,G=new Set),G.add(N)}function v(N,B,G,ie,K,pe){return B.then(ge=>{if(!d())throw T(N),Jl;const ue=gg(ge);return g(N,G,K,ue,ie),ge}).catch(ge=>{if(!d())throw T(N),Jl;if(Ke(ge))return x(N,ge,G,ie,K,pe);const ue=Md(ge);throw g(N,G,K,ue,ie),ge})}function x(N,B,G,ie,K,pe){return B.then(ge=>{if(!d())throw T(N),Jl;pe.loadingDepKey!=null&&pe.loadingDepPromise===B?G.atomValues.set(pe.loadingDepKey,gg(ge)):N.getState().knownSelectors.forEach(we=>{G.atomValues.delete(we)});const ue=b(N,G);if(ue&&ue.state!=="loading"){if((D(N,K)||A(N)==null)&&y(N,K),ue.state==="hasValue")return ue.contents;throw ue.contents}if(!D(N,K)){const we=k(N,G);if(we!=null)return we.loadingLoadable.contents}const[$e,je]=w(N,G,K);if($e.state!=="loading"&&g(N,G,K,$e,je),$e.state==="hasError")throw $e.contents;return $e.contents}).catch(ge=>{if(ge instanceof N$)throw Jl;if(!d())throw T(N),Jl;const ue=Md(ge);throw g(N,G,K,ue,ie),ge})}function S(N,B,G,ie){var K,pe,ge,ue;if(D(N,ie)||B.version===((K=N.getState())===null||K===void 0||(pe=K.currentTree)===null||pe===void 0?void 0:pe.version)||B.version===((ge=N.getState())===null||ge===void 0||(ue=ge.nextTree)===null||ue===void 0?void 0:ue.version)){var $e,je,we;MU(n,G,N,($e=(je=N.getState())===null||je===void 0||(we=je.nextTree)===null||we===void 0?void 0:we.version)!==null&&$e!==void 0?$e:N.getState().currentTree.version)}for(const Te of G)s.add(Te)}function w(N,B,G){const ie=jU(n);let K=!0,pe=!0;const ge=()=>{ie(),pe=!1};let ue,$e=!1,je;const we={loadingDepKey:null,loadingDepPromise:null},Te=new Map;function Ie({key:bt}){const pt=Nd(N,B,bt);switch(Te.set(bt,pt),K||(S(N,B,new Set(Te.keys()),G),_(N,G)),pt.state){case"hasValue":return pt.contents;case"hasError":throw pt.contents;case"loading":throw we.loadingDepKey=bt,we.loadingDepPromise=pt.contents,pt.contents}throw Ae("Invalid Loadable state")}const In=bt=>(...pt)=>{if(pe)throw Ae("Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.");return t==null&&yu(!1),DU(N,bt,pt,{node:t})};try{ue=r({get:Ie,getCallback:In}),ue=PU(ue)?Ie(ue):ue,RU(ue)&&(ue.state==="hasError"&&($e=!0),ue=ue.contents),Ke(ue)?ue=v(N,ue,B,Te,G,we).finally(ge):ge(),ue=ue instanceof M$?ue.value:ue}catch(bt){ue=bt,Ke(ue)?ue=x(N,ue,B,Te,G,we).finally(ge):($e=!0,ge())}return $e?je=Md(ue):Ke(ue)?je=$U(ue):je=gg(ue),K=!1,$(N,G,Te),S(N,B,new Set(Te.keys()),G),[je,Te]}function b(N,B){let G=B.atomValues.get(n);if(G!=null)return G;const ie=new Set;try{G=a.get(pe=>(typeof pe!="string"&&yu(!1),Nd(N,B,pe).contents),{onNodeVisit:pe=>{pe.type==="branch"&&pe.nodeKey!==n&&ie.add(pe.nodeKey)}})}catch(pe){throw Ae(`Problem with cache lookup for selector "${n}": ${pe.message}`)}if(G){var K;B.atomValues.set(n,G),S(N,B,ie,(K=A(N))===null||K===void 0?void 0:K.executionID)}return G}function C(N,B){const G=b(N,B);if(G!=null)return T(N),G;const ie=k(N,B);if(ie!=null){var K;return((K=ie.loadingLoadable)===null||K===void 0?void 0:K.state)==="loading"&&p(N,ie.executionID),ie.loadingLoadable}const pe=FU(),[ge,ue]=w(N,B,pe);return ge.state==="loading"?(M(N,pe,ge,ue,B),p(N,pe)):(T(N),H(B,ge,ue)),ge}function k(N,B){const G=t$([u.has(N)?[Je(u.get(N))]:[],T0(y2(u,([K])=>K!==N),([,K])=>K)]);function ie(K){for(const[pe,ge]of K)if(!Nd(N,B,pe).is(ge))return!0;return!1}for(const K of G){if(K.stateVersions.get(B.version)||!ie(K.depValuesDiscoveredSoFarDuringAsyncWork))return K.stateVersions.set(B.version,!0),K;K.stateVersions.set(B.version,!1)}}function A(N){return u.get(N)}function M(N,B,G,ie,K){u.set(N,{depValuesDiscoveredSoFarDuringAsyncWork:ie,executionID:B,loadingLoadable:G,stateVersions:new Map([[K.version,!0]])})}function $(N,B,G){if(D(N,B)){const ie=A(N);ie!=null&&(ie.depValuesDiscoveredSoFarDuringAsyncWork=G)}}function T(N){u.delete(N)}function D(N,B){var G;return B===((G=A(N))===null||G===void 0?void 0:G.executionID)}function O(N){return Array.from(N.entries()).map(([B,G])=>[B,G.contents])}function H(N,B,G){N.atomValues.set(n,B);try{a.set(O(G),B)}catch(ie){throw Ae(`Problem with setting cache for selector "${n}": ${ie.message}`)}}function Q(N){if(eu.includes(n)){const B=`Recoil selector has circular dependencies: ${eu.slice(eu.indexOf(n)).join(" → ")}`;return Md(Ae(B))}eu.push(n);try{return N()}finally{eu.pop()}}function U(N,B){const G=B.atomValues.get(n);return G??a.get(ie=>{var K;return typeof ie!="string"&&yu(!1),(K=kU(N,B,ie))===null||K===void 0?void 0:K.contents})}function W(N,B){return Q(()=>C(N,B))}function q(N){N.atomValues.delete(n)}function X(N,B){t==null&&yu(!1);for(const ie of s){var G;const K=OU(ie);(G=K.clearCache)===null||G===void 0||G.call(K,N,B)}s.clear(),q(B),a.clear(),AS(N,t)}return o!=null?t=CS({key:n,nodeType:"selector",peek:U,get:W,set:(B,G,ie)=>{let K=!1;const pe=new Map;function ge({key:we}){if(K)throw Ae("Recoil: Async selector sets are not currently supported.");const Te=Nd(B,G,we);if(Te.state==="hasValue")return Te.contents;if(Te.state==="loading"){const Ie=`Getting value of asynchronous atom or selector "${we}" in a pending state while setting selector "${n}" is not yet supported.`;throw Ae(Ie)}else throw Te.contents}function ue(we,Te){if(K)throw Ae("Recoil: Async selector sets are not currently supported.");const Ie=typeof Te=="function"?Te(ge(we)):Te;TU(B,G,we.key,Ie).forEach((bt,pt)=>pe.set(pt,bt))}function $e(we){ue(we,NU)}const je=o({set:ue,get:ge,reset:$e},ie);if(je!==void 0)throw Ke(je)?Ae("Recoil: Async selector sets are not currently supported."):Ae("Recoil: selector set should be a void function.");return K=!0,pe},init:f,invalidate:q,clearCache:X,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=CS({key:n,nodeType:"selector",peek:U,get:W,init:f,invalidate:q,clearCache:X,shouldDeleteConfigOnRelease:h,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}L$.value=e=>new M$(e);var sl=L$;const{isLoadable:UU,loadableWithError:mg,loadableWithPromise:yg,loadableWithValue:Bs}=Fc,{WrappedValue:O$}=$$,{peekNodeInfo:VU}=Ro,{DEFAULT_VALUE:jo,DefaultValue:Fi,getConfigDeletionHandler:P$,registerNode:zU,setConfigDeletionHandler:BU}=vn,{isRecoilValue:HU}=rl,{getRecoilValueAsLoadable:WU,markRecoilValueModified:qU,setRecoilValue:RS,setRecoilValueLoadable:GU}=Br,{retainedByOptionWithDefault:KU}=ks,tu=e=>e instanceof O$?e.value:e;function YU(e){const{key:t,persistence_UNSTABLE:n}=e,r=KU(e.retainedBy_UNSTABLE);let i=0;function o(p){return yg(p.then(v=>(s=Bs(v),v)).catch(v=>{throw s=mg(v),v}))}let s=Ke(e.default)?o(e.default):UU(e.default)?e.default.state==="loading"?o(e.default.contents):e.default:Bs(tu(e.default));s.contents;let a;const l=new Map;function u(p){return p}function c(p,v){const x=v.then(S=>{var w,b;return((b=((w=p.getState().nextTree)!==null&&w!==void 0?w:p.getState().currentTree).atomValues.get(t))===null||b===void 0?void 0:b.contents)===x&&RS(p,m,S),S}).catch(S=>{var w,b;throw((b=((w=p.getState().nextTree)!==null&&w!==void 0?w:p.getState().currentTree).atomValues.get(t))===null||b===void 0?void 0:b.contents)===x&&GU(p,m,mg(S)),S});return x}function d(p,v,x){var S;i++;const w=()=>{var A;i--,(A=l.get(p))===null||A===void 0||A.forEach(M=>M()),l.delete(p)};if(p.getState().knownAtoms.add(t),s.state==="loading"){const A=()=>{var M;((M=p.getState().nextTree)!==null&&M!==void 0?M:p.getState().currentTree).atomValues.has(t)||qU(p,m)};s.contents.finally(A)}const b=(S=e.effects)!==null&&S!==void 0?S:e.effects_UNSTABLE;if(b!=null){let A=function(q){if(D&&q.key===t){const X=T;return X instanceof Fi?f(p,v):Ke(X)?yg(X.then(N=>N instanceof Fi?s.toPromise():N)):Bs(X)}return WU(p,q)},M=function(q){return A(q).toPromise()},$=function(q){var X;const N=VU(p,(X=p.getState().nextTree)!==null&&X!==void 0?X:p.getState().currentTree,q.key);return D&&q.key===t&&!(T instanceof Fi)?{...N,isSet:!0,loadable:A(q)}:N},T=jo,D=!0,O=!1,H=null;const Q=q=>X=>{if(D){const N=A(m),B=N.state==="hasValue"?N.contents:jo;T=typeof X=="function"?X(B):X,Ke(T)&&(T=T.then(G=>(H={effect:q,value:G},G)))}else{if(Ke(X))throw Ae("Setting atoms to async values is not implemented.");typeof X!="function"&&(H={effect:q,value:tu(X)}),RS(p,m,typeof X=="function"?N=>{const B=tu(X(N));return H={effect:q,value:B},B}:tu(X))}},U=q=>()=>Q(q)(jo),W=q=>X=>{var N;const{release:B}=p.subscribeToTransactions(G=>{var ie;let{currentTree:K,previousTree:pe}=G.getState();pe||(pe=K);const ge=(ie=K.atomValues.get(t))!==null&&ie!==void 0?ie:s;if(ge.state==="hasValue"){var ue,$e,je,we;const Te=ge.contents,Ie=(ue=pe.atomValues.get(t))!==null&&ue!==void 0?ue:s,In=Ie.state==="hasValue"?Ie.contents:jo;(($e=H)===null||$e===void 0?void 0:$e.effect)!==q||((je=H)===null||je===void 0?void 0:je.value)!==Te?X(Te,In,!K.atomValues.has(t)):((we=H)===null||we===void 0?void 0:we.effect)===q&&(H=null)}},t);l.set(p,[...(N=l.get(p))!==null&&N!==void 0?N:[],B])};for(const q of b)try{const X=q({node:m,storeID:p.storeID,parentStoreID_UNSTABLE:p.parentStoreID,trigger:x,setSelf:Q(q),resetSelf:U(q),onSet:W(q),getPromise:M,getLoadable:A,getInfo_UNSTABLE:$});if(X!=null){var C;l.set(p,[...(C=l.get(p))!==null&&C!==void 0?C:[],X])}}catch(X){T=X,O=!0}if(D=!1,!(T instanceof Fi)){var k;const q=O?mg(T):Ke(T)?yg(c(p,T)):Bs(tu(T));q.contents,v.atomValues.set(t,q),(k=p.getState().nextTree)===null||k===void 0||k.atomValues.set(t,q)}}return w}function f(p,v){var x,S;return(x=(S=v.atomValues.get(t))!==null&&S!==void 0?S:a)!==null&&x!==void 0?x:s}function h(p,v){if(v.atomValues.has(t))return Je(v.atomValues.get(t));if(v.nonvalidatedAtoms.has(t)){if(a!=null)return a;if(n==null)return s;const x=v.nonvalidatedAtoms.get(t),S=n.validator(x,jo);return a=S instanceof Fi?s:Bs(S),a}else return s}function g(){a=void 0}function y(p,v,x){if(v.atomValues.has(t)){const S=Je(v.atomValues.get(t));if(S.state==="hasValue"&&x===S.contents)return new Map}else if(!v.nonvalidatedAtoms.has(t)&&x instanceof Fi)return new Map;return a=void 0,new Map().set(t,Bs(x))}function _(){return P$(t)!==void 0&&i<=0}const m=zU({key:t,nodeType:"atom",peek:f,get:h,set:y,init:d,invalidate:g,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:r});return m}function R2(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return HU(n)?QU({...t,default:n}):YU({...t,default:n})}function QU(e){const t=R2({...e,default:jo,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Fi?r:Je(e.persistence_UNSTABLE).validator(r,jo)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=sl({key:`${e.key}__withFallback`,get:({get:r})=>{const i=r(t);return i instanceof Fi?e.default:i},set:({set:r},i)=>r(t,i),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return BU(n.key,P$(e.key)),n}R2.value=e=>new O$(e);var I$=R2;class XU{constructor(t){var n;Ce(this,"_map",void 0),Ce(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=(n=t==null?void 0:t.mapKey)!==null&&n!==void 0?n:r=>r}size(){return this._map.size}has(t){return this._map.has(this._keyMapper(t))}get(t){return this._map.get(this._keyMapper(t))}set(t,n){this._map.set(this._keyMapper(t),n)}delete(t){this._map.delete(this._keyMapper(t))}clear(){this._map.clear()}}var ZU={MapCache:XU},JU=ZU.MapCache,eV=Object.freeze({__proto__:null,MapCache:JU});const{LRUCache:$S}=T$,{MapCache:tV}=eV,Od={equality:"reference",eviction:"none",maxSize:1/0};function nV({equality:e=Od.equality,eviction:t=Od.eviction,maxSize:n=Od.maxSize}=Od){const r=rV(e);return iV(t,n,r)}function rV(e){switch(e){case"reference":return t=>t;case"value":return t=>B0(t)}throw Ae(`Unrecognized equality policy ${e}`)}function iV(e,t,n){switch(e){case"keep-all":return new tV({mapKey:n});case"lru":return new $S({mapKey:n,maxSize:Je(t)});case"most-recent":return new $S({mapKey:n,maxSize:1})}throw Ae(`Unrecognized eviction policy ${e}`)}var D$=nV;const{setConfigDeletionHandler:oV}=vn;function sV(e){var t,n;const r=D$({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o,s;const a=r.get(i);if(a!=null)return a;const{cachePolicyForParams_UNSTABLE:l,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=I$({...u,key:`${e.key}__${(o=B0(i))!==null&&o!==void 0?o:"void"}`,default:typeof c=="function"?c(i):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(i):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(i):(s=e.effects)!==null&&s!==void 0?s:e.effects_UNSTABLE});return r.set(i,d),oV(d.key,()=>{r.delete(i)}),d}}var aV=sV;const{setConfigDeletionHandler:lV}=vn;let uV=0;function cV(e){var t,n;const r=D$({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return i=>{var o;let s;try{s=r.get(i)}catch(f){throw Ae(`Problem with cache lookup for selector ${e.key}: ${f.message}`)}if(s!=null)return s;const a=`${e.key}__selectorFamily/${(o=B0(i,{allowFunctions:!0}))!==null&&o!==void 0?o:"void"}/${uV++}`,l=f=>e.get(i)(f),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(i):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const f=e.set;d=sl({key:a,get:l,set:(g,y)=>f(i)(g,y),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=sl({key:a,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(i,d),lV(d.key,()=>{r.delete(i)}),d}}var $o=cV;const dV=$o({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function fV(e){return dV(e)}var hV=fV;const pV=$o({key:"__error",get:e=>()=>{throw Ae(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function gV(e){return pV(e)}var mV=gV;function yV(e){return e}var vV=yV;const{loadableWithError:j$,loadableWithPromise:F$,loadableWithValue:U$}=Fc;function H0(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[i,o]of t.entries())try{n[i]=e(o)}catch(s){r[i]=s}return[n,r]}function _V(e){return e!=null&&!Ke(e)}function W0(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function Py(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,i)=>({...n,[r]:t[i]}),{})}function Ca(e,t,n){const r=n.map((i,o)=>i==null?U$(t[o]):Ke(i)?F$(i):j$(i));return Py(e,r)}function xV(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const SV=$o({key:"__waitForNone",get:e=>({get:t})=>{const n=W0(e),[r,i]=H0(t,n);return Ca(e,r,i)},dangerouslyAllowMutability:!0}),wV=$o({key:"__waitForAny",get:e=>({get:t})=>{const n=W0(e),[r,i]=H0(t,n);return i.some(o=>!Ke(o))?Ca(e,r,i):new Promise(o=>{for(const[s,a]of i.entries())Ke(a)&&a.then(l=>{r[s]=l,i[s]=void 0,o(Ca(e,r,i))}).catch(l=>{i[s]=l,o(Ca(e,r,i))})})},dangerouslyAllowMutability:!0}),bV=$o({key:"__waitForAll",get:e=>({get:t})=>{const n=W0(e),[r,i]=H0(t,n);if(i.every(s=>s==null))return Py(e,r);const o=i.find(_V);if(o!=null)throw o;return Promise.all(i).then(s=>Py(e,xV(r,s)))},dangerouslyAllowMutability:!0}),EV=$o({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=W0(e),[r,i]=H0(t,n);return i.every(o=>!Ke(o))?Ca(e,r,i):Promise.all(i.map((o,s)=>Ke(o)?o.then(a=>{r[s]=a,i[s]=void 0}).catch(a=>{r[s]=void 0,i[s]=a}):null)).then(()=>Ca(e,r,i))},dangerouslyAllowMutability:!0}),CV=$o({key:"__noWait",get:e=>({get:t})=>{try{return sl.value(U$(t(e)))}catch(n){return sl.value(Ke(n)?F$(n):j$(n))}},dangerouslyAllowMutability:!0});var AV={waitForNone:SV,waitForAny:wV,waitForAll:bV,waitForAllSettled:EV,noWait:CV};const{RecoilLoadable:RV}=Fc,{DefaultValue:$V}=vn,{RecoilRoot:kV,useRecoilStoreID:TV}=Ei,{isRecoilValue:MV}=rl,{retentionZone:NV}=N0,{freshSnapshot:LV}=j0,{useRecoilState:OV,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:PV,useRecoilStateLoadable:IV,useRecoilValue:DV,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:jV,useRecoilValueLoadable:FV,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:UV,useResetRecoilState:VV,useSetRecoilState:zV}=Z9,{useGotoRecoilSnapshot:BV,useRecoilSnapshot:HV,useRecoilTransactionObserver:WV}=b$,{useRecoilCallback:qV}=R$,{noWait:GV,waitForAll:KV,waitForAllSettled:YV,waitForAny:QV,waitForNone:XV}=AV;var $2={DefaultValue:$V,isRecoilValue:MV,RecoilLoadable:RV,RecoilEnv:wl,RecoilRoot:kV,useRecoilStoreID:TV,useRecoilBridgeAcrossReactRoots_UNSTABLE:C7,atom:I$,selector:sl,atomFamily:aV,selectorFamily:$o,constSelector:hV,errorSelector:mV,readOnlySelector:vV,noWait:GV,waitForNone:XV,waitForAny:QV,waitForAll:KV,waitForAllSettled:YV,useRecoilValue:DV,useRecoilValueLoadable:FV,useRecoilState:OV,useRecoilStateLoadable:IV,useSetRecoilState:zV,useResetRecoilState:VV,useGetRecoilValueInfo_UNSTABLE:_7,useRecoilRefresher_UNSTABLE:eU,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:UV,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:jV,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:PV,useRecoilCallback:qV,useRecoilTransaction_UNSTABLE:oU,useGotoRecoilSnapshot:BV,useRecoilSnapshot:HV,useRecoilTransactionObserver_UNSTABLE:WV,snapshot_UNSTABLE:LV,useRetain:w2,retentionZone:NV},ZV=$2.RecoilRoot,V$=$2.atom,kS=$2.useRecoilState,Wc=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},al=typeof window>"u"||"Deno"in globalThis;function Vn(){}function JV(e,t){return typeof e=="function"?e(t):e}function Iy(e){return typeof e=="number"&&e>=0&&e!==1/0}function z$(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Aa(e,t){return typeof e=="function"?e(t):e}function cr(e,t){return typeof e=="function"?e(t):e}function TS(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(s){if(r){if(t.queryHash!==k2(s,t.options))return!1}else if(!cc(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||i&&i!==t.state.fetchStatus||o&&!o(t))}function MS(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(uc(t.options.mutationKey)!==uc(o))return!1}else if(!cc(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function k2(e,t){return((t==null?void 0:t.queryKeyHashFn)||uc)(e)}function uc(e){return JSON.stringify(e,(t,n)=>jy(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function cc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!cc(e[n],t[n])):!1}function B$(e,t){if(e===t)return e;const n=NS(e)&&NS(t);if(n||jy(e)&&jy(t)){const r=n?e:Object.keys(e),i=r.length,o=n?t:Object.keys(t),s=o.length,a=n?[]:{};let l=0;for(let u=0;u{setTimeout(t,e)})}function Fy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?B$(e,t):t}function tz(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function nz(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var H$=Symbol(),W$=(e,t)=>!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===H$?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn,Qo,qi,Oa,LE,rz=(LE=class extends Wc{constructor(){super();Se(this,Qo);Se(this,qi);Se(this,Oa);he(this,Oa,t=>{if(!al&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){P(this,qi)||this.setEventListener(P(this,Oa))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,qi))==null||t.call(this),he(this,qi,void 0))}setEventListener(t){var n;he(this,Oa,t),(n=P(this,qi))==null||n.call(this),he(this,qi,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){P(this,Qo)!==t&&(he(this,Qo,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof P(this,Qo)=="boolean"?P(this,Qo):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Qo=new WeakMap,qi=new WeakMap,Oa=new WeakMap,LE),T2=new rz,Pa,Gi,Ia,OE,iz=(OE=class extends Wc{constructor(){super();Se(this,Pa,!0);Se(this,Gi);Se(this,Ia);he(this,Ia,t=>{if(!al&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){P(this,Gi)||this.setEventListener(P(this,Ia))}onUnsubscribe(){var t;this.hasListeners()||((t=P(this,Gi))==null||t.call(this),he(this,Gi,void 0))}setEventListener(t){var n;he(this,Ia,t),(n=P(this,Gi))==null||n.call(this),he(this,Gi,t(this.setOnline.bind(this)))}setOnline(t){P(this,Pa)!==t&&(he(this,Pa,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return P(this,Pa)}},Pa=new WeakMap,Gi=new WeakMap,Ia=new WeakMap,OE),hh=new iz;function oz(e){return Math.min(1e3*2**e,3e4)}function q$(e){return(e??"online")==="online"?hh.isOnline():!0}var G$=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function vg(e){return e instanceof G$}function K$(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((m,p)=>{o=m,s=p}),l=m=>{var p;r||(g(new G$(m)),(p=e.abort)==null||p.call(e))},u=()=>{t=!0},c=()=>{t=!1},d=()=>T2.isFocused()&&(e.networkMode==="always"||hh.isOnline())&&e.canRun(),f=()=>q$(e.networkMode)&&e.canRun(),h=m=>{var p;r||(r=!0,(p=e.onSuccess)==null||p.call(e,m),i==null||i(),o(m))},g=m=>{var p;r||(r=!0,(p=e.onError)==null||p.call(e,m),i==null||i(),s(m))},y=()=>new Promise(m=>{var p;i=v=>{(r||d())&&m(v)},(p=e.onPause)==null||p.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),_=()=>{if(r)return;let m;const p=n===0?e.initialPromise:void 0;try{m=p??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(h).catch(v=>{var C;if(r)return;const x=e.retry??(al?0:3),S=e.retryDelay??oz,w=typeof S=="function"?S(n,v):S,b=x===!0||typeof x=="number"&&nd()?void 0:y()).then(()=>{t?g(v):_()})})};return{promise:a,cancel:l,continue:()=>(i==null||i(),a),cancelRetry:u,continueRetry:c,canStart:f,start:()=>(f()?_():y().then(_),a)}}function sz(){let e=[],t=0,n=f=>{f()},r=f=>{f()},i=f=>setTimeout(f,0);const o=f=>{i=f},s=f=>{let h;t++;try{h=f()}finally{t--,t||u()}return h},a=f=>{t?e.push(f):i(()=>{n(f)})},l=f=>(...h)=>{a(()=>{f(...h)})},u=()=>{const f=e;e=[],f.length&&i(()=>{r(()=>{f.forEach(h=>{n(h)})})})};return{batch:s,batchCalls:l,schedule:a,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{r=f},setScheduler:o}}var Nt=sz(),Xo,PE,Y$=(PE=class{constructor(){Se(this,Xo)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Iy(this.gcTime)&&he(this,Xo,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(al?1/0:5*60*1e3))}clearGcTimeout(){P(this,Xo)&&(clearTimeout(P(this,Xo)),he(this,Xo,void 0))}},Xo=new WeakMap,PE),Da,ja,Un,Ut,kc,Zo,sr,Yr,IE,az=(IE=class extends Y${constructor(t){super();Se(this,sr);Se(this,Da);Se(this,ja);Se(this,Un);Se(this,Ut);Se(this,kc);Se(this,Zo);he(this,Zo,!1),he(this,kc,t.defaultOptions),this.setOptions(t.options),this.observers=[],he(this,Un,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,he(this,Da,t.state||lz(this.options)),this.state=P(this,Da),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=P(this,Ut))==null?void 0:t.promise}setOptions(t){this.options={...P(this,kc),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&P(this,Un).remove(this)}setData(t,n){const r=Fy(this.state.data,t,this.options);return Me(this,sr,Yr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){Me(this,sr,Yr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=P(this,Ut))==null?void 0:r.promise;return(i=P(this,Ut))==null||i.cancel(t),n?n.then(Vn).catch(Vn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(P(this,Da))}isActive(){return this.observers.some(t=>cr(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!z$(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Ut))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=P(this,Ut))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),P(this,Un).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(P(this,Ut)&&(P(this,Zo)?P(this,Ut).cancel({revert:!0}):P(this,Ut).cancelRetry()),this.scheduleGc()),P(this,Un).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Me(this,sr,Yr).call(this,{type:"invalidate"})}fetch(t,n){var l,u,c;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(P(this,Ut))return P(this,Ut).continueRetry(),P(this,Ut).promise}if(t&&this.setOptions(t),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(he(this,Zo,!0),r.signal)})},o=()=>{const d=W$(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),he(this,Zo,!1),this.options.persister?this.options.persister(d,f,this):d(f)},s={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(s),(l=this.options.behavior)==null||l.onFetch(s,this),he(this,ja,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((u=s.fetchOptions)==null?void 0:u.meta))&&Me(this,sr,Yr).call(this,{type:"fetch",meta:(c=s.fetchOptions)==null?void 0:c.meta});const a=d=>{var f,h,g,y;vg(d)&&d.silent||Me(this,sr,Yr).call(this,{type:"error",error:d}),vg(d)||((h=(f=P(this,Un).config).onError)==null||h.call(f,d,this),(y=(g=P(this,Un).config).onSettled)==null||y.call(g,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return he(this,Ut,K$({initialPromise:n==null?void 0:n.initialPromise,fn:s.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,g,y;if(d===void 0){a(new Error(`${this.queryHash} data is undefined`));return}this.setData(d),(h=(f=P(this,Un).config).onSuccess)==null||h.call(f,d,this),(y=(g=P(this,Un).config).onSettled)==null||y.call(g,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:a,onFail:(d,f)=>{Me(this,sr,Yr).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{Me(this,sr,Yr).call(this,{type:"pause"})},onContinue:()=>{Me(this,sr,Yr).call(this,{type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0})),P(this,Ut).start()}},Da=new WeakMap,ja=new WeakMap,Un=new WeakMap,Ut=new WeakMap,kc=new WeakMap,Zo=new WeakMap,sr=new WeakSet,Yr=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Q$(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return vg(i)&&i.revert&&P(this,ja)?{...P(this,ja),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Nt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),P(this,Un).notify({query:this,type:"updated",action:t})})},IE);function Q$(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:q$(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function lz(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ar,DE,uz=(DE=class extends Wc{constructor(t={}){super();Se(this,Ar);this.config=t,he(this,Ar,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??k2(i,n);let s=this.get(o);return s||(s=new az({cache:this,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){P(this,Ar).has(t.queryHash)||(P(this,Ar).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=P(this,Ar).get(t.queryHash);n&&(t.destroy(),n===t&&P(this,Ar).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Nt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return P(this,Ar).get(t)}getAll(){return[...P(this,Ar).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>TS(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>TS(t,r)):n}notify(t){Nt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Nt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Nt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Ar=new WeakMap,DE),Rr,qt,Jo,$r,Li,jE,cz=(jE=class extends Y${constructor(t){super();Se(this,$r);Se(this,Rr);Se(this,qt);Se(this,Jo);this.mutationId=t.mutationId,he(this,qt,t.mutationCache),he(this,Rr,[]),this.state=t.state||dz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){P(this,Rr).includes(t)||(P(this,Rr).push(t),this.clearGcTimeout(),P(this,qt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){he(this,Rr,P(this,Rr).filter(n=>n!==t)),this.scheduleGc(),P(this,qt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){P(this,Rr).length||(this.state.status==="pending"?this.scheduleGc():P(this,qt).remove(this))}continue(){var t;return((t=P(this,Jo))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,o,s,a,l,u,c,d,f,h,g,y,_,m,p,v,x,S,w,b;he(this,Jo,K$({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(C,k)=>{Me(this,$r,Li).call(this,{type:"failed",failureCount:C,error:k})},onPause:()=>{Me(this,$r,Li).call(this,{type:"pause"})},onContinue:()=>{Me(this,$r,Li).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>P(this,qt).canRun(this)}));const n=this.state.status==="pending",r=!P(this,Jo).canStart();try{if(!n){Me(this,$r,Li).call(this,{type:"pending",variables:t,isPaused:r}),await((o=(i=P(this,qt).config).onMutate)==null?void 0:o.call(i,t,this));const k=await((a=(s=this.options).onMutate)==null?void 0:a.call(s,t));k!==this.state.context&&Me(this,$r,Li).call(this,{type:"pending",context:k,variables:t,isPaused:r})}const C=await P(this,Jo).start();return await((u=(l=P(this,qt).config).onSuccess)==null?void 0:u.call(l,C,t,this.state.context,this)),await((d=(c=this.options).onSuccess)==null?void 0:d.call(c,C,t,this.state.context)),await((h=(f=P(this,qt).config).onSettled)==null?void 0:h.call(f,C,null,this.state.variables,this.state.context,this)),await((y=(g=this.options).onSettled)==null?void 0:y.call(g,C,null,t,this.state.context)),Me(this,$r,Li).call(this,{type:"success",data:C}),C}catch(C){try{throw await((m=(_=P(this,qt).config).onError)==null?void 0:m.call(_,C,t,this.state.context,this)),await((v=(p=this.options).onError)==null?void 0:v.call(p,C,t,this.state.context)),await((S=(x=P(this,qt).config).onSettled)==null?void 0:S.call(x,void 0,C,this.state.variables,this.state.context,this)),await((b=(w=this.options).onSettled)==null?void 0:b.call(w,void 0,C,t,this.state.context)),C}finally{Me(this,$r,Li).call(this,{type:"error",error:C})}}finally{P(this,qt).runNext(this)}}},Rr=new WeakMap,qt=new WeakMap,Jo=new WeakMap,$r=new WeakSet,Li=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Nt.batch(()=>{P(this,Rr).forEach(r=>{r.onMutationUpdate(t)}),P(this,qt).notify({mutation:this,type:"updated",action:t})})},jE);function dz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var bn,Tc,FE,fz=(FE=class extends Wc{constructor(t={}){super();Se(this,bn);Se(this,Tc);this.config=t,he(this,bn,new Map),he(this,Tc,Date.now())}build(t,n,r){const i=new cz({mutationCache:this,mutationId:++fd(this,Tc)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){const n=Pd(t),r=P(this,bn).get(n)??[];r.push(t),P(this,bn).set(n,r),this.notify({type:"added",mutation:t})}remove(t){var r;const n=Pd(t);if(P(this,bn).has(n)){const i=(r=P(this,bn).get(n))==null?void 0:r.filter(o=>o!==t);i&&(i.length===0?P(this,bn).delete(n):P(this,bn).set(n,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const n=(r=P(this,bn).get(Pd(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===t}runNext(t){var r;const n=(r=P(this,bn).get(Pd(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Nt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...P(this,bn).values()].flat()}find(t){const n={exact:!0,...t};return this.getAll().find(r=>MS(n,r))}findAll(t={}){return this.getAll().filter(n=>MS(t,n))}notify(t){Nt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return Nt.batch(()=>Promise.all(t.map(n=>n.continue().catch(Vn))))}},bn=new WeakMap,Tc=new WeakMap,FE);function Pd(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function hz(e){return{onFetch:(t,n)=>{const r=async()=>{var g,y,_,m,p;const i=t.options,o=(_=(y=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:y.fetchMore)==null?void 0:_.direction,s=((m=t.state.data)==null?void 0:m.pages)||[],a=((p=t.state.data)==null?void 0:p.pageParams)||[],l={pages:[],pageParams:[]};let u=!1;const c=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?u=!0:t.signal.addEventListener("abort",()=>{u=!0}),t.signal)})},d=W$(t.options,t.fetchOptions),f=async(v,x,S)=>{if(u)return Promise.reject();if(x==null&&v.pages.length)return Promise.resolve(v);const w={queryKey:t.queryKey,pageParam:x,direction:S?"backward":"forward",meta:t.options.meta};c(w);const b=await d(w),{maxPages:C}=t.options,k=S?nz:tz;return{pages:k(v.pages,b,C),pageParams:k(v.pageParams,x,C)}};let h;if(o&&s.length){const v=o==="backward",x=v?pz:OS,S={pages:s,pageParams:a},w=x(i,S);h=await f(S,w,v)}else{h=await f(l,a[0]??i.initialPageParam);const v=e??s.length;for(let x=1;x{var i,o;return(o=(i=t.options).persister)==null?void 0:o.call(i,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function OS(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function pz(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}var ot,Ki,Yi,Fa,Ua,Qi,Va,za,UE,gz=(UE=class{constructor(e={}){Se(this,ot);Se(this,Ki);Se(this,Yi);Se(this,Fa);Se(this,Ua);Se(this,Qi);Se(this,Va);Se(this,za);he(this,ot,e.queryCache||new uz),he(this,Ki,e.mutationCache||new fz),he(this,Yi,e.defaultOptions||{}),he(this,Fa,new Map),he(this,Ua,new Map),he(this,Qi,0)}mount(){fd(this,Qi)._++,P(this,Qi)===1&&(he(this,Va,T2.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ot).onFocus())})),he(this,za,hh.subscribe(async e=>{e&&(await this.resumePausedMutations(),P(this,ot).onOnline())})))}unmount(){var e,t;fd(this,Qi)._--,P(this,Qi)===0&&((e=P(this,Va))==null||e.call(this),he(this,Va,void 0),(t=P(this,za))==null||t.call(this),he(this,za,void 0))}isFetching(e){return P(this,ot).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return P(this,Ki).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,ot).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);if(t===void 0)return this.fetchQuery(e);{const n=this.defaultQueryOptions(e),r=P(this,ot).build(this,n);return e.revalidateIfStale&&r.isStaleByTime(Aa(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(t)}}getQueriesData(e){return P(this,ot).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=P(this,ot).get(r.queryHash),o=i==null?void 0:i.state.data,s=JV(t,o);if(s!==void 0)return P(this,ot).build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return Nt.batch(()=>P(this,ot).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=P(this,ot).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=P(this,ot);Nt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=P(this,ot),r={type:"active",...e};return Nt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Nt.batch(()=>P(this,ot).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(Vn).catch(Vn)}invalidateQueries(e={},t={}){return Nt.batch(()=>{if(P(this,ot).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Nt.batch(()=>P(this,ot).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(Vn)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(Vn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=P(this,ot).build(this,t);return n.isStaleByTime(Aa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Vn).catch(Vn)}fetchInfiniteQuery(e){return e.behavior=hz(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Vn).catch(Vn)}resumePausedMutations(){return hh.isOnline()?P(this,Ki).resumePausedMutations():Promise.resolve()}getQueryCache(){return P(this,ot)}getMutationCache(){return P(this,Ki)}getDefaultOptions(){return P(this,Yi)}setDefaultOptions(e){he(this,Yi,e)}setQueryDefaults(e,t){P(this,Fa).set(uc(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...P(this,Fa).values()];let n={};return t.forEach(r=>{cc(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){P(this,Ua).set(uc(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...P(this,Ua).values()];let n={};return t.forEach(r=>{cc(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...P(this,Yi).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=k2(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.enabled!==!0&&t.queryFn===H$&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...P(this,Yi).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){P(this,ot).clear(),P(this,Ki).clear()}},ot=new WeakMap,Ki=new WeakMap,Yi=new WeakMap,Fa=new WeakMap,Ua=new WeakMap,Qi=new WeakMap,Va=new WeakMap,za=new WeakMap,UE),an,Ne,Mc,Gt,es,Ba,kr,Nc,Ha,Wa,ts,ns,Xi,qa,Fe,vu,Uy,Vy,zy,By,Hy,Wy,qy,X$,VE,mz=(VE=class extends Wc{constructor(t,n){super();Se(this,Fe);Se(this,an);Se(this,Ne);Se(this,Mc);Se(this,Gt);Se(this,es);Se(this,Ba);Se(this,kr);Se(this,Nc);Se(this,Ha);Se(this,Wa);Se(this,ts);Se(this,ns);Se(this,Xi);Se(this,qa,new Set);this.options=n,he(this,an,t),he(this,kr,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(P(this,Ne).addObserver(this),PS(P(this,Ne),this.options)?Me(this,Fe,vu).call(this):this.updateResult(),Me(this,Fe,By).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Gy(P(this,Ne),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Gy(P(this,Ne),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Me(this,Fe,Hy).call(this),Me(this,Fe,Wy).call(this),P(this,Ne).removeObserver(this)}setOptions(t,n){const r=this.options,i=P(this,Ne);if(this.options=P(this,an).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cr(this.options.enabled,P(this,Ne))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Me(this,Fe,qy).call(this),P(this,Ne).setOptions(this.options),r._defaulted&&!Dy(this.options,r)&&P(this,an).getQueryCache().notify({type:"observerOptionsUpdated",query:P(this,Ne),observer:this});const o=this.hasListeners();o&&IS(P(this,Ne),i,this.options,r)&&Me(this,Fe,vu).call(this),this.updateResult(n),o&&(P(this,Ne)!==i||cr(this.options.enabled,P(this,Ne))!==cr(r.enabled,P(this,Ne))||Aa(this.options.staleTime,P(this,Ne))!==Aa(r.staleTime,P(this,Ne)))&&Me(this,Fe,Uy).call(this);const s=Me(this,Fe,Vy).call(this);o&&(P(this,Ne)!==i||cr(this.options.enabled,P(this,Ne))!==cr(r.enabled,P(this,Ne))||s!==P(this,Xi))&&Me(this,Fe,zy).call(this,s)}getOptimisticResult(t){const n=P(this,an).getQueryCache().build(P(this,an),t),r=this.createResult(n,t);return vz(this,r)&&(he(this,Gt,r),he(this,Ba,this.options),he(this,es,P(this,Ne).state)),r}getCurrentResult(){return P(this,Gt)}trackResult(t,n){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),n==null||n(i),t[i])})}),r}trackProp(t){P(this,qa).add(t)}getCurrentQuery(){return P(this,Ne)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=P(this,an).defaultQueryOptions(t),r=P(this,an).getQueryCache().build(P(this,an),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return Me(this,Fe,vu).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),P(this,Gt)))}createResult(t,n){var b;const r=P(this,Ne),i=this.options,o=P(this,Gt),s=P(this,es),a=P(this,Ba),u=t!==r?t.state:P(this,Mc),{state:c}=t;let d={...c},f=!1,h;if(n._optimisticResults){const C=this.hasListeners(),k=!C&&PS(t,n),A=C&&IS(t,r,n,i);(k||A)&&(d={...d,...Q$(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(d.fetchStatus="idle")}let{error:g,errorUpdatedAt:y,status:_}=d;if(n.select&&d.data!==void 0)if(o&&d.data===(s==null?void 0:s.data)&&n.select===P(this,Nc))h=P(this,Ha);else try{he(this,Nc,n.select),h=n.select(d.data),h=Fy(o==null?void 0:o.data,h,n),he(this,Ha,h),he(this,kr,null)}catch(C){he(this,kr,C)}else h=d.data;if(n.placeholderData!==void 0&&h===void 0&&_==="pending"){let C;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))C=o.data;else if(C=typeof n.placeholderData=="function"?n.placeholderData((b=P(this,Wa))==null?void 0:b.state.data,P(this,Wa)):n.placeholderData,n.select&&C!==void 0)try{C=n.select(C),he(this,kr,null)}catch(k){he(this,kr,k)}C!==void 0&&(_="success",h=Fy(o==null?void 0:o.data,C,n),f=!0)}P(this,kr)&&(g=P(this,kr),h=P(this,Ha),y=Date.now(),_="error");const m=d.fetchStatus==="fetching",p=_==="pending",v=_==="error",x=p&&m,S=h!==void 0;return{status:_,fetchStatus:d.fetchStatus,isPending:p,isSuccess:_==="success",isError:v,isInitialLoading:x,isLoading:x,data:h,dataUpdatedAt:d.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:d.dataUpdateCount>0||d.errorUpdateCount>0,isFetchedAfterMount:d.dataUpdateCount>u.dataUpdateCount||d.errorUpdateCount>u.errorUpdateCount,isFetching:m,isRefetching:m&&!p,isLoadingError:v&&!S,isPaused:d.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:v&&S,isStale:M2(t,n),refetch:this.refetch}}updateResult(t){const n=P(this,Gt),r=this.createResult(P(this,Ne),this.options);if(he(this,es,P(this,Ne).state),he(this,Ba,this.options),P(this,es).data!==void 0&&he(this,Wa,P(this,Ne)),Dy(r,n))return;he(this,Gt,r);const i={},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,a=typeof s=="function"?s():s;if(a==="all"||!a&&!P(this,qa).size)return!0;const l=new Set(a??P(this,qa));return this.options.throwOnError&&l.add("error"),Object.keys(P(this,Gt)).some(u=>{const c=u;return P(this,Gt)[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),Me(this,Fe,X$).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Me(this,Fe,By).call(this)}},an=new WeakMap,Ne=new WeakMap,Mc=new WeakMap,Gt=new WeakMap,es=new WeakMap,Ba=new WeakMap,kr=new WeakMap,Nc=new WeakMap,Ha=new WeakMap,Wa=new WeakMap,ts=new WeakMap,ns=new WeakMap,Xi=new WeakMap,qa=new WeakMap,Fe=new WeakSet,vu=function(t){Me(this,Fe,qy).call(this);let n=P(this,Ne).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Vn)),n},Uy=function(){Me(this,Fe,Hy).call(this);const t=Aa(this.options.staleTime,P(this,Ne));if(al||P(this,Gt).isStale||!Iy(t))return;const r=z$(P(this,Gt).dataUpdatedAt,t)+1;he(this,ts,setTimeout(()=>{P(this,Gt).isStale||this.updateResult()},r))},Vy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(P(this,Ne)):this.options.refetchInterval)??!1},zy=function(t){Me(this,Fe,Wy).call(this),he(this,Xi,t),!(al||cr(this.options.enabled,P(this,Ne))===!1||!Iy(P(this,Xi))||P(this,Xi)===0)&&he(this,ns,setInterval(()=>{(this.options.refetchIntervalInBackground||T2.isFocused())&&Me(this,Fe,vu).call(this)},P(this,Xi)))},By=function(){Me(this,Fe,Uy).call(this),Me(this,Fe,zy).call(this,Me(this,Fe,Vy).call(this))},Hy=function(){P(this,ts)&&(clearTimeout(P(this,ts)),he(this,ts,void 0))},Wy=function(){P(this,ns)&&(clearInterval(P(this,ns)),he(this,ns,void 0))},qy=function(){const t=P(this,an).getQueryCache().build(P(this,an),this.options);if(t===P(this,Ne))return;const n=P(this,Ne);he(this,Ne,t),he(this,Mc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},X$=function(t){Nt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(P(this,Gt))}),P(this,an).getQueryCache().notify({query:P(this,Ne),type:"observerResultsUpdated"})})},VE);function yz(e,t){return cr(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function PS(e,t){return yz(e,t)||e.state.data!==void 0&&Gy(e,t,t.refetchOnMount)}function Gy(e,t,n){if(cr(t.enabled,e)!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&M2(e,t)}return!1}function IS(e,t,n,r){return(e!==t||cr(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&M2(e,n)}function M2(e,t){return cr(t.enabled,e)!==!1&&e.isStaleByTime(Aa(t.staleTime,e))}function vz(e,t){return!Dy(e.getCurrentResult(),t)}var Z$=V.createContext(void 0),_z=e=>{const t=V.useContext(Z$);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},xz=({client:e,children:t})=>(V.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),R.jsx(Z$.Provider,{value:e,children:t})),J$=V.createContext(!1),Sz=()=>V.useContext(J$);J$.Provider;function wz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var bz=V.createContext(wz()),Ez=()=>V.useContext(bz);function Cz(e,t){return typeof e=="function"?e(...t):!!e}var Az=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},Rz=e=>{V.useEffect(()=>{e.clearReset()},[e])},$z=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&Cz(n,[e.error,r]),kz=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},Tz=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Mz=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Nz(e,t,n){var u,c,d,f;const r=_z(n),i=Sz(),o=Ez(),s=r.defaultQueryOptions(e);(c=(u=r.getDefaultOptions().queries)==null?void 0:u._experimental_beforeQuery)==null||c.call(u,s),s._optimisticResults=i?"isRestoring":"optimistic",kz(s),Az(s,o),Rz(o);const[a]=V.useState(()=>new t(r,s)),l=a.getOptimisticResult(s);if(V.useSyncExternalStore(V.useCallback(h=>{const g=i?()=>{}:a.subscribe(Nt.batchCalls(h));return a.updateResult(),g},[a,i]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),V.useEffect(()=>{a.setOptions(s,{listeners:!1})},[s,a]),Tz(s,l))throw Mz(s,a,o);if($z({result:l,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)}))throw l.error;return(f=(d=r.getDefaultOptions().queries)==null?void 0:d._experimental_afterQuery)==null||f.call(d,s,l),s.notifyOnChangeProps?l:a.trackResult(l)}function ek(e,t){return Nz(e,mz,t)}const tk="Starter App",Lz="This field is required.",nk=8,Oz=`Password must be at least ${nk} characters long`,rk={required:Lz},Pz={...rk,minLength:{value:nk,message:Oz}},Iz="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%3e%3cpath%20fill='none'%20d='M0%200h24v24H0z'/%3e%3cpath%20d='M22%2012c0-5.52-4.48-10-10-10S2%206.48%202%2012c0%204.84%203.44%208.87%208%209.8V15H8v-3h2V9.5C10%207.57%2011.57%206%2013.5%206H16v3h-2c-.55%200-1%20.45-1%201v2h3v3h-3v6.95c5.05-.5%209-4.76%209-9.95z'/%3e%3c/svg%3e",Dz="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M8.273%203.063c-.958.045-1.612.198-2.184.423a4.41%204.41%200%200%200-1.592%201.04%204.409%204.409%200%200%200-1.035%201.596c-.222.572-.372%201.227-.414%202.185-.042.958-.052%201.266-.047%203.71.005%202.444.016%202.75.062%203.71.046.958.198%201.612.423%202.184a4.41%204.41%200%200%200%201.04%201.592%204.4%204.4%200%200%200%201.597%201.035c.572.221%201.227.372%202.185.414.958.042%201.266.052%203.71.047%202.443-.005%202.75-.016%203.71-.061.96-.046%201.611-.199%202.183-.423a4.411%204.411%200%200%200%201.592-1.04%204.41%204.41%200%200%200%201.035-1.597c.222-.572.372-1.227.414-2.184.042-.96.052-1.268.047-3.711-.005-2.444-.016-2.75-.061-3.71-.046-.96-.198-1.612-.423-2.184a4.418%204.418%200%200%200-1.04-1.592%204.4%204.4%200%200%200-1.597-1.035c-.572-.221-1.227-.372-2.185-.414-.958-.041-1.266-.052-3.71-.047-2.444.005-2.75.015-3.71.062m.105%2016.27c-.878-.038-1.354-.184-1.672-.306a2.802%202.802%200%200%201-1.036-.671%202.772%202.772%200%200%201-.675-1.034c-.124-.317-.272-.793-.313-1.67-.045-.95-.054-1.234-.06-3.637-.004-2.403.005-2.687.046-3.636.038-.877.184-1.354.306-1.671.162-.421.357-.72.672-1.036a2.778%202.778%200%200%201%201.033-.675c.317-.124.793-.272%201.67-.313.95-.045%201.234-.054%203.637-.06%202.402-.005%202.687.004%203.637.046.876.038%201.354.183%201.67.306.421.162.72.357%201.037.671.316.315.511.613.675%201.034.124.317.271.792.313%201.67.045.95.055%201.234.06%203.636.004%202.402-.004%202.688-.046%203.636-.038.878-.184%201.354-.306%201.672a2.79%202.79%200%200%201-.672%201.036%202.78%202.78%200%200%201-1.033.675c-.317.124-.794.271-1.67.313-.95.045-1.234.054-3.637.06-2.403.005-2.687-.005-3.636-.046M15.715%207.19a1.08%201.08%200%201%200%202.16-.004%201.08%201.08%200%200%200-2.16.004m-8.336%204.819a4.62%204.62%200%201%200%209.242-.018%204.62%204.62%200%200%200-9.242.018M9%2012.006a3%203%200%201%201%206-.012%203%203%200%200%201-6%20.012'/%3e%3c/svg%3e",jz="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%3e%3ccircle%20cx='6.18'%20cy='17.82'%20r='2.18'/%3e%3cpath%20d='M4%204.44v2.83c7.03%200%2012.73%205.7%2012.73%2012.73h2.83c0-8.59-6.97-15.56-15.56-15.56zm0%205.66v2.83c3.9%200%207.07%203.17%207.07%207.07h2.83c0-5.47-4.43-9.9-9.9-9.9z'/%3e%3c/svg%3e",Fz="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.912%207.925v.527A11.562%2011.562%200%200%201%208.265%2020.098%2011.443%2011.443%200%200%201%202%2018.265c.328.017.657.017.985%200a8.132%208.132%200%200%200%205.093-1.698%204.092%204.092%200%200%201-3.786-2.852c.255.062.518.091.781.085.36-.002.72-.047%201.07-.136a4.109%204.109%200%200%201-3.21-4.024c.566.32%201.202.494%201.851.51a4.126%204.126%200%200%201-1.34-5.518%2011.613%2011.613%200%200%200%208.488%204.295%204.397%204.397%200%200%201-.119-.934%204.092%204.092%200%200%201%204.092-4.092%204.04%204.04%200%200%201%203.005%201.29%207.929%207.929%200%200%200%202.53-1c-.3.953-.94%201.763-1.8%202.274A7.725%207.725%200%200%200%2022%205.803a8.489%208.489%200%200%201-2.088%202.122Z'%20fill-rule='evenodd'/%3e%3c/svg%3e",Uz="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M19.816%205.389a2.469%202.469%200%200%201%201.766%201.746c.291%201.598.43%203.22.417%204.843a25.867%2025.867%200%200%201-.417%204.794%202.468%202.468%200%200%201-1.766%201.795c-2.593.318-5.204.46-7.816.429a58.411%2058.411%200%200%201-7.816-.429%202.469%202.469%200%200%201-1.766-1.746%2025.879%2025.879%200%200%201-.417-4.843%2025.85%2025.85%200%200%201%20.417-4.793%202.468%202.468%200%200%201%201.766-1.796c2.594-.3%205.205-.427%207.816-.379a58.413%2058.413%200%200%201%207.816.379ZM9.95%209.046v5.864l5.233-2.932L9.95%209.046Z'/%3e%3c/svg%3e",Vz="/comet-starter/img/logo.png",zz=()=>{const e=t=>{t.preventDefault(),window.scrollTo(0,0)};return R.jsxs("footer",{className:"usa-footer",children:[R.jsx("div",{className:"grid-container usa-footer__return-to-top",children:R.jsx("a",{href:"/#",onClick:t=>{e(t)},children:"Return to top"})}),R.jsx("div",{className:"usa-footer__primary-section",children:R.jsx("nav",{className:"usa-footer__nav","aria-label":"Footer navigation",children:R.jsxs("ul",{className:"grid-row grid-gap",children:[R.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:R.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),R.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:R.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),R.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:R.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),R.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:R.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),R.jsx("li",{className:` + mobile-lg:grid-col-4 + desktop:grid-col-auto + usa-footer__primary-content + `,children:R.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})})]})})}),R.jsx("div",{className:"usa-footer__secondary-section",children:R.jsx("div",{className:"grid-container",children:R.jsxs("div",{className:"grid-row grid-gap",children:[R.jsxs("div",{className:` + usa-footer__logo + grid-row + mobile-lg:grid-col-6 mobile-lg:grid-gap-2 + `,children:[R.jsx("div",{className:"mobile-lg:grid-col-auto",children:R.jsx("img",{className:"usa-footer__logo-img",src:Vz,alt:"US Flag"})}),R.jsx("div",{className:"mobile-lg:grid-col-auto",children:R.jsx("p",{className:"usa-footer__logo-heading",children:tk})})]}),R.jsxs("div",{className:"usa-footer__contact-links mobile-lg:grid-col-6",children:[R.jsxs("div",{className:"usa-footer__social-links grid-row grid-gap-1",children:[R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{className:"usa-social-link",href:"/#",children:R.jsx("img",{className:"usa-social-link__icon",src:Iz,alt:"Facebook"})})}),R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{className:"usa-social-link",href:"/#",children:R.jsx("img",{className:"usa-social-link__icon",src:Fz,alt:"Twitter"})})}),R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{className:"usa-social-link",href:"/#",children:R.jsx("img",{className:"usa-social-link__icon",src:Uz,alt:"YouTube"})})}),R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{className:"usa-social-link",href:"/#",children:R.jsx("img",{className:"usa-social-link__icon",src:Dz,alt:"Instagram"})})}),R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{className:"usa-social-link",href:"/#",children:R.jsx("img",{className:"usa-social-link__icon",src:jz,alt:"RSS"})})})]}),R.jsx("h2",{className:"usa-footer__contact-heading",children:""}),R.jsx("address",{className:"usa-footer__address",children:R.jsxs("div",{className:"usa-footer__contact-info grid-row grid-gap",children:[R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{href:"tel:1-800-555-5555",children:" <(800) 555-GOVT> "})}),R.jsx("div",{className:"grid-col-auto",children:R.jsx("a",{href:"mailto:",children:""})})]})})]})]})})})]})},Bz=e=>e&&typeof e=="object"&&e.nodeType===1;var Ci=(e,t)=>{if(typeof e!="string")return[];(!t||!Bz(t))&&(t=window.document);const n=t.querySelectorAll(e);return Array.prototype.slice.call(n)};/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var DS=Object.getOwnPropertySymbols,Hz=Object.prototype.hasOwnProperty,Wz=Object.prototype.propertyIsEnumerable;function qz(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function Gz(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(o){i[o]=o}),Object.keys(Object.assign({},i)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var N2=Gz()?Object.assign:function(e,t){for(var n,r=qz(e),i,o=1;o-1?e.split(FS).map(function(s){return ok({type:s},o)}):(o.type=e,[o])};var US=function(e,t){var n=e[t];return delete e[t],n},sk=function(t,n){const r=Object.keys(t).reduce(function(i,o){var s=eB(o,t[o]);return i.concat(s)},[]);return ok({add:function(o){r.forEach(function(s){o.addEventListener(s.type,s.delegate,s.options)})},remove:function(o){r.forEach(function(s){o.removeEventListener(s.type,s.delegate,s.options)})}},n)};const tB=N2,nB=sk,VS=(...e)=>function(n=document.body){e.forEach(r=>{typeof this[r]=="function"&&this[r].call(this,n)})};var Ln=(e,t)=>nB(e,tB({on:VS("init","add"),off:VS("teardown","remove")},t));const zS="aria-expanded",rB="aria-controls",BS="hidden";var O2=(e,t)=>{let n=t;typeof n!="boolean"&&(n=e.getAttribute(zS)==="false"),e.setAttribute(zS,n);const r=e.getAttribute(rB),i=document.getElementById(r);if(!i)throw new Error(`No toggle target found with id: "${r}"`);return n?i.removeAttribute(BS):i.setAttribute(BS,""),n};function iB(e,t=window,n=document.documentElement){const r=e.getBoundingClientRect();return r.top>=0&&r.left>=0&&r.bottom<=(t.innerHeight||n.clientHeight)&&r.right<=(t.innerWidth||n.clientWidth)}var ak=iB,El={CLICK:"click"},er={prefix:"usa"};const lk=Ci,oB=Ln,HS=O2,sB=ak,{CLICK:aB}=El,{prefix:ph}=er,gh=`.${ph}-accordion, .${ph}-accordion--bordered`,lB=`.${ph}-banner__button`,ju=`.${ph}-accordion__button[aria-controls]:not(${lB})`,WS="aria-expanded",uB="data-allow-multiple",uk=e=>lk(ju,e).filter(n=>n.closest(gh)===e),Fu=(e,t)=>{const n=e.closest(gh);let r=t;if(!n)throw new Error(`${ju} is missing outer ${gh}`);r=HS(e,t);const i=n.hasAttribute(uB);r&&!i&&uk(n).forEach(o=>{o!==e&&HS(o,!1)})},cB=e=>Fu(e,!0),dB=e=>Fu(e,!1),fB=oB({[aB]:{[ju](){Fu(this),this.getAttribute(WS)==="true"&&(sB(this)||this.scrollIntoView())}}},{init(e){lk(ju,e).forEach(t=>{const n=t.getAttribute(WS)==="true";Fu(t,n)})},ACCORDION:gh,BUTTON:ju,show:cB,hide:dB,toggle:Fu,getButtons:uk});var ck=fB;const qS=Si(ck),hB=Ln,pB=Ci,{CLICK:gB}=El,{prefix:dk}=er,fk=O2,hk=`.${dk}-banner__header`,pk=`${dk}-banner__header--expanded`,Ky=`${hk} [aria-controls]`,mB=function(t){t.preventDefault();const n=t.target.closest(Ky);fk(n),this.closest(hk).classList.toggle(pk)};var yB=hB({[gB]:{[Ky]:mB}},{init(e){pB(Ky,e).forEach(t=>{const n=t.getAttribute(pk)==="true";fk(t,n)})}});const GS=Si(yB),vB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAsBAMAAAAncaPMAAAAAXNSR0IArs4c6QAAABtQTFRF////4EAg2z8g2z8f2z4f2j4fHjSyHjOxHTOxQEYPwgAAAIdJREFUeNrNkUENxDAMBEOhFJaCKZiCKZhCKBj2ebV3rdR71+pIq+Qxj1GyqjJ3U8VlHkc07hFm0awBYe91juq6MSI0yhSAEgkzJ4TMKiXyzFw3pgR9lmIBJlqj2AmBedf+IycExmlKZVzvZEJ4A0oBrjBl/m6PCy95B3fFAN6YuQPxhbcB4QMkEj04wQXD5wAAAABJRU5ErkJggg==",_B="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%3e%3ctitle%3eicon-https%3c/title%3e%3cpath%20fill='%23719F2A'%20fill-rule='evenodd'%20d='M32%200c17.673%200%2032%2014.327%2032%2032%200%2017.673-14.327%2032-32%2032C14.327%2064%200%2049.673%200%2032%200%2014.327%2014.327%200%2032%200zm0%201.208C14.994%201.208%201.208%2014.994%201.208%2032S14.994%2062.792%2032%2062.792%2062.792%2049.006%2062.792%2032%2049.006%201.208%2032%201.208zm0%2018.886a7.245%207.245%200%200%201%207.245%207.245v3.103h.52c.86%200%201.557.698%201.557%201.558v9.322c0%20.86-.697%201.558-1.557%201.558h-15.53c-.86%200-1.557-.697-1.557-1.558V32c0-.86.697-1.558%201.557-1.558h.52V27.34A7.245%207.245%200%200%201%2032%2020.094zm0%203.103a4.142%204.142%200%200%200-4.142%204.142v3.103h8.284V27.34A4.142%204.142%200%200%200%2032%2023.197z'/%3e%3c/svg%3e",xB="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='64'%20height='64'%20viewBox='0%200%2064%2064'%3e%3ctitle%3eicon-dot-gov%3c/title%3e%3cpath%20fill='%232378C3'%20fill-rule='evenodd'%20d='m32%200c17.7%200%2032%2014.3%2032%2032s-14.3%2032-32%2032-32-14.3-32-32%2014.3-32%2032-32zm0%201.2c-17%200-30.8%2013.8-30.8%2030.8s13.8%2030.8%2030.8%2030.8%2030.8-13.8%2030.8-30.8-13.8-30.8-30.8-30.8zm11.4%2038.9c.5%200%20.9.4.9.8v1.6h-24.6v-1.6c0-.5.4-.8.9-.8zm-17.1-12.3v9.8h1.6v-9.8h3.3v9.8h1.6v-9.8h3.3v9.8h1.6v-9.8h3.3v9.8h.8c.5%200%20.9.4.9.8v.8h-21.4v-.8c0-.5.4-.8.9-.8h.8v-9.8zm5.7-8.2%2012.3%204.9v1.6h-1.6c0%20.5-.4.8-.9.8h-19.6c-.5%200-.9-.4-.9-.8h-1.6v-1.6s12.3-4.9%2012.3-4.9z'/%3e%3c/svg%3e";var SB=function(t,n=500){let r=null;return(...i)=>{window.clearTimeout(r),r=window.setTimeout(()=>{t.apply(this,i)},n)}};const wB=Ci,bB=Ln,EB=SB,{prefix:q0}=er,P2=`${q0}-character-count`,_g=`.${P2}`,Yy=`.${q0}-character-count__field`,KS=`.${q0}-character-count__message`,Qy="The content is too long.",gk=`${q0}-character-count__status--invalid`,I2=`${P2}__status`,D2=`${P2}__sr-status`,CB=`.${I2}`,AB=`.${D2}`,j2="characters allowed",F2=e=>{const t=e.closest(_g);if(!t)throw new Error(`${Yy} is missing outer ${_g}`);const n=t.querySelector(KS);if(!n)throw new Error(`${_g} is missing inner ${KS}`);return{characterCountEl:t,messageEl:n}},RB=e=>{const{characterCountEl:t}=F2(e),n=e.getAttribute("maxlength");n&&(e.removeAttribute("maxlength"),t.setAttribute("data-maxlength",n))},mk=e=>{const t=document.createElement("div"),n=document.createElement("div"),i=`${e.dataset.maxlength} ${j2}`;t.classList.add(`${I2}`,"usa-hint"),n.classList.add(`${D2}`,"usa-sr-only"),t.setAttribute("aria-hidden",!0),n.setAttribute("aria-live","polite"),t.textContent=i,n.textContent=i,e.append(t,n)},yk=(e,t)=>{let n="";if(e===0)n=`${t} ${j2}`;else{const r=Math.abs(t-e),i=`character${r===1?"":"s"}`,o=e>t?"over limit":"left";n=`${r} ${i} ${o}`}return n},$B=EB((e,t)=>{const n=e;n.textContent=t},1e3),YS=e=>{const{characterCountEl:t}=F2(e),n=e.value.length,r=parseInt(t.getAttribute("data-maxlength"),10),i=t.querySelector(CB),o=t.querySelector(AB),s=yk(n,r);if(!r)return;const a=n&&n>r;i.textContent=s,$B(o,s),a&&!e.validationMessage&&e.setCustomValidity(Qy),!a&&e.validationMessage===Qy&&e.setCustomValidity(""),i.classList.toggle(gk,a)},kB=e=>{const{characterCountEl:t,messageEl:n}=F2(e);n.classList.add("usa-sr-only"),n.removeAttribute("aria-live"),RB(e),mk(t)};bB({input:{[Yy](){YS(this)}}},{init(e){wB(Yy,e).forEach(t=>kB(t))},MESSAGE_INVALID_CLASS:gk,VALIDATION_MESSAGE:Qy,STATUS_MESSAGE_CLASS:I2,STATUS_MESSAGE_SR_ONLY_CLASS:D2,DEFAULT_STATUS_LABEL:j2,createStatusMessages:mk,getCountMessage:yk,updateCountMessage:YS});var U2={exports:{}},TB={exports:{}};(function(e,t){(function(){var n={polyfill:o,keys:{3:"Cancel",6:"Help",8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",28:"Convert",29:"NonConvert",30:"Accept",31:"ModeChange",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",41:"Select",42:"Print",43:"Execute",44:"PrintScreen",45:"Insert",46:"Delete",48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],91:"OS",93:"ContextMenu",144:"NumLock",145:"ScrollLock",181:"VolumeMute",182:"VolumeDown",183:"VolumeUp",186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"'],224:"Meta",225:"AltGraph",246:"Attn",247:"CrSel",248:"ExSel",249:"EraseEof",250:"Play",251:"ZoomOut"}},r;for(r=1;r<25;r++)n.keys[111+r]="F"+r;var i="";for(r=65;r<91;r++)i=String.fromCharCode(r),n.keys[r]=[i.toLowerCase(),i.toUpperCase()];function o(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var s={get:function(a){var l=n.keys[this.which||this.keyCode];return Array.isArray(l)&&(l=l[+this.shiftKey]),l}};return Object.defineProperty(KeyboardEvent.prototype,"key",s),s}e.exports=n})()})(TB);const Xy={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"},vk="+",MB=function(e,t){var n=e.key;if(t)for(var r in Xy)e[Xy[r]]===!0&&(n=[r,n].join(vk));return n};U2.exports=function(t){const n=Object.keys(t).some(function(r){return r.indexOf(vk)>-1});return function(r){var i=MB(r,n);return[i,i.toLowerCase()].reduce(function(o,s){return s in t&&(o=t[i].call(this,r)),o},void 0)}};U2.exports.MODIFIERS=Xy;var qc=U2.exports;const NB=Ci,LB=e=>e&&typeof e=="object"&&e.nodeType===1;var Ts=(e,t)=>{const n=NB(e,t);return typeof e!="string"||LB(t)&&t.matches(e)&&n.push(t),n},_k={exports:{}};(function(e){_k.exports=e()})(function(){var e={_entity:/[&<>"'/]/g,_entities:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},getEntity:function(t){return e._entities[t]},escapeHTML:function(t){for(var n="",r=0;r1?n-1:0),i=1;i{},Ur=(e,t="")=>{const n=e;n.value=t;const r=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});n.dispatchEvent(r)},kt=e=>{const t=e.closest(li);if(!t)throw new Error(`Element is missing outer ${li}`);const n=t.querySelector(VB),r=t.querySelector(vf),i=t.querySelector(zB),o=t.querySelector(HB),s=t.querySelector(Rk),a=t.querySelector(BB),l=t.querySelector(Ak),u=t.querySelector(Ck),c=t.classList.contains(Ms),d=t.dataset.disableFiltering==="true";return{comboBoxEl:t,selectEl:n,inputEl:r,listEl:i,statusEl:o,focusedOptionEl:s,selectedOptionEl:a,toggleListBtnEl:l,clearInputBtnEl:u,isPristine:c,disableFiltering:d}},$k=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=kt(e);r.hidden=!0,r.disabled=!0,n.disabled=!0,t.disabled=!0},GB=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=kt(e);r.hidden=!0,r.setAttribute("aria-disabled",!0),n.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},KB=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=kt(e);r.hidden=!1,r.disabled=!1,n.disabled=!1,t.disabled=!1},XS=e=>{const t=e.closest(li);if(t.dataset.enhanced)return;const n=t.querySelector("select");if(!n)throw new Error(`${li} is missing inner select`);const r=n.id,i=document.querySelector(`label[for="${r}"]`),o=`${r}--list`,s=`${r}-label`,a=`${r}--assistiveHint`,l=[],{defaultValue:u}=t.dataset,{placeholder:c}=t.dataset;let d;if(c&&l.push({placeholder:c}),u)for(let h=0,g=n.options.length;h{if(n.hasAttribute(h)){const g=n.getAttribute(h);l.push({[h]:g}),n.removeAttribute(h)}});const f=document.createElement("input");if(f.setAttribute("id",r),f.setAttribute("aria-owns",o),f.setAttribute("aria-controls",o),f.setAttribute("aria-autocomplete","list"),f.setAttribute("aria-describedby",a),f.setAttribute("aria-expanded","false"),f.setAttribute("autocapitalize","off"),f.setAttribute("autocomplete","off"),f.setAttribute("class",Sk),f.setAttribute("type","text"),f.setAttribute("role","combobox"),l.forEach(h=>Object.keys(h).forEach(g=>{const y=QS.escapeHTML`${h[g]}`;f.setAttribute(g,y)})),t.insertAdjacentElement("beforeend",f),t.insertAdjacentHTML("beforeend",QS.escapeHTML` + + + +   + + + + +
+ + When autocomplete results are available use up and down arrows to review and enter to select. + Touch device users, explore by touch or with swipe gestures. + `),d){const{inputEl:h}=kt(t);Ur(n,d.value),Ur(h,d.text),t.classList.add(Ms)}n.disabled&&($k(t),n.disabled=!1),n.hasAttribute("aria-disabled")&&(GB(t),n.removeAttribute("aria-disabled")),t.dataset.enhanced="true"},Gc=(e,t,{skipFocus:n,preventScroll:r}={})=>{const{inputEl:i,listEl:o,focusedOptionEl:s}=kt(e);if(s&&(s.classList.remove(xs),s.setAttribute("tabIndex","-1")),t){if(i.setAttribute("aria-activedescendant",t.id),t.setAttribute("tabIndex","0"),t.classList.add(xs),!r){const a=t.offsetTop+t.offsetHeight,l=o.scrollTop+o.offsetHeight;a>l&&(o.scrollTop=a-o.offsetHeight),t.offsetTop{const r=o=>o.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");let i=e.replace(/{{(.*?)}}/g,(o,s)=>{const a=s.trim(),l=n[a];if(a!=="query"&&l){const u=new RegExp(l,"i"),c=t.match(u);return c?r(c[1]):""}return r(t)});return i=`^(?:${i})$`,new RegExp(i,"i")},ll=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r,listEl:i,statusEl:o,isPristine:s,disableFiltering:a}=kt(e);let l,u;const c=`${i.id}--option-`,d=(r.value||"").toLowerCase(),f=t.dataset.filter||WB,h=kk(f,d,t.dataset),g=[];for(let v=0,x=n.options.length;v{const S=`${c}${x}`,w=[dc];let b="-1",C="false";S===l&&(w.push(bk,xs),b="0",C="true"),!l&&x===0&&(w.push(xs),b="0");const k=document.createElement("li");return k.setAttribute("aria-setsize",g.length),k.setAttribute("aria-posinset",x+1),k.setAttribute("aria-selected",C),k.setAttribute("id",S),k.setAttribute("class",w.join(" ")),k.setAttribute("tabindex",b),k.setAttribute("role","option"),k.setAttribute("data-value",v.value),k.textContent=v.text,k}),m=document.createElement("li");m.setAttribute("class",`${dc}--no-results`),m.textContent="No results found",i.hidden=!1,y?(i.innerHTML="",_.forEach(v=>i.insertAdjacentElement("beforeend",v))):(i.innerHTML="",i.insertAdjacentElement("beforeend",m)),r.setAttribute("aria-expanded","true"),o.textContent=y?`${y} result${y>1?"s":""} available.`:"No results.";let p;s&&l?p=i.querySelector(`#${l}`):a&&u&&(p=i.querySelector(`#${u}`)),p&&Gc(i,p,{skipFocus:!0})},Ss=e=>{const{inputEl:t,listEl:n,statusEl:r,focusedOptionEl:i}=kt(e);r.innerHTML="",t.setAttribute("aria-expanded","false"),t.setAttribute("aria-activedescendant",""),i&&i.classList.remove(xs),n.scrollTop=0,n.hidden=!0},B2=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r}=kt(e);Ur(n,e.dataset.value),Ur(r,e.textContent),t.classList.add(Ms),Ss(t),r.focus()},YB=e=>{const{comboBoxEl:t,listEl:n,selectEl:r,inputEl:i}=kt(e),o=!n.hidden;r.value&&Ur(r),i.value&&Ur(i),t.classList.remove(Ms),o&&ll(t),i.focus()},H2=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r}=kt(e),i=n.value,o=(r.value||"").toLowerCase();if(i)for(let s=0,a=n.options.length;s{const{comboBoxEl:t,selectEl:n,inputEl:r,statusEl:i}=kt(e);i.textContent="";const o=(r.value||"").toLowerCase();if(o)for(let s=0,a=n.options.length;s{const{comboBoxEl:t,inputEl:n}=kt(e.target);Ss(t),H2(t),n.focus()},ZS=e=>{const{comboBoxEl:t,listEl:n}=kt(e.target);n.hidden&&ll(t);const r=n.querySelector(Rk)||n.querySelector(_f);r&&Gc(t,r),e.preventDefault()},ZB=e=>{const{comboBoxEl:t,listEl:n}=kt(e.target),r=!n.hidden;QB(t),r&&Ss(t),e.preventDefault()},JS=e=>{const t=e.target,n=t.nextSibling;n&&Gc(t,n),e.preventDefault()},JB=e=>{B2(e.target),e.preventDefault()},eH=e=>{B2(e.target),e.preventDefault()},ew=e=>{const{comboBoxEl:t,listEl:n,focusedOptionEl:r}=kt(e.target),i=r&&r.previousSibling,o=!n.hidden;Gc(t,i),o&&e.preventDefault(),i||Ss(t)},tH=e=>{e.classList.contains(xs)||Gc(e,e,{preventScroll:!0})},nH=e=>{const{comboBoxEl:t,listEl:n,inputEl:r}=kt(e);n.hidden?ll(t):Ss(t),r.focus()},rH=e=>{const{comboBoxEl:t,listEl:n}=kt(e);n.hidden&&ll(t)},iH=PB({[DB]:{[vf](){this.disabled||rH(this)},[Ak](){this.disabled||nH(this)},[_f](){this.disabled||B2(this)},[Ck](){this.disabled||YB(this)}},focusout:{[li](e){this.contains(e.relatedTarget)||(H2(this),Ss(this))}},keydown:{[li]:xg({Escape:XB}),[vf]:xg({Enter:ZB,ArrowDown:ZS,Down:ZS}),[_f]:xg({ArrowUp:ew,Up:ew,ArrowDown:JS,Down:JS,Enter:eH," ":JB,"Shift+Tab":qB})},input:{[vf](){this.closest(li).classList.remove(Ms),ll(this)}},mouseover:{[_f](){tH(this)}}},{init(e){OB(li,e).forEach(t=>{XS(t)})},getComboBoxContext:kt,enhanceComboBox:XS,generateDynamicRegExp:kk,disable:$k,enable:KB,displayList:ll,hideList:Ss,COMBO_BOX_CLASS:xr});var oH=iH,Tk=(e=document)=>e.activeElement;function sH(){return typeof navigator<"u"&&(navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream}var aH=sH;const Mo=qc,lH=Ln,uH=Ci,cH=Ts,{prefix:dH}=er,{CLICK:fH}=El,hH=Tk,pH=aH,Ra=G0,Ai=`${dH}-date-picker`,gH=`${Ai}__wrapper`,mH=`${Ai}--initialized`,Mk=`${Ai}--active`,Nk=`${Ai}__internal-input`,Lk=`${Ai}__external-input`,Ok=`${Ai}__button`,ft=`${Ai}__calendar`,Pk=`${Ai}__status`,tr=`${ft}__date`,Ik=`${tr}--focused`,yH=`${tr}--selected`,vH=`${tr}--previous-month`,Dk=`${tr}--current-month`,_H=`${tr}--next-month`,xH=`${tr}--range-date`,SH=`${tr}--today`,wH=`${tr}--range-date-start`,bH=`${tr}--range-date-end`,EH=`${tr}--within-range`,jk=`${ft}__previous-year`,Fk=`${ft}__previous-month`,Uk=`${ft}__next-year`,Vk=`${ft}__next-month`,zk=`${ft}__month-selection`,Bk=`${ft}__year-selection`,K0=`${ft}__month`,W2=`${K0}--focused`,CH=`${K0}--selected`,Y0=`${ft}__year`,q2=`${Y0}--focused`,AH=`${Y0}--selected`,Hk=`${ft}__previous-year-chunk`,Wk=`${ft}__next-year-chunk`,qk=`${ft}__date-picker`,Gk=`${ft}__month-picker`,Kk=`${ft}__year-picker`,mh=`${ft}__table`,RH=`${ft}__row`,Ks=`${ft}__cell`,Id=`${Ks}--center-items`,$H=`${ft}__month-label`,kH=`${ft}__day-of-week`,ws=`.${Ai}`,Yk=`.${Ok}`,TH=`.${Nk}`,xf=`.${Lk}`,yh=`.${ft}`,MH=`.${Pk}`,tw=`.${tr}`,Cl=`.${Ik}`,NH=`.${Dk}`,G2=`.${jk}`,K2=`.${Fk}`,Y2=`.${Uk}`,Q2=`.${Vk}`,Qk=`.${Bk}`,Xk=`.${zk}`,Zy=`.${K0}`,vh=`.${Y0}`,X2=`.${Hk}`,Z2=`.${Wk}`,Al=`.${qk}`,LH=`.${Gk}`,J2=`.${Kk}`,Q0=`.${W2}`,Rl=`.${q2}`,nw="Please enter a valid date",Jy=["January","February","March","April","May","June","July","August","September","October","November","December"],OH=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],PH=13,Tr=12,IH="0000-01-01",X0="MM/DD/YYYY",Zk="YYYY-MM-DD",DH=":not([disabled])",e5=(...e)=>e.map(t=>t+DH).join(", "),jH=e5(G2,K2,Qk,Xk,Y2,Q2,Cl),FH=e5(Q0),UH=e5(X2,Z2,Rl),t5=(e,t)=>(t!==e.getMonth()&&e.setDate(0),e),_h=(e,t,n)=>{const r=new Date(0);return r.setFullYear(e,t,n),r},n5=()=>{const e=new Date,t=e.getDate(),n=e.getMonth(),r=e.getFullYear();return _h(r,n,t)},r5=e=>{const t=new Date(0);return t.setFullYear(e.getFullYear(),e.getMonth(),1),t},Jk=e=>{const t=new Date(0);return t.setFullYear(e.getFullYear(),e.getMonth()+1,0),t},os=(e,t)=>{const n=new Date(e.getTime());return n.setDate(n.getDate()+t),n},i5=(e,t)=>os(e,-t),eT=(e,t)=>os(e,t*7),VH=(e,t)=>eT(e,-t),tT=e=>{const t=e.getDay();return i5(e,t)},zH=e=>{const t=e.getDay();return os(e,6-t)},Kc=(e,t)=>{const n=new Date(e.getTime()),r=(n.getMonth()+12+t)%12;return n.setMonth(n.getMonth()+t),t5(n,r),n},o5=(e,t)=>Kc(e,-t),s5=(e,t)=>Kc(e,t*12),nT=(e,t)=>s5(e,-t),ul=(e,t)=>{const n=new Date(e.getTime());return n.setMonth(t),t5(n,t),n},ho=(e,t)=>{const n=new Date(e.getTime()),r=n.getMonth();return n.setFullYear(t),t5(n,r),n},BH=(e,t)=>{let n=e;return t{let n=e;return t>e&&(n=t),new Date(n.getTime())},rT=(e,t)=>e&&t&&e.getFullYear()===t.getFullYear(),Fo=(e,t)=>rT(e,t)&&e.getMonth()===t.getMonth(),Oi=(e,t)=>Fo(e,t)&&e.getDate()===t.getDate(),On=(e,t,n)=>{let r=e;return en&&(r=n),new Date(r.getTime())},ev=(e,t,n)=>e>=t&&(!n||e<=n),WH=(e,t,n)=>Jk(e)n,Sg=(e,t,n)=>Jk(ul(e,11))n,lr=(e,t=Zk,n=!1)=>{let r,i,o,s,a;if(e){let l,u,c;if(t===X0?[l,u,c]=e.split("/"):[c,l,u]=e.split("-"),c&&(a=parseInt(c,10),!Number.isNaN(a)&&(s=a,n&&(s=Math.max(0,s),c.length<3)))){const d=n5().getFullYear();s=d-d%10**c.length+a}if(l&&(a=parseInt(l,10),Number.isNaN(a)||(i=a,n&&(i=Math.max(1,i),i=Math.min(12,i)))),i&&u&&s!=null&&(a=parseInt(u,10),!Number.isNaN(a)&&(o=a,n))){const d=_h(s,i,0).getDate();o=Math.max(1,o),o=Math.min(d,o)}i&&o&&s!=null&&(r=_h(s,i-1,o))}return r},cl=(e,t=Zk)=>{const n=(s,a)=>`0000${s}`.slice(-a),r=e.getMonth()+1,i=e.getDate(),o=e.getFullYear();return t===X0?[n(r,2),n(i,2),n(o,4)].join("/"):[n(o,4),n(r,2),n(i,2)].join("-")},a5=(e,t)=>{const n=[];let r=[],i=0;for(;i{o.insertAdjacentElement("beforeend",s)}),n.push(o)}return n},l5=e=>{const t=document.createElement("tbody");return e.forEach(n=>{t.insertAdjacentElement("beforeend",n)}),t},tv=(e,t="")=>{const n=e;n.value=t;const r=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});n.dispatchEvent(r)},Ve=e=>{const t=e.closest(ws);if(!t)throw new Error(`Element is missing outer ${ws}`);const n=t.querySelector(TH),r=t.querySelector(xf),i=t.querySelector(yh),o=t.querySelector(Yk),s=t.querySelector(MH),a=t.querySelector(vh),l=lr(r.value,X0,!0),u=lr(n.value),c=lr(i.dataset.value),d=lr(t.dataset.minDate),f=lr(t.dataset.maxDate),h=lr(t.dataset.rangeDate),g=lr(t.dataset.defaultDate);if(d&&f&&d>f)throw new Error("Minimum date cannot be after maximum date");return{calendarDate:c,minDate:d,toggleBtnEl:o,selectedDate:u,maxDate:f,firstYearChunkEl:a,datePickerEl:t,inputDate:l,internalInputEl:n,externalInputEl:r,calendarEl:i,rangeDate:h,defaultDate:g,statusEl:s}},iT=e=>{const{externalInputEl:t,toggleBtnEl:n}=Ve(e);n.disabled=!0,t.disabled=!0},oT=e=>{const{externalInputEl:t,toggleBtnEl:n}=Ve(e);n.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},qH=e=>{const{externalInputEl:t,toggleBtnEl:n}=Ve(e);n.disabled=!1,t.disabled=!1},u5=e=>{const{externalInputEl:t,minDate:n,maxDate:r}=Ve(e),i=t.value;let o=!1;if(i){o=!0;const s=i.split("/"),[a,l,u]=s.map(c=>{let d;const f=parseInt(c,10);return Number.isNaN(f)||(d=f),d});if(a&&l&&u!=null){const c=_h(u,a-1,l);c.getMonth()===a-1&&c.getDate()===l&&c.getFullYear()===u&&s[2].length===4&&ev(c,n,r)&&(o=!1)}}return o},xh=e=>{const{externalInputEl:t}=Ve(e),n=u5(t);n&&!t.validationMessage&&t.setCustomValidity(nw),!n&&t.validationMessage===nw&&t.setCustomValidity("")},GH=e=>{const{internalInputEl:t,inputDate:n}=Ve(e);let r="";n&&!u5(e)&&(r=cl(n)),t.value!==r&&tv(t,r)},c5=(e,t)=>{const n=lr(t);if(n){const r=cl(n,X0),{datePickerEl:i,internalInputEl:o,externalInputEl:s}=Ve(e);tv(o,t),tv(s,r),xh(i)}},KH=e=>{const t=e.closest(ws),{defaultValue:n}=t.dataset,r=t.querySelector("input");if(!r)throw new Error(`${ws} is missing inner input`);r.value&&(r.value="");const i=lr(t.dataset.minDate||r.getAttribute("min"));t.dataset.minDate=i?cl(i):IH;const o=lr(t.dataset.maxDate||r.getAttribute("max"));o&&(t.dataset.maxDate=cl(o));const s=document.createElement("div");s.classList.add(gH);const a=r.cloneNode();a.classList.add(Lk),a.type="text",s.appendChild(a),s.insertAdjacentHTML("beforeend",Ra.escapeHTML` + + +
`),r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex","-1"),r.style.display="none",r.classList.add(Nk),r.removeAttribute("id"),r.removeAttribute("name"),r.required=!1,t.appendChild(s),t.classList.add(mH),n&&c5(t,n),r.disabled&&(iT(t),r.disabled=!1),r.hasAttribute("aria-disabled")&&(oT(t),r.removeAttribute("aria-disabled"))},Sr=(e,t)=>{const{datePickerEl:n,calendarEl:r,statusEl:i,selectedDate:o,maxDate:s,minDate:a,rangeDate:l}=Ve(e),u=n5();let c=t||u;const d=r.hidden,f=os(c,0),h=c.getMonth(),g=c.getFullYear(),y=o5(c,1),_=Kc(c,1),m=cl(c),p=r5(c),v=Fo(c,a),x=Fo(c,s),S=o||c,w=l&&BH(S,l),b=l&&HH(S,l),C=l&&os(w,1),k=l&&i5(b,1),A=Jy[h],M=N=>{const B=[tr],G=N.getDate(),ie=N.getMonth(),K=N.getFullYear(),pe=N.getDay(),ge=cl(N);let ue="-1";const $e=!ev(N,a,s),je=Oi(N,o);Fo(N,y)&&B.push(vH),Fo(N,f)&&B.push(Dk),Fo(N,_)&&B.push(_H),je&&B.push(yH),Oi(N,u)&&B.push(SH),l&&(Oi(N,l)&&B.push(xH),Oi(N,w)&&B.push(wH),Oi(N,b)&&B.push(bH),ev(N,C,k)&&B.push(EH)),Oi(N,f)&&(ue="0",B.push(Ik));const we=Jy[ie],Te=OH[pe],Ie=document.createElement("button");return Ie.setAttribute("type","button"),Ie.setAttribute("tabindex",ue),Ie.setAttribute("class",B.join(" ")),Ie.setAttribute("data-day",G),Ie.setAttribute("data-month",ie+1),Ie.setAttribute("data-year",K),Ie.setAttribute("data-value",ge),Ie.setAttribute("aria-label",Ra.escapeHTML`${G} ${we} ${K} ${Te}`),Ie.setAttribute("aria-selected",je?"true":"false"),$e===!0&&(Ie.disabled=!0),Ie.textContent=G,Ie};c=tT(p);const $=[];for(;$.length<28||c.getMonth()===h||$.length%7!==0;)$.push(M(c)),c=os(c,1);const T=a5($,7),D=r.cloneNode();D.dataset.value=m,D.style.top=`${n.offsetHeight}px`,D.hidden=!1,D.innerHTML=Ra.escapeHTML` +
+
+
+ +
+
+ +
+
+ + +
+
+ +
+
+ +
+
+
+ `;const O=document.createElement("table");O.setAttribute("class",mh);const H=document.createElement("thead");O.insertAdjacentElement("beforeend",H);const Q=document.createElement("tr");H.insertAdjacentElement("beforeend",Q);const U={Sunday:"S",Monday:"M",Tuesday:"T",Wednesday:"W",Thursday:"Th",Friday:"Fr",Saturday:"S"};Object.keys(U).forEach(N=>{const B=document.createElement("th");B.setAttribute("class",kH),B.setAttribute("scope","col"),B.setAttribute("aria-label",N),B.textContent=U[N],Q.insertAdjacentElement("beforeend",B)});const W=l5(T);O.insertAdjacentElement("beforeend",W),D.querySelector(Al).insertAdjacentElement("beforeend",O),r.parentNode.replaceChild(D,r),n.classList.add(Mk);const X=[];return Oi(o,f)&&X.push("Selected date"),d?(X.push("You can navigate by day using left and right arrows","Weeks by using up and down arrows","Months by using page up and page down keys","Years by using shift plus page up and shift plus page down","Home and end keys navigate to the beginning and end of a week"),i.textContent=""):X.push(`${A} ${g}`),i.textContent=X.join(". "),D},YH=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=nT(n,1);o=On(o,r,i);const s=Sr(t,o);let a=s.querySelector(G2);a.disabled&&(a=s.querySelector(Al)),a.focus()},QH=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=o5(n,1);o=On(o,r,i);const s=Sr(t,o);let a=s.querySelector(K2);a.disabled&&(a=s.querySelector(Al)),a.focus()},XH=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=Kc(n,1);o=On(o,r,i);const s=Sr(t,o);let a=s.querySelector(Q2);a.disabled&&(a=s.querySelector(Al)),a.focus()},ZH=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e);let o=s5(n,1);o=On(o,r,i);const s=Sr(t,o);let a=s.querySelector(Y2);a.disabled&&(a=s.querySelector(Al)),a.focus()},Z0=e=>{const{datePickerEl:t,calendarEl:n,statusEl:r}=Ve(e);t.classList.remove(Mk),n.hidden=!0,r.textContent=""},JH=e=>{if(e.disabled)return;const{datePickerEl:t,externalInputEl:n}=Ve(e);c5(e,e.dataset.value),Z0(t),n.focus()},eW=e=>{if(e.disabled)return;const{calendarEl:t,inputDate:n,minDate:r,maxDate:i,defaultDate:o}=Ve(e);if(t.hidden){const s=On(n||o||n5(),r,i);Sr(t,s).querySelector(Cl).focus()}else Z0(e)},sT=e=>{const{calendarEl:t,inputDate:n,minDate:r,maxDate:i}=Ve(e);if(!t.hidden&&n){const s=On(n,r,i);Sr(t,s)}},d5=(e,t)=>{const{calendarEl:n,statusEl:r,calendarDate:i,minDate:o,maxDate:s}=Ve(e),a=i.getMonth(),l=t??a,u=Jy.map((y,_)=>{const m=ul(i,_),p=WH(m,o,s);let v="-1";const x=[K0],S=_===a;_===l&&(v="0",x.push(W2)),S&&x.push(CH);const w=document.createElement("button");return w.setAttribute("type","button"),w.setAttribute("tabindex",v),w.setAttribute("class",x.join(" ")),w.setAttribute("data-value",_),w.setAttribute("data-label",y),w.setAttribute("aria-selected",S?"true":"false"),p===!0&&(w.disabled=!0),w.textContent=y,w}),c=document.createElement("div");c.setAttribute("tabindex","-1"),c.setAttribute("class",Gk);const d=document.createElement("table");d.setAttribute("class",mh),d.setAttribute("role","presentation");const f=a5(u,3),h=l5(f);d.insertAdjacentElement("beforeend",h),c.insertAdjacentElement("beforeend",d);const g=n.cloneNode();return g.insertAdjacentElement("beforeend",c),n.parentNode.replaceChild(g,n),r.textContent="Select a month.",g},tW=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=parseInt(e.dataset.value,10);let s=ul(n,o);s=On(s,r,i),Sr(t,s).querySelector(Cl).focus()},Yc=(e,t)=>{const{calendarEl:n,statusEl:r,calendarDate:i,minDate:o,maxDate:s}=Ve(e),a=i.getFullYear(),l=t??a;let u=l;u-=u%Tr,u=Math.max(0,u);const c=Sg(ho(i,u-1),o,s),d=Sg(ho(i,u+Tr),o,s),f=[];let h=u;for(;f.length{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=t.querySelector(Rl);let a=parseInt(o.textContent,10)-Tr;a=Math.max(0,a);const l=ho(n,a),u=On(l,r,i),c=Yc(t,u.getFullYear());let d=c.querySelector(X2);d.disabled&&(d=c.querySelector(J2)),d.focus()},rW=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=t.querySelector(Rl);let a=parseInt(o.textContent,10)+Tr;a=Math.max(0,a);const l=ho(n,a),u=On(l,r,i),c=Yc(t,u.getFullYear());let d=c.querySelector(Z2);d.disabled&&(d=c.querySelector(J2)),d.focus()},iW=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:i}=Ve(e),o=parseInt(e.innerHTML,10);let s=ho(n,o);s=On(s,r,i),Sr(t,s).querySelector(Cl).focus()},oW=e=>{const{datePickerEl:t,externalInputEl:n}=Ve(e.target);Z0(t),n.focus(),e.preventDefault()},Wr=e=>t=>{const{calendarEl:n,calendarDate:r,minDate:i,maxDate:o}=Ve(t.target),s=e(r),a=On(s,i,o);Oi(r,a)||Sr(n,a).querySelector(Cl).focus(),t.preventDefault()},rw=Wr(e=>VH(e,1)),iw=Wr(e=>eT(e,1)),ow=Wr(e=>i5(e,1)),sw=Wr(e=>os(e,1)),sW=Wr(e=>tT(e)),aW=Wr(e=>zH(e)),lW=Wr(e=>Kc(e,1)),uW=Wr(e=>o5(e,1)),cW=Wr(e=>s5(e,1)),dW=Wr(e=>nT(e,1)),fW=e=>{if(e.disabled)return;const t=e.closest(yh),n=t.dataset.value,r=e.dataset.value;if(r===n)return;const i=lr(r);Sr(t,i).querySelector(Cl).focus()},ko=e=>t=>{const n=t.target,r=parseInt(n.dataset.value,10),{calendarEl:i,calendarDate:o,minDate:s,maxDate:a}=Ve(n),l=ul(o,r);let u=e(r);u=Math.max(0,Math.min(11,u));const c=ul(o,u),d=On(c,s,a);Fo(l,d)||d5(i,d.getMonth()).querySelector(Q0).focus(),t.preventDefault()},aw=ko(e=>e-3),lw=ko(e=>e+3),uw=ko(e=>e-1),cw=ko(e=>e+1),hW=ko(e=>e-e%3),pW=ko(e=>e+2-e%3),gW=ko(()=>11),mW=ko(()=>0),yW=e=>{if(e.disabled||e.classList.contains(W2))return;const t=parseInt(e.dataset.value,10);d5(e,t).querySelector(Q0).focus()},To=e=>t=>{const n=t.target,r=parseInt(n.dataset.value,10),{calendarEl:i,calendarDate:o,minDate:s,maxDate:a}=Ve(n),l=ho(o,r);let u=e(r);u=Math.max(0,u);const c=ho(o,u),d=On(c,s,a);rT(l,d)||Yc(i,d.getFullYear()).querySelector(Rl).focus(),t.preventDefault()},dw=To(e=>e-3),fw=To(e=>e+3),hw=To(e=>e-1),pw=To(e=>e+1),vW=To(e=>e-e%3),_W=To(e=>e+2-e%3),xW=To(e=>e-Tr),SW=To(e=>e+Tr),wW=e=>{if(e.disabled||e.classList.contains(q2))return;const t=parseInt(e.dataset.value,10);Yc(e,t).querySelector(Rl).focus()},f5=e=>{const t=n=>{const{calendarEl:r}=Ve(n),i=uH(e,r),o=0,s=i.length-1,a=i[o],l=i[s],u=i.indexOf(hH());return{focusableElements:i,isNotFound:u===-1,firstTabStop:a,isFirstTab:u===o,lastTabStop:l,isLastTab:u===s}};return{tabAhead(n){const{firstTabStop:r,isLastTab:i,isNotFound:o}=t(n.target);(i||o)&&(n.preventDefault(),r.focus())},tabBack(n){const{lastTabStop:r,isFirstTab:i,isNotFound:o}=t(n.target);(i||o)&&(n.preventDefault(),r.focus())}}},wg=f5(jH),gw=f5(FH),mw=f5(UH),aT={[fH]:{[Yk](){eW(this)},[tw](){JH(this)},[Zy](){tW(this)},[vh](){iW(this)},[K2](){QH(this)},[Q2](){XH(this)},[G2](){YH(this)},[Y2](){ZH(this)},[X2](){nW(this)},[Z2](){rW(this)},[Xk](){d5(this).querySelector(Q0).focus()},[Qk](){Yc(this).querySelector(Rl).focus()}},keyup:{[yh](e){const t=this.dataset.keydownKeyCode;`${e.keyCode}`!==t&&e.preventDefault()}},keydown:{[xf](e){e.keyCode===PH&&xh(this)},[tw]:Mo({Up:rw,ArrowUp:rw,Down:iw,ArrowDown:iw,Left:ow,ArrowLeft:ow,Right:sw,ArrowRight:sw,Home:sW,End:aW,PageDown:lW,PageUp:uW,"Shift+PageDown":cW,"Shift+PageUp":dW,Tab:wg.tabAhead}),[Al]:Mo({Tab:wg.tabAhead,"Shift+Tab":wg.tabBack}),[Zy]:Mo({Up:aw,ArrowUp:aw,Down:lw,ArrowDown:lw,Left:uw,ArrowLeft:uw,Right:cw,ArrowRight:cw,Home:hW,End:pW,PageDown:gW,PageUp:mW}),[LH]:Mo({Tab:gw.tabAhead,"Shift+Tab":gw.tabBack}),[vh]:Mo({Up:dw,ArrowUp:dw,Down:fw,ArrowDown:fw,Left:hw,ArrowLeft:hw,Right:pw,ArrowRight:pw,Home:vW,End:_W,PageDown:SW,PageUp:xW}),[J2]:Mo({Tab:mw.tabAhead,"Shift+Tab":mw.tabBack}),[yh](e){this.dataset.keydownKeyCode=e.keyCode},[ws](e){Mo({Escape:oW})(e)}},focusout:{[xf](){xh(this)},[ws](e){this.contains(e.relatedTarget)||Z0(this)}},input:{[xf](){GH(this),sT(this)}}};pH()||(aT.mouseover={[NH](){fW(this)},[Zy](){yW(this)},[vh](){wW(this)}});const bW=lH(aT,{init(e){cH(ws,e).forEach(t=>{KH(t)})},getDatePickerContext:Ve,disable:iT,ariaDisable:oT,enable:qH,isDateInputInvalid:u5,setCalendarValue:c5,validateDateInput:xh,renderCalendar:Sr,updateCalendarIfVisible:sT});var EW=bW;const CW=Ln,AW=Ci,RW=Ts,{prefix:lT}=er,{getDatePickerContext:uT,isDateInputInvalid:cT,updateCalendarIfVisible:dT}=EW,$W=`${lT}-date-picker`,h5=`${lT}-date-range-picker`,fT=`${h5}__range-start`,hT=`${h5}__range-end`,bg=`.${$W}`,$a=`.${h5}`,pT=`.${fT}`,gT=`.${hT}`,kW="0000-01-01",mT=e=>{const t=e.closest($a);if(!t)throw new Error(`Element is missing outer ${$a}`);const n=t.querySelector(pT),r=t.querySelector(gT);return{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}},yT=e=>{const{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}=mT(e),{internalInputEl:i}=uT(n),o=i.value;o&&!cT(i)?(r.dataset.minDate=o,r.dataset.rangeDate=o,r.dataset.defaultDate=o):(r.dataset.minDate=t.dataset.minDate||"",r.dataset.rangeDate="",r.dataset.defaultDate=""),dT(r)},vT=e=>{const{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}=mT(e),{internalInputEl:i}=uT(r),o=i.value;o&&!cT(i)?(n.dataset.maxDate=o,n.dataset.rangeDate=o,n.dataset.defaultDate=o):(n.dataset.maxDate=t.dataset.maxDate||"",n.dataset.rangeDate="",n.dataset.defaultDate=""),dT(n)},TW=e=>{const t=e.closest($a),[n,r]=AW(bg,t);if(!n)throw new Error(`${$a} is missing inner two '${bg}' elements`);if(!r)throw new Error(`${$a} is missing second '${bg}' element`);n.classList.add(fT),r.classList.add(hT),t.dataset.minDate||(t.dataset.minDate=kW);const{minDate:i}=t.dataset;n.dataset.minDate=i,r.dataset.minDate=i;const{maxDate:o}=t.dataset;o&&(n.dataset.maxDate=o,r.dataset.maxDate=o),yT(t),vT(t)};CW({"input change":{[pT](){yT(this)},[gT](){vT(this)}}},{init(e){RW($a,e).forEach(t=>{TW(t)})}});const yw=Ts,MW=Ln,Sh=G0,{prefix:_n}=er,fc=`${_n}-file-input`,hc=`.${fc}`,_T=`${_n}-file-input__input`,p5=`${_n}-file-input__target`,xT=`.${_T}`,NW=`${_n}-file-input__box`,ST=`${_n}-file-input__instructions`,wT=`${_n}-file-input__preview`,bT=`${_n}-file-input__preview-heading`,J0=`${_n}-file-input--disabled`,LW=`${_n}-file-input__choose`,ET=`${_n}-file-input__accepted-files-message`,vw=`${_n}-file-input__drag-text`,Eg=`${_n}-file-input--drag`,_w="is-loading",nv="has-invalid-file",$l=`${_n}-file-input__preview-image`,OW=`${$l}--generic`,PW=`${$l}--pdf`,IW=`${$l}--word`,DW=`${$l}--video`,jW=`${$l}--excel`,CT=`${_n}-sr-only`,Hs="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";let rv=!0,iv="",ov="";const Qc=e=>{const t=e.closest(hc);if(!t)throw new Error(`Element is missing outer ${hc}`);const n=t.querySelector(xT);return{dropZoneEl:t,inputEl:n}},FW=e=>{const{dropZoneEl:t,inputEl:n}=Qc(e);n.disabled=!0,t.classList.add(J0)},UW=e=>{const{dropZoneEl:t}=Qc(e);t.classList.add(J0)},VW=e=>{const{dropZoneEl:t,inputEl:n}=Qc(e);n.disabled=!1,t.classList.remove(J0),t.removeAttribute("aria-disabled")},zW=e=>{const t=e.charCodeAt(0);return t===32?"-":t>=65&&t<=90?`img_${e.toLowerCase()}`:`__${t.toString(16).slice(-4)}`},BW=e=>e.replace(/[^a-z0-9]/g,zW),HW=e=>`${e}-${Math.floor(Date.now().toString()/1e3)}`,AT=e=>e.hasAttribute("multiple")?"files":"file",WW=e=>{const t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");return e.classList.remove(fc),e.classList.add(_T),t.classList.add(fc),r.classList.add(NW),n.classList.add(p5),n.prepend(r),e.parentNode.insertBefore(n,e),e.parentNode.insertBefore(t,n),n.appendChild(e),t.appendChild(n),n},qW=e=>{const t=e.closest(hc),n=AT(e),r=document.createElement("div"),i=`Drag ${n} here or`,o="choose from folder";return iv=`${i} ${o}`,r.classList.add(ST),r.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",iv),r.innerHTML=Sh.escapeHTML`${i} ${o}`,e.parentNode.insertBefore(r,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(`.${vw}`).outerHTML=""),r},GW=e=>{const t=document.createElement("div"),n=AT(e),r=e.closest(hc),i=e.closest(`.${p5}`);ov=`No ${n} selected.`,t.classList.add(CT),t.setAttribute("aria-live","polite"),t.textContent=ov,r.insertBefore(t,i)},KW=e=>{const t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),n=WW(e),r=qW(e),{dropZoneEl:i}=Qc(e);return t?i.classList.add(J0):GW(e),{instructions:r,dropTarget:n}},RT=(e,t)=>{const n=e.querySelectorAll(`.${wT}`),r=e.querySelector(`.${bT}`),i=e.querySelector(`.${ET}`),o=s=>{s.parentNode.removeChild(s)};r&&(r.outerHTML=""),i&&(i.outerHTML="",e.classList.remove(nv)),n!==null&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(n,o))},YW=(e,t,n)=>{const r=e;let i=ov;t.length===1?i=`You have selected the file: ${n}`:t.length>1&&(i=`You have selected ${t.length} files: ${n.join(", ")}`),setTimeout(()=>{r.textContent=i},1e3)},QW=(e,t)=>{const n=document.createElement("div"),r=e.closest(`.${p5}`),i=r.querySelector(`.${ST}`);let o="Change file",s="";t.length===1?s=Sh.escapeHTML`Selected file ${o}`:t.length>1&&(o="Change files",s=Sh.escapeHTML`${t.length} files selected ${o}`),i.setAttribute("hidden","true"),n.classList.add(bT),n.innerHTML=s,r.insertBefore(n,i),e.setAttribute("aria-label",o)},XW=(e,t,n,r)=>{const i=e.target.files,s=r.closest(`.${fc}`).querySelector(`.${CT}`),a=[];RT(r,n);for(let l=0;l