diff --git a/assets/Latin-Merriweather-Bold-398a4098.woff2 b/assets/Latin-Merriweather-Bold-398a4098.woff2
new file mode 100644
index 00000000..b71dc5a0
Binary files /dev/null and b/assets/Latin-Merriweather-Bold-398a4098.woff2 differ
diff --git a/assets/Latin-Merriweather-BoldItalic-47048032.woff2 b/assets/Latin-Merriweather-BoldItalic-47048032.woff2
new file mode 100644
index 00000000..36d3abfc
Binary files /dev/null and b/assets/Latin-Merriweather-BoldItalic-47048032.woff2 differ
diff --git a/assets/Latin-Merriweather-Italic-a0e8dae2.woff2 b/assets/Latin-Merriweather-Italic-a0e8dae2.woff2
new file mode 100644
index 00000000..09916326
Binary files /dev/null and b/assets/Latin-Merriweather-Italic-a0e8dae2.woff2 differ
diff --git a/assets/Latin-Merriweather-Light-85e700ae.woff2 b/assets/Latin-Merriweather-Light-85e700ae.woff2
new file mode 100644
index 00000000..a0eadc33
Binary files /dev/null and b/assets/Latin-Merriweather-Light-85e700ae.woff2 differ
diff --git a/assets/Latin-Merriweather-LightItalic-d755b836.woff2 b/assets/Latin-Merriweather-LightItalic-d755b836.woff2
new file mode 100644
index 00000000..5112dab4
Binary files /dev/null and b/assets/Latin-Merriweather-LightItalic-d755b836.woff2 differ
diff --git a/assets/Latin-Merriweather-Regular-928176d9.woff2 b/assets/Latin-Merriweather-Regular-928176d9.woff2
new file mode 100644
index 00000000..9a9bd644
Binary files /dev/null and b/assets/Latin-Merriweather-Regular-928176d9.woff2 differ
diff --git a/assets/add-4dc55478.svg b/assets/add-4dc55478.svg
new file mode 100644
index 00000000..58f73e96
--- /dev/null
+++ b/assets/add-4dc55478.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/arrow_back-ad23ffb6.svg b/assets/arrow_back-ad23ffb6.svg
new file mode 100644
index 00000000..00d44bf5
--- /dev/null
+++ b/assets/arrow_back-ad23ffb6.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/calendar_today-cc23d005.svg b/assets/calendar_today-cc23d005.svg
new file mode 100644
index 00000000..9c40555f
--- /dev/null
+++ b/assets/calendar_today-cc23d005.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/check--blue-60v-2fa4117a.svg b/assets/check--blue-60v-2fa4117a.svg
new file mode 100644
index 00000000..ed101a94
--- /dev/null
+++ b/assets/check--blue-60v-2fa4117a.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/check_circle-2222ca5b.svg b/assets/check_circle-2222ca5b.svg
new file mode 100644
index 00000000..1775c862
--- /dev/null
+++ b/assets/check_circle-2222ca5b.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/close-1abf0e0a.svg b/assets/close-1abf0e0a.svg
new file mode 100644
index 00000000..c3f7c2fd
--- /dev/null
+++ b/assets/close-1abf0e0a.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/correct8-7d30903a.svg b/assets/correct8-7d30903a.svg
new file mode 100644
index 00000000..3270fdb2
--- /dev/null
+++ b/assets/correct8-7d30903a.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/correct8-alt-68c4a313.svg b/assets/correct8-alt-68c4a313.svg
new file mode 100644
index 00000000..cba03c31
--- /dev/null
+++ b/assets/correct8-alt-68c4a313.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/error--white-d55dac06.svg b/assets/error--white-d55dac06.svg
new file mode 100644
index 00000000..442cca50
--- /dev/null
+++ b/assets/error--white-d55dac06.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/error-4ab47484.svg b/assets/error-4ab47484.svg
new file mode 100644
index 00000000..d30cc3a7
--- /dev/null
+++ b/assets/error-4ab47484.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/expand_less-e364a85f.svg b/assets/expand_less-e364a85f.svg
new file mode 100644
index 00000000..53985246
--- /dev/null
+++ b/assets/expand_less-e364a85f.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/expand_more-bc1d8378.svg b/assets/expand_more-bc1d8378.svg
new file mode 100644
index 00000000..4428af00
--- /dev/null
+++ b/assets/expand_more-bc1d8378.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/facebook-1522ea1f.svg b/assets/facebook-1522ea1f.svg
new file mode 100644
index 00000000..f4feccc0
--- /dev/null
+++ b/assets/facebook-1522ea1f.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/file-2b1fcfa0.svg b/assets/file-2b1fcfa0.svg
new file mode 100644
index 00000000..8469c7e9
--- /dev/null
+++ b/assets/file-2b1fcfa0.svg
@@ -0,0 +1 @@
+
diff --git a/assets/file-excel-89c8dce1.svg b/assets/file-excel-89c8dce1.svg
new file mode 100644
index 00000000..9bf512ad
--- /dev/null
+++ b/assets/file-excel-89c8dce1.svg
@@ -0,0 +1 @@
+
diff --git a/assets/file-pdf-186ca8c6.svg b/assets/file-pdf-186ca8c6.svg
new file mode 100644
index 00000000..c40ec126
--- /dev/null
+++ b/assets/file-pdf-186ca8c6.svg
@@ -0,0 +1 @@
+
diff --git a/assets/file-video-98ea6ce4.svg b/assets/file-video-98ea6ce4.svg
new file mode 100644
index 00000000..d3933c88
--- /dev/null
+++ b/assets/file-video-98ea6ce4.svg
@@ -0,0 +1 @@
+
diff --git a/assets/file-word-52d8af54.svg b/assets/file-word-52d8af54.svg
new file mode 100644
index 00000000..214b55a1
--- /dev/null
+++ b/assets/file-word-52d8af54.svg
@@ -0,0 +1 @@
+
diff --git a/assets/hero-d5779c5c.jpg b/assets/hero-d5779c5c.jpg
new file mode 100644
index 00000000..62320c42
Binary files /dev/null and b/assets/hero-d5779c5c.jpg differ
diff --git a/assets/icon-dot-gov-d0228750.svg b/assets/icon-dot-gov-d0228750.svg
new file mode 100644
index 00000000..3dac7cd8
--- /dev/null
+++ b/assets/icon-dot-gov-d0228750.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/icon-https-912daff9.svg b/assets/icon-https-912daff9.svg
new file mode 100644
index 00000000..19ad04fc
--- /dev/null
+++ b/assets/icon-https-912daff9.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/index-42dd3864.js b/assets/index-42dd3864.js
new file mode 100644
index 00000000..2b998fde
--- /dev/null
+++ b/assets/index-42dd3864.js
@@ -0,0 +1,573 @@
+function XM(e,t){for(var n=0;nr[o]})}}}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 o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const i of o)if(i.type==="childList")for(const a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(o){const i={};return o.integrity&&(i.integrity=o.integrity),o.referrerPolicy&&(i.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?i.credentials="include":o.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(o){if(o.ep)return;o.ep=!0;const i=n(o);fetch(o.href,i)}})();var Ci=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function uo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ZM(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 o=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,o.get?o:{enumerable:!0,get:function(){return e[r]}})}),n}var oC={exports:{}},Kp={},iC={exports:{}},Re={};/**
+ * @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 Qu=Symbol.for("react.element"),JM=Symbol.for("react.portal"),eN=Symbol.for("react.fragment"),tN=Symbol.for("react.strict_mode"),nN=Symbol.for("react.profiler"),rN=Symbol.for("react.provider"),oN=Symbol.for("react.context"),iN=Symbol.for("react.forward_ref"),aN=Symbol.for("react.suspense"),sN=Symbol.for("react.memo"),lN=Symbol.for("react.lazy"),px=Symbol.iterator;function uN(e){return e===null||typeof e!="object"?null:(e=px&&e[px]||e["@@iterator"],typeof e=="function"?e:null)}var aC={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sC=Object.assign,lC={};function Ds(e,t,n){this.props=e,this.context=t,this.refs=lC,this.updater=n||aC}Ds.prototype.isReactComponent={};Ds.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")};Ds.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function uC(){}uC.prototype=Ds.prototype;function N1(e,t,n){this.props=e,this.context=t,this.refs=lC,this.updater=n||aC}var L1=N1.prototype=new uC;L1.constructor=N1;sC(L1,Ds.prototype);L1.isPureReactComponent=!0;var hx=Array.isArray,cC=Object.prototype.hasOwnProperty,D1={current:null},dC={key:!0,ref:!0,__self:!0,__source:!0};function fC(e,t,n){var r,o={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)cC.call(t,r)&&!dC.hasOwnProperty(r)&&(o[r]=t[r]);var s=arguments.length-2;if(s===1)o.children=n;else if(1>>1,M=V[oe];if(0>>1;oeo(ee,Y))Zo(ae,ee)?(V[oe]=ae,V[Z]=Y,oe=Z):(V[oe]=ee,V[B]=Y,oe=B);else if(Zo(ae,Y))V[oe]=ae,V[Z]=Y,oe=Z;else break e}}return K}function o(V,K){var Y=V.sortIndex-K.sortIndex;return Y!==0?Y:V.id-K.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,s=a.now();e.unstable_now=function(){return a.now()-s}}var l=[],u=[],c=1,d=null,f=3,p=!1,g=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,h=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){for(var K=n(u);K!==null;){if(K.callback===null)r(u);else if(K.startTime<=V)r(u),K.sortIndex=K.expirationTime,t(l,K);else break;K=n(u)}}function x(V){if(v=!1,_(V),!g)if(n(l)!==null)g=!0,G(w);else{var K=n(u);K!==null&&W(x,K.startTime-V)}}function w(V,K){g=!1,v&&(v=!1,y(C),C=-1),p=!0;var Y=f;try{for(_(K),d=n(l);d!==null&&(!(d.expirationTime>K)||V&&!k());){var oe=d.callback;if(typeof oe=="function"){d.callback=null,f=d.priorityLevel;var M=oe(d.expirationTime<=K);K=e.unstable_now(),typeof M=="function"?d.callback=M:d===n(l)&&r(l),_(K)}else r(l);d=n(l)}if(d!==null)var U=!0;else{var B=n(u);B!==null&&W(x,B.startTime-K),U=!1}return U}finally{d=null,f=Y,p=!1}}var S=!1,A=null,C=-1,R=5,O=-1;function k(){return!(e.unstable_now()-OV||125oe?(V.sortIndex=Y,t(u,V),n(l)===null&&V===n(u)&&(v?(y(C),C=-1):v=!0,W(x,Y-oe))):(V.sortIndex=M,t(l,V),g||p||(g=!0,G(w))),V},e.unstable_shouldYield=k,e.unstable_wrapCallback=function(V){var K=f;return function(){var Y=f;f=K;try{return V.apply(this,arguments)}finally{f=Y}}}})(mC);gC.exports=mC;var xN=gC.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 yC=H,_n=xN;function X(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"),Ly=Object.prototype.hasOwnProperty,wN=/^[: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]*$/,mx={},yx={};function SN(e){return Ly.call(yx,e)?!0:Ly.call(mx,e)?!1:wN.test(e)?yx[e]=!0:(mx[e]=!0,!1)}function EN(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 AN(e,t,n,r){if(t===null||typeof t>"u"||EN(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 Wt(e,t,n,r,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Wt(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){Tt[e]=new Wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var j1=/[\-:]([a-z])/g;function F1(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(j1,F1);Tt[t]=new Wt(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(j1,F1);Tt[t]=new Wt(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(j1,F1);Tt[t]=new Wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function U1(e,t,n,r){var o=Tt.hasOwnProperty(t)?Tt[t]:null;(o!==null?o.type!==0:r||!(2s||o[a]!==i[s]){var l=`
+`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{Ag=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Pl(e):""}function CN(e){switch(e.tag){case 5:return Pl(e.type);case 16:return Pl("Lazy");case 13:return Pl("Suspense");case 19:return Pl("SuspenseList");case 0:case 2:case 15:return e=Cg(e.type,!1),e;case 11:return e=Cg(e.type.render,!1),e;case 1:return e=Cg(e.type,!0),e;default:return""}}function Fy(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 Ma:return"Fragment";case Pa:return"Portal";case Dy:return"Profiler";case V1:return"StrictMode";case Iy:return"Suspense";case jy:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bC:return(e.displayName||"Context")+".Consumer";case _C:return(e._context.displayName||"Context")+".Provider";case z1:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case B1:return t=e.displayName||null,t!==null?t:Fy(e.type)||"Memo";case wo:t=e._payload,e=e._init;try{return Fy(e(t))}catch{}}return null}function ON(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 Fy(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 ei(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wC(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function RN(e){var t=wC(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 o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mc(e){e._valueTracker||(e._valueTracker=RN(e))}function SC(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=wC(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zd(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 Uy(e,t){var n=t.checked;return Je({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function _x(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ei(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 EC(e,t){t=t.checked,t!=null&&U1(e,"checked",t,!1)}function Vy(e,t){EC(e,t);var n=ei(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")?zy(e,t.type,n):t.hasOwnProperty("defaultValue")&&zy(e,t.type,ei(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function bx(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 zy(e,t,n){(t!=="number"||Zd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ml=Array.isArray;function Za(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Nc.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function du(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ql={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},kN=["Webkit","ms","Moz","O"];Object.keys(ql).forEach(function(e){kN.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ql[t]=ql[e]})});function RC(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||ql.hasOwnProperty(e)&&ql[e]?(""+t).trim():t+"px"}function kC(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,o=RC(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}var TN=Je({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 qy(e,t){if(t){if(TN[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(X(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(X(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(X(61))}if(t.style!=null&&typeof t.style!="object")throw Error(X(62))}}function Wy(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 Gy=null;function H1(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ky=null,Ja=null,es=null;function Sx(e){if(e=Ju(e)){if(typeof Ky!="function")throw Error(X(280));var t=e.stateNode;t&&(t=Jp(t),Ky(e.stateNode,e.type,t))}}function TC(e){Ja?es?es.push(e):es=[e]:Ja=e}function $C(){if(Ja){var e=Ja,t=es;if(es=Ja=null,Sx(e),t)for(e=0;e>>=0,e===0?32:31-(VN(e)/zN|0)|0}var Lc=64,Dc=4194304;function Nl(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 nf(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var s=a&~o;s!==0?r=Nl(s):(i&=a,i!==0&&(r=Nl(i)))}else a=n&~o,a!==0?r=Nl(a):i!==0&&(r=Nl(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&o)&&(o=r&-r,i=t&-t,o>=i||o===16&&(i&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 Xu(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ur(t),e[t]=n}function WN(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=Gl),Px=String.fromCharCode(32),Mx=!1;function XC(e,t){switch(e){case"keyup":return b4.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Na=!1;function w4(e,t){switch(e){case"compositionend":return ZC(t);case"keypress":return t.which!==32?null:(Mx=!0,Px);case"textInput":return e=t.data,e===Px&&Mx?null:e;default:return null}}function S4(e,t){if(Na)return e==="compositionend"||!Z1&&XC(e,t)?(e=YC(),bd=Y1=Mo=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=Ix(n)}}function n7(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?n7(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function r7(){for(var e=window,t=Zd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zd(e.document)}return t}function J1(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 P4(e){var t=r7(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&n7(n.ownerDocument.documentElement,n)){if(r!==null&&J1(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 o=n.textContent.length,i=Math.min(r.start,o);r=r.end===void 0?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=jx(n,i);var a=jx(n,r);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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,La=null,e0=null,Yl=null,t0=!1;function Fx(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;t0||La==null||La!==Zd(r)||(r=La,"selectionStart"in r&&J1(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}),Yl&&yu(Yl,r)||(Yl=r,r=af(e0,"onSelect"),0ja||(e.current=s0[ja],s0[ja]=null,ja--)}function Ue(e,t){ja++,s0[ja]=e.current,e.current=t}var ti={},Dt=si(ti),rn=si(!1),qi=ti;function ps(e,t){var n=e.type.contextTypes;if(!n)return ti;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in n)o[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function on(e){return e=e.childContextTypes,e!=null}function lf(){qe(rn),qe(Dt)}function Wx(e,t,n){if(Dt.current!==ti)throw Error(X(168));Ue(Dt,t),Ue(rn,n)}function f7(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var o in r)if(!(o in t))throw Error(X(108,ON(e)||"Unknown",o));return Je({},n,r)}function uf(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ti,qi=Dt.current,Ue(Dt,e),Ue(rn,rn.current),!0}function Gx(e,t,n){var r=e.stateNode;if(!r)throw Error(X(169));n?(e=f7(e,t,qi),r.__reactInternalMemoizedMergedChildContext=e,qe(rn),qe(Dt),Ue(Dt,e)):qe(rn),Ue(rn,n)}var Wr=null,eh=!1,Ug=!1;function p7(e){Wr===null?Wr=[e]:Wr.push(e)}function H4(e){eh=!0,p7(e)}function li(){if(!Ug&&Wr!==null){Ug=!0;var e=0,t=Ne;try{var n=Wr;for(Ne=1;e>=a,o-=a,Gr=1<<32-ur(t)+o|n<C?(R=A,A=null):R=A.sibling;var O=f(y,A,_[C],x);if(O===null){A===null&&(A=R);break}e&&A&&O.alternate===null&&t(y,A),h=i(O,h,C),S===null?w=O:S.sibling=O,S=O,A=R}if(C===_.length)return n(y,A),Ke&&mi(y,C),w;if(A===null){for(;C<_.length;C++)A=d(y,_[C],x),A!==null&&(h=i(A,h,C),S===null?w=A:S.sibling=A,S=A);return Ke&&mi(y,C),w}for(A=r(y,A);C<_.length;C++)R=p(A,y,C,_[C],x),R!==null&&(e&&R.alternate!==null&&A.delete(R.key===null?C:R.key),h=i(R,h,C),S===null?w=R:S.sibling=R,S=R);return e&&A.forEach(function(k){return t(y,k)}),Ke&&mi(y,C),w}function v(y,h,_,x){var w=ll(_);if(typeof w!="function")throw Error(X(150));if(_=w.call(_),_==null)throw Error(X(151));for(var S=w=null,A=h,C=h=0,R=null,O=_.next();A!==null&&!O.done;C++,O=_.next()){A.index>C?(R=A,A=null):R=A.sibling;var k=f(y,A,O.value,x);if(k===null){A===null&&(A=R);break}e&&A&&k.alternate===null&&t(y,A),h=i(k,h,C),S===null?w=k:S.sibling=k,S=k,A=R}if(O.done)return n(y,A),Ke&&mi(y,C),w;if(A===null){for(;!O.done;C++,O=_.next())O=d(y,O.value,x),O!==null&&(h=i(O,h,C),S===null?w=O:S.sibling=O,S=O);return Ke&&mi(y,C),w}for(A=r(y,A);!O.done;C++,O=_.next())O=p(A,y,C,O.value,x),O!==null&&(e&&O.alternate!==null&&A.delete(O.key===null?C:O.key),h=i(O,h,C),S===null?w=O:S.sibling=O,S=O);return e&&A.forEach(function(T){return t(y,T)}),Ke&&mi(y,C),w}function b(y,h,_,x){if(typeof _=="object"&&_!==null&&_.type===Ma&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case Pc:e:{for(var w=_.key,S=h;S!==null;){if(S.key===w){if(w=_.type,w===Ma){if(S.tag===7){n(y,S.sibling),h=o(S,_.props.children),h.return=y,y=h;break e}}else if(S.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===wo&&e2(w)===S.type){n(y,S.sibling),h=o(S,_.props),h.ref=pl(y,S,_),h.return=y,y=h;break e}n(y,S);break}else t(y,S);S=S.sibling}_.type===Ma?(h=ji(_.props.children,y.mode,x,_.key),h.return=y,y=h):(x=Rd(_.type,_.key,_.props,null,y.mode,x),x.ref=pl(y,h,_),x.return=y,y=x)}return a(y);case Pa:e:{for(S=_.key;h!==null;){if(h.key===S)if(h.tag===4&&h.stateNode.containerInfo===_.containerInfo&&h.stateNode.implementation===_.implementation){n(y,h.sibling),h=o(h,_.children||[]),h.return=y,y=h;break e}else{n(y,h);break}else t(y,h);h=h.sibling}h=Kg(_,y.mode,x),h.return=y,y=h}return a(y);case wo:return S=_._init,b(y,h,S(_._payload),x)}if(Ml(_))return g(y,h,_,x);if(ll(_))return v(y,h,_,x);Bc(y,_)}return typeof _=="string"&&_!==""||typeof _=="number"?(_=""+_,h!==null&&h.tag===6?(n(y,h.sibling),h=o(h,_),h.return=y,y=h):(n(y,h),h=Gg(_,y.mode,x),h.return=y,y=h),a(y)):n(y,h)}return b}var gs=x7(!0),w7=x7(!1),ec={},Or=si(ec),xu=si(ec),wu=si(ec);function ki(e){if(e===ec)throw Error(X(174));return e}function l_(e,t){switch(Ue(wu,t),Ue(xu,e),Ue(Or,ec),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Hy(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Hy(t,e)}qe(Or),Ue(Or,t)}function ms(){qe(Or),qe(xu),qe(wu)}function S7(e){ki(wu.current);var t=ki(Or.current),n=Hy(t,e.type);t!==n&&(Ue(xu,e),Ue(Or,n))}function u_(e){xu.current===e&&(qe(Or),qe(xu))}var Xe=si(0);function gf(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 Vg=[];function c_(){for(var e=0;en?n:4,e(!0);var r=zg.transition;zg.transition={};try{e(!1),t()}finally{Ne=n,zg.transition=r}}function F7(){return Un().memoizedState}function K4(e,t,n){var r=qo(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},U7(e))V7(t,n);else if(n=y7(e,t,n,r),n!==null){var o=Bt();cr(n,e,r,o),z7(n,t,r)}}function Y4(e,t,n){var r=qo(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(U7(e))V7(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,fr(s,a)){var l=t.interleaved;l===null?(o.next=o,a_(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}n=y7(e,t,o,r),n!==null&&(o=Bt(),cr(n,e,r,o),z7(n,t,r))}}function U7(e){var t=e.alternate;return e===Ze||t!==null&&t===Ze}function V7(e,t){Ql=mf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function z7(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,W1(e,n)}}var yf={readContext:Fn,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useInsertionEffect:$t,useLayoutEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useMutableSource:$t,useSyncExternalStore:$t,useId:$t,unstable_isNewReconciler:!1},Q4={readContext:Fn,useCallback:function(e,t){return yr().memoizedState=[e,t===void 0?null:t],e},useContext:Fn,useEffect:n2,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ed(4194308,4,N7.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ed(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ed(4,2,e,t)},useMemo:function(e,t){var n=yr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yr();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=K4.bind(null,Ze,e),[r.memoizedState,e]},useRef:function(e){var t=yr();return e={current:e},t.memoizedState=e},useState:t2,useDebugValue:g_,useDeferredValue:function(e){return yr().memoizedState=e},useTransition:function(){var e=t2(!1),t=e[0];return e=G4.bind(null,e[1]),yr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ze,o=yr();if(Ke){if(n===void 0)throw Error(X(407));n=n()}else{if(n=t(),St===null)throw Error(X(349));Gi&30||C7(r,t,n)}o.memoizedState=n;var i={value:n,getSnapshot:t};return o.queue=i,n2(R7.bind(null,r,i,e),[e]),r.flags|=2048,Au(9,O7.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=yr(),t=St.identifierPrefix;if(Ke){var n=Kr,r=Gr;n=(r&~(1<<32-ur(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Su++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[xr]=t,e[bu]=r,X7(e,t,!1,!1),t.stateNode=e;e:{switch(a=Wy(n,r),n){case"dialog":ze("cancel",e),ze("close",e),o=r;break;case"iframe":case"object":case"embed":ze("load",e),o=r;break;case"video":case"audio":for(o=0;ovs&&(t.flags|=128,r=!0,hl(i,!1),t.lanes=4194304)}else{if(!r)if(e=gf(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),hl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!Ke)return Pt(t),null}else 2*ot()-i.renderingStartTime>vs&&n!==1073741824&&(t.flags|=128,r=!0,hl(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ot(),t.sibling=null,n=Xe.current,Ue(Xe,r?n&1|2:n&1),t):(Pt(t),null);case 22:case 23:return x_(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?mn&1073741824&&(Pt(t),t.subtreeFlags&6&&(t.flags|=8192)):Pt(t),null;case 24:return null;case 25:return null}throw Error(X(156,t.tag))}function o8(e,t){switch(t_(t),t.tag){case 1:return on(t.type)&&lf(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ms(),qe(rn),qe(Dt),c_(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return u_(t),null;case 13:if(qe(Xe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(X(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return qe(Xe),null;case 4:return ms(),null;case 10:return i_(t.type._context),null;case 22:case 23:return x_(),null;case 24:return null;default:return null}}var qc=!1,Lt=!1,i8=typeof WeakSet=="function"?WeakSet:Set,ue=null;function za(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){et(e,t,r)}else n.current=null}function _0(e,t,n){try{n()}catch(r){et(e,t,r)}}var d2=!1;function a8(e,t){if(n0=rf,e=r7(),J1(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 o=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var a=0,s=-1,l=-1,u=0,c=0,d=e,f=null;t:for(;;){for(var p;d!==n||o!==0&&d.nodeType!==3||(s=a+o),d!==i||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++u===o&&(s=a),f===i&&++c===r&&(l=a),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||l===-1?null:{start:s,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(r0={focusedElem:e,selectionRange:n},rf=!1,ue=t;ue!==null;)if(t=ue,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ue=e;else for(;ue!==null;){t=ue;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 v=g.memoizedProps,b=g.memoizedState,y=t.stateNode,h=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:Jn(t.type,v),b);y.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var _=t.stateNode.containerInfo;_.nodeType===1?_.textContent="":_.nodeType===9&&_.documentElement&&_.removeChild(_.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(X(163))}}catch(x){et(t,t.return,x)}if(e=t.sibling,e!==null){e.return=t.return,ue=e;break}ue=t.return}return g=d2,d2=!1,g}function Xl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&_0(t,n,i)}o=o.next}while(o!==r)}}function rh(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 b0(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 eO(e){var t=e.alternate;t!==null&&(e.alternate=null,eO(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[xr],delete t[bu],delete t[a0],delete t[z4],delete t[B4])),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 tO(e){return e.tag===5||e.tag===3||e.tag===4}function f2(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tO(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 x0(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=sf));else if(r!==4&&(e=e.child,e!==null))for(x0(e,t,n),e=e.sibling;e!==null;)x0(e,t,n),e=e.sibling}function w0(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(w0(e,t,n),e=e.sibling;e!==null;)w0(e,t,n),e=e.sibling}var Rt=null,tr=!1;function bo(e,t,n){for(n=n.child;n!==null;)nO(e,t,n),n=n.sibling}function nO(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Yp,n)}catch{}switch(n.tag){case 5:Lt||za(n,t);case 6:var r=Rt,o=tr;Rt=null,bo(e,t,n),Rt=r,tr=o,Rt!==null&&(tr?(e=Rt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Rt.removeChild(n.stateNode));break;case 18:Rt!==null&&(tr?(e=Rt,n=n.stateNode,e.nodeType===8?Fg(e.parentNode,n):e.nodeType===1&&Fg(e,n),gu(e)):Fg(Rt,n.stateNode));break;case 4:r=Rt,o=tr,Rt=n.stateNode.containerInfo,tr=!0,bo(e,t,n),Rt=r,tr=o;break;case 0:case 11:case 14:case 15:if(!Lt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&_0(n,t,a),o=o.next}while(o!==r)}bo(e,t,n);break;case 1:if(!Lt&&(za(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){et(n,t,s)}bo(e,t,n);break;case 21:bo(e,t,n);break;case 22:n.mode&1?(Lt=(r=Lt)||n.memoizedState!==null,bo(e,t,n),Lt=r):bo(e,t,n);break;default:bo(e,t,n)}}function p2(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new i8),t.forEach(function(r){var o=g8.bind(null,e,r);n.has(r)||(n.add(r),r.then(o,o))})}}function Yn(e,t){var n=t.deletions;if(n!==null)for(var r=0;ro&&(o=a),r&=~i}if(r=o,r=ot()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*l8(r/1960))-r,10e?16:e,No===null)var r=!1;else{if(e=No,No=null,bf=0,Te&6)throw Error(X(331));var o=Te;for(Te|=4,ue=e.current;ue!==null;){var i=ue,a=i.child;if(ue.flags&16){var s=i.deletions;if(s!==null){for(var l=0;lot()-__?Ii(e,0):v_|=n),an(e,t)}function cO(e,t){t===0&&(e.mode&1?(t=Dc,Dc<<=1,!(Dc&130023424)&&(Dc=4194304)):t=1);var n=Bt();e=eo(e,t),e!==null&&(Xu(e,t,n),an(e,n))}function h8(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cO(e,n)}function g8(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(X(314))}r!==null&&r.delete(t),cO(e,n)}var dO;dO=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||rn.current)nn=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return nn=!1,n8(e,t,n);nn=!!(e.flags&131072)}else nn=!1,Ke&&t.flags&1048576&&h7(t,df,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ad(e,t),e=t.pendingProps;var o=ps(t,Dt.current);ns(t,n),o=f_(null,t,r,e,o,n);var i=p_();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,on(r)?(i=!0,uf(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,s_(t),o.updater=th,t.stateNode=o,o._reactInternals=t,f0(t,r,e,n),t=g0(null,t,r,!0,i,n)):(t.tag=0,Ke&&i&&e_(t),Ft(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ad(e,t),e=t.pendingProps,o=r._init,r=o(r._payload),t.type=r,o=t.tag=y8(r),e=Jn(r,e),o){case 0:t=h0(null,t,r,e,n);break e;case 1:t=l2(null,t,r,e,n);break e;case 11:t=a2(null,t,r,e,n);break e;case 14:t=s2(null,t,r,Jn(r.type,e),n);break e}throw Error(X(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),h0(e,t,r,o,n);case 1:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),l2(e,t,r,o,n);case 3:e:{if(K7(t),e===null)throw Error(X(387));r=t.pendingProps,i=t.memoizedState,o=i.element,v7(e,t),hf(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=ys(Error(X(423)),t),t=u2(e,t,r,n,o);break e}else if(r!==o){o=ys(Error(X(424)),t),t=u2(e,t,r,n,o);break e}else for(yn=zo(t.stateNode.containerInfo.firstChild),vn=t,Ke=!0,rr=null,n=w7(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hs(),r===o){t=to(e,t,n);break e}Ft(e,t,r,n)}t=t.child}return t;case 5:return S7(t),e===null&&u0(t),r=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,o0(r,o)?a=null:i!==null&&o0(r,i)&&(t.flags|=32),G7(e,t),Ft(e,t,a,n),t.child;case 6:return e===null&&u0(t),null;case 13:return Y7(e,t,n);case 4:return l_(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gs(t,null,r,n):Ft(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),a2(e,t,r,o,n);case 7:return Ft(e,t,t.pendingProps,n),t.child;case 8:return Ft(e,t,t.pendingProps.children,n),t.child;case 12:return Ft(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,Ue(ff,r._currentValue),r._currentValue=a,i!==null)if(fr(i.value,a)){if(i.children===o.children&&!rn.current){t=to(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Xr(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),c0(i.return,n,t),s.lanes|=n;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(X(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),c0(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Ft(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,ns(t,n),o=Fn(o),r=r(o),t.flags|=1,Ft(e,t,r,n),t.child;case 14:return r=t.type,o=Jn(r,t.pendingProps),o=Jn(r.type,o),s2(e,t,r,o,n);case 15:return q7(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Jn(r,o),Ad(e,t),t.tag=1,on(r)?(e=!0,uf(t)):e=!1,ns(t,n),b7(t,r,o),f0(t,r,o,n),g0(null,t,r,!0,e,n);case 19:return Q7(e,t,n);case 22:return W7(e,t,n)}throw Error(X(156,t.tag))};function fO(e,t){return jC(e,t)}function m8(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 Dn(e,t,n,r){return new m8(e,t,n,r)}function S_(e){return e=e.prototype,!(!e||!e.isReactComponent)}function y8(e){if(typeof e=="function")return S_(e)?1:0;if(e!=null){if(e=e.$$typeof,e===z1)return 11;if(e===B1)return 14}return 2}function Wo(e,t){var n=e.alternate;return n===null?(n=Dn(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 Rd(e,t,n,r,o,i){var a=2;if(r=e,typeof e=="function")S_(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ma:return ji(n.children,o,i,t);case V1:a=8,o|=8;break;case Dy:return e=Dn(12,n,t,o|2),e.elementType=Dy,e.lanes=i,e;case Iy:return e=Dn(13,n,t,o),e.elementType=Iy,e.lanes=i,e;case jy:return e=Dn(19,n,t,o),e.elementType=jy,e.lanes=i,e;case xC:return ih(n,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _C:a=10;break e;case bC:a=9;break e;case z1:a=11;break e;case B1:a=14;break e;case wo:a=16,r=null;break e}throw Error(X(130,e==null?e:typeof e,""))}return t=Dn(a,n,t,o),t.elementType=e,t.type=r,t.lanes=i,t}function ji(e,t,n,r){return e=Dn(7,e,r,t),e.lanes=n,e}function ih(e,t,n,r){return e=Dn(22,e,r,t),e.elementType=xC,e.lanes=n,e.stateNode={isHidden:!1},e}function Gg(e,t,n){return e=Dn(6,e,null,t),e.lanes=n,e}function Kg(e,t,n){return t=Dn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function v8(e,t,n,r,o){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=Rg(0),this.expirationTimes=Rg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rg(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function E_(e,t,n,r,o,i,a,s,l){return e=new v8(e,t,n,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Dn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},s_(i),e}function _8(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mO)}catch(e){console.error(e)}}mO(),hC.exports=bn;var yO=hC.exports;const E8=uo(yO);var x2=yO;Ny.createRoot=x2.createRoot,Ny.hydrateRoot=x2.hydrateRoot;function A8(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 vO={exports:{}};const C8={},O8=Object.freeze(Object.defineProperty({__proto__:null,default:C8},Symbol.toStringTag,{value:"Module"})),R8=ZM(O8);(function(e,t){(function(n,r){e.exports=r()})(Ci,function(){var n=n||function(r,o){var i;if(typeof window<"u"&&window.crypto&&(i=window.crypto),typeof self<"u"&&self.crypto&&(i=self.crypto),typeof globalThis<"u"&&globalThis.crypto&&(i=globalThis.crypto),!i&&typeof window<"u"&&window.msCrypto&&(i=window.msCrypto),!i&&typeof Ci<"u"&&Ci.crypto&&(i=Ci.crypto),!i&&typeof A8=="function")try{i=R8}catch{}var a=function(){if(i){if(typeof i.getRandomValues=="function")try{return i.getRandomValues(new Uint32Array(1))[0]}catch{}if(typeof i.randomBytes=="function")try{return i.randomBytes(4).readInt32LE()}catch{}}throw new Error("Native crypto module could not be used to get secure random number.")},s=Object.create||function(){function h(){}return function(_){var x;return h.prototype=_,x=new h,h.prototype=null,x}}(),l={},u=l.lib={},c=u.Base=function(){return{extend:function(h){var _=s(this);return h&&_.mixIn(h),(!_.hasOwnProperty("init")||this.init===_.init)&&(_.init=function(){_.$super.init.apply(this,arguments)}),_.init.prototype=_,_.$super=this,_},create:function(){var h=this.extend();return h.init.apply(h,arguments),h},init:function(){},mixIn:function(h){for(var _ in h)h.hasOwnProperty(_)&&(this[_]=h[_]);h.hasOwnProperty("toString")&&(this.toString=h.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),d=u.WordArray=c.extend({init:function(h,_){h=this.words=h||[],_!=o?this.sigBytes=_:this.sigBytes=h.length*4},toString:function(h){return(h||p).stringify(this)},concat:function(h){var _=this.words,x=h.words,w=this.sigBytes,S=h.sigBytes;if(this.clamp(),w%4)for(var A=0;A>>2]>>>24-A%4*8&255;_[w+A>>>2]|=C<<24-(w+A)%4*8}else for(var R=0;R>>2]=x[R>>>2];return this.sigBytes+=S,this},clamp:function(){var h=this.words,_=this.sigBytes;h[_>>>2]&=4294967295<<32-_%4*8,h.length=r.ceil(_/4)},clone:function(){var h=c.clone.call(this);return h.words=this.words.slice(0),h},random:function(h){for(var _=[],x=0;x>>2]>>>24-S%4*8&255;w.push((A>>>4).toString(16)),w.push((A&15).toString(16))}return w.join("")},parse:function(h){for(var _=h.length,x=[],w=0;w<_;w+=2)x[w>>>3]|=parseInt(h.substr(w,2),16)<<24-w%8*4;return new d.init(x,_/2)}},g=f.Latin1={stringify:function(h){for(var _=h.words,x=h.sigBytes,w=[],S=0;S>>2]>>>24-S%4*8&255;w.push(String.fromCharCode(A))}return w.join("")},parse:function(h){for(var _=h.length,x=[],w=0;w<_;w++)x[w>>>2]|=(h.charCodeAt(w)&255)<<24-w%4*8;return new d.init(x,_)}},v=f.Utf8={stringify:function(h){try{return decodeURIComponent(escape(g.stringify(h)))}catch{throw new Error("Malformed UTF-8 data")}},parse:function(h){return g.parse(unescape(encodeURIComponent(h)))}},b=u.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new d.init,this._nDataBytes=0},_append:function(h){typeof h=="string"&&(h=v.parse(h)),this._data.concat(h),this._nDataBytes+=h.sigBytes},_process:function(h){var _,x=this._data,w=x.words,S=x.sigBytes,A=this.blockSize,C=A*4,R=S/C;h?R=r.ceil(R):R=r.max((R|0)-this._minBufferSize,0);var O=R*A,k=r.min(O*4,S);if(O){for(var T=0;T>>7)^(R<<14|R>>>18)^R>>>3,k=d[C-2],T=(k<<15|k>>>17)^(k<<13|k>>>19)^k>>>10;d[C]=O+d[C-7]+T+d[C-16]}var $=x&w^~x&S,j=b&y^b&h^y&h,L=(b<<30|b>>>2)^(b<<19|b>>>13)^(b<<10|b>>>22),G=(x<<26|x>>>6)^(x<<21|x>>>11)^(x<<7|x>>>25),W=A+G+$+c[C]+d[C],V=L+j;A=S,S=w,w=x,x=_+W|0,_=h,h=y,y=b,b=W+V|0}v[0]=v[0]+b|0,v[1]=v[1]+y|0,v[2]=v[2]+h|0,v[3]=v[3]+_|0,v[4]=v[4]+x|0,v[5]=v[5]+w|0,v[6]=v[6]+S|0,v[7]=v[7]+A|0},_doFinalize:function(){var p=this._data,g=p.words,v=this._nDataBytes*8,b=p.sigBytes*8;return g[b>>>5]|=128<<24-b%32,g[(b+64>>>9<<4)+14]=r.floor(v/4294967296),g[(b+64>>>9<<4)+15]=v,p.sigBytes=g.length*4,this._process(),this._hash},clone:function(){var p=s.clone.call(this);return p._hash=this._hash.clone(),p}});o.SHA256=s._createHelper(f),o.HmacSHA256=s._createHmacHelper(f)}(Math),n.SHA256})})(_O);var T8=_O.exports;const $8=uo(T8);var bO={exports:{}};(function(e,t){(function(n,r){e.exports=r(ch)})(Ci,function(n){return function(){var r=n,o=r.lib,i=o.WordArray,a=r.enc;a.Base64={stringify:function(l){var u=l.words,c=l.sigBytes,d=this._map;l.clamp();for(var f=[],p=0;p>>2]>>>24-p%4*8&255,v=u[p+1>>>2]>>>24-(p+1)%4*8&255,b=u[p+2>>>2]>>>24-(p+2)%4*8&255,y=g<<16|v<<8|b,h=0;h<4&&p+h*.75>>6*(3-h)&63));var _=d.charAt(64);if(_)for(;f.length%4;)f.push(_);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-p%4*2,b=g|v;d[f>>>2]|=b<<24-f%4*8,f++}return i.create(d,f)}}(),n.enc.Base64})})(bO);var P8=bO.exports;const w2=uo(P8);var xO={exports:{}};(function(e,t){(function(n,r){e.exports=r(ch)})(Ci,function(n){return n.enc.Utf8})})(xO);var M8=xO.exports;const N8=uo(M8);function O0(e){this.message=e}O0.prototype=new Error,O0.prototype.name="InvalidCharacterError";var S2=typeof window<"u"&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new O0("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,o=0,i=0,a="";r=t.charAt(i++);~r&&(n=o%4?64*n+r:r,o++%4)?a+=String.fromCharCode(255&n>>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function L8(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(S2(n).replace(/(.)/g,function(r,o){var i=o.charCodeAt(0).toString(16).toUpperCase();return i.length<2&&(i="0"+i),"%"+i}))}(t)}catch{return S2(t)}}function Sf(e){this.message=e}function D8(e,t){if(typeof e!="string")throw new Sf("Invalid token specified");var n=(t=t||{}).header===!0?0:1;try{return JSON.parse(L8(e.split(".")[n]))}catch(r){throw new Sf("Invalid token specified: "+r.message)}}Sf.prototype=new Error,Sf.prototype.name="InvalidTokenError";var I8={debug:()=>{},info:()=>{},warn:()=>{},error:()=>{}},vr,_r,Ef=(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))(Ef||{});(e=>{function t(){vr=3,_r=I8}e.reset=t;function n(o){if(!(0<=o&&o<=4))throw new Error("Invalid log level");vr=o}e.setLevel=n;function r(o){_r=o}e.setLogger=r})(Ef||(Ef={}));var be=class{constructor(e){this._name=e}debug(...e){vr>=4&&_r.debug(be._format(this._name,this._method),...e)}info(...e){vr>=3&&_r.info(be._format(this._name,this._method),...e)}warn(...e){vr>=2&&_r.warn(be._format(this._name,this._method),...e)}error(...e){vr>=1&&_r.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){vr>=4&&_r.debug(be._format(e),...t)}static info(e,...t){vr>=3&&_r.info(be._format(e),...t)}static warn(e,...t){vr>=2&&_r.warn(be._format(e),...t)}static error(e,...t){vr>=1&&_r.error(be._format(e),...t)}};Ef.reset();var j8="10000000-1000-4000-8000-100000000000",Sr=class{static _randomWord(){return k8.lib.WordArray.random(1).words[0]}static generateUUIDv4(){return j8.replace(/[018]/g,t=>(+t^Sr._randomWord()&15>>+t/4).toString(16)).replace(/-/g,"")}static generateCodeVerifier(){return Sr.generateUUIDv4()+Sr.generateUUIDv4()+Sr.generateUUIDv4()}static generateCodeChallenge(e){try{const t=$8(e);return w2.stringify(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}catch(t){throw be.error("CryptoUtils.generateCodeChallenge",t),t}}static generateBasicAuth(e,t){const n=N8.parse([e,t].join(":"));return w2.stringify(n)}},Eo=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)}},R0=class{static decode(e){try{return D8(e)}catch(t){throw be.error("JwtUtils.decode",t),t}}},E2=class{static center({...e}){var t,n,r;return e.width==null&&(e.width=(t=[800,720,600,480].find(o=>o<=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(",")}},jn=class extends Eo{constructor(){super(...arguments),this._logger=new be(`Timer('${this._name}')`),this._timerHandle=null,this._expiration=0,this._callback=()=>{const e=this._expiration-jn.getEpochTime();this._logger.debug("timer completes in",e),this._expiration<=jn.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=jn.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)}},k0=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))}},T0=";",Qi=class extends Error{constructor(e,t){var n,r,o;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=(o=e.session_state)!=null?o:null,this.url_state=e.url_state}},R_=class extends Error{constructor(e){super(e),this.name="ErrorTimeout"}},F8=class{constructor(e){this._logger=new be("AccessTokenEvents"),this._expiringTimer=new jn("Access token expiring"),this._expiredTimer=new jn("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 o=n-this._expiringNotificationTimeInSeconds;o<=0&&(o=1),t.debug("registering expiring timer, raising in",o,"seconds"),this._expiringTimer.init(o)}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)}},U8=class{constructor(e,t,n,r,o){this._callback=e,this._client_id=t,this._intervalInSeconds=r,this._stopOnError=o,this._logger=new be("CheckSessionIFrame"),this._timer=null,this._session_state=null,this._message=a=>{a.origin===this._frame_origin&&a.source===this._frame.contentWindow&&(a.data==="error"?(this._logger.error("error message from check session op iframe"),this._stopOnError&&this.stop()):a.data==="changed"?(this._logger.debug("changed message from check session op iframe"),this.stop(),this._callback()):this._logger.debug(a.data+" message from check session op iframe"))};const i=new URL(n);this._frame_origin=i.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=i.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)}},wO=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]}},k_=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 o=new AbortController,i=setTimeout(()=>o.abort(),n*1e3);try{return await fetch(e,{...t,signal:o.signal})}catch(a){throw a instanceof DOMException&&a.name==="AbortError"?new R_("Network timed out"):a}finally{clearTimeout(i)}}async getJson(e,{token:t,credentials:n}={}){const r=this._logger.create("getJson"),o={Accept:this._contentTypes.join(", ")};t&&(r.debug("token passed, setting Authorization header"),o.Authorization="Bearer "+t),this.appendExtraHeaders(o);let i;try{r.debug("url:",e),i=await this.fetchWithTimeout(e,{method:"GET",headers:o,credentials:n})}catch(l){throw r.error("Network Error"),l}r.debug("HTTP response received, status",i.status);const a=i.headers.get("Content-Type");if(a&&!this._contentTypes.find(l=>a.startsWith(l))&&r.throw(new Error(`Invalid response Content-Type: ${a??"undefined"}, from URL: ${e}`)),i.ok&&this._jwtHandler&&(a!=null&&a.startsWith("application/jwt")))return await this._jwtHandler(await i.text());let s;try{s=await i.json()}catch(l){throw r.error("Error parsing JSON response",l),i.ok?l:new Error(`${i.statusText} (${i.status})`)}if(!i.ok)throw r.error("Error from server:",s),s.error?new Qi(s):new Error(`${i.statusText} (${i.status}): ${JSON.stringify(s)}`);return s}async postForm(e,{body:t,basicAuth:n,timeoutInSeconds:r,initCredentials:o}){const i=this._logger.create("postForm"),a={Accept:this._contentTypes.join(", "),"Content-Type":"application/x-www-form-urlencoded"};n!==void 0&&(a.Authorization="Basic "+n),this.appendExtraHeaders(a);let s;try{i.debug("url:",e),s=await this.fetchWithTimeout(e,{method:"POST",headers:a,body:t,timeoutInSeconds:r,credentials:o})}catch(d){throw i.error("Network error"),d}i.debug("HTTP response received, status",s.status);const l=s.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 s.text();let c={};if(u)try{c=JSON.parse(u)}catch(d){throw i.error("Error parsing JSON response",d),s.ok?d:new Error(`${s.statusText} (${s.status})`)}if(!s.ok)throw i.error("Error from server:",c),c.error?new Qi(c,t):new Error(`${s.statusText} (${s.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(o=>{if(r.includes(o.toLocaleLowerCase())){t.warn("Protected header could not be overridden",o,r);return}const i=typeof this._extraHeaders[o]=="function"?this._extraHeaders[o]():this._extraHeaders[o];i&&i!==""&&(e[o]=i)})}},V8=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 k_(["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}},SO=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 o=R0.decode(n);return r.debug("JWT decoding successful"),o}catch(o){throw r.error("Error parsing JWT response"),o}},this._jsonService=new k_(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}},EO=class{constructor(e,t){this._settings=e,this._metadataService=t,this._logger=new be("TokenClient"),this._jsonService=new k_(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,...o}){const i=this._logger.create("exchangeCode");n||i.throw(new Error("A client_id is required")),t||i.throw(new Error("A redirect_uri is required")),o.code||i.throw(new Error("A code is required"));const a=new URLSearchParams({grant_type:e,redirect_uri:t});for(const[c,d]of Object.entries(o))d!=null&&a.set(c,d);let s;switch(this._settings.client_authentication){case"client_secret_basic":if(!r)throw i.throw(new Error("A client_secret is required")),null;s=Sr.generateBasicAuth(n,r);break;case"client_secret_post":a.append("client_id",n),r&&a.append("client_secret",r);break}const l=await this._metadataService.getTokenEndpoint(!1);i.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:a,basicAuth:s,initCredentials:this._settings.fetchRequestCredentials});return i.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,...o}){const i=this._logger.create("exchangeCredentials");t||i.throw(new Error("A client_id is required"));const a=new URLSearchParams({grant_type:e,scope:r});for(const[c,d]of Object.entries(o))d!=null&&a.set(c,d);let s;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw i.throw(new Error("A client_secret is required")),null;s=Sr.generateBasicAuth(t,n);break;case"client_secret_post":a.append("client_id",t),n&&a.append("client_secret",n);break}const l=await this._metadataService.getTokenEndpoint(!1);i.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:a,basicAuth:s,initCredentials:this._settings.fetchRequestCredentials});return i.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,...o}){const i=this._logger.create("exchangeRefreshToken");t||i.throw(new Error("A client_id is required")),o.refresh_token||i.throw(new Error("A refresh_token is required"));const a=new URLSearchParams({grant_type:e});for(const[c,d]of Object.entries(o))Array.isArray(d)?d.forEach(f=>a.append(c,f)):d!=null&&a.set(c,d);let s;switch(this._settings.client_authentication){case"client_secret_basic":if(!n)throw i.throw(new Error("A client_secret is required")),null;s=Sr.generateBasicAuth(t,n);break;case"client_secret_post":a.append("client_id",t),n&&a.append("client_secret",n);break}const l=await this._metadataService.getTokenEndpoint(!1);i.debug("got token endpoint");const u=await this._jsonService.postForm(l,{body:a,basicAuth:s,timeoutInSeconds:r,initCredentials:this._settings.fetchRequestCredentials});return i.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 o=new URLSearchParams;for(const[i,a]of Object.entries(e))a!=null&&o.set(i,a);o.set("client_id",this._settings.client_id),this._settings.client_secret&&o.set("client_secret",this._settings.client_secret),await this._jsonService.postForm(r,{body:o}),n.debug("got response")}},Y8=class{constructor(e,t,n){this._settings=e,this._metadataService=t,this._claimsService=n,this._logger=new be("ResponseValidator"),this._userInfoService=new K8(this._settings,this._metadataService),this._tokenClient=new EO(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 o=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),o.debug("ID Token validated")),e.id_token||(e.id_token=t.id_token,e.profile=t.profile);const i=e.isOpenId&&!!e.id_token;await this._processClaims(e,!1,i),o.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 Qi(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 Qi(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 o=await this._userInfoService.getClaims(e.access_token);r.debug("user info claims received from user info endpoint"),n&&o.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(o)),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 o=R0.decode((n=e.id_token)!=null?n:"");if(o.sub||r.throw(new Error("ID Token is missing a subject claim")),t){const i=R0.decode(t);o.sub!==i.sub&&r.throw(new Error("sub in id_token does not match current sub")),o.auth_time&&o.auth_time!==i.auth_time&&r.throw(new Error("auth_time in id_token does not match original auth_time")),o.azp&&o.azp!==i.azp&&r.throw(new Error("azp in id_token does not match original azp")),!o.azp&&i.azp&&r.throw(new Error("azp not in id_token, but present in original id_token"))}e.profile=o}},_s=class{constructor(e){this.id=e.id||Sr.generateUUIDv4(),this.data=e.data,e.created&&e.created>0?this.created=e.created:this.created=jn.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 _s(JSON.parse(e))}static async clearStaleState(e,t){const n=be.createStatic("State","clearStaleState"),r=jn.getEpochTime()-t,o=await e.getAllKeys();n.debug("got keys",o);for(let i=0;ih.searchParams.append("resource",w));for(const[x,w]of Object.entries({response_mode:s,...y,...g}))w!=null&&h.searchParams.append(x,w.toString());this.url=h.href}},X8="openid",Yg=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(T0);this.state=t[0],t.length>1&&(this.url_state=t.slice(1).join(T0))}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-jn.getEpochTime()}set expires_in(e){typeof e=="string"&&(e=Number(e)),e!==void 0&&e>=0&&(this.expires_at=Math.floor(e)+jn.getEpochTime())}get isOpenId(){var e;return((e=this.scope)==null?void 0:e.split(" ").includes(X8))||!!this.id_token}},Z8=class{constructor({url:e,state_data:t,id_token_hint:n,post_logout_redirect_uri:r,extraQueryParams:o,request_type:i,client_id:a}){if(this._logger=new be("SignoutRequest"),!e)throw this._logger.error("ctor: No url passed"),new Error("url");const s=new URL(e);n&&s.searchParams.append("id_token_hint",n),a&&s.searchParams.append("client_id",a),r&&(s.searchParams.append("post_logout_redirect_uri",r),t&&(this.state=new _s({data:t,request_type:i}),s.searchParams.append("state",this.state.id)));for(const[l,u]of Object.entries({...o}))u!=null&&s.searchParams.append(l,u.toString());this.url=s.href}},J8=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")}},eL=["nbf","jti","auth_time","nonce","acr","amr","azp","at_hash"],tL=["sub","iss","aud","exp","iat"],nL=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=eL;for(const r of n)tL.includes(r)||delete t[r]}return t}mergeClaims(e,t){const n={...e};for(const[r,o]of Object.entries(t))for(const i of Array.isArray(o)?o:[o]){const a=n[r];a===void 0?n[r]=i:Array.isArray(a)?a.includes(i)||a.push(i):n[r]!==i&&(typeof i=="object"&&this._settings.mergeClaims?n[r]=this.mergeClaims(a,i):n[r]=[a,i])}return n}},rL=class{constructor(e,t){this._logger=new be("OidcClient"),this.settings=e instanceof $0?e:new $0(e),this.metadataService=t??new V8(this.settings),this._claimsService=new nL(this.settings),this._validator=new Y8(this.settings,this.metadataService,this._claimsService),this._tokenClient=new EO(this.settings,this.metadataService)}async createSigninRequest({state:e,request:t,request_uri:n,request_type:r,id_token_hint:o,login_hint:i,skipUserInfo:a,nonce:s,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:p=this.settings.display,max_age:g=this.settings.max_age,ui_locales:v=this.settings.ui_locales,acr_values:b=this.settings.acr_values,resource:y=this.settings.resource,response_mode:h=this.settings.response_mode,extraQueryParams:_=this.settings.extraQueryParams,extraTokenParams:x=this.settings.extraTokenParams}){const w=this._logger.create("createSigninRequest");if(u!=="code")throw new Error("Only the Authorization Code flow (with PKCE) is supported");const S=await this.metadataService.getAuthorizationEndpoint();w.debug("Received authorization endpoint",S);const A=new Q8({url:S,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:p,max_age:g,ui_locales:v,id_token_hint:o,login_hint:i,acr_values:b,resource:y,request:t,request_uri:n,extraQueryParams:_,extraTokenParams:x,request_type:r,response_mode:h,client_secret:this.settings.client_secret,skipUserInfo:a,nonce:s,disablePKCE:this.settings.disablePKCE});await this.clearStaleState();const C=A.state;return await this.settings.stateStore.set(C.id,C.toStorageString()),A}async readSigninResponseState(e,t=!1){const n=this._logger.create("readSigninResponseState"),r=new Yg(k0.readParams(e,this.settings.response_mode));if(!r.state)throw n.throw(new Error("No state in response")),null;const o=await this.settings.stateStore[t?"remove":"get"](r.state);if(!o)throw n.throw(new Error("No matching state found in storage")),null;return{state:T_.fromStorageString(o),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 o=await this._tokenClient.exchangeCredentials({username:e,password:t,...r}),i=new Yg(new URLSearchParams);return Object.assign(i,o),await this._validator.validateCredentialsResponse(i,n),i}async useRefreshToken({state:e,timeoutInSeconds:t}){var n;const r=this._logger.create("useRefreshToken");let o;if(this.settings.refreshTokenAllowedScope===void 0)o=e.scope;else{const s=this.settings.refreshTokenAllowedScope.split(" ");o=(((n=e.scope)==null?void 0:n.split(" "))||[]).filter(u=>s.includes(u)).join(" ")}const i=await this._tokenClient.exchangeRefreshToken({refresh_token:e.refresh_token,resource:e.resource,scope:o,timeoutInSeconds:t}),a=new Yg(new URLSearchParams);return Object.assign(a,i),r.debug("validating response",a),await this._validator.validateRefreshResponse(a,{...e,scope:o}),a}async createSignoutRequest({state:e,id_token_hint:t,client_id:n,request_type:r,post_logout_redirect_uri:o=this.settings.post_logout_redirect_uri,extraQueryParams:i=this.settings.extraQueryParams}={}){const a=this._logger.create("createSignoutRequest"),s=await this.metadataService.getEndSessionEndpoint();if(!s)throw a.throw(new Error("No end session endpoint")),null;a.debug("Received end session endpoint",s),!n&&o&&!t&&(n=this.settings.client_id);const l=new Z8({url:s,id_token_hint:t,client_id:n,post_logout_redirect_uri:o,state_data:e,extraQueryParams:i,request_type:r});await this.clearStaleState();const u=l.state;return u&&(a.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 J8(k0.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 Qi(r);return{state:void 0,response:r}}const o=await this.settings.stateStore[t?"remove":"get"](r.state);if(!o)throw n.throw(new Error("No matching state found in storage")),null;return{state:_s.fromStorageString(o),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"),_s.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})}},oL=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 o=await this._userManager.metadataService.getCheckSessionIframe();if(o){r.debug("initializing check session iframe");const i=this._userManager.settings.client_id,a=this._userManager.settings.checkSessionIntervalInSeconds,s=this._userManager.settings.stopCheckSessionOnError,l=new U8(this._callback,i,o,a,s);await l.load(),this._checkSessionIFrame=l,l.start(n)}else r.warn("no check session iframe found in the metadata")}catch(o){r.error("Error from getCheckSessionIframe:",o instanceof Error?o.message:o)}},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 o={session_state:r.session_state,profile:r.sub&&r.sid?{sub:r.sub,sid:r.sid}:null};this._start(o)}}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)}}}},kd=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-jn.getEpochTime()}set expires_in(e){e!==void 0&&(this.expires_at=Math.floor(e)+jn.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 kd(JSON.parse(e))}},A2="oidc-client",AO=class{constructor(){this._abort=new Eo("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((o,i)=>{const a=s=>{var l;const u=s.data,c=(l=e.scriptOrigin)!=null?l:window.location.origin;if(!(s.origin!==c||(u==null?void 0:u.source)!==A2)){try{const d=k0.readParams(u.url,e.response_mode).get("state");if(d||t.warn("no state found in response url"),s.source!==this._window&&d!==e.state)return}catch{this._dispose(),i(new Error("Invalid response from window"))}o(u)}};window.addEventListener("message",a,!1),this._disposeHandlers.add(()=>window.removeEventListener("message",a,!1)),this._disposeHandlers.add(this._abort.addHandler(s=>{this._dispose(),i(s)}))});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:A2,url:t,keepOpen:n},r)}},CO={location:!1,toolbar:!1,height:640,closePopupWindowAfterInSeconds:-1},OO="_blank",iL=60,aL=2,RO=10,sL=class extends $0{constructor(e){const{popup_redirect_uri:t=e.redirect_uri,popup_post_logout_redirect_uri:n=e.post_logout_redirect_uri,popupWindowFeatures:r=CO,popupWindowTarget:o=OO,redirectMethod:i="assign",redirectTarget:a="self",iframeNotifyParentOrigin:s=e.iframeNotifyParentOrigin,iframeScriptOrigin:l=e.iframeScriptOrigin,silent_redirect_uri:u=e.redirect_uri,silentRequestTimeoutInSeconds:c=RO,automaticSilentRenew:d=!0,validateSubOnSilentRenew:f=!0,includeIdTokenInSilentRenew:p=!1,monitorSession:g=!1,monitorAnonymousSession:v=!1,checkSessionIntervalInSeconds:b=aL,query_status_response_type:y="code",stopCheckSessionOnError:h=!0,revokeTokenTypes:_=["access_token","refresh_token"],revokeTokensOnSignout:x=!1,includeIdTokenInSilentSignout:w=!1,accessTokenExpiringNotificationTimeInSeconds:S=iL,userStore:A}=e;if(super(e),this.popup_redirect_uri=t,this.popup_post_logout_redirect_uri=n,this.popupWindowFeatures=r,this.popupWindowTarget=o,this.redirectMethod=i,this.redirectTarget=a,this.iframeNotifyParentOrigin=s,this.iframeScriptOrigin=l,this.silent_redirect_uri=u,this.silentRequestTimeoutInSeconds=c,this.automaticSilentRenew=d,this.validateSubOnSilentRenew=f,this.includeIdTokenInSilentRenew=p,this.monitorSession=g,this.monitorAnonymousSession=v,this.checkSessionIntervalInSeconds=b,this.stopCheckSessionOnError=h,this.query_status_response_type=y,this.revokeTokenTypes=_,this.revokeTokensOnSignout=x,this.includeIdTokenInSilentSignout=w,this.accessTokenExpiringNotificationTimeInSeconds=S,A)this.userStore=A;else{const C=typeof window<"u"?window.sessionStorage:new wO;this.userStore=new SO({store:C})}}},P0=class extends AO{constructor({silentRequestTimeoutInSeconds:e=RO}){super(),this._logger=new be("IFrameWindow"),this._timeoutInSeconds=e,this._frame=P0.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 R_("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)}},lL=class{constructor(e){this._settings=e,this._logger=new be("IFrameNavigator")}async prepare({silentRequestTimeoutInSeconds:e=this._settings.silentRequestTimeoutInSeconds}){return new P0({silentRequestTimeoutInSeconds:e})}async callback(e){this._logger.create("callback"),P0.notifyParent(e,this._settings.iframeNotifyParentOrigin)}},uL=500,cL=1e3,C2=class extends AO{constructor({popupWindowTarget:e=OO,popupWindowFeatures:t={}}){super(),this._logger=new be("PopupWindow");const n=E2.center({...CO,...t});this._window=window.open(void 0,e,E2.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*cL)}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"))},uL);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)}},dL=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 C2({popupWindowFeatures:e,popupWindowTarget:t})}async callback(e,{keepOpen:t=!1}){this._logger.create("callback"),C2.notifyOpener(e,t)}},fL=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 o=r.location[e].bind(r.location);let i;return{navigate:async a=>{this._logger.create("navigate");const s=new Promise((l,u)=>{i=u});return o(a.url),await s},close:()=>{this._logger.create("close"),i==null||i(new Error("Redirect aborted")),r.stop()}}}async callback(){}},pL=class extends F8{constructor(e){super({expiringNotificationTimeInSeconds:e.accessTokenExpiringNotificationTimeInSeconds}),this._logger=new be("UserManagerEvents"),this._userLoaded=new Eo("User loaded"),this._userUnloaded=new Eo("User unloaded"),this._silentRenewError=new Eo("Silent renew error"),this._userSignedIn=new Eo("User signed in"),this._userSignedOut=new Eo("User signed out"),this._userSessionChanged=new Eo("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()}},hL=class{constructor(e){this._userManager=e,this._logger=new be("SilentRenewService"),this._isStarted=!1,this._retryTimer=new jn("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 R_){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)}},gL=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}},mL=class{constructor(e,t,n,r){this._logger=new be("UserManager"),this.settings=new sL(e),this._client=new rL(e),this._redirectNavigator=t??new fL(this.settings),this._popupNavigator=n??new dL(this.settings),this._iframeNavigator=r??new lL(this.settings),this._events=new pL(this.settings),this._silentRenewService=new hL(this),this.settings.automaticSilentRenew&&this.startSilentRenew(),this._sessionMonitor=null,this.settings.monitorSession&&(this._sessionMonitor=new oL(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"),o=await this._client.processResourceOwnerPasswordCredentials({username:e,password:t,skipUserInfo:n,extraTokenParams:this.settings.extraTokenParams});r.debug("got signin response");const i=await this._buildUser(o);return i.profile&&i.profile.sub?r.info("success, signed in subject",i.profile.sub):r.info("no subject"),i}async signinPopup(e={}){const t=this._logger.create("signinPopup"),{popupWindowFeatures:n,popupWindowTarget:r,...o}=e,i=this.settings.popup_redirect_uri;i||t.throw(new Error("No popup_redirect_uri configured"));const a=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r}),s=await this._signin({request_type:"si:p",redirect_uri:i,display:"popup",...o},a);return s&&(s.profile&&s.profile.sub?t.info("success, signed in subject",s.profile.sub):t.info("no subject")),s}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:o,...i}=e;let a=await this._loadUser();if(a!=null&&a.refresh_token){n.debug("using refresh token");const c=new gL(a,o);return await this._useRefreshToken(c)}const s=this.settings.silent_redirect_uri;s||n.throw(new Error("No silent_redirect_uri configured"));let l;a&&this.settings.validateSubOnSilentRenew&&(n.debug("subject prior to silent renew:",a.profile.sub),l=a.profile.sub);const u=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});return a=await this._signin({request_type:"si:s",redirect_uri:s,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?a==null?void 0:a.id_token:void 0,...i},u,l),a&&((t=a.profile)!=null&&t.sub?n.info("success, signed in subject",a.profile.sub):n.info("no subject")),a}async _useRefreshToken(e){const t=await this._client.useRefreshToken({state:e,timeoutInSeconds:this.settings.silentRequestTimeoutInSeconds}),n=new kd({...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,o=this.settings.silent_redirect_uri;o||t.throw(new Error("No silent_redirect_uri configured"));const i=await this._loadUser(),a=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:n}),s=await this._signinStart({request_type:"si:s",redirect_uri:o,prompt:"none",id_token_hint:this.settings.includeIdTokenInSilentRenew?i==null?void 0:i.id_token:void 0,response_type:this.settings.query_status_response_type,scope:"openid",skipUserInfo:!0,...r},a);try{const l=await this._client.processSigninResponse(s.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 Qi)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 kd(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 Qi({...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,o=await this._redirectNavigator.prepare({redirectMethod:n});await this._signoutStart({request_type:"so:r",post_logout_redirect_uri:this.settings.post_logout_redirect_uri,...r},o),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,...o}=e,i=this.settings.popup_post_logout_redirect_uri,a=await this._popupNavigator.prepare({popupWindowFeatures:n,popupWindowTarget:r});await this._signout({request_type:"so:p",post_logout_redirect_uri:i,state:i==null?void 0:{},...o},a),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 o=await this._loadUser();r.debug("loaded current user from storage"),this.settings.revokeTokensOnSignout&&await this._revokeInternal(o);const i=e.id_token_hint||o&&o.id_token;i&&(r.debug("setting id_token_hint in signout request"),e.id_token_hint=i),await this.removeUser(),r.debug("user removed, creating signout request");const a=await this._client.createSignoutRequest(e);return r.debug("got signout request"),await t.navigate({url:a.url,state:(n=a.state)==null?void 0:n.id,scriptOrigin:this.settings.iframeScriptOrigin})}catch(o){throw r.debug("error after preparing navigator, closing navigator window"),t.close(),o}}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,...o}=e,i=this.settings.includeIdTokenInSilentSignout?(t=await this._loadUser())==null?void 0:t.id_token:void 0,a=this.settings.popup_post_logout_redirect_uri,s=await this._iframeNavigator.prepare({silentRequestTimeoutInSeconds:r});await this._signout({request_type:"so:s",post_logout_redirect_uri:a,id_token_hint:i,...o},s),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(o=>typeof e[o]=="string");if(!r.length){n.debug("no need to revoke due to no token(s)");return}for(const o of r)await this._client.revokeToken(e[o],o),n.info(`${o} revoked successfully`),o!=="access_token"&&(e[o]=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"),kd.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()}},$_=E.createContext(void 0);$_.displayName="AuthContext";var yL={isLoading:!0,isAuthenticated:!1},vL=(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}`)}}},_L=(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")))},bL=e=>t=>t instanceof Error?t:new Error(e),xL=bL("Login failed"),wL=["clearStaleState","querySessionStatus","revokeTokens","startSilentRenew","stopSilentRenew"],SL=["signinPopup","signinSilent","signinRedirect","signinResourceOwnerCredentials","signoutPopup","signoutRedirect","signoutSilent"],Qg=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.`)},EL=typeof window>"u"?null:mL,AL=e=>{const{children:t,onSigninCallback:n,skipSigninCallback:r,onRemoveUser:o,onSignoutRedirect:i,onSignoutPopup:a,implementation:s=EL,userManager:l,...u}=e,[c]=H.useState(()=>l??(s?new s(u):{settings:u})),[d,f]=H.useReducer(vL,yL),p=H.useMemo(()=>Object.assign({settings:c.settings,events:c.events},Object.fromEntries(wL.map(_=>{var x,w;return[_,(w=(x=c[_])==null?void 0:x.bind(c))!=null?w:Qg(_)]})),Object.fromEntries(SL.map(_=>[_,c[_]?async x=>{f({type:"NAVIGATOR_INIT",method:_});try{return await c[_](x)}catch(w){return f({type:"ERROR",error:w}),null}finally{f({type:"NAVIGATOR_CLOSE"})}}:Qg(_)]))),[c]),g=H.useRef(!1);H.useEffect(()=>{!c||g.current||(g.current=!0,(async()=>{let _=null;try{_L()&&!r&&(_=await c.signinCallback(),n&&await n(_)),_=_||await c.getUser(),f({type:"INITIALISED",user:_})}catch(x){f({type:"ERROR",error:xL(x)})}})())},[c,r,n]),H.useEffect(()=>{if(!c)return;const _=S=>{f({type:"USER_LOADED",user:S})};c.events.addUserLoaded(_);const x=()=>{f({type:"USER_UNLOADED"})};c.events.addUserUnloaded(x);const w=S=>{f({type:"ERROR",error:S})};return c.events.addSilentRenewError(w),()=>{c.events.removeUserLoaded(_),c.events.removeUserUnloaded(x),c.events.removeSilentRenewError(w)}},[c]);const v=H.useCallback(c?()=>c.removeUser().then(o):Qg("removeUser"),[c,o]),b=H.useCallback(_=>p.signoutRedirect(_).then(i),[p.signoutRedirect,i]),y=H.useCallback(_=>p.signoutPopup(_).then(a),[p.signoutPopup,a]),h=H.useCallback(_=>p.signoutSilent(_),[p.signoutSilent]);return E.createElement($_.Provider,{value:{...d,...p,removeUser:v,signoutRedirect:b,signoutPopup:y,signoutSilent:h}},t)},CL=()=>{const e=E.useContext($_);return e||console.warn("AuthProvider context is undefined, please verify you are calling useAuth() as child of a component."),e};/**
+ * @remix-run/router v1.7.2
+ *
+ * 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 Ou(){return Ou=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function P_(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function RL(){return Math.random().toString(36).substr(2,8)}function R2(e,t){return{usr:e.state,key:e.key,idx:t}}function M0(e,t,n,r){return n===void 0&&(n=null),Ou({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fs(t):t,{state:n,key:t&&t.key||r||RL()})}function Af(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 Fs(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 kL(e,t,n,r){r===void 0&&(r={});let{window:o=document.defaultView,v5Compat:i=!1}=r,a=o.history,s=Lo.Pop,l=null,u=c();u==null&&(u=0,a.replaceState(Ou({},a.state,{idx:u}),""));function c(){return(a.state||{idx:null}).idx}function d(){s=Lo.Pop;let b=c(),y=b==null?null:b-u;u=b,l&&l({action:s,location:v.location,delta:y})}function f(b,y){s=Lo.Push;let h=M0(v.location,b,y);n&&n(h,b),u=c()+1;let _=R2(h,u),x=v.createHref(h);try{a.pushState(_,"",x)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;o.location.assign(x)}i&&l&&l({action:s,location:v.location,delta:1})}function p(b,y){s=Lo.Replace;let h=M0(v.location,b,y);n&&n(h,b),u=c();let _=R2(h,u),x=v.createHref(h);a.replaceState(_,"",x),i&&l&&l({action:s,location:v.location,delta:0})}function g(b){let y=o.location.origin!=="null"?o.location.origin:o.location.href,h=typeof b=="string"?b:Af(b);return it(y,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,y)}let v={get action(){return s},get location(){return e(o,a)},listen(b){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(O2,d),l=b,()=>{o.removeEventListener(O2,d),l=null}},createHref(b){return t(o,b)},createURL:g,encodeLocation(b){let y=g(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:f,replace:p,go(b){return a.go(b)}};return v}var k2;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(k2||(k2={}));function TL(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Fs(t):t,o=M_(r.pathname||"/",n);if(o==null)return null;let i=kO(e);$L(i);let a=null;for(let s=0;a==null&&s{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};l.relativePath.startsWith("/")&&(it(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=Go([r,l.relativePath]),c=n.concat(l);i.children&&i.children.length>0&&(it(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),kO(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:jL(u,i.index),routesMeta:c})};return e.forEach((i,a)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))o(i,a);else for(let l of TO(i.path))o(i,a,l)}),t}function TO(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return o?[i,""]:[i];let a=TO(r.join("/")),s=[];return s.push(...a.map(l=>l===""?i:[i,l].join("/"))),o&&s.push(...a),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function $L(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:FL(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const PL=/^:\w+$/,ML=3,NL=2,LL=1,DL=10,IL=-2,T2=e=>e==="*";function jL(e,t){let n=e.split("/"),r=n.length;return n.some(T2)&&(r+=IL),t&&(r+=NL),n.filter(o=>!T2(o)).reduce((o,i)=>o+(PL.test(i)?ML:i===""?LL:DL),r)}function FL(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function UL(e,t){let{routesMeta:n}=e,r={},o="/",i=[];for(let a=0;a{if(c==="*"){let f=s[d]||"";a=i.slice(0,i.length-f.length).replace(/(.)\/+$/,"$1")}return u[c]=HL(s[d]||"",c),u},{}),pathname:i,pathnameBase:a,pattern:e}}function zL(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),P_(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=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(a,s)=>(r.push(s),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function BL(e){try{return decodeURI(e)}catch(t){return P_(!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 HL(e,t){try{return decodeURIComponent(e)}catch(n){return P_(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function M_(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 qL(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?Fs(e):e;return{pathname:n?n.startsWith("/")?n:WL(n,t):t,search:KL(r),hash:YL(o)}}function WL(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Xg(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 N_(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function L_(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=Fs(e):(o=Ou({},e),it(!o.pathname||!o.pathname.includes("?"),Xg("?","pathname","search",o)),it(!o.pathname||!o.pathname.includes("#"),Xg("#","pathname","hash",o)),it(!o.search||!o.search.includes("#"),Xg("#","search","hash",o)));let i=e===""||o.pathname==="",a=i?"/":o.pathname,s;if(r||a==null)s=n;else{let d=t.length-1;if(a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;o.pathname=f.join("/")}s=d>=0?t[d]:"/"}let l=qL(o,s),u=a&&a!=="/"&&a.endsWith("/"),c=(i||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(u||c)&&(l.pathname+="/"),l}const Go=e=>e.join("/").replace(/\/\/+/g,"/"),GL=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),KL=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,YL=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function QL(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $O=["post","put","patch","delete"];new Set($O);const XL=["get",...$O];new Set(XL);/**
+ * React Router v6.14.2
+ *
+ * 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 Cf(){return Cf=Object.assign?Object.assign.bind():function(e){for(var t=1;tl.pathnameBase)),a=H.useRef(!1);return NO(()=>{a.current=!0}),H.useCallback(function(l,u){if(u===void 0&&(u={}),!a.current)return;if(typeof l=="number"){n.go(l);return}let c=L_(l,JSON.parse(i),o,u.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:Go([t,c.pathname])),(u.replace?n.replace:n.push)(c,u.state,u)},[t,n,i,o,e])}const eD=H.createContext(null);function tD(e){let t=H.useContext(Pr).outlet;return t&&H.createElement(eD.Provider,{value:e},t)}function nD(){let{matches:e}=H.useContext(Pr),t=e[e.length-1];return t?t.params:{}}function I_(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=H.useContext(Pr),{pathname:o}=sa(),i=JSON.stringify(N_(r).map(a=>a.pathnameBase));return H.useMemo(()=>L_(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function rD(e,t){return oD(e,t)}function oD(e,t,n){Us()||it(!1);let{navigator:r}=H.useContext(aa),{matches:o}=H.useContext(Pr),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let s=i?i.pathnameBase:"/";i&&i.route;let l=sa(),u;if(t){var c;let v=typeof t=="string"?Fs(t):t;s==="/"||(c=v.pathname)!=null&&c.startsWith(s)||it(!1),u=v}else u=l;let d=u.pathname||"/",f=s==="/"?d:d.slice(s.length)||"/",p=TL(e,{pathname:f}),g=uD(p&&p.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:Go([s,r.encodeLocation?r.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?s:Go([s,r.encodeLocation?r.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),o,n);return t&&g?H.createElement(dh.Provider,{value:{location:Cf({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Lo.Pop}},g):g}function iD(){let e=pD(),t=QL(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,o={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),n?H.createElement("pre",{style:o},n):null,i)}const aD=H.createElement(iD,null);class sD extends H.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||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?H.createElement(Pr.Provider,{value:this.props.routeContext},H.createElement(MO.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function lD(e){let{routeContext:t,match:n,children:r}=e,o=H.useContext(D_);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),H.createElement(Pr.Provider,{value:t},r)}function uD(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var o;if((o=n)!=null&&o.errors)e=n.matches;else return null}let i=e,a=(r=n)==null?void 0:r.errors;if(a!=null){let s=i.findIndex(l=>l.route.id&&(a==null?void 0:a[l.route.id]));s>=0||it(!1),i=i.slice(0,Math.min(i.length,s+1))}return i.reduceRight((s,l,u)=>{let c=l.route.id?a==null?void 0:a[l.route.id]:null,d=null;n&&(d=l.route.errorElement||aD);let f=t.concat(i.slice(0,u+1)),p=()=>{let g;return c?g=d:l.route.Component?g=H.createElement(l.route.Component,null):l.route.element?g=l.route.element:g=s,H.createElement(lD,{match:l,routeContext:{outlet:s,matches:f,isDataRoute:n!=null},children:g})};return n&&(l.route.ErrorBoundary||l.route.errorElement||u===0)?H.createElement(sD,{location:n.location,revalidation:n.revalidation,component:d,error:c,children:p(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):p()},null)}var N0;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(N0||(N0={}));var Ru;(function(e){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"})(Ru||(Ru={}));function cD(e){let t=H.useContext(D_);return t||it(!1),t}function dD(e){let t=H.useContext(PO);return t||it(!1),t}function fD(e){let t=H.useContext(Pr);return t||it(!1),t}function LO(e){let t=fD(),n=t.matches[t.matches.length-1];return n.route.id||it(!1),n.route.id}function pD(){var e;let t=H.useContext(MO),n=dD(Ru.UseRouteError),r=LO(Ru.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function hD(){let{router:e}=cD(N0.UseNavigateStable),t=LO(Ru.UseNavigateStable),n=H.useRef(!1);return NO(()=>{n.current=!0}),H.useCallback(function(o,i){i===void 0&&(i={}),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,Cf({fromRouteId:t},i)))},[e,t])}function gD(e){let{to:t,replace:n,state:r,relative:o}=e;Us()||it(!1);let{matches:i}=H.useContext(Pr),{pathname:a}=sa(),s=fh(),l=L_(t,N_(i).map(c=>c.pathnameBase),a,o==="path"),u=JSON.stringify(l);return H.useEffect(()=>s(JSON.parse(u),{replace:n,state:r,relative:o}),[s,u,o,n,r]),null}function mD(e){return tD(e.context)}function vi(e){it(!1)}function yD(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Lo.Pop,navigator:i,static:a=!1}=e;Us()&&it(!1);let s=t.replace(/^\/*/,"/"),l=H.useMemo(()=>({basename:s,navigator:i,static:a}),[s,i,a]);typeof r=="string"&&(r=Fs(r));let{pathname:u="/",search:c="",hash:d="",state:f=null,key:p="default"}=r,g=H.useMemo(()=>{let v=M_(u,s);return v==null?null:{location:{pathname:v,search:c,hash:d,state:f,key:p},navigationType:o}},[s,u,c,d,f,p,o]);return g==null?null:H.createElement(aa.Provider,{value:l},H.createElement(dh.Provider,{children:n,value:g}))}function vD(e){let{children:t,location:n}=e;return rD(L0(t),n)}var $2;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})($2||($2={}));new Promise(()=>{});function L0(e,t){t===void 0&&(t=[]);let n=[];return H.Children.forEach(e,(r,o)=>{if(!H.isValidElement(r))return;let i=[...t,o];if(r.type===H.Fragment){n.push.apply(n,L0(r.props.children,i));return}r.type!==vi&&it(!1),!r.props.index||!r.props.children||it(!1);let a={id:r.props.id||i.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&&(a.children=L0(r.props.children,i)),n.push(a)}),n}/**
+ * React Router DOM v6.14.2
+ *
+ * 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 Of(){return Of=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[o]=e[o]);return n}function _D(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function bD(e,t){return e.button===0&&(!t||t==="_self")&&!_D(e)}const xD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],wD=["aria-current","caseSensitive","className","end","style","to","children"],SD="startTransition",P2=hN[SD];function ED(e){let{basename:t,children:n,future:r,window:o}=e,i=H.useRef();i.current==null&&(i.current=OL({window:o,v5Compat:!0}));let a=i.current,[s,l]=H.useState({action:a.action,location:a.location}),{v7_startTransition:u}=r||{},c=H.useCallback(d=>{u&&P2?P2(()=>l(d)):l(d)},[l,u]);return H.useLayoutEffect(()=>a.listen(c),[a,c]),H.createElement(yD,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:a})}const AD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",CD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,IO=H.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:i,replace:a,state:s,target:l,to:u,preventScrollReset:c}=t,d=DO(t,xD),{basename:f}=H.useContext(aa),p,g=!1;if(typeof u=="string"&&CD.test(u)&&(p=u,AD))try{let h=new URL(window.location.href),_=u.startsWith("//")?new URL(h.protocol+u):new URL(u),x=M_(_.pathname,f);_.origin===h.origin&&x!=null?u=x+_.search+_.hash:g=!0}catch{}let v=ZL(u,{relative:o}),b=OD(u,{replace:a,state:s,target:l,preventScrollReset:c,relative:o});function y(h){r&&r(h),h.defaultPrevented||b(h)}return H.createElement("a",Of({},d,{href:p||v,onClick:g||i?r:y,ref:n,target:l}))}),Td=H.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:i="",end:a=!1,style:s,to:l,children:u}=t,c=DO(t,wD),d=I_(l,{relative:c.relative}),f=sa(),p=H.useContext(PO),{navigator:g}=H.useContext(aa),v=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,b=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;o||(b=b.toLowerCase(),y=y?y.toLowerCase():null,v=v.toLowerCase());let h=b===v||!a&&b.startsWith(v)&&b.charAt(v.length)==="/",_=y!=null&&(y===v||!a&&y.startsWith(v)&&y.charAt(v.length)==="/"),x=h?r:void 0,w;typeof i=="function"?w=i({isActive:h,isPending:_}):w=[i,h?"active":null,_?"pending":null].filter(Boolean).join(" ");let S=typeof s=="function"?s({isActive:h,isPending:_}):s;return H.createElement(IO,Of({},c,{"aria-current":x,className:w,ref:n,style:S,to:l}),typeof u=="function"?u({isActive:h,isPending:_}):u)});var M2;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(M2||(M2={}));var N2;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(N2||(N2={}));function OD(e,t){let{target:n,replace:r,state:o,preventScrollReset:i,relative:a}=t===void 0?{}:t,s=fh(),l=sa(),u=I_(e,{relative:a});return H.useCallback(c=>{if(bD(c,n)){c.preventDefault();let d=r!==void 0?r:Af(l)===Af(u);s(e,{replace:d,state:o,preventScrollReset:i,relative:a})}},[l,s,u,r,o,n,e,i,a])}function RD(e){const t=new Error(e);if(t.stack===void 0)try{throw t}catch{}return t}var kD=RD,Ee=kD;function TD(e){return!!e&&typeof e.then=="function"}var He=TD;function $D(e,t){if(e!=null)return e;throw Ee(t??"Got unexpected null or undefined")}var Qe=$D;function we(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ph{getValue(){throw Ee("BaseLoadable")}toPromise(){throw Ee("BaseLoadable")}valueMaybe(){throw Ee("BaseLoadable")}valueOrThrow(){throw Ee(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw Ee("BaseLoadable")}promiseOrThrow(){throw Ee(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw Ee("BaseLoadable")}errorOrThrow(){throw Ee(`Loadable expected error, but in "${this.state}" state`)}is(t){return t.state===this.state&&t.contents===this.contents}map(t){throw Ee("BaseLoadable")}}class PD extends ph{constructor(t){super(),we(this,"state","hasValue"),we(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 He(n)?Xi(n):bs(n)?n:tc(n)}catch(n){return He(n)?Xi(n.next(()=>this.map(t))):hh(n)}}}class MD extends ph{constructor(t){super(),we(this,"state","hasError"),we(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 jO extends ph{constructor(t){super(),we(this,"state","loading"),we(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 Xi(this.contents.then(n=>{const r=t(n);if(bs(r)){const o=r;switch(o.state){case"hasValue":return o.contents;case"hasError":throw o.contents;case"loading":return o.contents}}return r}).catch(n=>{if(He(n))return n.then(()=>this.map(t).contents);throw n}))}}function tc(e){return Object.freeze(new PD(e))}function hh(e){return Object.freeze(new MD(e))}function Xi(e){return Object.freeze(new jO(e))}function FO(){return Object.freeze(new jO(new Promise(()=>{})))}function ND(e){return e.every(t=>t.state==="hasValue")?tc(e.map(t=>t.contents)):e.some(t=>t.state==="hasError")?hh(Qe(e.find(t=>t.state==="hasError"),"Invalid loadable passed to loadableAll").contents):Xi(Promise.all(e.map(t=>t.contents)))}function UO(e){const n=(Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(o=>e[o])).map(o=>bs(o)?o:He(o)?Xi(o):tc(o)),r=ND(n);return Array.isArray(e)?r:r.map(o=>Object.getOwnPropertyNames(e).reduce((i,a,s)=>({...i,[a]:o[s]}),{}))}function bs(e){return e instanceof ph}const LD={of:e=>He(e)?Xi(e):bs(e)?e:tc(e),error:e=>hh(e),loading:()=>FO(),all:UO,isLoadable:bs};var la={loadableWithValue:tc,loadableWithError:hh,loadableWithPromise:Xi,loadableLoading:FO,loadableAll:UO,isLoadable:bs,RecoilLoadable:LD},DD=la.loadableWithValue,ID=la.loadableWithError,jD=la.loadableWithPromise,FD=la.loadableLoading,UD=la.loadableAll,VD=la.isLoadable,zD=la.RecoilLoadable,nc=Object.freeze({__proto__:null,loadableWithValue:DD,loadableWithError:ID,loadableWithPromise:jD,loadableLoading:FD,loadableAll:UD,isLoadable:VD,RecoilLoadable:zD});const D0={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 BD(e,t){var n,r;const o=(n=process.env[e])===null||n===void 0||(r=n.toLowerCase())===null||r===void 0?void 0:r.trim();if(o==null||o==="")return;if(!["true","false"].includes(o))throw Ee(`({}).${e} value must be 'true', 'false', or empty: ${o}`);t(o==="true")}function HD(e,t){var n;const r=(n=process.env[e])===null||n===void 0?void 0:n.trim();r==null||r===""||t(r.split(/\s*,\s*|\s+/))}function qD(){var e;typeof process>"u"||((e=process)===null||e===void 0?void 0:e.env)!=null&&(BD("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED",t=>{D0.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=t}),HD("RECOIL_GKS_ENABLED",t=>{t.forEach(n=>{D0.RECOIL_GKS_ENABLED.add(n)})}))}qD();var Vs=D0;function gh(e){return Vs.RECOIL_GKS_ENABLED.has(e)}gh.setPass=e=>{Vs.RECOIL_GKS_ENABLED.add(e)};gh.setFail=e=>{Vs.RECOIL_GKS_ENABLED.delete(e)};gh.clear=()=>{Vs.RECOIL_GKS_ENABLED.clear()};var Ie=gh;function WD(e,t,{error:n}={}){return null}var GD=WD,j_=GD,Zg,Jg,em;const KD=(Zg=E.createMutableSource)!==null&&Zg!==void 0?Zg:E.unstable_createMutableSource,VO=(Jg=E.useMutableSource)!==null&&Jg!==void 0?Jg:E.unstable_useMutableSource,zO=(em=E.useSyncExternalStore)!==null&&em!==void 0?em:E.unstable_useSyncExternalStore;function YD(){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 QD(){return Ie("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:Ie("recoil_sync_external_store")&&zO!=null?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:Ie("recoil_mutable_source")&&VO!=null&&typeof window<"u"&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?Ie("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:Ie("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}}function XD(){return!1}var rc={createMutableSource:KD,useMutableSource:VO,useSyncExternalStore:zO,currentRendererSupportsUseSyncExternalStore:YD,reactMode:QD,isFastRefreshEnabled:XD};class F_{constructor(t){we(this,"key",void 0),this.key=t}toJSON(){return{key:this.key}}}class BO extends F_{}class HO extends F_{}function ZD(e){return e instanceof BO||e instanceof HO}var mh={AbstractRecoilValue:F_,RecoilState:BO,RecoilValueReadOnly:HO,isRecoilValue:ZD},JD=mh.AbstractRecoilValue,eI=mh.RecoilState,tI=mh.RecoilValueReadOnly,nI=mh.isRecoilValue,xs=Object.freeze({__proto__:null,AbstractRecoilValue:JD,RecoilState:eI,RecoilValueReadOnly:tI,isRecoilValue:nI});function rI(e,t){return function*(){let n=0;for(const r of e)yield t(r,n++)}()}var yh=rI;class qO{}const oI=new qO,Zi=new Map,U_=new Map;function iI(e){return yh(e,t=>Qe(U_.get(t)))}function aI(e){if(Zi.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 sI(e){Vs.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&aI(e.key),Zi.set(e.key,e);const t=e.set==null?new xs.RecoilValueReadOnly(e.key):new xs.RecoilState(e.key);return U_.set(e.key,t),t}class WO extends Error{}function lI(e){const t=Zi.get(e);if(t==null)throw new WO(`Missing definition for RecoilValue: "${e}""`);return t}function uI(e){return Zi.get(e)}const Rf=new Map;function cI(e){var t;if(!Ie("recoil_memory_managament_2020"))return;const n=Zi.get(e);if(n!=null&&(t=n.shouldDeleteConfigOnRelease)!==null&&t!==void 0&&t.call(n)){var r;Zi.delete(e),(r=GO(e))===null||r===void 0||r(),Rf.delete(e)}}function dI(e,t){Ie("recoil_memory_managament_2020")&&(t===void 0?Rf.delete(e):Rf.set(e,t))}function GO(e){return Rf.get(e)}var cn={nodes:Zi,recoilValues:U_,registerNode:sI,getNode:lI,getNodeMaybe:uI,deleteNodeConfigIfPossible:cI,setConfigDeletionHandler:dI,getConfigDeletionHandler:GO,recoilValuesForKeys:iI,NodeMissingError:WO,DefaultValue:qO,DEFAULT_VALUE:oI};function fI(e,t){t()}var pI={enqueueExecution:fI};function hI(e,t){return t={exports:{}},e(t,t.exports),t.exports}var gI=hI(function(e){var t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},n={},r=5,o=Math.pow(2,r),i=o-1,a=o/2,s=o/4,l={},u=function(D){return function(){return D}},c=n.hash=function(F){var D=typeof F>"u"?"undefined":t(F);if(D==="number")return F;D!=="string"&&(F+="");for(var Q=0,ne=0,re=F.length;ne>1&1431655765,D=(D&858993459)+(D>>2&858993459),D=D+(D>>4)&252645135,D+=D>>8,D+=D>>16,D&127},f=function(D,Q){return Q>>>D&i},p=function(D){return 1<=Q;)re[ve--]=re[ve];return re[Q]=ne,re}for(var me=0,ye=0,Ae=new Array(de+1);me>>=1;return ve[Q]=ne,k(D,ye+1,ve)},j=function(D,Q,ne,re){for(var de=new Array(Q-1),ve=0,me=0,ye=0,Ae=re.length;ye1?R(D,this.hash,Ae):Ae[0]}var Ge=re();return Ge===l?this:(++me.value,L(D,ne,this.hash,this,de,C(D,de,ve,Ge)))},Y=function(D,Q,ne,re,de,ve,me){var ye=this.mask,Ae=this.children,Ge=f(ne,de),Kt=p(Ge),bt=g(ye,Kt),An=ye&Kt,Kn=An?Ae[bt]:S,va=Kn._modify(D,Q,ne+r,re,de,ve,me);if(Kn===va)return this;var Tc=W(D,this),al=ye,sl=void 0;if(An&&A(va)){if(al&=~Kt,!al)return S;if(Ae.length<=2&&T(Ae[bt^1]))return Ae[bt^1];sl=b(Tc,bt,Ae)}else if(!An&&!A(va)){if(Ae.length>=a)return $(D,Ge,va,ye,Ae);al|=Kt,sl=y(Tc,bt,va,Ae)}else sl=v(Tc,bt,va,Ae);return Tc?(this.mask=al,this.children=sl,this):O(D,al,sl)},oe=function(D,Q,ne,re,de,ve,me){var ye=this.size,Ae=this.children,Ge=f(ne,de),Kt=Ae[Ge],bt=(Kt||S)._modify(D,Q,ne+r,re,de,ve,me);if(Kt===bt)return this;var An=W(D,this),Kn=void 0;if(A(Kt)&&!A(bt))++ye,Kn=v(An,Ge,bt,Ae);else if(!A(Kt)&&A(bt)){if(--ye,ye<=s)return j(D,ye,Ge,Ae);Kn=v(An,Ge,S,Ae)}else Kn=v(An,Ge,bt,Ae);return An?(this.size=ye,this.children=Kn,this):k(D,ye,Kn)};S._modify=function(F,D,Q,ne,re,de,ve){var me=ne();return me===l?S:(++ve.value,C(F,re,de,me))};function M(F,D,Q,ne,re){this._editable=F,this._edit=D,this._config=Q,this._root=ne,this._size=re}M.prototype.setTree=function(F,D){return this._editable?(this._root=F,this._size=D,this):F===this._root?this:new M(this._editable,this._edit,this._config,F,D)};var U=n.tryGetHash=function(F,D,Q,ne){for(var re=ne._root,de=0,ve=ne._config.keyEq;;)switch(re.type){case h:return ve(Q,re.key)?re.value:F;case _:{if(D===re.hash)for(var me=re.children,ye=0,Ae=me.length;ye{n.set(o,t(r,o))}),n}var kf=xI;function wI(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}}function SI(e){return{nodeDeps:kf(e.nodeDeps,t=>new Set(t)),nodeToNodeSubscriptions:kf(e.nodeToNodeSubscriptions,t=>new Set(t))}}function tm(e,t,n,r){const{nodeDeps:o,nodeToNodeSubscriptions:i}=n,a=o.get(e);if(a&&r&&a!==r.nodeDeps.get(e))return;o.set(e,t);const s=a==null?t:eu(t,a);for(const l of s)i.has(l)||i.set(l,new Set),Qe(i.get(l)).add(e);if(a){const l=eu(a,t);for(const u of l){if(!i.has(u))return;const c=Qe(i.get(u));c.delete(e),c.size===0&&i.delete(u)}}}function EI(e,t,n,r){var o,i,a,s;const l=n.getState();r===l.currentTree.version||r===((o=l.nextTree)===null||o===void 0?void 0:o.version)||((i=l.previousTree)===null||i===void 0||i.version);const u=n.getGraph(r);if(tm(e,t,u),r===((a=l.previousTree)===null||a===void 0?void 0:a.version)){const d=n.getGraph(l.currentTree.version);tm(e,t,d,u)}if(r===((s=l.previousTree)===null||s===void 0?void 0:s.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);tm(e,t,f,u)}}}var oc={cloneGraph:SI,graph:wI,saveDepsToStore:EI};let AI=0;const CI=()=>AI++;let OI=0;const RI=()=>OI++;let kI=0;const TI=()=>kI++;var vh={getNextTreeStateVersion:CI,getNextStoreID:RI,getNextComponentID:TI};const{persistentMap:L2}=_I,{graph:$I}=oc,{getNextTreeStateVersion:KO}=vh;function YO(){const e=KO();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:L2(),nonvalidatedAtoms:L2()}}function PI(){const e=YO();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,$I()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}}var QO={makeEmptyTreeState:YO,makeEmptyStoreState:PI,getNextTreeStateVersion:KO};class XO{}function MI(){return new XO}var _h={RetentionZone:XO,retentionZone:MI};function NI(e,t){const n=new Set(e);return n.add(t),n}function LI(e,t){const n=new Set(e);return n.delete(t),n}function DI(e,t,n){const r=new Map(e);return r.set(t,n),r}function II(e,t,n){const r=new Map(e);return r.set(t,n(r.get(t))),r}function jI(e,t){const n=new Map(e);return n.delete(t),n}function FI(e,t){const n=new Map(e);return t.forEach(r=>n.delete(r)),n}var ZO={setByAddingToSet:NI,setByDeletingFromSet:LI,mapBySettingInMap:DI,mapByUpdatingInMap:II,mapByDeletingFromMap:jI,mapByDeletingMultipleFromMap:FI};function*UI(e,t){let n=0;for(const r of e)t(r,n++)&&(yield r)}var B_=UI;function VI(e,t){return new Proxy(e,{get:(r,o)=>(!(o in r)&&o in t&&(r[o]=t[o]()),r[o]),ownKeys:r=>Object.keys(r)})}var JO=VI;const{getNode:ic,getNodeMaybe:zI,recoilValuesForKeys:D2}=cn,{RetentionZone:I2}=_h,{setByAddingToSet:BI}=ZO,HI=Object.freeze(new Set);class qI extends Error{}function WI(e,t,n){if(!Ie("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:r}=e.getState().retention;function o(i){let a=r.get(i);a||r.set(i,a=new Set),a.add(t)}if(n instanceof I2)o(n);else if(Array.isArray(n))for(const i of n)o(i);return()=>{if(!Ie("recoil_memory_managament_2020"))return;const{retention:i}=e.getState();function a(s){const l=i.nodesRetainedByZone.get(s);l==null||l.delete(t),l&&l.size===0&&i.nodesRetainedByZone.delete(s)}if(n instanceof I2)a(n);else if(Array.isArray(n))for(const s of n)a(s)}}function H_(e,t,n,r){const o=e.getState();if(o.nodeCleanupFunctions.has(n))return;const i=ic(n),a=WI(e,n,i.retainedBy),s=i.init(e,t,r);o.nodeCleanupFunctions.set(n,()=>{s(),a()})}function GI(e,t,n){H_(e,e.getState().currentTree,t,n)}function KI(e,t){var n;const r=e.getState();(n=r.nodeCleanupFunctions.get(t))===null||n===void 0||n(),r.nodeCleanupFunctions.delete(t)}function YI(e,t,n){return H_(e,t,n,"get"),ic(n).get(e,t)}function eR(e,t,n){return ic(n).peek(e,t)}function QI(e,t,n){var r;const o=zI(t);return o==null||(r=o.invalidate)===null||r===void 0||r.call(o,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:BI(e.dirtyAtoms,t)}}function XI(e,t,n,r){const o=ic(n);if(o.set==null)throw new qI(`Attempt to set read-only RecoilValue: ${n}`);const i=o.set;return H_(e,t,n,"set"),i(e,t,r)}function ZI(e,t,n){const r=e.getState(),o=e.getGraph(t.version),i=ic(n).nodeType;return JO({type:i},{loadable:()=>eR(e,t,n),isActive:()=>r.knownAtoms.has(n)||r.knownSelectors.has(n),isSet:()=>i==="selector"?!1:t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var a;return D2((a=o.nodeDeps.get(n))!==null&&a!==void 0?a:[])},subscribers:()=>{var a,s;return{nodes:D2(B_(tR(e,t,new Set([n])),l=>l!==n)),components:yh((a=(s=r.nodeToComponentSubscriptions.get(n))===null||s===void 0?void 0:s.values())!==null&&a!==void 0?a:[],([l])=>({name:l}))}}})}function tR(e,t,n){const r=new Set,o=Array.from(n),i=e.getGraph(t.version);for(let s=o.pop();s;s=o.pop()){var a;r.add(s);const l=(a=i.nodeToNodeSubscriptions.get(s))!==null&&a!==void 0?a:HI;for(const u of l)r.has(u)||o.push(u)}return r}var ui={getNodeLoadable:YI,peekNodeLoadable:eR,setNodeValue:XI,initializeNode:GI,cleanUpNode:KI,setUnvalidatedAtomValue_DEPRECATED:QI,peekNodeInfo:ZI,getDownstreamNodes:tR};let nR=null;function JI(e){nR=e}function ej(){var e;(e=nR)===null||e===void 0||e()}var rR={setInvalidateMemoizedSnapshot:JI,invalidateMemoizedSnapshot:ej};const{getDownstreamNodes:tj,getNodeLoadable:oR,setNodeValue:nj}=ui,{getNextComponentID:rj}=vh,{getNode:oj,getNodeMaybe:iR}=cn,{DefaultValue:q_}=cn,{reactMode:ij}=rc,{AbstractRecoilValue:aj,RecoilState:sj,RecoilValueReadOnly:lj,isRecoilValue:uj}=xs,{invalidateMemoizedSnapshot:cj}=rR;function dj(e,{key:t},n=e.getState().currentTree){var r,o;const i=e.getState();n.version===i.currentTree.version||n.version===((r=i.nextTree)===null||r===void 0?void 0:r.version)||(n.version,(o=i.previousTree)===null||o===void 0||o.version);const a=oR(e,n,t);return a.state==="loading"&&a.contents.catch(()=>{}),a}function fj(e,t){const n=e.clone();return t.forEach((r,o)=>{r.state==="hasValue"&&r.contents instanceof q_?n.delete(o):n.set(o,r)}),n}function pj(e,t,{key:n},r){if(typeof r=="function"){const o=oR(e,t,n);if(o.state==="loading"){const i=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw Ee(i)}else if(o.state==="hasError")throw o.contents;return r(o.contents)}else return r}function hj(e,t,n){if(n.type==="set"){const{recoilValue:o,valueOrUpdater:i}=n,a=pj(e,t,o,i),s=nj(e,t,o.key,a);for(const[l,u]of s.entries())I0(t,l,u)}else if(n.type==="setLoadable"){const{recoilValue:{key:o},loadable:i}=n;I0(t,o,i)}else if(n.type==="markModified"){const{recoilValue:{key:o}}=n;t.dirtyAtoms.add(o)}else if(n.type==="setUnvalidated"){var r;const{recoilValue:{key:o},unvalidatedValue:i}=n,a=iR(o);a==null||(r=a.invalidate)===null||r===void 0||r.call(a,t),t.atomValues.delete(o),t.nonvalidatedAtoms.set(o,i),t.dirtyAtoms.add(o)}else j_(`Unknown action ${n.type}`)}function I0(e,t,n){n.state==="hasValue"&&n.contents instanceof q_?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function aR(e,t){e.replaceState(n=>{const r=sR(n);for(const o of t)hj(e,r,o);return lR(e,r),cj(),r})}function bh(e,t){if(tu.length){const n=tu[tu.length-1];let r=n.get(e);r||n.set(e,r=[]),r.push(t)}else aR(e,[t])}const tu=[];function gj(){const e=new Map;return tu.push(e),()=>{for(const[t,n]of e)aR(t,n);tu.pop()}}function sR(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function lR(e,t){const n=tj(e,t,t.dirtyAtoms);for(const i of n){var r,o;(r=iR(i))===null||r===void 0||(o=r.invalidate)===null||o===void 0||o.call(r,t)}}function uR(e,t,n){bh(e,{type:"set",recoilValue:t,valueOrUpdater:n})}function mj(e,t,n){if(n instanceof q_)return uR(e,t,n);bh(e,{type:"setLoadable",recoilValue:t,loadable:n})}function yj(e,t){bh(e,{type:"markModified",recoilValue:t})}function vj(e,t,n){bh(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})}function _j(e,{key:t},n,r=null){const o=rj(),i=e.getState();i.nodeToComponentSubscriptions.has(t)||i.nodeToComponentSubscriptions.set(t,new Map),Qe(i.nodeToComponentSubscriptions.get(t)).set(o,[r??"",n]);const a=ij();if(a.early&&(a.mode==="LEGACY"||a.mode==="MUTABLE_SOURCE")){const s=e.getState().nextTree;s&&s.dirtyAtoms.has(t)&&n(s)}return{release:()=>{const s=e.getState(),l=s.nodeToComponentSubscriptions.get(t);l===void 0||!l.has(o)||(l.delete(o),l.size===0&&s.nodeToComponentSubscriptions.delete(t))}}}function bj(e,t){var n;const{currentTree:r}=e.getState(),o=oj(t.key);(n=o.clearCache)===null||n===void 0||n.call(o,e,r)}var Mr={RecoilValueReadOnly:lj,AbstractRecoilValue:aj,RecoilState:sj,getRecoilValueAsLoadable:dj,setRecoilValue:uR,setRecoilValueLoadable:mj,markRecoilValueModified:yj,setUnvalidatedRecoilValue:vj,subscribeToRecoilValue:_j,isRecoilValue:uj,applyAtomValueWrites:fj,batchStart:gj,writeLoadableToTreeState:I0,invalidateDownstreams:lR,copyTreeState:sR,refreshRecoilValue:bj};function xj(e,t,n){const r=e.entries();let o=r.next();for(;!o.done;){const i=o.value;if(t.call(n,i[1],i[0],e))return!0;o=r.next()}return!1}var wj=xj;const{cleanUpNode:Sj}=ui,{deleteNodeConfigIfPossible:Ej,getNode:cR}=cn,{RetentionZone:dR}=_h,Aj=12e4,fR=new Set;function pR(e,t){const n=e.getState(),r=n.currentTree;if(n.nextTree)return;const o=new Set;for(const a of t)if(a instanceof dR)for(const s of kj(n,a))o.add(s);else o.add(a);const i=Cj(e,o);for(const a of i)Rj(e,r,a)}function Cj(e,t){const n=e.getState(),r=n.currentTree,o=e.getGraph(r.version),i=new Set,a=new Set;return s(t),i;function s(l){const u=new Set,c=Oj(e,r,l,i,a);for(const g of c){var d;if(cR(g).retainedBy==="recoilRoot"){a.add(g);continue}if(((d=n.retention.referenceCounts.get(g))!==null&&d!==void 0?d:0)>0){a.add(g);continue}if(hR(g).some(b=>n.retention.referenceCounts.get(b))){a.add(g);continue}const v=o.nodeToNodeSubscriptions.get(g);if(v&&wj(v,b=>a.has(b))){a.add(g);continue}i.add(g),u.add(g)}const f=new Set;for(const g of u)for(const v of(p=o.nodeDeps.get(g))!==null&&p!==void 0?p:fR){var p;i.has(v)||f.add(v)}f.size&&s(f)}}function Oj(e,t,n,r,o){const i=e.getGraph(t.version),a=[],s=new Set;for(;n.size>0;)l(Qe(n.values().next().value));return a;function l(u){if(r.has(u)||o.has(u)){n.delete(u);return}if(s.has(u))return;const c=i.nodeToNodeSubscriptions.get(u);if(c)for(const d of c)l(d);s.add(u),n.delete(u),a.push(u)}}function Rj(e,t,n){if(!Ie("recoil_memory_managament_2020"))return;Sj(e,n);const r=e.getState();r.knownAtoms.delete(n),r.knownSelectors.delete(n),r.nodeTransactionSubscriptions.delete(n),r.retention.referenceCounts.delete(n);const o=hR(n);for(const l of o){var i;(i=r.retention.nodesRetainedByZone.get(l))===null||i===void 0||i.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const a=r.graphsByVersion.get(t.version);if(a){const l=a.nodeDeps.get(n);if(l!==void 0){a.nodeDeps.delete(n);for(const u of l){var s;(s=a.nodeToNodeSubscriptions.get(u))===null||s===void 0||s.delete(n)}}a.nodeToNodeSubscriptions.delete(n)}Ej(n)}function kj(e,t){var n;return(n=e.retention.nodesRetainedByZone.get(t))!==null&&n!==void 0?n:fR}function hR(e){const t=cR(e).retainedBy;return t===void 0||t==="components"||t==="recoilRoot"?[]:t instanceof dR?[t]:t}function Tj(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):pR(e,new Set([t]))}function $j(e,t,n){var r;if(!Ie("recoil_memory_managament_2020"))return;const o=e.getState().retention.referenceCounts,i=((r=o.get(t))!==null&&r!==void 0?r:0)+n;i===0?gR(e,t):o.set(t,i)}function gR(e,t){if(!Ie("recoil_memory_managament_2020"))return;e.getState().retention.referenceCounts.delete(t),Tj(e,t)}function Pj(e){if(!Ie("recoil_memory_managament_2020"))return;const t=e.getState();pR(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()}function Mj(e){return e===void 0?"recoilRoot":e}var ua={SUSPENSE_TIMEOUT_MS:Aj,updateRetainCount:$j,updateRetainCountToZero:gR,releaseScheduledRetainablesNow:Pj,retainedByOptionWithDefault:Mj};const{unstable_batchedUpdates:Nj}=E8;var Lj={unstable_batchedUpdates:Nj};const{unstable_batchedUpdates:Dj}=Lj;var Ij={unstable_batchedUpdates:Dj};const{batchStart:jj}=Mr,{unstable_batchedUpdates:Fj}=Ij;let W_=Fj||(e=>e());const Uj=e=>{W_=e},Vj=()=>W_,zj=e=>{W_(()=>{let t=()=>{};try{t=jj(),e()}finally{t()}})};var xh={getBatcher:Vj,setBatcher:Uj,batchUpdates:zj};function*Bj(e){for(const t of e)for(const n of t)yield n}var mR=Bj;const yR=typeof Window>"u"||typeof window>"u",Hj=e=>!yR&&(e===window||e instanceof Window),qj=typeof navigator<"u"&&navigator.product==="ReactNative";var wh={isSSR:yR,isReactNative:qj,isWindow:Hj};function Wj(e,t){let n;return(...r)=>{n||(n={});const o=t(...r);return Object.hasOwnProperty.call(n,o)||(n[o]=e(...r)),n[o]}}function Gj(e,t){let n,r;return(...o)=>{const i=t(...o);return n===i||(n=i,r=e(...o)),r}}function Kj(e,t){let n,r;return[(...a)=>{const s=t(...a);return n===s||(n=s,r=e(...a)),r},()=>{n=null}]}var Yj={memoizeWithArgsHash:Wj,memoizeOneWithArgsHash:Gj,memoizeOneWithArgsHashAndInvalidation:Kj};const{batchUpdates:j0}=xh,{initializeNode:Qj,peekNodeInfo:Xj}=ui,{graph:Zj}=oc,{getNextStoreID:Jj}=vh,{DEFAULT_VALUE:eF,recoilValues:j2,recoilValuesForKeys:F2}=cn,{AbstractRecoilValue:tF,getRecoilValueAsLoadable:nF,setRecoilValue:U2,setUnvalidatedRecoilValue:rF}=Mr,{updateRetainCount:$d}=ua,{setInvalidateMemoizedSnapshot:oF}=rR,{getNextTreeStateVersion:iF,makeEmptyStoreState:aF}=QO,{isSSR:sF}=wh,{memoizeOneWithArgsHashAndInvalidation:lF}=Yj;class Sh{constructor(t,n){we(this,"_store",void 0),we(this,"_refCount",1),we(this,"getLoadable",r=>(this.checkRefCount_INTERNAL(),nF(this._store,r))),we(this,"getPromise",r=>(this.checkRefCount_INTERNAL(),this.getLoadable(r).toPromise())),we(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 a=this._store.getState().currentTree;return F2(a.dirtyAtoms)}const o=this._store.getState().knownAtoms,i=this._store.getState().knownSelectors;return(r==null?void 0:r.isInitialized)==null?j2.values():r.isInitialized===!0?F2(mR([o,i])):B_(j2.values(),({key:a})=>!o.has(a)&&!i.has(a))}),we(this,"getInfo_UNSTABLE",({key:r})=>(this.checkRefCount_INTERNAL(),Xj(this._store,this._store.getState().currentTree,r))),we(this,"map",r=>{this.checkRefCount_INTERNAL();const o=new F0(this,j0);return r(o),o}),we(this,"asyncMap",async r=>{this.checkRefCount_INTERNAL();const o=new F0(this,j0);return o.retain(),await r(o),o.autoRelease_INTERNAL(),o}),this._store={storeID:Jj(),parentStoreID:n,getState:()=>t,replaceState:r=>{t.currentTree=r(t.currentTree)},getGraph:r=>{const o=t.graphsByVersion;if(o.has(r))return Qe(o.get(r));const i=Zj();return o.set(r,i),i},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Ee("Cannot subscribe to Snapshots")}};for(const r of this._store.getState().knownAtoms)Qj(this._store,r,"get"),$d(this._store,r,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0,this._refCount++;let t=!1;return()=>{t||(t=!0,this._release())}}autoRelease_INTERNAL(){sF||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(),!Ie("recoil_memory_managament_2020"))return}else this._refCount<0}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){Ie("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 vR(e,t,n=!1){const r=e.getState(),o=n?iF():t.version;return{currentTree:{version:n?o:t.version,stateID:n?o: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(o,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(yh(r.nodeCleanupFunctions.entries(),([i])=>[i,()=>{}]))}}function uF(e){const t=new Sh(aF());return e!=null?t.map(e):t}const[V2,_R]=lF((e,t)=>{var n;const r=e.getState(),o=t==="latest"?(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree:Qe(r.previousTree);return new Sh(vR(e,o),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)});oF(_R);function cF(e,t="latest"){const n=V2(e,t);return n.isRetained()?n:(_R(),V2(e,t))}class F0 extends Sh{constructor(t,n){super(vR(t.getStore_INTERNAL(),t.getStore_INTERNAL().getState().currentTree,!0),t.getStoreID()),we(this,"_batch",void 0),we(this,"set",(r,o)=>{this.checkRefCount_INTERNAL();const i=this.getStore_INTERNAL();this._batch(()=>{$d(i,r.key,1),U2(this.getStore_INTERNAL(),r,o)})}),we(this,"reset",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();this._batch(()=>{$d(o,r.key,1),U2(this.getStore_INTERNAL(),r,eF)})}),we(this,"setUnvalidatedAtomValues_DEPRECATED",r=>{this.checkRefCount_INTERNAL();const o=this.getStore_INTERNAL();j0(()=>{for(const[i,a]of r.entries())$d(o,i,1),rF(o,new tF(i),a)})}),this._batch=n}}var Eh={Snapshot:Sh,MutableSnapshot:F0,freshSnapshot:uF,cloneSnapshot:cF},dF=Eh.Snapshot,fF=Eh.MutableSnapshot,pF=Eh.freshSnapshot,hF=Eh.cloneSnapshot,Ah=Object.freeze({__proto__:null,Snapshot:dF,MutableSnapshot:fF,freshSnapshot:pF,cloneSnapshot:hF});function gF(...e){const t=new Set;for(const n of e)for(const r of n)t.add(r);return t}var mF=gF;const{useRef:yF}=E;function vF(e){const t=yF(e);return t.current===e&&typeof e=="function"&&(t.current=e()),t}var z2=vF;const{getNextTreeStateVersion:_F,makeEmptyStoreState:bR}=QO,{cleanUpNode:bF,getDownstreamNodes:xF,initializeNode:wF,setNodeValue:SF,setUnvalidatedAtomValue_DEPRECATED:EF}=ui,{graph:AF}=oc,{cloneGraph:CF}=oc,{getNextStoreID:xR}=vh,{createMutableSource:nm,reactMode:wR}=rc,{applyAtomValueWrites:OF}=Mr,{releaseScheduledRetainablesNow:SR}=ua,{freshSnapshot:RF}=Ah,{useCallback:kF,useContext:ER,useEffect:U0,useMemo:TF,useRef:$F,useState:PF}=E;function ml(){throw Ee("This component must be used inside a component.")}const AR=Object.freeze({storeID:xR(),getState:ml,replaceState:ml,getGraph:ml,subscribeToTransactions:ml,addTransactionMetadata:ml});let V0=!1;function B2(e){if(V0)throw Ee("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){Ie("recoil_memory_managament_2020")&&Ie("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&SR(e);const n=t.currentTree.version,r=_F();t.nextTree={...t.currentTree,version:r,stateID:r,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(r,CF(Qe(t.graphsByVersion.get(n))))}}const CR=E.createContext({current:AR}),Ch=()=>ER(CR),OR=E.createContext(null);function MF(){return ER(OR)}function G_(e,t,n){const r=xF(e,n,n.dirtyAtoms);for(const o of r){const i=t.nodeToComponentSubscriptions.get(o);if(i)for(const[a,[s,l]]of i)l(n)}}function RR(e){const t=e.getState(),n=t.currentTree,r=n.dirtyAtoms;if(r.size){for(const[o,i]of t.nodeTransactionSubscriptions)if(r.has(o))for(const[a,s]of i)s(e);for(const[o,i]of t.transactionSubscriptions)i(e);(!wR().early||t.suspendedComponentResolvers.size>0)&&(G_(e,t,n),t.suspendedComponentResolvers.forEach(o=>o()),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach(o=>o(n)),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function NF(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,RR(e),t.previousTree!=null?t.graphsByVersion.delete(t.previousTree.version):j_("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,Ie("recoil_memory_managament_2020")&&n==null&&SR(e)}finally{t.commitDepth--}}function LF({setNotifyBatcherOfChange:e}){const t=Ch(),[,n]=PF([]);return e(()=>n({})),U0(()=>(e(()=>n({})),()=>{e(()=>{})}),[e]),U0(()=>{pI.enqueueExecution("Batcher",()=>{NF(t.current)})}),null}function DF(e,t){const n=bR();return t({set:(r,o)=>{const i=n.currentTree,a=SF(e,i,r.key,o),s=new Set(a.keys()),l=i.nonvalidatedAtoms.clone();for(const u of s)l.delete(u);n.currentTree={...i,dirtyAtoms:mF(i.dirtyAtoms,s),atomValues:OF(i.atomValues,a),nonvalidatedAtoms:l}},setUnvalidatedAtomValues:r=>{r.forEach((o,i)=>{n.currentTree=EF(n.currentTree,i,o)})}}),n}function IF(e){const t=RF(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach(r=>r()),n.nodeCleanupFunctions.clear(),n}let H2=0;function jF({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:r}){let o;const i=p=>{const g=o.current.graphsByVersion;if(g.has(p))return Qe(g.get(p));const v=AF();return g.set(p,v),v},a=(p,g)=>{if(g==null){const{transactionSubscriptions:v}=d.current.getState(),b=H2++;return v.set(b,p),{release:()=>{v.delete(b)}}}else{const{nodeTransactionSubscriptions:v}=d.current.getState();v.has(g)||v.set(g,new Map);const b=H2++;return Qe(v.get(g)).set(b,p),{release:()=>{const y=v.get(g);y&&(y.delete(b),y.size===0&&v.delete(g))}}}},s=p=>{B2(d.current);for(const g of Object.keys(p))Qe(d.current.getState().nextTree).transactionMetadata[g]=p[g]},l=p=>{B2(d.current);const g=Qe(o.current.nextTree);let v;try{V0=!0,v=p(g)}finally{V0=!1}v!==g&&(o.current.nextTree=v,wR().early&&G_(d.current,o.current,v),Qe(u.current)())},u=$F(null),c=kF(p=>{u.current=p},[u]),d=z2(()=>n??{storeID:xR(),getState:()=>o.current,replaceState:l,getGraph:i,subscribeToTransactions:a,addTransactionMetadata:s});n!=null&&(d.current=n),o=z2(()=>e!=null?DF(d.current,e):t!=null?IF(t):bR());const f=TF(()=>nm==null?void 0:nm(o,()=>o.current.currentTree.version),[o]);return U0(()=>{const p=d.current;for(const g of new Set(p.getState().knownAtoms))wF(p,g,"get");return()=>{for(const g of p.getState().knownAtoms)bF(p,g)}},[d]),E.createElement(CR.Provider,{value:d},E.createElement(OR.Provider,{value:f},E.createElement(LF,{setNotifyBatcherOfChange:c}),r))}function FF(e){const{override:t,...n}=e,r=Ch();return t===!1&&r.current!==AR?e.children:E.createElement(jF,n)}function UF(){return Ch().current.storeID}var fo={RecoilRoot:FF,useStoreRef:Ch,useRecoilMutableSource:MF,useRecoilStoreID:UF,notifyComponents_FOR_TESTING:G_,sendEndOfBatchNotifications_FOR_TESTING:RR};function VF(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 kR=qF;const{useStoreRef:WF}=fo,{SUSPENSE_TIMEOUT_MS:GF}=ua,{updateRetainCount:yl}=ua,{RetentionZone:KF}=_h,{useEffect:YF,useRef:QF}=E,{isSSR:q2}=wh;function XF(e){if(Ie("recoil_memory_managament_2020"))return ZF(e)}function ZF(e){const n=(Array.isArray(e)?e:[e]).map(a=>a instanceof KF?a:a.key),r=WF();YF(()=>{if(!Ie("recoil_memory_managament_2020"))return;const a=r.current;if(o.current&&!q2)window.clearTimeout(o.current),o.current=null;else for(const s of n)yl(a,s,1);return()=>{for(const s of n)yl(a,s,-1)}},[r,...n]);const o=QF(),i=kR(n);if(!q2&&(i===void 0||!zF(i,n))){const a=r.current;for(const s of n)yl(a,s,1);if(i)for(const s of i)yl(a,s,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(()=>{o.current=null;for(const s of n)yl(a,s,-1)},GF)}}var K_=XF;function JF(){return""}var ac=JF;const{batchUpdates:e9}=xh,{DEFAULT_VALUE:TR}=cn,{currentRendererSupportsUseSyncExternalStore:t9,reactMode:zs,useMutableSource:n9,useSyncExternalStore:r9}=rc,{useRecoilMutableSource:o9,useStoreRef:Nr}=fo,{AbstractRecoilValue:z0,getRecoilValueAsLoadable:sc,setRecoilValue:Tf,setUnvalidatedRecoilValue:i9,subscribeToRecoilValue:ws}=Mr,{useCallback:sn,useEffect:Ss,useMemo:$R,useRef:nu,useState:Y_}=E,{setByAddingToSet:a9}=ZO,{isSSR:s9}=wh;function Q_(e,t,n){if(e.state==="hasValue")return e.contents;throw e.state==="loading"?new Promise(o=>{const i=n.current.getState().suspendedComponentResolvers;i.add(o),s9&&He(e.contents)&&e.contents.finally(()=>{i.delete(o)})}):e.state==="hasError"?e.contents:Ee(`Invalid value of loadable atom "${t.key}"`)}function l9(){const e=ac(),t=Nr(),[,n]=Y_([]),r=nu(new Set);r.current=new Set;const o=nu(new Set),i=nu(new Map),a=sn(l=>{const u=i.current.get(l);u&&(u.release(),i.current.delete(l))},[i]),s=sn((l,u)=>{i.current.has(u)&&n([])},[]);return Ss(()=>{const l=t.current;eu(r.current,o.current).forEach(u=>{if(i.current.has(u))return;const c=ws(l,new z0(u),f=>s(f,u),e);i.current.set(u,c),l.getState().nextTree?l.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{s(l.getState(),u)}):s(l.getState(),u)}),eu(o.current,r.current).forEach(u=>{a(u)}),o.current=r.current}),Ss(()=>{const l=i.current;return eu(r.current,new Set(l.keys())).forEach(u=>{const c=ws(t.current,new z0(u),d=>s(d,u),e);l.set(u,c)}),()=>l.forEach((u,c)=>a(c))},[e,t,a,s]),$R(()=>{function l(g){return v=>{Tf(t.current,g,v)}}function u(g){return()=>Tf(t.current,g,TR)}function c(g){var v;r.current.has(g.key)||(r.current=a9(r.current,g.key));const b=t.current.getState();return sc(t.current,g,zs().early&&(v=b.nextTree)!==null&&v!==void 0?v:b.currentTree)}function d(g){const v=c(g);return Q_(v,g,t)}function f(g){return[d(g),l(g)]}function p(g){return[c(g),l(g)]}return{getRecoilValue:d,getRecoilValueLoadable:c,getRecoilState:f,getRecoilStateLoadable:p,getSetRecoilState:l,getResetRecoilState:u}},[r,t])}const u9={current:0};function c9(e){const t=Nr(),n=ac(),r=sn(()=>{var s;const l=t.current,u=l.getState(),c=zs().early&&(s=u.nextTree)!==null&&s!==void 0?s:u.currentTree;return{loadable:sc(l,e,c),key:e.key}},[t,e]),o=sn(s=>{let l;return()=>{var u,c;const d=s();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)}},[]),i=$R(()=>o(r),[r,o]),a=sn(s=>{const l=t.current;return ws(l,e,s,n).release},[t,e,n]);return r9(a,i,i).loadable}function d9(e){const t=Nr(),n=sn(()=>{var u;const c=t.current,d=c.getState(),f=zs().early&&(u=d.nextTree)!==null&&u!==void 0?u:d.currentTree;return sc(c,e,f)},[t,e]),r=sn(()=>n(),[n]),o=ac(),i=sn((u,c)=>{const d=t.current;return ws(d,e,()=>{if(!Ie("recoil_suppress_rerender_in_callback"))return c();const p=n();l.current.is(p)||c(),l.current=p},o).release},[t,e,o,n]),a=o9();if(a==null)throw Ee("Recoil hooks must be used in components contained within a component.");const s=n9(a,r,i),l=nu(s);return Ss(()=>{l.current=s}),s}function B0(e){const t=Nr(),n=ac(),r=sn(()=>{var l;const u=t.current,c=u.getState(),d=zs().early&&(l=c.nextTree)!==null&&l!==void 0?l:c.currentTree;return sc(u,e,d)},[t,e]),o=sn(()=>({loadable:r(),key:e.key}),[r,e.key]),i=sn(l=>{const u=o();return l.loadable.is(u.loadable)&&l.key===u.key?l:u},[o]);Ss(()=>{const l=ws(t.current,e,u=>{s(i)},n);return s(i),l.release},[n,e,t,i]);const[a,s]=Y_(o);return a.key!==e.key?o().loadable:a.loadable}function f9(e){const t=Nr(),[,n]=Y_([]),r=ac(),o=sn(()=>{var s;const l=t.current,u=l.getState(),c=zs().early&&(s=u.nextTree)!==null&&s!==void 0?s:u.currentTree;return sc(l,e,c)},[t,e]),i=o(),a=nu(i);return Ss(()=>{a.current=i}),Ss(()=>{const s=t.current,l=s.getState(),u=ws(s,e,d=>{var f;if(!Ie("recoil_suppress_rerender_in_callback"))return n([]);const p=o();(f=a.current)!==null&&f!==void 0&&f.is(p)||n(p),a.current=p},r);if(l.nextTree)s.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{a.current=null,n([])});else{var c;if(!Ie("recoil_suppress_rerender_in_callback"))return n([]);const d=o();(c=a.current)!==null&&c!==void 0&&c.is(d)||n(d),a.current=d}return u.release},[r,o,e,t]),i}function X_(e){return Ie("recoil_memory_managament_2020")&&K_(e),{TRANSITION_SUPPORT:B0,SYNC_EXTERNAL_STORE:t9()?c9:B0,MUTABLE_SOURCE:d9,LEGACY:f9}[zs().mode](e)}function PR(e){const t=Nr(),n=X_(e);return Q_(n,e,t)}function Oh(e){const t=Nr();return sn(n=>{Tf(t.current,e,n)},[t,e])}function p9(e){const t=Nr();return sn(()=>{Tf(t.current,e,TR)},[t,e])}function h9(e){return[PR(e),Oh(e)]}function g9(e){return[X_(e),Oh(e)]}function m9(){const e=Nr();return(t,n={})=>{e9(()=>{e.current.addTransactionMetadata(n),t.forEach((r,o)=>i9(e.current,new z0(o),r))})}}function MR(e){return Ie("recoil_memory_managament_2020")&&K_(e),B0(e)}function NR(e){const t=Nr(),n=MR(e);return Q_(n,e,t)}function y9(e){return[NR(e),Oh(e)]}var v9={recoilComponentGetRecoilValueCount_FOR_TESTING:u9,useRecoilInterface:l9,useRecoilState:h9,useRecoilStateLoadable:g9,useRecoilValue:PR,useRecoilValueLoadable:X_,useResetRecoilState:p9,useSetRecoilState:Oh,useSetUnvalidatedAtomValues:m9,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:MR,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:NR,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:y9};function _9(e,t){const n=new Map;for(const[r,o]of e)t(o,r)&&n.set(r,o);return n}var b9=_9;function x9(e,t){const n=new Set;for(const r of e)t(r)&&n.add(r);return n}var w9=x9;function S9(...e){const t=new Map;for(let n=0;nt.current.subscribeToTransactions(e).release,[e,t])}function K2(e){const t=e.atomValues.toMap(),n=kf(b9(t,(r,o)=>{const a=LR(o).persistence_UNSTABLE;return a!=null&&a.type!=="none"&&r.state==="hasValue"}),r=>r.contents);return E9(e.nonvalidatedAtoms.toMap(),n)}function P9(e){kh(Rh(t=>{let n=t.getState().previousTree;const r=t.getState().currentTree;n||(n=t.getState().currentTree);const o=K2(r),i=K2(n),a=kf(O9,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}}}),s=w9(r.dirtyAtoms,l=>o.has(l)||i.has(l));e({atomValues:o,previousAtomValues:i,atomInfo:a,modifiedAtoms:s,transactionMetadata:{...r.transactionMetadata}})},[e]))}function M9(e){kh(Rh(t=>{const n=$f(t,"latest"),r=$f(t,"previous");e({snapshot:n,previousSnapshot:r})},[e]))}function N9(){const e=Z_(),[t,n]=$9(()=>$f(e.current)),r=kR(t),o=W2(),i=W2();if(kh(Rh(s=>n($f(s)),[])),DR(()=>{const s=t.retain();if(o.current&&!G2){var l;window.clearTimeout(o.current),o.current=null,(l=i.current)===null||l===void 0||l.call(i),i.current=null}return()=>{window.setTimeout(s,10)}},[t]),r!==t&&!G2){if(o.current){var a;window.clearTimeout(o.current),o.current=null,(a=i.current)===null||a===void 0||a.call(i),i.current=null}i.current=t.retain(),o.current=window.setTimeout(()=>{var s;o.current=null,(s=i.current)===null||s===void 0||s.call(i),i.current=null},T9)}return t}function IR(e,t){var n;const r=e.getState(),o=(n=r.nextTree)!==null&&n!==void 0?n:r.currentTree,i=t.getStore_INTERNAL().getState().currentTree;A9(()=>{const a=new Set;for(const u of[o.atomValues.keys(),i.atomValues.keys()])for(const c of u){var s,l;((s=o.atomValues.get(c))===null||s===void 0?void 0:s.contents)!==((l=i.atomValues.get(c))===null||l===void 0?void 0:l.contents)&&LR(c).shouldRestoreFromSnapshots&&a.add(c)}a.forEach(u=>{k9(e,new R9(u),i.atomValues.has(u)?Qe(i.atomValues.get(u)):C9)}),e.replaceState(u=>({...u,stateID:t.getID()}))})}function L9(){const e=Z_();return Rh(t=>IR(e.current,t),[e])}var jR={useRecoilSnapshot:N9,gotoSnapshot:IR,useGotoRecoilSnapshot:L9,useRecoilTransactionObserver:M9,useTransactionObservation_DEPRECATED:P9,useTransactionSubscription_DEPRECATED:kh};const{peekNodeInfo:D9}=ui,{useStoreRef:I9}=fo;function j9(){const e=I9();return({key:t})=>D9(e.current,e.current.getState().currentTree,t)}var F9=j9;const{reactMode:U9}=rc,{RecoilRoot:V9,useStoreRef:z9}=fo,{useMemo:B9}=E;function H9(){U9().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=z9().current;return B9(()=>{function t({children:n}){return E.createElement(V9,{store_INTERNAL:e},n)}return t},[e])}var q9=H9;const{loadableWithValue:W9}=nc,{initializeNode:G9}=ui,{DEFAULT_VALUE:K9,getNode:Y9}=cn,{copyTreeState:Q9,getRecoilValueAsLoadable:X9,invalidateDownstreams:Z9,writeLoadableToTreeState:J9}=Mr;function Y2(e){return Y9(e.key).nodeType==="atom"}class eU{constructor(t,n){we(this,"_store",void 0),we(this,"_treeState",void 0),we(this,"_changes",void 0),we(this,"get",r=>{if(this._changes.has(r.key))return this._changes.get(r.key);if(!Y2(r))throw Ee("Reading selectors within atomicUpdate is not supported");const o=X9(this._store,r,this._treeState);if(o.state==="hasValue")return o.contents;throw o.state==="hasError"?o.contents:Ee(`Expected Recoil atom ${r.key} to have a value, but it is in a loading state.`)}),we(this,"set",(r,o)=>{if(!Y2(r))throw Ee("Setting selectors within atomicUpdate is not supported");if(typeof o=="function"){const i=this.get(r);this._changes.set(r.key,o(i))}else G9(this._store,r.key,"set"),this._changes.set(r.key,o)}),we(this,"reset",r=>{this.set(r,K9)}),this._store=t,this._treeState=n,this._changes=new Map}newTreeState_INTERNAL(){if(this._changes.size===0)return this._treeState;const t=Q9(this._treeState);for(const[n,r]of this._changes)J9(t,n,W9(r));return Z9(this._store,t),t}}function tU(e){return t=>{e.replaceState(n=>{const r=new eU(e,n);return t(r),r.newTreeState_INTERNAL()})}}var nU={atomicUpdater:tU},rU=nU.atomicUpdater,FR=Object.freeze({__proto__:null,atomicUpdater:rU});function oU(e,t){if(!e)throw new Error(t)}var iU=oU,Dl=iU;const{atomicUpdater:aU}=FR,{batchUpdates:sU}=xh,{DEFAULT_VALUE:lU}=cn,{useStoreRef:uU}=fo,{refreshRecoilValue:cU,setRecoilValue:Q2}=Mr,{cloneSnapshot:dU}=Ah,{gotoSnapshot:fU}=jR,{useCallback:pU}=E;class UR{}const hU=new UR;function VR(e,t,n,r){let o=hU,i;if(sU(()=>{const s="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 Ee(s);const l=JO({...r??{},set:(c,d)=>Q2(e,c,d),reset:c=>Q2(e,c,lU),refresh:c=>cU(e,c),gotoSnapshot:c=>fU(e,c),transact_UNSTABLE:c=>aU(e)(c)},{snapshot:()=>{const c=dU(e);return i=c.retain(),c}}),u=t(l);if(typeof u!="function")throw Ee(s);o=u(...n)}),o instanceof UR&&Dl(!1),He(o))o=o.finally(()=>{var s;(s=i)===null||s===void 0||s()});else{var a;(a=i)===null||a===void 0||a()}return o}function gU(e,t){const n=uU();return pU((...r)=>VR(n.current,e,r),t!=null?[...t,n]:void 0)}var zR={recoilCallback:VR,useRecoilCallback:gU};const{useStoreRef:mU}=fo,{refreshRecoilValue:yU}=Mr,{useCallback:vU}=E;function _U(e){const t=mU();return vU(()=>{const n=t.current;yU(n,e)},[e,t])}var bU=_U;const{atomicUpdater:xU}=FR,{useStoreRef:wU}=fo,{useMemo:SU}=E;function EU(e,t){const n=wU();return SU(()=>(...r)=>{xU(n.current)(i=>{e(i)(...r)})},t!=null?[...t,n]:void 0)}var AU=EU;class CU{constructor(t){we(this,"value",void 0),this.value=t}}var OU={WrappedValue:CU},RU=OU.WrappedValue,BR=Object.freeze({__proto__:null,WrappedValue:RU});const{isFastRefreshEnabled:kU}=rc;class X2 extends Error{}class TU{constructor(t){var n,r,o;we(this,"_name",void 0),we(this,"_numLeafs",void 0),we(this,"_root",void 0),we(this,"_onHit",void 0),we(this,"_onSet",void 0),we(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=(o=t==null?void 0:t.mapNodeValue)!==null&&o!==void 0?o:i=>i}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 o=this._mapNodeValue(t(r.nodeKey));r=r.branches.get(o)}}set(t,n,r){const o=()=>{var i,a,s,l;let u,c;for(const[b,y]of t){var d,f,p;const h=this._root;if((h==null?void 0:h.type)==="leaf")throw this.invalidCacheError();const _=u;if(u=_?_.branches.get(c):h,u=(d=u)!==null&&d!==void 0?d:{type:"branch",nodeKey:b,parent:_,branches:new Map,branchKey:c},u.type!=="branch"||u.nodeKey!==b)throw this.invalidCacheError();_==null||_.branches.set(c,u),r==null||(f=r.onNodeVisit)===null||f===void 0||f.call(r,u),c=this._mapNodeValue(y),this._root=(p=this._root)!==null&&p!==void 0?p:u}const g=u?(i=u)===null||i===void 0?void 0:i.branches.get(c):this._root;if(g!=null&&(g.type!=="leaf"||g.branchKey!==c))throw this.invalidCacheError();const v={type:"leaf",value:n,parent:u,branchKey:c};(a=u)===null||a===void 0||a.branches.set(c,v),this._root=(s=this._root)!==null&&s!==void 0?s:v,this._numLeafs++,this._onSet(v),r==null||(l=r.onNodeVisit)===null||l===void 0||l.call(r,v)};try{o()}catch(i){if(i instanceof X2)this.clear(),o();else throw i}}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,o=t.branchKey;for(;r;){var i;if(r.branches.delete(o),r===n)return r.branches.size===0?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(r.branches.size>0)break;o=(i=r)===null||i===void 0?void 0:i.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=kU()?"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 j_(t+(this._name!=null?` - ${this._name}`:"")),new X2}}var $U={TreeCache:TU},PU=$U.TreeCache,HR=Object.freeze({__proto__:null,TreeCache:PU});class MU{constructor(t){var n;we(this,"_maxSize",void 0),we(this,"_size",void 0),we(this,"_head",void 0),we(this,"_tail",void 0),we(this,"_map",void 0),we(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 i=this.head(),a={key:t,right:i,left:null,value:n};i?i.left=a:this._tail=a,this._map.set(r,a),this._head=a,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=Qe(this._map.get(n)),o=r.right,i=r.left;o&&(o.left=r.left),i&&(i.right=r.right),r===this.head()&&(this._head=o),r===this.tail()&&(this._tail=i),this._map.delete(n),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}var NU={LRUCache:MU},LU=NU.LRUCache,qR=Object.freeze({__proto__:null,LRUCache:LU});const{LRUCache:DU}=qR,{TreeCache:IU}=HR;function jU({name:e,maxSize:t,mapNodeValue:n=r=>r}){const r=new DU({maxSize:t}),o=new IU({name:e,mapNodeValue:n,onHit:i=>{r.set(i,!0)},onSet:i=>{const a=r.tail();r.set(i,!0),a&&o.size()>t&&o.delete(a.key)}});return o}var Z2=jU;function Qn(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 Ee("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(He(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map((o,i)=>Qn(o,t,i.toString()))}]`;if(typeof e.toJSON=="function")return Qn(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[i,a]of e)o[typeof i=="string"?i:Qn(i,t)]=a;return Qn(o,t,n)}return e instanceof Set?Qn(Array.from(e).sort((o,i)=>Qn(o,t).localeCompare(Qn(i,t))),t,n):Symbol!==void 0&&e[Symbol.iterator]!=null&&typeof e[Symbol.iterator]=="function"?Qn(Array.from(e),t,n):`{${Object.keys(e).filter(o=>e[o]!==void 0).sort().map(o=>`${Qn(o,t)}:${Qn(e[o],t,o)}`).join(",")}}`}function FU(e,t={allowFunctions:!1}){return Qn(e,t)}var Th=FU;const{TreeCache:UU}=HR,Kc={equality:"reference",eviction:"keep-all",maxSize:1/0};function VU({equality:e=Kc.equality,eviction:t=Kc.eviction,maxSize:n=Kc.maxSize}=Kc,r){const o=zU(e);return BU(t,n,o,r)}function zU(e){switch(e){case"reference":return t=>t;case"value":return t=>Th(t)}throw Ee(`Unrecognized equality policy ${e}`)}function BU(e,t,n,r){switch(e){case"keep-all":return new UU({name:r,mapNodeValue:n});case"lru":return Z2({name:r,maxSize:Qe(t),mapNodeValue:n});case"most-recent":return Z2({name:r,maxSize:1,mapNodeValue:n})}throw Ee(`Unrecognized eviction policy ${e}`)}var HU=VU;function qU(e){return()=>null}var WU={startPerfBlock:qU};const{isLoadable:GU,loadableWithError:Yc,loadableWithPromise:KU,loadableWithValue:rm}=nc,{WrappedValue:WR}=BR,{getNodeLoadable:Qc,peekNodeLoadable:YU,setNodeValue:QU}=ui,{saveDepsToStore:XU}=oc,{DEFAULT_VALUE:ZU,getConfigDeletionHandler:JU,getNode:eV,registerNode:J2}=cn,{isRecoilValue:tV}=xs,{markRecoilValueModified:ew}=Mr,{retainedByOptionWithDefault:nV}=ua,{recoilCallback:rV}=zR,{startPerfBlock:oV}=WU;class GR{}const vl=new GR,_l=[],Xc=new Map,iV=(()=>{let e=0;return()=>e++})();function KR(e){let t=null;const{key:n,get:r,cachePolicy_UNSTABLE:o}=e,i=e.set!=null?e.set:void 0,a=new Set,s=HU(o??{equality:"reference",eviction:"keep-all"},n),l=nV(e.retainedBy_UNSTABLE),u=new Map;let c=0;function d(){return!Ie("recoil_memory_managament_2020")||c>0}function f(M){return M.getState().knownSelectors.add(n),c++,()=>{c--}}function p(){return JU(n)!==void 0&&!d()}function g(M,U,B,ee,Z){G(U,ee,Z),v(M,B)}function v(M,U){j(M,U)&&$(M),y(U,!0)}function b(M,U){j(M,U)&&(Qe(O(M)).stateVersions.clear(),y(U,!1))}function y(M,U){const B=Xc.get(M);if(B!=null){for(const ee of B)ew(ee,Qe(t));U&&Xc.delete(M)}}function h(M,U){let B=Xc.get(U);B==null&&Xc.set(U,B=new Set),B.add(M)}function _(M,U,B,ee,Z,ae){return U.then(he=>{if(!d())throw $(M),vl;const se=rm(he);return g(M,B,Z,se,ee),he}).catch(he=>{if(!d())throw $(M),vl;if(He(he))return x(M,he,B,ee,Z,ae);const se=Yc(he);throw g(M,B,Z,se,ee),he})}function x(M,U,B,ee,Z,ae){return U.then(he=>{if(!d())throw $(M),vl;ae.loadingDepKey!=null&&ae.loadingDepPromise===U?B.atomValues.set(ae.loadingDepKey,rm(he)):M.getState().knownSelectors.forEach(Se=>{B.atomValues.delete(Se)});const se=A(M,B);if(se&&se.state!=="loading"){if((j(M,Z)||O(M)==null)&&v(M,Z),se.state==="hasValue")return se.contents;throw se.contents}if(!j(M,Z)){const Se=R(M,B);if(Se!=null)return Se.loadingLoadable.contents}const[Ce,je]=S(M,B,Z);if(Ce.state!=="loading"&&g(M,B,Z,Ce,je),Ce.state==="hasError")throw Ce.contents;return Ce.contents}).catch(he=>{if(he instanceof GR)throw vl;if(!d())throw $(M),vl;const se=Yc(he);throw g(M,B,Z,se,ee),he})}function w(M,U,B,ee){var Z,ae,he,se;if(j(M,ee)||U.version===((Z=M.getState())===null||Z===void 0||(ae=Z.currentTree)===null||ae===void 0?void 0:ae.version)||U.version===((he=M.getState())===null||he===void 0||(se=he.nextTree)===null||se===void 0?void 0:se.version)){var Ce,je,Se;XU(n,B,M,(Ce=(je=M.getState())===null||je===void 0||(Se=je.nextTree)===null||Se===void 0?void 0:Se.version)!==null&&Ce!==void 0?Ce:M.getState().currentTree.version)}for(const ke of B)a.add(ke)}function S(M,U,B){const ee=oV(n);let Z=!0,ae=!0;const he=()=>{ee(),ae=!1};let se,Ce=!1,je;const Se={loadingDepKey:null,loadingDepPromise:null},ke=new Map;function Le({key:ft}){const P=Qc(M,U,ft);switch(ke.set(ft,P),Z||(w(M,U,new Set(ke.keys()),B),b(M,B)),P.state){case"hasValue":return P.contents;case"hasError":throw P.contents;case"loading":throw Se.loadingDepKey=ft,Se.loadingDepPromise=P.contents,P.contents}throw Ee("Invalid Loadable state")}const En=ft=>(...P)=>{if(ae)throw Ee("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&&Dl(!1),rV(M,ft,P,{node:t})};try{se=r({get:Le,getCallback:En}),se=tV(se)?Le(se):se,GU(se)&&(se.state==="hasError"&&(Ce=!0),se=se.contents),He(se)?se=_(M,se,U,ke,B,Se).finally(he):he(),se=se instanceof WR?se.value:se}catch(ft){se=ft,He(se)?se=x(M,se,U,ke,B,Se).finally(he):(Ce=!0,he())}return Ce?je=Yc(se):He(se)?je=KU(se):je=rm(se),Z=!1,T(M,B,ke),w(M,U,new Set(ke.keys()),B),[je,ke]}function A(M,U){let B=U.atomValues.get(n);if(B!=null)return B;const ee=new Set;try{B=s.get(ae=>(typeof ae!="string"&&Dl(!1),Qc(M,U,ae).contents),{onNodeVisit:ae=>{ae.type==="branch"&&ae.nodeKey!==n&&ee.add(ae.nodeKey)}})}catch(ae){throw Ee(`Problem with cache lookup for selector "${n}": ${ae.message}`)}if(B){var Z;U.atomValues.set(n,B),w(M,U,ee,(Z=O(M))===null||Z===void 0?void 0:Z.executionID)}return B}function C(M,U){const B=A(M,U);if(B!=null)return $(M),B;const ee=R(M,U);if(ee!=null){var Z;return((Z=ee.loadingLoadable)===null||Z===void 0?void 0:Z.state)==="loading"&&h(M,ee.executionID),ee.loadingLoadable}const ae=iV(),[he,se]=S(M,U,ae);return he.state==="loading"?(k(M,ae,he,se,U),h(M,ae)):($(M),G(U,he,se)),he}function R(M,U){const B=mR([u.has(M)?[Qe(u.get(M))]:[],yh(B_(u,([Z])=>Z!==M),([,Z])=>Z)]);function ee(Z){for(const[ae,he]of Z)if(!Qc(M,U,ae).is(he))return!0;return!1}for(const Z of B){if(Z.stateVersions.get(U.version)||!ee(Z.depValuesDiscoveredSoFarDuringAsyncWork))return Z.stateVersions.set(U.version,!0),Z;Z.stateVersions.set(U.version,!1)}}function O(M){return u.get(M)}function k(M,U,B,ee,Z){u.set(M,{depValuesDiscoveredSoFarDuringAsyncWork:ee,executionID:U,loadingLoadable:B,stateVersions:new Map([[Z.version,!0]])})}function T(M,U,B){if(j(M,U)){const ee=O(M);ee!=null&&(ee.depValuesDiscoveredSoFarDuringAsyncWork=B)}}function $(M){u.delete(M)}function j(M,U){var B;return U===((B=O(M))===null||B===void 0?void 0:B.executionID)}function L(M){return Array.from(M.entries()).map(([U,B])=>[U,B.contents])}function G(M,U,B){M.atomValues.set(n,U);try{s.set(L(B),U)}catch(ee){throw Ee(`Problem with setting cache for selector "${n}": ${ee.message}`)}}function W(M){if(_l.includes(n)){const U=`Recoil selector has circular dependencies: ${_l.slice(_l.indexOf(n)).join(" → ")}`;return Yc(Ee(U))}_l.push(n);try{return M()}finally{_l.pop()}}function V(M,U){const B=U.atomValues.get(n);return B??s.get(ee=>{var Z;return typeof ee!="string"&&Dl(!1),(Z=YU(M,U,ee))===null||Z===void 0?void 0:Z.contents})}function K(M,U){return W(()=>C(M,U))}function Y(M){M.atomValues.delete(n)}function oe(M,U){t==null&&Dl(!1);for(const ee of a){var B;const Z=eV(ee);(B=Z.clearCache)===null||B===void 0||B.call(Z,M,U)}a.clear(),Y(U),s.clear(),ew(M,t)}return i!=null?t=J2({key:n,nodeType:"selector",peek:V,get:K,set:(U,B,ee)=>{let Z=!1;const ae=new Map;function he({key:Se}){if(Z)throw Ee("Recoil: Async selector sets are not currently supported.");const ke=Qc(U,B,Se);if(ke.state==="hasValue")return ke.contents;if(ke.state==="loading"){const Le=`Getting value of asynchronous atom or selector "${Se}" in a pending state while setting selector "${n}" is not yet supported.`;throw Ee(Le)}else throw ke.contents}function se(Se,ke){if(Z)throw Ee("Recoil: Async selector sets are not currently supported.");const Le=typeof ke=="function"?ke(he(Se)):ke;QU(U,B,Se.key,Le).forEach((ft,P)=>ae.set(P,ft))}function Ce(Se){se(Se,ZU)}const je=i({set:se,get:he,reset:Ce},ee);if(je!==void 0)throw He(je)?Ee("Recoil: Async selector sets are not currently supported."):Ee("Recoil: selector set should be a void function.");return Z=!0,ae},init:f,invalidate:Y,clearCache:oe,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l}):t=J2({key:n,nodeType:"selector",peek:V,get:K,init:f,invalidate:Y,clearCache:oe,shouldDeleteConfigOnRelease:p,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:l})}KR.value=e=>new WR(e);var Es=KR;const{isLoadable:aV,loadableWithError:om,loadableWithPromise:im,loadableWithValue:ba}=nc,{WrappedValue:YR}=BR,{peekNodeInfo:sV}=ui,{DEFAULT_VALUE:xi,DefaultValue:Ao,getConfigDeletionHandler:QR,registerNode:lV,setConfigDeletionHandler:uV}=cn,{isRecoilValue:cV}=xs,{getRecoilValueAsLoadable:dV,markRecoilValueModified:fV,setRecoilValue:tw,setRecoilValueLoadable:pV}=Mr,{retainedByOptionWithDefault:hV}=ua,bl=e=>e instanceof YR?e.value:e;function gV(e){const{key:t,persistence_UNSTABLE:n}=e,r=hV(e.retainedBy_UNSTABLE);let o=0;function i(h){return im(h.then(_=>(a=ba(_),_)).catch(_=>{throw a=om(_),_}))}let a=He(e.default)?i(e.default):aV(e.default)?e.default.state==="loading"?i(e.default.contents):e.default:ba(bl(e.default));a.contents;let s;const l=new Map;function u(h){return h}function c(h,_){const x=_.then(w=>{var S,A;return((A=((S=h.getState().nextTree)!==null&&S!==void 0?S:h.getState().currentTree).atomValues.get(t))===null||A===void 0?void 0:A.contents)===x&&tw(h,y,w),w}).catch(w=>{var S,A;throw((A=((S=h.getState().nextTree)!==null&&S!==void 0?S:h.getState().currentTree).atomValues.get(t))===null||A===void 0?void 0:A.contents)===x&&pV(h,y,om(w)),w});return x}function d(h,_,x){var w;o++;const S=()=>{var $;o--,($=l.get(h))===null||$===void 0||$.forEach(j=>j()),l.delete(h)};if(h.getState().knownAtoms.add(t),a.state==="loading"){const $=()=>{var j;((j=h.getState().nextTree)!==null&&j!==void 0?j:h.getState().currentTree).atomValues.has(t)||fV(h,y)};a.contents.finally($)}const A=(w=e.effects)!==null&&w!==void 0?w:e.effects_UNSTABLE;if(A!=null){let W=function(U){if(j&&U.key===t){const B=$;return B instanceof Ao?f(h,_):He(B)?im(B.then(ee=>ee instanceof Ao?a.toPromise():ee)):ba(B)}return dV(h,U)},V=function(U){return W(U).toPromise()},K=function(U){var B;const ee=sV(h,(B=h.getState().nextTree)!==null&&B!==void 0?B:h.getState().currentTree,U.key);return j&&U.key===t&&!($ instanceof Ao)?{...ee,isSet:!0,loadable:W(U)}:ee};var O=W,k=V,T=K;let $=xi,j=!0,L=!1,G=null;const Y=U=>B=>{if(j){const ee=W(y),Z=ee.state==="hasValue"?ee.contents:xi;$=typeof B=="function"?B(Z):B,He($)&&($=$.then(ae=>(G={effect:U,value:ae},ae)))}else{if(He(B))throw Ee("Setting atoms to async values is not implemented.");typeof B!="function"&&(G={effect:U,value:bl(B)}),tw(h,y,typeof B=="function"?ee=>{const Z=bl(B(ee));return G={effect:U,value:Z},Z}:bl(B))}},oe=U=>()=>Y(U)(xi),M=U=>B=>{var ee;const{release:Z}=h.subscribeToTransactions(ae=>{var he;let{currentTree:se,previousTree:Ce}=ae.getState();Ce||(Ce=se);const je=(he=se.atomValues.get(t))!==null&&he!==void 0?he:a;if(je.state==="hasValue"){var Se,ke,Le,En;const ft=je.contents,P=(Se=Ce.atomValues.get(t))!==null&&Se!==void 0?Se:a,z=P.state==="hasValue"?P.contents:xi;((ke=G)===null||ke===void 0?void 0:ke.effect)!==U||((Le=G)===null||Le===void 0?void 0:Le.value)!==ft?B(ft,z,!se.atomValues.has(t)):((En=G)===null||En===void 0?void 0:En.effect)===U&&(G=null)}},t);l.set(h,[...(ee=l.get(h))!==null&&ee!==void 0?ee:[],Z])};for(const U of A)try{const B=U({node:y,storeID:h.storeID,parentStoreID_UNSTABLE:h.parentStoreID,trigger:x,setSelf:Y(U),resetSelf:oe(U),onSet:M(U),getPromise:V,getLoadable:W,getInfo_UNSTABLE:K});if(B!=null){var C;l.set(h,[...(C=l.get(h))!==null&&C!==void 0?C:[],B])}}catch(B){$=B,L=!0}if(j=!1,!($ instanceof Ao)){var R;const U=L?om($):He($)?im(c(h,$)):ba(bl($));U.contents,_.atomValues.set(t,U),(R=h.getState().nextTree)===null||R===void 0||R.atomValues.set(t,U)}}return S}function f(h,_){var x,w;return(x=(w=_.atomValues.get(t))!==null&&w!==void 0?w:s)!==null&&x!==void 0?x:a}function p(h,_){if(_.atomValues.has(t))return Qe(_.atomValues.get(t));if(_.nonvalidatedAtoms.has(t)){if(s!=null)return s;if(n==null)return a;const x=_.nonvalidatedAtoms.get(t),w=n.validator(x,xi);return s=w instanceof Ao?a:ba(w),s}else return a}function g(){s=void 0}function v(h,_,x){if(_.atomValues.has(t)){const w=Qe(_.atomValues.get(t));if(w.state==="hasValue"&&x===w.contents)return new Map}else if(!_.nonvalidatedAtoms.has(t)&&x instanceof Ao)return new Map;return s=void 0,new Map().set(t,ba(x))}function b(){return QR(t)!==void 0&&o<=0}const y=lV({key:t,nodeType:"atom",peek:f,get:p,set:v,init:d,invalidate:g,shouldDeleteConfigOnRelease:b,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 y}function J_(e){const{...t}=e,n="default"in e?e.default:new Promise(()=>{});return cV(n)?mV({...t,default:n}):gV({...t,default:n})}function mV(e){const t=J_({...e,default:xi,persistence_UNSTABLE:e.persistence_UNSTABLE===void 0?void 0:{...e.persistence_UNSTABLE,validator:r=>r instanceof Ao?r:Qe(e.persistence_UNSTABLE).validator(r,xi)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Es({key:`${e.key}__withFallback`,get:({get:r})=>{const o=r(t);return o instanceof Ao?e.default:o},set:({set:r},o)=>r(t,o),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return uV(n.key,QR(e.key)),n}J_.value=e=>new YR(e);var XR=J_;class yV{constructor(t){var n;we(this,"_map",void 0),we(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 vV={MapCache:yV},_V=vV.MapCache,bV=Object.freeze({__proto__:null,MapCache:_V});const{LRUCache:nw}=qR,{MapCache:xV}=bV,Zc={equality:"reference",eviction:"none",maxSize:1/0};function wV({equality:e=Zc.equality,eviction:t=Zc.eviction,maxSize:n=Zc.maxSize}=Zc){const r=SV(e);return EV(t,n,r)}function SV(e){switch(e){case"reference":return t=>t;case"value":return t=>Th(t)}throw Ee(`Unrecognized equality policy ${e}`)}function EV(e,t,n){switch(e){case"keep-all":return new xV({mapKey:n});case"lru":return new nw({mapKey:n,maxSize:Qe(t)});case"most-recent":return new nw({mapKey:n,maxSize:1})}throw Ee(`Unrecognized eviction policy ${e}`)}var ZR=wV;const{setConfigDeletionHandler:AV}=cn;function CV(e){var t,n;const r=ZR({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i,a;const s=r.get(o);if(s!=null)return s;const{cachePolicyForParams_UNSTABLE:l,...u}=e,c="default"in e?e.default:new Promise(()=>{}),d=XR({...u,key:`${e.key}__${(i=Th(o))!==null&&i!==void 0?i:"void"}`,default:typeof c=="function"?c(o):c,retainedBy_UNSTABLE:typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE,effects:typeof e.effects=="function"?e.effects(o):typeof e.effects_UNSTABLE=="function"?e.effects_UNSTABLE(o):(a=e.effects)!==null&&a!==void 0?a:e.effects_UNSTABLE});return r.set(o,d),AV(d.key,()=>{r.delete(o)}),d}}var OV=CV;const{setConfigDeletionHandler:RV}=cn;let kV=0;function TV(e){var t,n;const r=ZR({equality:(t=(n=e.cachePolicyForParams_UNSTABLE)===null||n===void 0?void 0:n.equality)!==null&&t!==void 0?t:"value",eviction:"keep-all"});return o=>{var i;let a;try{a=r.get(o)}catch(f){throw Ee(`Problem with cache lookup for selector ${e.key}: ${f.message}`)}if(a!=null)return a;const s=`${e.key}__selectorFamily/${(i=Th(o,{allowFunctions:!0}))!==null&&i!==void 0?i:"void"}/${kV++}`,l=f=>e.get(o)(f),u=e.cachePolicy_UNSTABLE,c=typeof e.retainedBy_UNSTABLE=="function"?e.retainedBy_UNSTABLE(o):e.retainedBy_UNSTABLE;let d;if(e.set!=null){const f=e.set;d=Es({key:s,get:l,set:(g,v)=>f(o)(g,v),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else d=Es({key:s,get:l,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return r.set(o,d),RV(d.key,()=>{r.delete(o)}),d}}var ci=TV;const $V=ci({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});function PV(e){return $V(e)}var MV=PV;const NV=ci({key:"__error",get:e=>()=>{throw Ee(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});function LV(e){return NV(e)}var DV=LV;function IV(e){return e}var jV=IV;const{loadableWithError:JR,loadableWithPromise:e3,loadableWithValue:t3}=nc;function $h(e,t){const n=Array(t.length).fill(void 0),r=Array(t.length).fill(void 0);for(const[o,i]of t.entries())try{n[o]=e(i)}catch(a){r[o]=a}return[n,r]}function FV(e){return e!=null&&!He(e)}function Ph(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map(t=>e[t])}function H0(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce((n,r,o)=>({...n,[r]:t[o]}),{})}function os(e,t,n){const r=n.map((o,i)=>o==null?t3(t[i]):He(o)?e3(o):JR(o));return H0(e,r)}function UV(e,t){return t.map((n,r)=>n===void 0?e[r]:n)}const VV=ci({key:"__waitForNone",get:e=>({get:t})=>{const n=Ph(e),[r,o]=$h(t,n);return os(e,r,o)},dangerouslyAllowMutability:!0}),zV=ci({key:"__waitForAny",get:e=>({get:t})=>{const n=Ph(e),[r,o]=$h(t,n);return o.some(i=>!He(i))?os(e,r,o):new Promise(i=>{for(const[a,s]of o.entries())He(s)&&s.then(l=>{r[a]=l,o[a]=void 0,i(os(e,r,o))}).catch(l=>{o[a]=l,i(os(e,r,o))})})},dangerouslyAllowMutability:!0}),BV=ci({key:"__waitForAll",get:e=>({get:t})=>{const n=Ph(e),[r,o]=$h(t,n);if(o.every(a=>a==null))return H0(e,r);const i=o.find(FV);if(i!=null)throw i;return Promise.all(o).then(a=>H0(e,UV(r,a)))},dangerouslyAllowMutability:!0}),HV=ci({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=Ph(e),[r,o]=$h(t,n);return o.every(i=>!He(i))?os(e,r,o):Promise.all(o.map((i,a)=>He(i)?i.then(s=>{r[a]=s,o[a]=void 0}).catch(s=>{r[a]=void 0,o[a]=s}):null)).then(()=>os(e,r,o))},dangerouslyAllowMutability:!0}),qV=ci({key:"__noWait",get:e=>({get:t})=>{try{return Es.value(t3(t(e)))}catch(n){return Es.value(He(n)?e3(n):JR(n))}},dangerouslyAllowMutability:!0});var WV={waitForNone:VV,waitForAny:zV,waitForAll:BV,waitForAllSettled:HV,noWait:qV};const{RecoilLoadable:GV}=nc,{DefaultValue:KV}=cn,{RecoilRoot:YV,useRecoilStoreID:QV}=fo,{isRecoilValue:XV}=xs,{retentionZone:ZV}=_h,{freshSnapshot:JV}=Ah,{useRecoilState:ez,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:tz,useRecoilStateLoadable:nz,useRecoilValue:rz,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:oz,useRecoilValueLoadable:iz,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:az,useResetRecoilState:sz,useSetRecoilState:lz}=v9,{useGotoRecoilSnapshot:uz,useRecoilSnapshot:cz,useRecoilTransactionObserver:dz}=jR,{useRecoilCallback:fz}=zR,{noWait:pz,waitForAll:hz,waitForAllSettled:gz,waitForAny:mz,waitForNone:yz}=WV;var e5={DefaultValue:KV,isRecoilValue:XV,RecoilLoadable:GV,RecoilEnv:Vs,RecoilRoot:YV,useRecoilStoreID:QV,useRecoilBridgeAcrossReactRoots_UNSTABLE:q9,atom:XR,selector:Es,atomFamily:OV,selectorFamily:ci,constSelector:MV,errorSelector:DV,readOnlySelector:jV,noWait:pz,waitForNone:yz,waitForAny:mz,waitForAll:hz,waitForAllSettled:gz,useRecoilValue:rz,useRecoilValueLoadable:iz,useRecoilState:ez,useRecoilStateLoadable:nz,useSetRecoilState:lz,useResetRecoilState:sz,useGetRecoilValueInfo_UNSTABLE:F9,useRecoilRefresher_UNSTABLE:bU,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:az,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:oz,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:tz,useRecoilCallback:fz,useRecoilTransaction_UNSTABLE:AU,useGotoRecoilSnapshot:uz,useRecoilSnapshot:cz,useRecoilTransactionObserver_UNSTABLE:dz,snapshot_UNSTABLE:JV,useRetain:K_,retentionZone:ZV},vz=e5.RecoilRoot,n3=e5.atom,rw=e5.useRecoilState;class lc{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const ku=typeof window>"u"||"Deno"in window;function Tn(){}function _z(e,t){return typeof e=="function"?e(t):e}function q0(e){return typeof e=="number"&&e>=0&&e!==1/0}function r3(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Il(e,t,n){return Mh(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Co(e,t,n){return Mh(e)?[{...t,queryKey:e},n]:[e||{},t]}function ow(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:i,queryKey:a,stale:s}=e;if(Mh(a)){if(r){if(t.queryHash!==t5(a,t.options))return!1}else if(!Pf(t.queryKey,a))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof s=="boolean"&&t.isStale()!==s||typeof o<"u"&&o!==t.state.fetchStatus||i&&!i(t))}function iw(e,t){const{exact:n,fetching:r,predicate:o,mutationKey:i}=e;if(Mh(i)){if(!t.options.mutationKey)return!1;if(n){if(Ti(t.options.mutationKey)!==Ti(i))return!1}else if(!Pf(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||o&&!o(t))}function t5(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ti)(e)}function Ti(e){return JSON.stringify(e,(t,n)=>G0(n)?Object.keys(n).sort().reduce((r,o)=>(r[o]=n[o],r),{}):n)}function Pf(e,t){return o3(e,t)}function o3(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!o3(e[n],t[n])):!1}function i3(e,t){if(e===t)return e;const n=aw(e)&&aw(t);if(n||G0(e)&&G0(t)){const r=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),i=o.length,a=n?[]:{};let s=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!sw(n)||!n.hasOwnProperty("isPrototypeOf"))}function sw(e){return Object.prototype.toString.call(e)==="[object Object]"}function Mh(e){return Array.isArray(e)}function a3(e){return new Promise(t=>{setTimeout(t,e)})}function lw(e){a3(0).then(e)}function bz(){if(typeof AbortController=="function")return new AbortController}function K0(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?i3(e,t):t}class xz extends lc{constructor(){super(),this.setup=t=>{if(!ku&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Mf=new xz,uw=["online","offline"];class wz extends lc{constructor(){super(),this.setup=t=>{if(!ku&&window.addEventListener){const n=()=>t();return uw.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{uw.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Nf=new wz;function Sz(e){return Math.min(1e3*2**e,3e4)}function Nh(e){return(e??"online")==="online"?Nf.isOnline():!0}class s3{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Pd(e){return e instanceof s3}function l3(e){let t=!1,n=0,r=!1,o,i,a;const s=new Promise((b,y)=>{i=b,a=y}),l=b=>{r||(p(new s3(b)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},d=()=>!Mf.isFocused()||e.networkMode!=="always"&&!Nf.isOnline(),f=b=>{r||(r=!0,e.onSuccess==null||e.onSuccess(b),o==null||o(),i(b))},p=b=>{r||(r=!0,e.onError==null||e.onError(b),o==null||o(),a(b))},g=()=>new Promise(b=>{o=y=>{const h=r||!d();return h&&b(y),h},e.onPause==null||e.onPause()}).then(()=>{o=void 0,r||e.onContinue==null||e.onContinue()}),v=()=>{if(r)return;let b;try{b=e.fn()}catch(y){b=Promise.reject(y)}Promise.resolve(b).then(f).catch(y=>{var h,_;if(r)return;const x=(h=e.retry)!=null?h:3,w=(_=e.retryDelay)!=null?_:Sz,S=typeof w=="function"?w(n,y):w,A=x===!0||typeof x=="number"&&n{if(d())return g()}).then(()=>{t?p(y):v()})})};return Nh(e.networkMode)?v():g().then(v),{promise:s,cancel:l,continue:()=>(o==null?void 0:o())?s:Promise.resolve(),cancelRetry:u,continueRetry:c}}const n5=console;function Ez(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const o=c=>{let d;t++;try{d=c()}finally{t--,t||s()}return d},i=c=>{t?e.push(c):lw(()=>{n(c)})},a=c=>(...d)=>{i(()=>{c(...d)})},s=()=>{const c=e;e=[],c.length&&lw(()=>{r(()=>{c.forEach(d=>{n(d)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const ut=Ez();class u3{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),q0(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(ku?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class Az extends u3{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||n5,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||Cz(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=K0(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Tn).catch(Tn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!r3(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}const a=bz(),s={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};l(s);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(s)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u};if(l(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=c.fetchOptions)==null?void 0:o.meta)){var d;this.dispatch({type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta})}const f=p=>{if(Pd(p)&&p.silent||this.dispatch({type:"error",error:p}),!Pd(p)){var g,v,b,y;(g=(v=this.cache.config).onError)==null||g.call(v,p,this),(b=(y=this.cache.config).onSettled)==null||b.call(y,this.state.data,p,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=l3({fn:c.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:p=>{var g,v,b,y;if(typeof p>"u"){f(new Error(this.queryHash+" data is undefined"));return}this.setData(p),(g=(v=this.cache.config).onSuccess)==null||g.call(v,p,this),(b=(y=this.cache.config).onSettled)==null||b.call(y,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:f,onFail:(p,g)=>{this.dispatch({type:"failed",failureCount:p,error:g})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var o,i;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,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=t.meta)!=null?o:null,fetchStatus:Nh(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return Pd(a)&&a.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ut.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function Cz(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",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":"loading",fetchStatus:"idle"}}class Oz extends lc{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var o;const i=n.queryKey,a=(o=n.queryHash)!=null?o:t5(i,n);let s=this.get(a);return s||(s=new Az({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(s)),s}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){ut.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Co(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(o=>ow(r,o))}findAll(t,n){const[r]=Co(t,n);return Object.keys(r).length>0?this.queries.filter(o=>ow(r,o)):this.queries}notify(t){ut.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){ut.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ut.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Rz extends u3{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||n5,this.observers=[],this.state=t.state||kz(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var A;return this.retryer=l3({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(C,R)=>{this.dispatch({type:"failed",failureCount:C,error:R})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(A=this.options.retry)!=null?A:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,o,i,a,s,l,u,c;if(!n){var d,f,p,g;this.dispatch({type:"loading",variables:this.options.variables}),await((d=(f=this.mutationCache.config).onMutate)==null?void 0:d.call(f,this.state.variables,this));const C=await((p=(g=this.options).onMutate)==null?void 0:p.call(g,this.state.variables));C!==this.state.context&&this.dispatch({type:"loading",context:C,variables:this.state.variables})}const A=await t();return await((r=(o=this.mutationCache.config).onSuccess)==null?void 0:r.call(o,A,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,A,this.state.variables,this.state.context)),await((s=(l=this.mutationCache.config).onSettled)==null?void 0:s.call(l,A,null,this.state.variables,this.state.context,this)),await((u=(c=this.options).onSettled)==null?void 0:u.call(c,A,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:A}),A}catch(A){try{var v,b,y,h,_,x,w,S;throw await((v=(b=this.mutationCache.config).onError)==null?void 0:v.call(b,A,this.state.variables,this.state.context,this)),await((y=(h=this.options).onError)==null?void 0:y.call(h,A,this.state.variables,this.state.context)),await((_=(x=this.mutationCache.config).onSettled)==null?void 0:_.call(x,void 0,A,this.state.variables,this.state.context,this)),await((w=(S=this.options).onSettled)==null?void 0:w.call(S,void 0,A,this.state.variables,this.state.context)),A}finally{this.dispatch({type:"error",error:A})}}}dispatch(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"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Nh(this.options.networkMode),status:"loading",variables:t.variables};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"};case"setState":return{...r,...t.state}}};this.state=n(this.state),ut.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function kz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class Tz extends lc{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const o=new Rz({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(o),o}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){ut.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>iw(t,n))}findAll(t){return this.mutations.filter(n=>iw(t,n))}notify(t){ut.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return ut.batch(()=>n.reduce((r,o)=>r.then(()=>o.continue().catch(Tn)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function $z(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,o,i,a;const s=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(o=r.meta)==null?void 0:o.fetchMore,u=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",d=(l==null?void 0:l.direction)==="backward",f=((i=e.state.data)==null?void 0:i.pages)||[],p=((a=e.state.data)==null?void 0:a.pageParams)||[];let g=p,v=!1;const b=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>{var A;if((A=e.signal)!=null&&A.aborted)v=!0;else{var C;(C=e.signal)==null||C.addEventListener("abort",()=>{v=!0})}return e.signal}})},y=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),h=(S,A,C,R)=>(g=R?[A,...g]:[...g,A],R?[C,...S]:[...S,C]),_=(S,A,C,R)=>{if(v)return Promise.reject("Cancelled");if(typeof C>"u"&&!A&&S.length)return Promise.resolve(S);const O={queryKey:e.queryKey,pageParam:C,meta:e.options.meta};b(O);const k=y(O);return Promise.resolve(k).then($=>h(S,C,$,R))};let x;if(!f.length)x=_([]);else if(c){const S=typeof u<"u",A=S?u:cw(e.options,f);x=_(f,S,A)}else if(d){const S=typeof u<"u",A=S?u:Pz(e.options,f);x=_(f,S,A,!0)}else{g=[];const S=typeof e.options.getNextPageParam>"u";x=(s&&f[0]?s(f[0],0,f):!0)?_([],S,p[0]):Promise.resolve(h([],p[0],f[0]));for(let C=1;C{if(s&&f[C]?s(f[C],C,f):!0){const k=S?p[C]:cw(e.options,R);return _(R,S,k)}return Promise.resolve(h(R,p[C],f[C]))})}return x.then(S=>({pages:S,pageParams:g}))}}}}function cw(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function Pz(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Mz{constructor(t={}){this.queryCache=t.queryCache||new Oz,this.mutationCache=t.mutationCache||new Tz,this.logger=t.logger||n5,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Mf.subscribe(()=>{Mf.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Nf.subscribe(()=>{Nf.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Co(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const o=Il(t,n,r),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const o=r.data;return[n,o]})}setQueryData(t,n,r){const o=this.queryCache.find(t),i=o==null?void 0:o.state.data,a=_z(n,i);if(typeof a>"u")return;const s=Il(t),l=this.defaultQueryOptions(s);return this.queryCache.build(this,l).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return ut.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:o})=>[o,this.setQueryData(o,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Co(t,n),o=this.queryCache;ut.batch(()=>{o.findAll(r).forEach(i=>{o.remove(i)})})}resetQueries(t,n,r){const[o,i]=Co(t,n,r),a=this.queryCache,s={type:"active",...o};return ut.batch(()=>(a.findAll(o).forEach(l=>{l.reset()}),this.refetchQueries(s,i)))}cancelQueries(t,n,r){const[o,i={}]=Co(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=ut.batch(()=>this.queryCache.findAll(o).map(s=>s.cancel(i)));return Promise.all(a).then(Tn).catch(Tn)}invalidateQueries(t,n,r){const[o,i]=Co(t,n,r);return ut.batch(()=>{var a,s;if(this.queryCache.findAll(o).forEach(u=>{u.invalidate()}),o.refetchType==="none")return Promise.resolve();const l={...o,type:(a=(s=o.refetchType)!=null?s:o.type)!=null?a:"active"};return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[o,i]=Co(t,n,r),a=ut.batch(()=>this.queryCache.findAll(o).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...i,cancelRefetch:(u=i==null?void 0:i.cancelRefetch)!=null?u:!0,meta:{refetchPage:o.refetchPage}})}));let s=Promise.all(a).then(Tn);return i!=null&&i.throwOnError||(s=s.catch(Tn)),s}fetchQuery(t,n,r){const o=Il(t,n,r),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Tn).catch(Tn)}fetchInfiniteQuery(t,n,r){const o=Il(t,n,r);return o.behavior=$z(),this.fetchQuery(o)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Tn).catch(Tn)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(o=>Ti(t)===Ti(o.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Pf(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(o=>Ti(t)===Ti(o.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Pf(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=t5(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class Nz extends lc{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),dw(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Y0(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Y0(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),W0(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&fw(this.currentQuery,o,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==r.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return Dz(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Tn)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),ku||this.currentResult.isStale||!q0(this.options.staleTime))return;const n=r3(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(ku||this.options.enabled===!1||!q0(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Mf.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,s=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:d}=t;let{dataUpdatedAt:f,error:p,errorUpdatedAt:g,fetchStatus:v,status:b}=d,y=!1,h=!1,_;if(n._optimisticResults){const C=this.hasListeners(),R=!C&&dw(t,n),O=C&&fw(t,r,n,o);(R||O)&&(v=Nh(t.options.networkMode)?"fetching":"paused",f||(b="loading")),n._optimisticResults==="isRestoring"&&(v="idle")}if(n.keepPreviousData&&!d.dataUpdatedAt&&c!=null&&c.isSuccess&&b!=="error")_=c.data,f=c.dataUpdatedAt,b=c.status,y=!0;else if(n.select&&typeof d.data<"u")if(i&&d.data===(a==null?void 0:a.data)&&n.select===this.selectFn)_=this.selectResult;else try{this.selectFn=n.select,_=n.select(d.data),_=K0(i==null?void 0:i.data,_,n),this.selectResult=_,this.selectError=null}catch(C){this.selectError=C}else _=d.data;if(typeof n.placeholderData<"u"&&typeof _>"u"&&b==="loading"){let C;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(s==null?void 0:s.placeholderData))C=i.data;else if(C=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof C<"u")try{C=n.select(C),this.selectError=null}catch(R){this.selectError=R}typeof C<"u"&&(b="success",_=K0(i==null?void 0:i.data,C,n),h=!0)}this.selectError&&(p=this.selectError,_=this.selectResult,g=Date.now(),b="error");const x=v==="fetching",w=b==="loading",S=b==="error";return{status:b,fetchStatus:v,isLoading:w,isSuccess:b==="success",isError:S,isInitialLoading:w&&x,data:_,dataUpdatedAt:f,error:p,errorUpdatedAt:g,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:x,isRefetching:x&&!w,isLoadingError:S&&d.dataUpdatedAt===0,isPaused:v==="paused",isPlaceholderData:h,isPreviousData:y,isRefetchError:S&&d.dataUpdatedAt!==0,isStale:r5(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,W0(r,n))return;this.currentResult=r;const o={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.trackedProps.size)return!0;const l=new Set(s??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const c=u;return this.currentResult[c]!==n[c]&&l.has(c)})};(t==null?void 0:t.listeners)!==!1&&i()&&(o.listeners=!0),this.notify({...o,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!Pd(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){ut.batch(()=>{if(t.onSuccess){var n,r,o,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(t.onError){var a,s,l,u;(a=(s=this.options).onError)==null||a.call(s,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:c})=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Lz(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function dw(e,t){return Lz(e,t)||e.state.dataUpdatedAt>0&&Y0(e,t,t.refetchOnMount)}function Y0(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&r5(e,t)}return!1}function fw(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&r5(e,n)}function r5(e,t){return e.isStaleByTime(t.staleTime)}function Dz(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:!W0(e.getCurrentResult(),t)}var c3={exports:{}},d3={};/**
+ * @license React
+ * use-sync-external-store-shim.production.min.js
+ *
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */var As=H;function Iz(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jz=typeof Object.is=="function"?Object.is:Iz,Fz=As.useState,Uz=As.useEffect,Vz=As.useLayoutEffect,zz=As.useDebugValue;function Bz(e,t){var n=t(),r=Fz({inst:{value:n,getSnapshot:t}}),o=r[0].inst,i=r[1];return Vz(function(){o.value=n,o.getSnapshot=t,am(o)&&i({inst:o})},[e,n,t]),Uz(function(){return am(o)&&i({inst:o}),e(function(){am(o)&&i({inst:o})})},[e]),zz(n),n}function am(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jz(e,n)}catch{return!0}}function Hz(e,t){return t()}var qz=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Hz:Bz;d3.useSyncExternalStore=As.useSyncExternalStore!==void 0?As.useSyncExternalStore:qz;c3.exports=d3;var Wz=c3.exports;const Gz=Wz.useSyncExternalStore,pw=H.createContext(void 0),f3=H.createContext(!1);function p3(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=pw),window.ReactQueryClientContext):pw)}const Kz=({context:e}={})=>{const t=H.useContext(p3(e,H.useContext(f3)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Yz=({client:e,children:t,context:n,contextSharing:r=!1})=>{H.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const o=p3(n,r);return H.createElement(f3.Provider,{value:!n&&r},H.createElement(o.Provider,{value:e},t))},h3=H.createContext(!1),Qz=()=>H.useContext(h3);h3.Provider;function Xz(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Zz=H.createContext(Xz()),Jz=()=>H.useContext(Zz);function eB(e,t){return typeof e=="function"?e(...t):!!e}const tB=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},nB=e=>{H.useEffect(()=>{e.clearReset()},[e])},rB=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&eB(n,[e.error,r]),oB=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},iB=(e,t)=>e.isLoading&&e.isFetching&&!t,aB=(e,t,n)=>(e==null?void 0:e.suspense)&&iB(t,n),sB=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function lB(e,t){const n=Kz({context:e.context}),r=Qz(),o=Jz(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=ut.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=ut.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=ut.batchCalls(i.onSettled)),oB(i),tB(i,o),nB(o);const[a]=H.useState(()=>new t(n,i)),s=a.getOptimisticResult(i);if(Gz(H.useCallback(l=>{const u=r?()=>{}:a.subscribe(ut.batchCalls(l));return a.updateResult(),u},[a,r]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),H.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),aB(i,s,r))throw sB(i,a,o);if(rB({result:s,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:a.trackResult(s)}function g3(e,t,n){const r=Il(e,t,n);return lB(r,Nz)}const m3="Starter App",uB="This field is required.",y3=8,cB=`Password must be at least ${y3} characters long`,v3={required:uB},dB={...v3,minLength:{value:y3,message:cB}},fB="/comet-starter/assets/facebook-1522ea1f.svg",pB="/comet-starter/assets/instagram-8f8ac081.svg",hB="/comet-starter/assets/rss_feed-99a55869.svg",gB="/comet-starter/assets/twitter-0314c487.svg",mB="/comet-starter/assets/youtube-7659b4fd.svg",yB="/comet-starter/img/logo.png",vB=()=>{const e=t=>{t.preventDefault(),window.scrollTo(0,0)};return N.jsxs("footer",{className:"usa-footer",children:[N.jsx("div",{className:"grid-container usa-footer__return-to-top",children:N.jsx("a",{href:"/#",onClick:t=>{e(t)},children:"Return to top"})}),N.jsx("div",{className:"usa-footer__primary-section",children:N.jsx("nav",{className:"usa-footer__nav","aria-label":"Footer navigation",children:N.jsxs("ul",{className:"grid-row grid-gap",children:[N.jsx("li",{className:`
+ mobile-lg:grid-col-4
+ desktop:grid-col-auto
+ usa-footer__primary-content
+ `,children:N.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),N.jsx("li",{className:`
+ mobile-lg:grid-col-4
+ desktop:grid-col-auto
+ usa-footer__primary-content
+ `,children:N.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),N.jsx("li",{className:`
+ mobile-lg:grid-col-4
+ desktop:grid-col-auto
+ usa-footer__primary-content
+ `,children:N.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),N.jsx("li",{className:`
+ mobile-lg:grid-col-4
+ desktop:grid-col-auto
+ usa-footer__primary-content
+ `,children:N.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})}),N.jsx("li",{className:`
+ mobile-lg:grid-col-4
+ desktop:grid-col-auto
+ usa-footer__primary-content
+ `,children:N.jsx("a",{className:"usa-footer__primary-link",href:"/#",children:""})})]})})}),N.jsx("div",{className:"usa-footer__secondary-section",children:N.jsx("div",{className:"grid-container",children:N.jsxs("div",{className:"grid-row grid-gap",children:[N.jsxs("div",{className:`
+ usa-footer__logo
+ grid-row
+ mobile-lg:grid-col-6 mobile-lg:grid-gap-2
+ `,children:[N.jsx("div",{className:"mobile-lg:grid-col-auto",children:N.jsx("img",{className:"usa-footer__logo-img",src:yB,alt:"US Flag"})}),N.jsx("div",{className:"mobile-lg:grid-col-auto",children:N.jsx("p",{className:"usa-footer__logo-heading",children:m3})})]}),N.jsxs("div",{className:"usa-footer__contact-links mobile-lg:grid-col-6",children:[N.jsxs("div",{className:"usa-footer__social-links grid-row grid-gap-1",children:[N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{className:"usa-social-link",href:"/#",children:N.jsx("img",{className:"usa-social-link__icon",src:fB,alt:"Facebook"})})}),N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{className:"usa-social-link",href:"/#",children:N.jsx("img",{className:"usa-social-link__icon",src:gB,alt:"Twitter"})})}),N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{className:"usa-social-link",href:"/#",children:N.jsx("img",{className:"usa-social-link__icon",src:mB,alt:"YouTube"})})}),N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{className:"usa-social-link",href:"/#",children:N.jsx("img",{className:"usa-social-link__icon",src:pB,alt:"Instagram"})})}),N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{className:"usa-social-link",href:"/#",children:N.jsx("img",{className:"usa-social-link__icon",src:hB,alt:"RSS"})})})]}),N.jsx("h2",{className:"usa-footer__contact-heading",children:""}),N.jsx("address",{className:"usa-footer__address",children:N.jsxs("div",{className:"usa-footer__contact-info grid-row grid-gap",children:[N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{href:"tel:1-800-555-5555",children:" <(800) 555-GOVT> "})}),N.jsx("div",{className:"grid-col-auto",children:N.jsx("a",{href:"mailto:",children:""})})]})})]})]})})})]})},_B=e=>e&&typeof e=="object"&&e.nodeType===1;var po=(e,t)=>{if(typeof e!="string")return[];(!t||!_B(t))&&(t=window.document);const n=t.querySelectorAll(e);return Array.prototype.slice.call(n)};/*
+object-assign
+(c) Sindre Sorhus
+@license MIT
+*/var hw=Object.getOwnPropertySymbols,bB=Object.prototype.hasOwnProperty,xB=Object.prototype.propertyIsEnumerable;function wB(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function SB(){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(i){return t[i]});if(r.join("")!=="0123456789")return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(i){o[i]=i}),Object.keys(Object.assign({},o)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}var o5=SB()?Object.assign:function(e,t){for(var n,r=wB(e),o,i=1;i-1?e.split(mw).map(function(a){return b3({type:a},i)}):(i.type=e,[i])};var yw=function(e,t){var n=e[t];return delete e[t],n},x3=function(t,n){const r=Object.keys(t).reduce(function(o,i){var a=TB(i,t[i]);return o.concat(a)},[]);return b3({add:function(i){r.forEach(function(a){i.addEventListener(a.type,a.delegate,a.options)})},remove:function(i){r.forEach(function(a){i.removeEventListener(a.type,a.delegate,a.options)})}},n)};const $B=o5,PB=x3,vw=(...e)=>function(n=document.body){e.forEach(r=>{typeof this[r]=="function"&&this[r].call(this,n)})};var wn=(e,t)=>PB(e,$B({on:vw("init","add"),off:vw("teardown","remove")},t));const _w="aria-expanded",MB="aria-controls",bw="hidden";var a5=(e,t)=>{let n=t;typeof n!="boolean"&&(n=e.getAttribute(_w)==="false"),e.setAttribute(_w,n);const r=e.getAttribute(MB),o=document.getElementById(r);if(!o)throw new Error(`No toggle target found with id: "${r}"`);return n?o.removeAttribute(bw):o.setAttribute(bw,""),n};function NB(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 w3=NB,Bs={CLICK:"click"},Wn={prefix:"usa"};const S3=po,LB=wn,xw=a5,DB=w3,{CLICK:IB}=Bs,{prefix:Lf}=Wn,Df=`.${Lf}-accordion, .${Lf}-accordion--bordered`,jB=`.${Lf}-banner__button`,ru=`.${Lf}-accordion__button[aria-controls]:not(${jB})`,ww="aria-expanded",FB="data-allow-multiple",E3=e=>S3(ru,e).filter(n=>n.closest(Df)===e),ou=(e,t)=>{const n=e.closest(Df);let r=t;if(!n)throw new Error(`${ru} is missing outer ${Df}`);r=xw(e,t);const o=n.hasAttribute(FB);r&&!o&&E3(n).forEach(i=>{i!==e&&xw(i,!1)})},UB=e=>ou(e,!0),VB=e=>ou(e,!1),zB=LB({[IB]:{[ru](){ou(this),this.getAttribute(ww)==="true"&&(DB(this)||this.scrollIntoView())}}},{init(e){S3(ru,e).forEach(t=>{const n=t.getAttribute(ww)==="true";ou(t,n)})},ACCORDION:Df,BUTTON:ru,show:UB,hide:VB,toggle:ou,getButtons:E3});var A3=zB;const Sw=uo(A3),BB=wn,HB=po,{CLICK:qB}=Bs,{prefix:C3}=Wn,O3=a5,R3=`.${C3}-banner__header`,k3=`${C3}-banner__header--expanded`,Q0=`${R3} [aria-controls]`,WB=function(t){t.preventDefault();const n=t.target.closest(Q0);O3(n),this.closest(R3).classList.toggle(k3)};var GB=BB({[qB]:{[Q0]:WB}},{init(e){HB(Q0,e).forEach(t=>{const n=t.getAttribute(k3)==="true";O3(t,n)})}});const Ew=uo(GB),KB="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAsBAMAAAAncaPMAAAAAXNSR0IArs4c6QAAABtQTFRF////4EAg2z8g2z8f2z4f2j4fHjSyHjOxHTOxQEYPwgAAAIdJREFUeNrNkUENxDAMBEOhFJaCKZiCKZhCKBj2ebV3rdR71+pIq+Qxj1GyqjJ3U8VlHkc07hFm0awBYe91juq6MSI0yhSAEgkzJ4TMKiXyzFw3pgR9lmIBJlqj2AmBedf+IycExmlKZVzvZEJ4A0oBrjBl/m6PCy95B3fFAN6YuQPxhbcB4QMkEj04wQXD5wAAAABJRU5ErkJggg==",YB="/comet-starter/assets/icon-https-912daff9.svg",QB="/comet-starter/assets/icon-dot-gov-d0228750.svg";var XB=function(t,n=500){let r=null;return(...o)=>{window.clearTimeout(r),r=window.setTimeout(()=>{t.apply(this,o)},n)}};const ZB=po,JB=wn,eH=XB,{prefix:Lh}=Wn,s5=`${Lh}-character-count`,sm=`.${s5}`,X0=`.${Lh}-character-count__field`,Aw=`.${Lh}-character-count__message`,Z0="The content is too long.",T3=`${Lh}-character-count__status--invalid`,l5=`${s5}__status`,u5=`${s5}__sr-status`,tH=`.${l5}`,nH=`.${u5}`,c5="characters allowed",d5=e=>{const t=e.closest(sm);if(!t)throw new Error(`${X0} is missing outer ${sm}`);const n=t.querySelector(Aw);if(!n)throw new Error(`${sm} is missing inner ${Aw}`);return{characterCountEl:t,messageEl:n}},rH=e=>{const{characterCountEl:t}=d5(e),n=e.getAttribute("maxlength");n&&(e.removeAttribute("maxlength"),t.setAttribute("data-maxlength",n))},$3=e=>{const t=document.createElement("div"),n=document.createElement("div"),o=`${e.dataset.maxlength} ${c5}`;t.classList.add(`${l5}`,"usa-hint"),n.classList.add(`${u5}`,"usa-sr-only"),t.setAttribute("aria-hidden",!0),n.setAttribute("aria-live","polite"),t.textContent=o,n.textContent=o,e.append(t,n)},P3=(e,t)=>{let n="";if(e===0)n=`${t} ${c5}`;else{const r=Math.abs(t-e),o=`character${r===1?"":"s"}`,i=e>t?"over limit":"left";n=`${r} ${o} ${i}`}return n},oH=eH((e,t)=>{const n=e;n.textContent=t},1e3),Cw=e=>{const{characterCountEl:t}=d5(e),n=e.value.length,r=parseInt(t.getAttribute("data-maxlength"),10),o=t.querySelector(tH),i=t.querySelector(nH),a=P3(n,r);if(!r)return;const s=n&&n>r;o.textContent=a,oH(i,a),s&&!e.validationMessage&&e.setCustomValidity(Z0),!s&&e.validationMessage===Z0&&e.setCustomValidity(""),o.classList.toggle(T3,s)},iH=e=>{const{characterCountEl:t,messageEl:n}=d5(e);n.classList.add("usa-sr-only"),n.removeAttribute("aria-live"),rH(e),$3(t)};JB({input:{[X0](){Cw(this)}}},{init(e){ZB(X0,e).forEach(t=>iH(t))},MESSAGE_INVALID_CLASS:T3,VALIDATION_MESSAGE:Z0,STATUS_MESSAGE_CLASS:l5,STATUS_MESSAGE_SR_ONLY_CLASS:u5,DEFAULT_STATUS_LABEL:c5,createStatusMessages:$3,getCountMessage:P3,updateCountMessage:Cw});var f5={exports:{}},aH={exports:{}};(function(e,t){(function(){var n={polyfill:i,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 o="";for(r=65;r<91;r++)o=String.fromCharCode(r),n.keys[r]=[o.toLowerCase(),o.toUpperCase()];function i(){if(!("KeyboardEvent"in window)||"key"in KeyboardEvent.prototype)return!1;var a={get:function(s){var l=n.keys[this.which||this.keyCode];return Array.isArray(l)&&(l=l[+this.shiftKey]),l}};return Object.defineProperty(KeyboardEvent.prototype,"key",a),a}e.exports=n})()})(aH);const J0={Alt:"altKey",Control:"ctrlKey",Ctrl:"ctrlKey",Shift:"shiftKey"},M3="+",sH=function(e,t){var n=e.key;if(t)for(var r in J0)e[J0[r]]===!0&&(n=[r,n].join(M3));return n};f5.exports=function(t){const n=Object.keys(t).some(function(r){return r.indexOf(M3)>-1});return function(r){var o=sH(r,n);return[o,o.toLowerCase()].reduce(function(i,a){return a in t&&(i=t[o].call(this,r)),i},void 0)}};f5.exports.MODIFIERS=J0;var Dh=f5.exports;const lH=po,uH=e=>e&&typeof e=="object"&&e.nodeType===1;var ca=(e,t)=>{const n=lH(e,t);return typeof e!="string"||uH(t)&&t.matches(e)&&n.push(t),n},N3={exports:{}};(function(e){N3.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),o=1;o{},Tr=(e,t="")=>{const n=e;n.value=t;const r=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});n.dispatchEvent(r)},At=e=>{const t=e.closest(Yr);if(!t)throw new Error(`Element is missing outer ${Yr}`);const n=t.querySelector(yH),r=t.querySelector(Md),o=t.querySelector(vH),i=t.querySelector(bH),a=t.querySelector(z3),s=t.querySelector(_H),l=t.querySelector(V3),u=t.querySelector(U3),c=t.classList.contains(da),d=t.dataset.disableFiltering==="true";return{comboBoxEl:t,selectEl:n,inputEl:r,listEl:o,statusEl:i,focusedOptionEl:a,selectedOptionEl:s,toggleListBtnEl:l,clearInputBtnEl:u,isPristine:c,disableFiltering:d}},B3=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=At(e);r.hidden=!0,r.disabled=!0,n.disabled=!0,t.disabled=!0},SH=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=At(e);r.hidden=!0,r.setAttribute("aria-disabled",!0),n.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},EH=e=>{const{inputEl:t,toggleListBtnEl:n,clearInputBtnEl:r}=At(e);r.hidden=!1,r.disabled=!1,n.disabled=!1,t.disabled=!1},Rw=e=>{const t=e.closest(Yr);if(t.dataset.enhanced)return;const n=t.querySelector("select");if(!n)throw new Error(`${Yr} is missing inner select`);const r=n.id,o=document.querySelector(`label[for="${r}"]`),i=`${r}--list`,a=`${r}-label`,s=`${r}--assistiveHint`,l=[],{defaultValue:u}=t.dataset,{placeholder:c}=t.dataset;let d;if(c&&l.push({placeholder:c}),u)for(let p=0,g=n.options.length;p{if(n.hasAttribute(p)){const g=n.getAttribute(p);l.push({[p]:g}),n.removeAttribute(p)}});const f=document.createElement("input");if(f.setAttribute("id",r),f.setAttribute("aria-owns",i),f.setAttribute("aria-controls",i),f.setAttribute("aria-autocomplete","list"),f.setAttribute("aria-describedby",s),f.setAttribute("aria-expanded","false"),f.setAttribute("autocapitalize","off"),f.setAttribute("autocomplete","off"),f.setAttribute("class",D3),f.setAttribute("type","text"),f.setAttribute("role","combobox"),l.forEach(p=>Object.keys(p).forEach(g=>{const v=Ow.escapeHTML`${p[g]}`;f.setAttribute(g,v)})),t.insertAdjacentElement("beforeend",f),t.insertAdjacentHTML("beforeend",Ow.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:p}=At(t);Tr(n,d.value),Tr(p,d.text),t.classList.add(da)}n.disabled&&(B3(t),n.disabled=!1),n.hasAttribute("aria-disabled")&&(SH(t),n.removeAttribute("aria-disabled")),t.dataset.enhanced="true"},uc=(e,t,{skipFocus:n,preventScroll:r}={})=>{const{inputEl:o,listEl:i,focusedOptionEl:a}=At(e);if(a&&(a.classList.remove(Ji),a.setAttribute("tabIndex","-1")),t){if(o.setAttribute("aria-activedescendant",t.id),t.setAttribute("tabIndex","0"),t.classList.add(Ji),!r){const s=t.offsetTop+t.offsetHeight,l=i.scrollTop+i.offsetHeight;s>l&&(i.scrollTop=s-i.offsetHeight),t.offsetTop{const r=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");let o=e.replace(/{{(.*?)}}/g,(i,a)=>{const s=a.trim(),l=n[s];if(s!=="query"&&l){const u=new RegExp(l,"i"),c=t.match(u);return c?r(c[1]):""}return r(t)});return o=`^(?:${o})$`,new RegExp(o,"i")},Cs=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r,listEl:o,statusEl:i,isPristine:a,disableFiltering:s}=At(e);let l,u;const c=`${o.id}--option-`,d=(r.value||"").toLowerCase(),f=t.dataset.filter||xH,p=H3(f,d,t.dataset),g=[];for(let _=0,x=n.options.length;_{const w=`${c}${x}`,S=[Tu];let A="-1",C="false";w===l&&(S.push(j3,Ji),A="0",C="true"),!l&&x===0&&(S.push(Ji),A="0");const R=document.createElement("li");return R.setAttribute("aria-setsize",g.length),R.setAttribute("aria-posinset",x+1),R.setAttribute("aria-selected",C),R.setAttribute("id",w),R.setAttribute("class",S.join(" ")),R.setAttribute("tabindex",A),R.setAttribute("role","option"),R.setAttribute("data-value",_.value),R.textContent=_.text,R}),y=document.createElement("li");y.setAttribute("class",`${Tu}--no-results`),y.textContent="No results found",o.hidden=!1,v?(o.innerHTML="",b.forEach(_=>o.insertAdjacentElement("beforeend",_))):(o.innerHTML="",o.insertAdjacentElement("beforeend",y)),r.setAttribute("aria-expanded","true"),i.textContent=v?`${v} result${v>1?"s":""} available.`:"No results.";let h;a&&l?h=o.querySelector(`#${l}`):s&&u&&(h=o.querySelector(`#${u}`)),h&&uc(o,h,{skipFocus:!0})},ea=e=>{const{inputEl:t,listEl:n,statusEl:r,focusedOptionEl:o}=At(e);r.innerHTML="",t.setAttribute("aria-expanded","false"),t.setAttribute("aria-activedescendant",""),o&&o.classList.remove(Ji),n.scrollTop=0,n.hidden=!0},g5=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r}=At(e);Tr(n,e.dataset.value),Tr(r,e.textContent),t.classList.add(da),ea(t),r.focus()},AH=e=>{const{comboBoxEl:t,listEl:n,selectEl:r,inputEl:o}=At(e),i=!n.hidden;r.value&&Tr(r),o.value&&Tr(o),t.classList.remove(da),i&&Cs(t),o.focus()},m5=e=>{const{comboBoxEl:t,selectEl:n,inputEl:r}=At(e),o=n.value,i=(r.value||"").toLowerCase();if(o)for(let a=0,s=n.options.length;a{const{comboBoxEl:t,selectEl:n,inputEl:r,statusEl:o}=At(e);o.textContent="";const i=(r.value||"").toLowerCase();if(i)for(let a=0,s=n.options.length;a{const{comboBoxEl:t,inputEl:n}=At(e.target);ea(t),m5(t),n.focus()},kw=e=>{const{comboBoxEl:t,listEl:n}=At(e.target);n.hidden&&Cs(t);const r=n.querySelector(z3)||n.querySelector(Nd);r&&uc(t,r),e.preventDefault()},RH=e=>{const{comboBoxEl:t,listEl:n}=At(e.target),r=!n.hidden;CH(t),r&&ea(t),e.preventDefault()},Tw=e=>{const t=e.target,n=t.nextSibling;n&&uc(t,n),e.preventDefault()},kH=e=>{g5(e.target),e.preventDefault()},TH=e=>{g5(e.target),e.preventDefault()},$w=e=>{const{comboBoxEl:t,listEl:n,focusedOptionEl:r}=At(e.target),o=r&&r.previousSibling,i=!n.hidden;uc(t,o),i&&e.preventDefault(),o||ea(t)},$H=e=>{e.classList.contains(Ji)||uc(e,e,{preventScroll:!0})},PH=e=>{const{comboBoxEl:t,listEl:n,inputEl:r}=At(e);n.hidden?Cs(t):ea(t),r.focus()},MH=e=>{const{comboBoxEl:t,listEl:n}=At(e);n.hidden&&Cs(t)},NH=dH({[pH]:{[Md](){this.disabled||MH(this)},[V3](){this.disabled||PH(this)},[Nd](){this.disabled||g5(this)},[U3](){this.disabled||AH(this)}},focusout:{[Yr](e){this.contains(e.relatedTarget)||(m5(this),ea(this))}},keydown:{[Yr]:lm({Escape:OH}),[Md]:lm({Enter:RH,ArrowDown:kw,Down:kw}),[Nd]:lm({ArrowUp:$w,Up:$w,ArrowDown:Tw,Down:Tw,Enter:TH," ":kH,"Shift+Tab":wH})},input:{[Md](){this.closest(Yr).classList.remove(da),Cs(this)}},mouseover:{[Nd](){$H(this)}}},{init(e){cH(Yr,e).forEach(t=>{Rw(t)})},getComboBoxContext:At,enhanceComboBox:Rw,generateDynamicRegExp:H3,disable:B3,enable:EH,displayList:Cs,hideList:ea,COMBO_BOX_CLASS:pr});var LH=NH,q3=(e=document)=>e.activeElement;function DH(){return typeof navigator<"u"&&(navigator.userAgent.match(/(iPod|iPhone|iPad)/g)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1)&&!window.MSStream}var IH=DH;const hi=Dh,jH=wn,FH=po,UH=ca,{prefix:VH}=Wn,{CLICK:zH}=Bs,BH=q3,HH=IH,is=Ih,ho=`${VH}-date-picker`,qH=`${ho}__wrapper`,WH=`${ho}--initialized`,W3=`${ho}--active`,G3=`${ho}__internal-input`,K3=`${ho}__external-input`,Y3=`${ho}__button`,st=`${ho}__calendar`,Q3=`${ho}__status`,Gn=`${st}__date`,X3=`${Gn}--focused`,GH=`${Gn}--selected`,KH=`${Gn}--previous-month`,Z3=`${Gn}--current-month`,YH=`${Gn}--next-month`,QH=`${Gn}--range-date`,XH=`${Gn}--today`,ZH=`${Gn}--range-date-start`,JH=`${Gn}--range-date-end`,eq=`${Gn}--within-range`,J3=`${st}__previous-year`,ek=`${st}__previous-month`,tk=`${st}__next-year`,nk=`${st}__next-month`,rk=`${st}__month-selection`,ok=`${st}__year-selection`,jh=`${st}__month`,y5=`${jh}--focused`,tq=`${jh}--selected`,Fh=`${st}__year`,v5=`${Fh}--focused`,nq=`${Fh}--selected`,ik=`${st}__previous-year-chunk`,ak=`${st}__next-year-chunk`,sk=`${st}__date-picker`,lk=`${st}__month-picker`,uk=`${st}__year-picker`,If=`${st}__table`,rq=`${st}__row`,Ca=`${st}__cell`,Jc=`${Ca}--center-items`,oq=`${st}__month-label`,iq=`${st}__day-of-week`,ta=`.${ho}`,ck=`.${Y3}`,aq=`.${G3}`,Ld=`.${K3}`,jf=`.${st}`,sq=`.${Q3}`,Pw=`.${Gn}`,Hs=`.${X3}`,lq=`.${Z3}`,_5=`.${J3}`,b5=`.${ek}`,x5=`.${tk}`,w5=`.${nk}`,dk=`.${ok}`,fk=`.${rk}`,ev=`.${jh}`,Ff=`.${Fh}`,S5=`.${ik}`,E5=`.${ak}`,qs=`.${sk}`,uq=`.${lk}`,A5=`.${uk}`,Uh=`.${y5}`,Ws=`.${v5}`,Mw="Please enter a valid date",tv=["January","February","March","April","May","June","July","August","September","October","November","December"],cq=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dq=13,br=12,fq="0000-01-01",Vh="MM/DD/YYYY",pk="YYYY-MM-DD",pq=":not([disabled])",C5=(...e)=>e.map(t=>t+pq).join(", "),hq=C5(_5,b5,dk,fk,x5,w5,Hs),gq=C5(Uh),mq=C5(S5,E5,Ws),O5=(e,t)=>(t!==e.getMonth()&&e.setDate(0),e),Uf=(e,t,n)=>{const r=new Date(0);return r.setFullYear(e,t,n),r},R5=()=>{const e=new Date,t=e.getDate(),n=e.getMonth(),r=e.getFullYear();return Uf(r,n,t)},k5=e=>{const t=new Date(0);return t.setFullYear(e.getFullYear(),e.getMonth(),1),t},hk=e=>{const t=new Date(0);return t.setFullYear(e.getFullYear(),e.getMonth()+1,0),t},Fi=(e,t)=>{const n=new Date(e.getTime());return n.setDate(n.getDate()+t),n},T5=(e,t)=>Fi(e,-t),gk=(e,t)=>Fi(e,t*7),yq=(e,t)=>gk(e,-t),mk=e=>{const t=e.getDay();return T5(e,t)},vq=e=>{const t=e.getDay();return Fi(e,6-t)},cc=(e,t)=>{const n=new Date(e.getTime()),r=(n.getMonth()+12+t)%12;return n.setMonth(n.getMonth()+t),O5(n,r),n},$5=(e,t)=>cc(e,-t),P5=(e,t)=>cc(e,t*12),yk=(e,t)=>P5(e,-t),Os=(e,t)=>{const n=new Date(e.getTime());return n.setMonth(t),O5(n,t),n},Ko=(e,t)=>{const n=new Date(e.getTime()),r=n.getMonth();return n.setFullYear(t),O5(n,r),n},_q=(e,t)=>{let n=e;return t{let n=e;return t>e&&(n=t),new Date(n.getTime())},vk=(e,t)=>e&&t&&e.getFullYear()===t.getFullYear(),wi=(e,t)=>vk(e,t)&&e.getMonth()===t.getMonth(),xo=(e,t)=>wi(e,t)&&e.getDate()===t.getDate(),Sn=(e,t,n)=>{let r=e;return en&&(r=n),new Date(r.getTime())},nv=(e,t,n)=>e>=t&&(!n||e<=n),xq=(e,t,n)=>hk(e)n,um=(e,t,n)=>hk(Os(e,11))n,nr=(e,t=pk,n=!1)=>{let r,o,i,a,s;if(e){let l,u,c;if(t===Vh?[l,u,c]=e.split("/"):[c,l,u]=e.split("-"),c&&(s=parseInt(c,10),!Number.isNaN(s)&&(a=s,n&&(a=Math.max(0,a),c.length<3)))){const d=R5().getFullYear();a=d-d%10**c.length+s}if(l&&(s=parseInt(l,10),Number.isNaN(s)||(o=s,n&&(o=Math.max(1,o),o=Math.min(12,o)))),o&&u&&a!=null&&(s=parseInt(u,10),!Number.isNaN(s)&&(i=s,n))){const d=Uf(a,o,0).getDate();i=Math.max(1,i),i=Math.min(d,i)}o&&i&&a!=null&&(r=Uf(a,o-1,i))}return r},Rs=(e,t=pk)=>{const n=(a,s)=>`0000${a}`.slice(-s),r=e.getMonth()+1,o=e.getDate(),i=e.getFullYear();return t===Vh?[n(r,2),n(o,2),n(i,4)].join("/"):[n(i,4),n(r,2),n(o,2)].join("-")},M5=(e,t)=>{const n=[];let r=[],o=0;for(;o{i.insertAdjacentElement("beforeend",a)}),n.push(i)}return n},N5=e=>{const t=document.createElement("tbody");return e.forEach(n=>{t.insertAdjacentElement("beforeend",n)}),t},rv=(e,t="")=>{const n=e;n.value=t;const r=new CustomEvent("change",{bubbles:!0,cancelable:!0,detail:{value:t}});n.dispatchEvent(r)},De=e=>{const t=e.closest(ta);if(!t)throw new Error(`Element is missing outer ${ta}`);const n=t.querySelector(aq),r=t.querySelector(Ld),o=t.querySelector(jf),i=t.querySelector(ck),a=t.querySelector(sq),s=t.querySelector(Ff),l=nr(r.value,Vh,!0),u=nr(n.value),c=nr(o.dataset.value),d=nr(t.dataset.minDate),f=nr(t.dataset.maxDate),p=nr(t.dataset.rangeDate),g=nr(t.dataset.defaultDate);if(d&&f&&d>f)throw new Error("Minimum date cannot be after maximum date");return{calendarDate:c,minDate:d,toggleBtnEl:i,selectedDate:u,maxDate:f,firstYearChunkEl:s,datePickerEl:t,inputDate:l,internalInputEl:n,externalInputEl:r,calendarEl:o,rangeDate:p,defaultDate:g,statusEl:a}},_k=e=>{const{externalInputEl:t,toggleBtnEl:n}=De(e);n.disabled=!0,t.disabled=!0},bk=e=>{const{externalInputEl:t,toggleBtnEl:n}=De(e);n.setAttribute("aria-disabled",!0),t.setAttribute("aria-disabled",!0)},wq=e=>{const{externalInputEl:t,toggleBtnEl:n}=De(e);n.disabled=!1,t.disabled=!1},L5=e=>{const{externalInputEl:t,minDate:n,maxDate:r}=De(e),o=t.value;let i=!1;if(o){i=!0;const a=o.split("/"),[s,l,u]=a.map(c=>{let d;const f=parseInt(c,10);return Number.isNaN(f)||(d=f),d});if(s&&l&&u!=null){const c=Uf(u,s-1,l);c.getMonth()===s-1&&c.getDate()===l&&c.getFullYear()===u&&a[2].length===4&&nv(c,n,r)&&(i=!1)}}return i},Vf=e=>{const{externalInputEl:t}=De(e),n=L5(t);n&&!t.validationMessage&&t.setCustomValidity(Mw),!n&&t.validationMessage===Mw&&t.setCustomValidity("")},Sq=e=>{const{internalInputEl:t,inputDate:n}=De(e);let r="";n&&!L5(e)&&(r=Rs(n)),t.value!==r&&rv(t,r)},D5=(e,t)=>{const n=nr(t);if(n){const r=Rs(n,Vh),{datePickerEl:o,internalInputEl:i,externalInputEl:a}=De(e);rv(i,t),rv(a,r),Vf(o)}},Eq=e=>{const t=e.closest(ta),{defaultValue:n}=t.dataset,r=t.querySelector("input");if(!r)throw new Error(`${ta} is missing inner input`);r.value&&(r.value="");const o=nr(t.dataset.minDate||r.getAttribute("min"));t.dataset.minDate=o?Rs(o):fq;const i=nr(t.dataset.maxDate||r.getAttribute("max"));i&&(t.dataset.maxDate=Rs(i));const a=document.createElement("div");a.classList.add(qH);const s=r.cloneNode();s.classList.add(K3),s.type="text",a.appendChild(s),a.insertAdjacentHTML("beforeend",is.escapeHTML`
+
+
+ `),r.setAttribute("aria-hidden","true"),r.setAttribute("tabindex","-1"),r.style.display="none",r.classList.add(G3),r.removeAttribute("id"),r.removeAttribute("name"),r.required=!1,t.appendChild(a),t.classList.add(WH),n&&D5(t,n),r.disabled&&(_k(t),r.disabled=!1),r.hasAttribute("aria-disabled")&&(bk(t),r.removeAttribute("aria-disabled"))},hr=(e,t)=>{const{datePickerEl:n,calendarEl:r,statusEl:o,selectedDate:i,maxDate:a,minDate:s,rangeDate:l}=De(e),u=R5();let c=t||u;const d=r.hidden,f=Fi(c,0),p=c.getMonth(),g=c.getFullYear(),v=$5(c,1),b=cc(c,1),y=Rs(c),h=k5(c),_=wi(c,s),x=wi(c,a),w=i||c,S=l&&_q(w,l),A=l&&bq(w,l),C=l&&Fi(S,1),R=l&&T5(A,1),O=tv[p],k=M=>{const U=[Gn],B=M.getDate(),ee=M.getMonth(),Z=M.getFullYear(),ae=M.getDay(),he=Rs(M);let se="-1";const Ce=!nv(M,s,a),je=xo(M,i);wi(M,v)&&U.push(KH),wi(M,f)&&U.push(Z3),wi(M,b)&&U.push(YH),je&&U.push(GH),xo(M,u)&&U.push(XH),l&&(xo(M,l)&&U.push(QH),xo(M,S)&&U.push(ZH),xo(M,A)&&U.push(JH),nv(M,C,R)&&U.push(eq)),xo(M,f)&&(se="0",U.push(X3));const Se=tv[ee],ke=cq[ae],Le=document.createElement("button");return Le.setAttribute("type","button"),Le.setAttribute("tabindex",se),Le.setAttribute("class",U.join(" ")),Le.setAttribute("data-day",B),Le.setAttribute("data-month",ee+1),Le.setAttribute("data-year",Z),Le.setAttribute("data-value",he),Le.setAttribute("aria-label",is.escapeHTML`${B} ${Se} ${Z} ${ke}`),Le.setAttribute("aria-selected",je?"true":"false"),Ce===!0&&(Le.disabled=!0),Le.textContent=B,Le};c=mk(h);const T=[];for(;T.length<28||c.getMonth()===p||T.length%7!==0;)T.push(k(c)),c=Fi(c,1);const $=M5(T,7),j=r.cloneNode();j.dataset.value=y,j.style.top=`${n.offsetHeight}px`,j.hidden=!1,j.innerHTML=is.escapeHTML`
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ `;const L=document.createElement("table");L.setAttribute("class",If);const G=document.createElement("thead");L.insertAdjacentElement("beforeend",G);const W=document.createElement("tr");G.insertAdjacentElement("beforeend",W);const V={Sunday:"S",Monday:"M",Tuesday:"T",Wednesday:"W",Thursday:"Th",Friday:"Fr",Saturday:"S"};Object.keys(V).forEach(M=>{const U=document.createElement("th");U.setAttribute("class",iq),U.setAttribute("scope","col"),U.setAttribute("aria-label",M),U.textContent=V[M],W.insertAdjacentElement("beforeend",U)});const K=N5($);L.insertAdjacentElement("beforeend",K),j.querySelector(qs).insertAdjacentElement("beforeend",L),r.parentNode.replaceChild(j,r),n.classList.add(W3);const oe=[];return xo(i,f)&&oe.push("Selected date"),d?(oe.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"),o.textContent=""):oe.push(`${O} ${g}`),o.textContent=oe.join(". "),j},Aq=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e);let i=yk(n,1);i=Sn(i,r,o);const a=hr(t,i);let s=a.querySelector(_5);s.disabled&&(s=a.querySelector(qs)),s.focus()},Cq=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e);let i=$5(n,1);i=Sn(i,r,o);const a=hr(t,i);let s=a.querySelector(b5);s.disabled&&(s=a.querySelector(qs)),s.focus()},Oq=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e);let i=cc(n,1);i=Sn(i,r,o);const a=hr(t,i);let s=a.querySelector(w5);s.disabled&&(s=a.querySelector(qs)),s.focus()},Rq=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e);let i=P5(n,1);i=Sn(i,r,o);const a=hr(t,i);let s=a.querySelector(x5);s.disabled&&(s=a.querySelector(qs)),s.focus()},zh=e=>{const{datePickerEl:t,calendarEl:n,statusEl:r}=De(e);t.classList.remove(W3),n.hidden=!0,r.textContent=""},kq=e=>{if(e.disabled)return;const{datePickerEl:t,externalInputEl:n}=De(e);D5(e,e.dataset.value),zh(t),n.focus()},Tq=e=>{if(e.disabled)return;const{calendarEl:t,inputDate:n,minDate:r,maxDate:o,defaultDate:i}=De(e);if(t.hidden){const a=Sn(n||i||R5(),r,o);hr(t,a).querySelector(Hs).focus()}else zh(e)},xk=e=>{const{calendarEl:t,inputDate:n,minDate:r,maxDate:o}=De(e);if(!t.hidden&&n){const a=Sn(n,r,o);hr(t,a)}},I5=(e,t)=>{const{calendarEl:n,statusEl:r,calendarDate:o,minDate:i,maxDate:a}=De(e),s=o.getMonth(),l=t??s,u=tv.map((v,b)=>{const y=Os(o,b),h=xq(y,i,a);let _="-1";const x=[jh],w=b===s;b===l&&(_="0",x.push(y5)),w&&x.push(tq);const S=document.createElement("button");return S.setAttribute("type","button"),S.setAttribute("tabindex",_),S.setAttribute("class",x.join(" ")),S.setAttribute("data-value",b),S.setAttribute("data-label",v),S.setAttribute("aria-selected",w?"true":"false"),h===!0&&(S.disabled=!0),S.textContent=v,S}),c=document.createElement("div");c.setAttribute("tabindex","-1"),c.setAttribute("class",lk);const d=document.createElement("table");d.setAttribute("class",If),d.setAttribute("role","presentation");const f=M5(u,3),p=N5(f);d.insertAdjacentElement("beforeend",p),c.insertAdjacentElement("beforeend",d);const g=n.cloneNode();return g.insertAdjacentElement("beforeend",c),n.parentNode.replaceChild(g,n),r.textContent="Select a month.",g},$q=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e),i=parseInt(e.dataset.value,10);let a=Os(n,i);a=Sn(a,r,o),hr(t,a).querySelector(Hs).focus()},dc=(e,t)=>{const{calendarEl:n,statusEl:r,calendarDate:o,minDate:i,maxDate:a}=De(e),s=o.getFullYear(),l=t??s;let u=l;u-=u%br,u=Math.max(0,u);const c=um(Ko(o,u-1),i,a),d=um(Ko(o,u+br),i,a),f=[];let p=u;for(;f.length {if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e),i=t.querySelector(Ws);let s=parseInt(i.textContent,10)-br;s=Math.max(0,s);const l=Ko(n,s),u=Sn(l,r,o),c=dc(t,u.getFullYear());let d=c.querySelector(S5);d.disabled&&(d=c.querySelector(A5)),d.focus()},Mq=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e),i=t.querySelector(Ws);let s=parseInt(i.textContent,10)+br;s=Math.max(0,s);const l=Ko(n,s),u=Sn(l,r,o),c=dc(t,u.getFullYear());let d=c.querySelector(E5);d.disabled&&(d=c.querySelector(A5)),d.focus()},Nq=e=>{if(e.disabled)return;const{calendarEl:t,calendarDate:n,minDate:r,maxDate:o}=De(e),i=parseInt(e.innerHTML,10);let a=Ko(n,i);a=Sn(a,r,o),hr(t,a).querySelector(Hs).focus()},Lq=e=>{const{datePickerEl:t,externalInputEl:n}=De(e.target);zh(t),n.focus(),e.preventDefault()},Lr=e=>t=>{const{calendarEl:n,calendarDate:r,minDate:o,maxDate:i}=De(t.target),a=e(r),s=Sn(a,o,i);xo(r,s)||hr(n,s).querySelector(Hs).focus(),t.preventDefault()},Nw=Lr(e=>yq(e,1)),Lw=Lr(e=>gk(e,1)),Dw=Lr(e=>T5(e,1)),Iw=Lr(e=>Fi(e,1)),Dq=Lr(e=>mk(e)),Iq=Lr(e=>vq(e)),jq=Lr(e=>cc(e,1)),Fq=Lr(e=>$5(e,1)),Uq=Lr(e=>P5(e,1)),Vq=Lr(e=>yk(e,1)),zq=e=>{if(e.disabled)return;const t=e.closest(jf),n=t.dataset.value,r=e.dataset.value;if(r===n)return;const o=nr(r);hr(t,o).querySelector(Hs).focus()},di=e=>t=>{const n=t.target,r=parseInt(n.dataset.value,10),{calendarEl:o,calendarDate:i,minDate:a,maxDate:s}=De(n),l=Os(i,r);let u=e(r);u=Math.max(0,Math.min(11,u));const c=Os(i,u),d=Sn(c,a,s);wi(l,d)||I5(o,d.getMonth()).querySelector(Uh).focus(),t.preventDefault()},jw=di(e=>e-3),Fw=di(e=>e+3),Uw=di(e=>e-1),Vw=di(e=>e+1),Bq=di(e=>e-e%3),Hq=di(e=>e+2-e%3),qq=di(()=>11),Wq=di(()=>0),Gq=e=>{if(e.disabled||e.classList.contains(y5))return;const t=parseInt(e.dataset.value,10);I5(e,t).querySelector(Uh).focus()},fi=e=>t=>{const n=t.target,r=parseInt(n.dataset.value,10),{calendarEl:o,calendarDate:i,minDate:a,maxDate:s}=De(n),l=Ko(i,r);let u=e(r);u=Math.max(0,u);const c=Ko(i,u),d=Sn(c,a,s);vk(l,d)||dc(o,d.getFullYear()).querySelector(Ws).focus(),t.preventDefault()},zw=fi(e=>e-3),Bw=fi(e=>e+3),Hw=fi(e=>e-1),qw=fi(e=>e+1),Kq=fi(e=>e-e%3),Yq=fi(e=>e+2-e%3),Qq=fi(e=>e-br),Xq=fi(e=>e+br),Zq=e=>{if(e.disabled||e.classList.contains(v5))return;const t=parseInt(e.dataset.value,10);dc(e,t).querySelector(Ws).focus()},j5=e=>{const t=n=>{const{calendarEl:r}=De(n),o=FH(e,r),i=0,a=o.length-1,s=o[i],l=o[a],u=o.indexOf(BH());return{focusableElements:o,isNotFound:u===-1,firstTabStop:s,isFirstTab:u===i,lastTabStop:l,isLastTab:u===a}};return{tabAhead(n){const{firstTabStop:r,isLastTab:o,isNotFound:i}=t(n.target);(o||i)&&(n.preventDefault(),r.focus())},tabBack(n){const{lastTabStop:r,isFirstTab:o,isNotFound:i}=t(n.target);(o||i)&&(n.preventDefault(),r.focus())}}},cm=j5(hq),Ww=j5(gq),Gw=j5(mq),wk={[zH]:{[ck](){Tq(this)},[Pw](){kq(this)},[ev](){$q(this)},[Ff](){Nq(this)},[b5](){Cq(this)},[w5](){Oq(this)},[_5](){Aq(this)},[x5](){Rq(this)},[S5](){Pq(this)},[E5](){Mq(this)},[fk](){I5(this).querySelector(Uh).focus()},[dk](){dc(this).querySelector(Ws).focus()}},keyup:{[jf](e){const t=this.dataset.keydownKeyCode;`${e.keyCode}`!==t&&e.preventDefault()}},keydown:{[Ld](e){e.keyCode===dq&&Vf(this)},[Pw]:hi({Up:Nw,ArrowUp:Nw,Down:Lw,ArrowDown:Lw,Left:Dw,ArrowLeft:Dw,Right:Iw,ArrowRight:Iw,Home:Dq,End:Iq,PageDown:jq,PageUp:Fq,"Shift+PageDown":Uq,"Shift+PageUp":Vq,Tab:cm.tabAhead}),[qs]:hi({Tab:cm.tabAhead,"Shift+Tab":cm.tabBack}),[ev]:hi({Up:jw,ArrowUp:jw,Down:Fw,ArrowDown:Fw,Left:Uw,ArrowLeft:Uw,Right:Vw,ArrowRight:Vw,Home:Bq,End:Hq,PageDown:qq,PageUp:Wq}),[uq]:hi({Tab:Ww.tabAhead,"Shift+Tab":Ww.tabBack}),[Ff]:hi({Up:zw,ArrowUp:zw,Down:Bw,ArrowDown:Bw,Left:Hw,ArrowLeft:Hw,Right:qw,ArrowRight:qw,Home:Kq,End:Yq,PageDown:Xq,PageUp:Qq}),[A5]:hi({Tab:Gw.tabAhead,"Shift+Tab":Gw.tabBack}),[jf](e){this.dataset.keydownKeyCode=e.keyCode},[ta](e){hi({Escape:Lq})(e)}},focusout:{[Ld](){Vf(this)},[ta](e){this.contains(e.relatedTarget)||zh(this)}},input:{[Ld](){Sq(this),xk(this)}}};HH()||(wk.mouseover={[lq](){zq(this)},[ev](){Gq(this)},[Ff](){Zq(this)}});const Jq=jH(wk,{init(e){UH(ta,e).forEach(t=>{Eq(t)})},getDatePickerContext:De,disable:_k,ariaDisable:bk,enable:wq,isDateInputInvalid:L5,setCalendarValue:D5,validateDateInput:Vf,renderCalendar:hr,updateCalendarIfVisible:xk});var eW=Jq;const tW=wn,nW=po,rW=ca,{prefix:Sk}=Wn,{getDatePickerContext:Ek,isDateInputInvalid:Ak,updateCalendarIfVisible:Ck}=eW,oW=`${Sk}-date-picker`,F5=`${Sk}-date-range-picker`,Ok=`${F5}__range-start`,Rk=`${F5}__range-end`,dm=`.${oW}`,as=`.${F5}`,kk=`.${Ok}`,Tk=`.${Rk}`,iW="0000-01-01",$k=e=>{const t=e.closest(as);if(!t)throw new Error(`Element is missing outer ${as}`);const n=t.querySelector(kk),r=t.querySelector(Tk);return{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}},Pk=e=>{const{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}=$k(e),{internalInputEl:o}=Ek(n),i=o.value;i&&!Ak(o)?(r.dataset.minDate=i,r.dataset.rangeDate=i,r.dataset.defaultDate=i):(r.dataset.minDate=t.dataset.minDate||"",r.dataset.rangeDate="",r.dataset.defaultDate=""),Ck(r)},Mk=e=>{const{dateRangePickerEl:t,rangeStartEl:n,rangeEndEl:r}=$k(e),{internalInputEl:o}=Ek(r),i=o.value;i&&!Ak(o)?(n.dataset.maxDate=i,n.dataset.rangeDate=i,n.dataset.defaultDate=i):(n.dataset.maxDate=t.dataset.maxDate||"",n.dataset.rangeDate="",n.dataset.defaultDate=""),Ck(n)},aW=e=>{const t=e.closest(as),[n,r]=nW(dm,t);if(!n)throw new Error(`${as} is missing inner two '${dm}' elements`);if(!r)throw new Error(`${as} is missing second '${dm}' element`);n.classList.add(Ok),r.classList.add(Rk),t.dataset.minDate||(t.dataset.minDate=iW);const{minDate:o}=t.dataset;n.dataset.minDate=o,r.dataset.minDate=o;const{maxDate:i}=t.dataset;i&&(n.dataset.maxDate=i,r.dataset.maxDate=i),Pk(t),Mk(t)};tW({"input change":{[kk](){Pk(this)},[Tk](){Mk(this)}}},{init(e){rW(as,e).forEach(t=>{aW(t)})}});const Kw=ca,sW=wn,zf=Ih,{prefix:dn}=Wn,$u=`${dn}-file-input`,Pu=`.${$u}`,Nk=`${dn}-file-input__input`,U5=`${dn}-file-input__target`,Lk=`.${Nk}`,lW=`${dn}-file-input__box`,Dk=`${dn}-file-input__instructions`,Ik=`${dn}-file-input__preview`,jk=`${dn}-file-input__preview-heading`,Bh=`${dn}-file-input--disabled`,uW=`${dn}-file-input__choose`,Fk=`${dn}-file-input__accepted-files-message`,Yw=`${dn}-file-input__drag-text`,fm=`${dn}-file-input--drag`,Qw="is-loading",ov="has-invalid-file",Gs=`${dn}-file-input__preview-image`,cW=`${Gs}--generic`,dW=`${Gs}--pdf`,fW=`${Gs}--word`,pW=`${Gs}--video`,hW=`${Gs}--excel`,Uk=`${dn}-sr-only`,xa="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";let iv=!0,av="",sv="";const fc=e=>{const t=e.closest(Pu);if(!t)throw new Error(`Element is missing outer ${Pu}`);const n=t.querySelector(Lk);return{dropZoneEl:t,inputEl:n}},gW=e=>{const{dropZoneEl:t,inputEl:n}=fc(e);n.disabled=!0,t.classList.add(Bh)},mW=e=>{const{dropZoneEl:t}=fc(e);t.classList.add(Bh)},yW=e=>{const{dropZoneEl:t,inputEl:n}=fc(e);n.disabled=!1,t.classList.remove(Bh),t.removeAttribute("aria-disabled")},vW=e=>{const t=e.charCodeAt(0);return t===32?"-":t>=65&&t<=90?`img_${e.toLowerCase()}`:`__${t.toString(16).slice(-4)}`},_W=e=>e.replace(/[^a-z0-9]/g,vW),bW=e=>`${e}-${Math.floor(Date.now().toString()/1e3)}`,Vk=e=>e.hasAttribute("multiple")?"files":"file",xW=e=>{const t=document.createElement("div"),n=document.createElement("div"),r=document.createElement("div");return e.classList.remove($u),e.classList.add(Nk),t.classList.add($u),r.classList.add(lW),n.classList.add(U5),n.prepend(r),e.parentNode.insertBefore(n,e),e.parentNode.insertBefore(t,n),n.appendChild(e),t.appendChild(n),n},wW=e=>{const t=e.closest(Pu),n=Vk(e),r=document.createElement("div"),o=`Drag ${n} here or`,i="choose from folder";return av=`${o} ${i}`,r.classList.add(Dk),r.setAttribute("aria-hidden","true"),e.setAttribute("aria-label",av),r.innerHTML=zf.escapeHTML`${o}${i}`,e.parentNode.insertBefore(r,e),(/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.querySelector(`.${Yw}`).outerHTML=""),r},SW=e=>{const t=document.createElement("div"),n=Vk(e),r=e.closest(Pu),o=e.closest(`.${U5}`);sv=`No ${n} selected.`,t.classList.add(Uk),t.setAttribute("aria-live","polite"),t.textContent=sv,r.insertBefore(t,o)},EW=e=>{const t=e.hasAttribute("aria-disabled")||e.hasAttribute("disabled"),n=xW(e),r=wW(e),{dropZoneEl:o}=fc(e);return t?o.classList.add(Bh):SW(e),{instructions:r,dropTarget:n}},zk=(e,t)=>{const n=e.querySelectorAll(`.${Ik}`),r=e.querySelector(`.${jk}`),o=e.querySelector(`.${Fk}`),i=a=>{a.parentNode.removeChild(a)};r&&(r.outerHTML=""),o&&(o.outerHTML="",e.classList.remove(ov)),n!==null&&(t&&t.removeAttribute("hidden"),Array.prototype.forEach.call(n,i))},AW=(e,t,n)=>{const r=e;let o=sv;t.length===1?o=`You have selected the file: ${n}`:t.length>1&&(o=`You have selected ${t.length} files: ${n.join(", ")}`),setTimeout(()=>{r.textContent=o},1e3)},CW=(e,t)=>{const n=document.createElement("div"),r=e.closest(`.${U5}`),o=r.querySelector(`.${Dk}`);let i="Change file",a="";t.length===1?a=zf.escapeHTML`Selected file ${i}`:t.length>1&&(i="Change files",a=zf.escapeHTML`${t.length} files selected ${i}`),o.setAttribute("hidden","true"),n.classList.add(jk),n.innerHTML=a,r.insertBefore(n,o),e.setAttribute("aria-label",i)},OW=(e,t,n,r)=>{const o=e.target.files,a=r.closest(`.${$u}`).querySelector(`.${Uk}`),s=[];zk(r,n);for(let l=0;l
+ ${c}
+