Scripts/resources/[phone]/npwd/dist/html/1999.js
2024-12-29 20:49:12 +01:00

1 line
78 KiB
JavaScript

"use strict";(self.webpackChunk_npwd_nui=self.webpackChunk_npwd_nui||[]).push([[1999],{21999:function(e,t,n){n.r(t),n.d(t,{DefaultValue:function(){return ji},RecoilEnv:function(){return Yi},RecoilLoadable:function(){return Zi},RecoilRoot:function(){return Ji},atom:function(){return es},atomFamily:function(){return ns},constSelector:function(){return rs},errorSelector:function(){return as},isRecoilValue:function(){return qi},noWait:function(){return ss},readOnlySelector:function(){return is},retentionZone:function(){return Vs},selector:function(){return ts},selectorFamily:function(){return os},snapshot_UNSTABLE:function(){return Ls},useGetRecoilValueInfo_UNSTABLE:function(){return Ss},useGotoRecoilSnapshot:function(){return As},useRecoilBridgeAcrossReactRoots_UNSTABLE:function(){return Qi},useRecoilCallback:function(){return bs},useRecoilRefresher_UNSTABLE:function(){return ms},useRecoilSnapshot:function(){return Es},useRecoilState:function(){return ps},useRecoilStateLoadable:function(){return vs},useRecoilState_TRANSITION_SUPPORT_UNSTABLE:function(){return Ts},useRecoilStoreID:function(){return Xi},useRecoilTransactionObserver_UNSTABLE:function(){return Ns},useRecoilTransaction_UNSTABLE:function(){return ws},useRecoilValue:function(){return fs},useRecoilValueLoadable:function(){return hs},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:function(){return gs},useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:function(){return Rs},useResetRecoilState:function(){return ys},useRetain:function(){return ks},useSetRecoilState:function(){return _s},waitForAll:function(){return ls},waitForAllSettled:function(){return ds},waitForAny:function(){return cs},waitForNone:function(){return us}});var o=n(53182),r=n.n(o),a=n(72367),i=n.n(a),s=function(e){const t=new Error(e);if(void 0===t.stack)try{throw t}catch(e){}return t},u=function(e){return!!e&&"function"==typeof e.then},c=function(e,t){if(null!=e)return e;throw s(null!=t?t:"Got unexpected null or undefined")};function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class d{getValue(){throw s("BaseLoadable")}toPromise(){throw s("BaseLoadable")}valueMaybe(){throw s("BaseLoadable")}valueOrThrow(){throw s(`Loadable expected value, but in "${this.state}" state`)}promiseMaybe(){throw s("BaseLoadable")}promiseOrThrow(){throw s(`Loadable expected promise, but in "${this.state}" state`)}errorMaybe(){throw s("BaseLoadable")}errorOrThrow(){throw s(`Loadable expected error, but in "${this.state}" state`)}is(e){return e.state===this.state&&e.contents===this.contents}map(e){throw s("BaseLoadable")}}class f extends d{constructor(e){super(),l(this,"state","hasValue"),l(this,"contents",void 0),this.contents=e}getValue(){return this.contents}toPromise(){return Promise.resolve(this.contents)}valueMaybe(){return this.contents}valueOrThrow(){return this.contents}promiseMaybe(){}errorMaybe(){}map(e){try{const t=e(this.contents);return u(t)?y(t):g(t)?t:v(t)}catch(t){return u(t)?y(t.next((()=>this.map(e)))):_(t)}}}class h extends d{constructor(e){super(),l(this,"state","hasError"),l(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return Promise.reject(this.contents)}valueMaybe(){}promiseMaybe(){}errorMaybe(){return this.contents}errorOrThrow(){return this.contents}map(e){return this}}class p extends d{constructor(e){super(),l(this,"state","loading"),l(this,"contents",void 0),this.contents=e}getValue(){throw this.contents}toPromise(){return this.contents}valueMaybe(){}promiseMaybe(){return this.contents}promiseOrThrow(){return this.contents}errorMaybe(){}map(e){return y(this.contents.then((t=>{const n=e(t);if(g(n)){const e=n;switch(e.state){case"hasValue":case"loading":return e.contents;case"hasError":throw e.contents}}return n})).catch((t=>{if(u(t))return t.then((()=>this.map(e).contents));throw t})))}}function v(e){return Object.freeze(new f(e))}function _(e){return Object.freeze(new h(e))}function y(e){return Object.freeze(new p(e))}function S(){return Object.freeze(new p(new Promise((()=>{}))))}function m(e){const t=function(e){return e.every((e=>"hasValue"===e.state))?v(e.map((e=>e.contents))):e.some((e=>"hasError"===e.state))?_(c(e.find((e=>"hasError"===e.state)),"Invalid loadable passed to loadableAll").contents):y(Promise.all(e.map((e=>e.contents))))}((Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))).map((e=>g(e)?e:u(e)?y(e):v(e))));return Array.isArray(e)?t:t.map((t=>Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})))}function g(e){return e instanceof d}const R={of:e=>u(e)?y(e):g(e)?e:v(e),error:e=>_(e),loading:()=>S(),all:m,isLoadable:g};var T={loadableWithValue:v,loadableWithError:_,loadableWithPromise:y,loadableLoading:S,loadableAll:m,isLoadable:g,RecoilLoadable:R},b=T.loadableWithValue,w=T.loadableWithError,A=T.loadableWithPromise,E=T.loadableLoading,N=T.loadableAll,L=T.isLoadable,k=T.RecoilLoadable,V=Object.freeze({__proto__:null,loadableWithValue:b,loadableWithError:w,loadableWithPromise:A,loadableLoading:E,loadableAll:N,isLoadable:L,RecoilLoadable:k});const C={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"])};var M;null!=(null===(M={env:{REACT_APP_IN_GAME:void 0}})||void 0===M?void 0:M.env)&&(function(e,t){var n,o;const r=null===(n={REACT_APP_IN_GAME:void 0}[e])||void 0===n||null===(o=n.toLowerCase())||void 0===o?void 0:o.trim();if(null!=r&&""!==r){if(!["true","false"].includes(r))throw s(`process.env.${e} value must be 'true', 'false', or empty: ${r}`);a="true"===r,C.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=a}var a}("RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED"),function(e,t){var n;const o=null===(n={REACT_APP_IN_GAME:void 0}.RECOIL_GKS_ENABLED)||void 0===n?void 0:n.trim();null!=o&&""!==o&&o.split(/\s*,\s*|\s+/).forEach((e=>{C.RECOIL_GKS_ENABLED.add(e)}))}());var U=C;function I(e){return U.RECOIL_GKS_ENABLED.has(e)}I.setPass=e=>{U.RECOIL_GKS_ENABLED.add(e)},I.setFail=e=>{U.RECOIL_GKS_ENABLED.delete(e)},I.clear=()=>{U.RECOIL_GKS_ENABLED.clear()};var B,D,O,P=I,x=function(e,t,{error:n}={}){return null};const F=null!==(B=r().createMutableSource)&&void 0!==B?B:r().unstable_createMutableSource,z=null!==(D=r().useMutableSource)&&void 0!==D?D:r().unstable_useMutableSource,G=null!==(O=r().useSyncExternalStore)&&void 0!==O?O:r().unstable_useSyncExternalStore;let W=!1;var $={createMutableSource:F,useMutableSource:z,useSyncExternalStore:G,currentRendererSupportsUseSyncExternalStore:function(){var e;const{ReactCurrentDispatcher:t,ReactCurrentOwner:n}=r().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,o=null!=(null!==(e=null==t?void 0:t.current)&&void 0!==e?e:n.currentDispatcher).useSyncExternalStore;return!G||o||W||(W=!0,x("A React renderer without React 18+ API support is being used with React 18+.")),o},reactMode:function(){return P("recoil_transition_support")?{mode:"TRANSITION_SUPPORT",early:!0,concurrent:!0}:P("recoil_sync_external_store")&&null!=G?{mode:"SYNC_EXTERNAL_STORE",early:!0,concurrent:!1}:P("recoil_mutable_source")&&null!=z&&"undefined"!=typeof window&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE?P("recoil_suppress_rerender_in_callback")?{mode:"MUTABLE_SOURCE",early:!0,concurrent:!0}:{mode:"MUTABLE_SOURCE",early:!1,concurrent:!1}:P("recoil_suppress_rerender_in_callback")?{mode:"LEGACY",early:!0,concurrent:!1}:{mode:"LEGACY",early:!1,concurrent:!1}},isFastRefreshEnabled:function(){return!1}};class K{constructor(e){l(this,"key",void 0),this.key=e}toJSON(){return{key:this.key}}}class H extends K{}class j extends K{}var q={AbstractRecoilValue:K,RecoilState:H,RecoilValueReadOnly:j,isRecoilValue:function(e){return e instanceof H||e instanceof j}},Z=q.AbstractRecoilValue,Y=q.RecoilState,J=q.RecoilValueReadOnly,X=q.isRecoilValue,Q=Object.freeze({__proto__:null,AbstractRecoilValue:Z,RecoilState:Y,RecoilValueReadOnly:J,isRecoilValue:X}),ee=function(e,...t){},te=function(e,t){return function*(){let n=0;for(const o of e)yield t(o,n++)}()};const{isFastRefreshEnabled:ne}=$;class oe{}const re=new oe,ae=new Map,ie=new Map;class se extends Error{}const ue=new Map;function ce(e){return ue.get(e)}var le,de,fe={nodes:ae,recoilValues:ie,registerNode:function(e){U.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED&&function(e){if(ae.has(e)){const t=`Duplicate atom key "${e}". This is a FATAL ERROR in\n production. But it is safe to ignore this warning if it occurred because of\n hot module replacement.`;console.warn(t)}}(e.key),ae.set(e.key,e);const t=null==e.set?new Q.RecoilValueReadOnly(e.key):new Q.RecoilState(e.key);return ie.set(e.key,t),t},getNode:function(e){const t=ae.get(e);if(null==t)throw new se(`Missing definition for RecoilValue: "${e}""`);return t},getNodeMaybe:function(e){return ae.get(e)},deleteNodeConfigIfPossible:function(e){var t;if(!P("recoil_memory_managament_2020"))return;const n=ae.get(e);var o;null!=n&&null!==(t=n.shouldDeleteConfigOnRelease)&&void 0!==t&&t.call(n)&&(ae.delete(e),null===(o=ce(e))||void 0===o||o(),ue.delete(e))},setConfigDeletionHandler:function(e,t){P("recoil_memory_managament_2020")&&(void 0===t?ue.delete(e):ue.set(e,t))},getConfigDeletionHandler:ce,recoilValuesForKeys:function(e){return te(e,(e=>c(ie.get(e))))},NodeMissingError:se,DefaultValue:oe,DEFAULT_VALUE:re},he={enqueueExecution:function(e,t){t()}},pe=(le=function(e){var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n={},o=Math.pow(2,5),r=o-1,a=o/2,i=o/4,s={},u=function(e){return function(){return e}},c=n.hash=function(e){var n=void 0===e?"undefined":t(e);if("number"===n)return e;"string"!==n&&(e+="");for(var o=0,r=0,a=e.length;r<a;++r)o=(o<<5)-o+e.charCodeAt(r)|0;return o},l=function(e,t){return t>>>e&r},d=function(e){return 1<<e},f=function(e,t){return n=e&t-1,n=(n=(858993459&(n-=n>>1&1431655765))+(n>>2&858993459))+(n>>4)&252645135,127&(n+=n>>8)+(n>>16);var n},h=function(e,t,n,o){var r=o;if(!e){var a=o.length;r=new Array(a);for(var i=0;i<a;++i)r[i]=o[i]}return r[t]=n,r},p=function(e,t,n){var o=n.length-1,r=0,a=0,i=n;if(e)r=a=t;else for(i=new Array(o);r<t;)i[a++]=n[r++];for(++r;r<=o;)i[a++]=n[r++];return e&&(i.length=o),i},v={__hamt_isEmpty:!0},_=function(e){return e===v||e&&e.__hamt_isEmpty},y=function(e,t,n,o){return{type:1,edit:e,hash:t,key:n,value:o,_modify:b}},S=function(e,t,n){return{type:2,edit:e,hash:t,children:n,_modify:w}},m=function(e,t,n){return{type:3,edit:e,mask:t,children:n,_modify:A}},g=function(e,t,n){return{type:4,edit:e,size:t,children:n,_modify:E}},R=function e(t,n,o,r,a,i){if(o===a)return S(t,o,[i,r]);var s=l(n,o),u=l(n,a);return m(t,d(s)|d(u),s===u?[e(t,n+5,o,r,a,i)]:s<u?[r,i]:[i,r])},T=function(e,t){return e===t.edit},b=function(e,t,n,o,r,a,i){if(t(a,this.key)){var u=o(this.value);return u===this.value?this:u===s?(--i.value,v):T(e,this)?(this.value=u,this):y(e,r,a,u)}var c=o();return c===s?this:(++i.value,R(e,n,this.hash,this,r,y(e,r,a,c)))},w=function(e,t,n,o,r,a,i){if(r===this.hash){var u=function(e,t,n,o,r,a,i,u){for(var c=r.length,l=0;l<c;++l){var d=r[l];if(n(i,d.key)){var f=d.value,v=a(f);return v===f?r:v===s?(--u.value,p(e,l,r)):h(e,l,y(t,o,i,v),r)}}var _=a();return _===s?r:(++u.value,h(e,c,y(t,o,i,_),r))}(T(e,this),e,t,this.hash,this.children,o,a,i);return u===this.children?this:u.length>1?S(e,this.hash,u):u[0]}var c=o();return c===s?this:(++i.value,R(e,n,this.hash,this,r,y(e,r,a,c)))},A=function(e,t,n,o,r,i,s){var u=this.mask,c=this.children,y=l(n,r),S=d(y),R=f(u,S),b=u&S,w=b?c[R]:v,A=w._modify(e,t,n+5,o,r,i,s);if(w===A)return this;var E,N=T(e,this),L=u,k=void 0;if(b&&_(A)){if(!(L&=~S))return v;if(c.length<=2&&((E=c[1^R])===v||1===E.type||2===E.type))return c[1^R];k=p(N,R,c)}else if(b||_(A))k=h(N,R,A,c);else{if(c.length>=a)return function(e,t,n,o,r){for(var a=[],i=o,s=0,u=0;i;++u)1&i&&(a[u]=r[s++]),i>>>=1;return a[t]=n,g(e,s+1,a)}(e,y,A,u,c);L|=S,k=function(e,t,n,o){var r=o.length;if(e){for(var a=r;a>=t;)o[a--]=o[a];return o[t]=n,o}for(var i=0,s=0,u=new Array(r+1);i<t;)u[s++]=o[i++];for(u[t]=n;i<r;)u[++s]=o[i++];return u}(N,R,A,c)}return N?(this.mask=L,this.children=k,this):m(e,L,k)},E=function(e,t,n,o,r,a,s){var u=this.size,c=this.children,d=l(n,r),f=c[d],p=(f||v)._modify(e,t,n+5,o,r,a,s);if(f===p)return this;var y=T(e,this),S=void 0;if(_(f)&&!_(p))++u,S=h(y,d,p,c);else if(!_(f)&&_(p)){if(--u<=i)return function(e,t,n,o){for(var r=new Array(t-1),a=0,i=0,s=0,u=o.length;s<u;++s)if(s!==n){var c=o[s];c&&!_(c)&&(r[a++]=c,i|=1<<s)}return m(e,i,r)}(e,u,d,c);S=h(y,d,v,c)}else S=h(y,d,p,c);return y?(this.size=u,this.children=S,this):g(e,u,S)};function N(e,t,n,o,r){this._editable=e,this._edit=t,this._config=n,this._root=o,this._size=r}v._modify=function(e,t,n,o,r,a,i){var u=o();return u===s?v:(++i.value,y(e,r,a,u))},N.prototype.setTree=function(e,t){return this._editable?(this._root=e,this._size=t,this):e===this._root?this:new N(this._editable,this._edit,this._config,e,t)};var L=n.tryGetHash=function(e,t,n,o){for(var r=o._root,a=0,i=o._config.keyEq;;)switch(r.type){case 1:return i(n,r.key)?r.value:e;case 2:if(t===r.hash)for(var s=r.children,u=0,c=s.length;u<c;++u){var h=s[u];if(i(n,h.key))return h.value}return e;case 3:var p=l(a,t),v=d(p);if(r.mask&v){r=r.children[f(r.mask,v)],a+=5;break}return e;case 4:if(r=r.children[l(a,t)]){a+=5;break}return e;default:return e}};N.prototype.tryGetHash=function(e,t,n){return L(e,t,n,this)};var k=n.tryGet=function(e,t,n){return L(e,n._config.hash(t),t,n)};N.prototype.tryGet=function(e,t){return k(e,t,this)};var V=n.getHash=function(e,t,n){return L(void 0,e,t,n)};N.prototype.getHash=function(e,t){return V(e,t,this)},n.get=function(e,t){return L(void 0,t._config.hash(e),e,t)},N.prototype.get=function(e,t){return k(t,e,this)};var C=n.has=function(e,t,n){return L(s,e,t,n)!==s};N.prototype.hasHash=function(e,t){return C(e,t,this)};var M=n.has=function(e,t){return C(t._config.hash(e),e,t)};N.prototype.has=function(e){return M(e,this)};var U=function(e,t){return e===t};n.make=function(e){return new N(0,0,{keyEq:e&&e.keyEq||U,hash:e&&e.hash||c},v,0)},n.empty=n.make();var I=n.isEmpty=function(e){return e&&!!_(e._root)};N.prototype.isEmpty=function(){return I(this)};var B=n.modifyHash=function(e,t,n,o){var r={value:o._size},a=o._root._modify(o._editable?o._edit:NaN,o._config.keyEq,0,e,t,n,r);return o.setTree(a,r.value)};N.prototype.modifyHash=function(e,t,n){return B(n,e,t,this)};var D=n.modify=function(e,t,n){return B(e,n._config.hash(t),t,n)};N.prototype.modify=function(e,t){return D(t,e,this)};var O=n.setHash=function(e,t,n,o){return B(u(n),e,t,o)};N.prototype.setHash=function(e,t,n){return O(e,t,n,this)};var P=n.set=function(e,t,n){return O(n._config.hash(e),e,t,n)};N.prototype.set=function(e,t){return P(e,t,this)};var x=u(s),F=n.removeHash=function(e,t,n){return B(x,e,t,n)};N.prototype.removeHash=N.prototype.deleteHash=function(e,t){return F(e,t,this)};var z=n.remove=function(e,t){return F(t._config.hash(e),e,t)};N.prototype.remove=N.prototype.delete=function(e){return z(e,this)};var G=n.beginMutation=function(e){return new N(e._editable+1,e._edit+1,e._config,e._root,e._size)};N.prototype.beginMutation=function(){return G(this)};var W=n.endMutation=function(e){return e._editable=e._editable&&e._editable-1,e};N.prototype.endMutation=function(){return W(this)};var $=n.mutate=function(e,t){var n=G(t);return e(n),W(n)};N.prototype.mutate=function(e){return $(e,this)};var K=function(e){return e&&H(e[0],e[1],e[2],e[3],e[4])},H=function(e,t,n,o,r){for(;n<e;){var a=t[n++];if(a&&!_(a))return j(a,o,[e,t,n,o,r])}return K(r)},j=function(e,t,n){switch(e.type){case 1:return{value:t(e),rest:n};case 2:case 4:case 3:var o=e.children;return H(o.length,o,0,t,n);default:return K(n)}},q={done:!0};function Z(e){this.v=e}Z.prototype.next=function(){if(!this.v)return q;var e=this.v;return this.v=K(e.rest),e},Z.prototype[Symbol.iterator]=function(){return this};var Y=function(e,t){return new Z(j(e._root,t))},J=function(e){return[e.key,e.value]},X=n.entries=function(e){return Y(e,J)};N.prototype.entries=N.prototype[Symbol.iterator]=function(){return X(this)};var Q=function(e){return e.key},ee=n.keys=function(e){return Y(e,Q)};N.prototype.keys=function(){return ee(this)};var te=function(e){return e.value},ne=n.values=N.prototype.values=function(e){return Y(e,te)};N.prototype.values=function(){return ne(this)};var oe=n.fold=function(e,t,n){var o=n._root;if(1===o.type)return e(t,o.value,o.key);for(var r=[o.children],a=void 0;a=r.pop();)for(var i=0,s=a.length;i<s;){var u=a[i++];u&&u.type&&(1===u.type?t=e(t,u.value,u.key):r.push(u.children))}return t};N.prototype.fold=function(e,t){return oe(e,t,this)};var re=n.forEach=function(e,t){return oe((function(n,o,r){return e(o,r,t)}),null,t)};N.prototype.forEach=function(e){return re(e,this)};var ae=n.count=function(e){return e._size};N.prototype.count=function(){return ae(this)},Object.defineProperty(N.prototype,"size",{get:N.prototype.count}),e.exports?e.exports=n:(void 0).hamt=n},le(de={exports:{}}),de.exports);class ve{constructor(e){l(this,"_map",void 0),this._map=new Map(null==e?void 0:e.entries())}keys(){return this._map.keys()}entries(){return this._map.entries()}get(e){return this._map.get(e)}has(e){return this._map.has(e)}set(e,t){return this._map.set(e,t),this}delete(e){return this._map.delete(e),this}clone(){return ye(this)}toMap(){return new Map(this._map)}}class _e{constructor(e){if(l(this,"_hamt",pe.empty.beginMutation()),e instanceof _e){const t=e._hamt.endMutation();e._hamt=t.beginMutation(),this._hamt=t.beginMutation()}else if(e)for(const[t,n]of e.entries())this._hamt.set(t,n)}keys(){return this._hamt.keys()}entries(){return this._hamt.entries()}get(e){return this._hamt.get(e)}has(e){return this._hamt.has(e)}set(e,t){return this._hamt.set(e,t),this}delete(e){return this._hamt.delete(e),this}clone(){return ye(this)}toMap(){return new Map(this._hamt)}}function ye(e){return P("recoil_hamt_2020")?new _e(e):new ve(e)}var Se=ye,me=Object.freeze({__proto__:null,persistentMap:Se}),ge=function(e,...t){const n=new Set;e:for(const o of e){for(const e of t)if(e.has(o))continue e;n.add(o)}return n},Re=function(e,t){const n=new Map;return e.forEach(((e,o)=>{n.set(o,t(e,o))})),n};function Te(e,t,n,o){const{nodeDeps:r,nodeToNodeSubscriptions:a}=n,i=r.get(e);if(i&&o&&i!==o.nodeDeps.get(e))return;r.set(e,t);const s=null==i?t:ge(t,i);for(const t of s)a.has(t)||a.set(t,new Set),c(a.get(t)).add(e);if(i){const n=ge(i,t);for(const t of n){if(!a.has(t))return;const n=c(a.get(t));n.delete(e),0===n.size&&a.delete(t)}}}var be={cloneGraph:function(e){return{nodeDeps:Re(e.nodeDeps,(e=>new Set(e))),nodeToNodeSubscriptions:Re(e.nodeToNodeSubscriptions,(e=>new Set(e)))}},graph:function(){return{nodeDeps:new Map,nodeToNodeSubscriptions:new Map}},saveDepsToStore:function(e,t,n,o){var r,a,i,s;const u=n.getState();o!==u.currentTree.version&&o!==(null===(r=u.nextTree)||void 0===r?void 0:r.version)&&o!==(null===(a=u.previousTree)||void 0===a?void 0:a.version)&&x("Tried to save dependencies to a discarded tree");const c=n.getGraph(o);if(Te(e,t,c),o===(null===(i=u.previousTree)||void 0===i?void 0:i.version)&&Te(e,t,n.getGraph(u.currentTree.version),c),o===(null===(s=u.previousTree)||void 0===s?void 0:s.version)||o===u.currentTree.version){var l;const o=null===(l=u.nextTree)||void 0===l?void 0:l.version;void 0!==o&&Te(e,t,n.getGraph(o),c)}}};let we=0,Ae=0,Ee=0;var Ne={getNextTreeStateVersion:()=>we++,getNextStoreID:()=>Ae++,getNextComponentID:()=>Ee++};const{persistentMap:Le}=me,{graph:ke}=be,{getNextTreeStateVersion:Ve}=Ne;function Ce(){const e=Ve();return{version:e,stateID:e,transactionMetadata:{},dirtyAtoms:new Set,atomValues:Le(),nonvalidatedAtoms:Le()}}var Me={makeEmptyTreeState:Ce,makeEmptyStoreState:function(){const e=Ce();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,ke()),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map}},getNextTreeStateVersion:Ve};class Ue{}var Ie={RetentionZone:Ue,retentionZone:function(){return new Ue}},Be={setByAddingToSet:function(e,t){const n=new Set(e);return n.add(t),n},setByDeletingFromSet:function(e,t){const n=new Set(e);return n.delete(t),n},mapBySettingInMap:function(e,t,n){const o=new Map(e);return o.set(t,n),o},mapByUpdatingInMap:function(e,t,n){const o=new Map(e);return o.set(t,n(o.get(t))),o},mapByDeletingFromMap:function(e,t){const n=new Map(e);return n.delete(t),n},mapByDeletingMultipleFromMap:function(e,t){const n=new Map(e);return t.forEach((e=>n.delete(e))),n}},De=function*(e,t){let n=0;for(const o of e)t(o,n++)&&(yield o)},Oe=function(e,t){return new Proxy(e,{get:(e,n)=>(!(n in e)&&n in t&&(e[n]=t[n]()),e[n]),ownKeys:e=>Object.keys(e)})};const{getNode:Pe,getNodeMaybe:xe,recoilValuesForKeys:Fe}=fe,{RetentionZone:ze}=Ie,{setByAddingToSet:Ge}=Be,We=Object.freeze(new Set);class $e extends Error{}function Ke(e,t,n,o){const r=e.getState();if(r.nodeCleanupFunctions.has(n))return;const a=Pe(n),i=function(e,t,n){if(!P("recoil_memory_managament_2020"))return()=>{};const{nodesRetainedByZone:o}=e.getState().retention;function r(e){let n=o.get(e);n||o.set(e,n=new Set),n.add(t)}if(n instanceof ze)r(n);else if(Array.isArray(n))for(const e of n)r(e);return()=>{if(!P("recoil_memory_managament_2020"))return;const{retention:o}=e.getState();function r(e){const n=o.nodesRetainedByZone.get(e);null==n||n.delete(t),n&&0===n.size&&o.nodesRetainedByZone.delete(e)}if(n instanceof ze)r(n);else if(Array.isArray(n))for(const e of n)r(e)}}(e,n,a.retainedBy),s=a.init(e,t,o);r.nodeCleanupFunctions.set(n,(()=>{s(),i()}))}function He(e,t,n){return Pe(n).peek(e,t)}function je(e,t,n){const o=new Set,r=Array.from(n),a=e.getGraph(t.version);for(let e=r.pop();e;e=r.pop()){var i;o.add(e);const t=null!==(i=a.nodeToNodeSubscriptions.get(e))&&void 0!==i?i:We;for(const e of t)o.has(e)||r.push(e)}return o}var qe={getNodeLoadable:function(e,t,n){return Ke(e,t,n,"get"),Pe(n).get(e,t)},peekNodeLoadable:He,setNodeValue:function(e,t,n,o){const r=Pe(n);if(null==r.set)throw new $e(`Attempt to set read-only RecoilValue: ${n}`);const a=r.set;return Ke(e,t,n,"set"),a(e,t,o)},initializeNode:function(e,t,n){Ke(e,e.getState().currentTree,t,n)},cleanUpNode:function(e,t){var n;const o=e.getState();null===(n=o.nodeCleanupFunctions.get(t))||void 0===n||n(),o.nodeCleanupFunctions.delete(t)},setUnvalidatedAtomValue_DEPRECATED:function(e,t,n){var o;const r=xe(t);return null==r||null===(o=r.invalidate)||void 0===o||o.call(r,e),{...e,atomValues:e.atomValues.clone().delete(t),nonvalidatedAtoms:e.nonvalidatedAtoms.clone().set(t,n),dirtyAtoms:Ge(e.dirtyAtoms,t)}},peekNodeInfo:function(e,t,n){const o=e.getState(),r=e.getGraph(t.version),a=Pe(n).nodeType;return Oe({type:a},{loadable:()=>He(e,t,n),isActive:()=>o.knownAtoms.has(n)||o.knownSelectors.has(n),isSet:()=>"selector"!==a&&t.atomValues.has(n),isModified:()=>t.dirtyAtoms.has(n),deps:()=>{var e;return Fe(null!==(e=r.nodeDeps.get(n))&&void 0!==e?e:[])},subscribers:()=>{var r,a;return{nodes:Fe(De(je(e,t,new Set([n])),(e=>e!==n))),components:te(null!==(r=null===(a=o.nodeToComponentSubscriptions.get(n))||void 0===a?void 0:a.values())&&void 0!==r?r:[],(([e])=>({name:e})))}}})},getDownstreamNodes:je};let Ze=null;var Ye={setInvalidateMemoizedSnapshot:function(e){Ze=e},invalidateMemoizedSnapshot:function(){var e;null===(e=Ze)||void 0===e||e()}};const{getDownstreamNodes:Je,getNodeLoadable:Xe,setNodeValue:Qe}=qe,{getNextComponentID:et}=Ne,{getNode:tt,getNodeMaybe:nt}=fe,{DefaultValue:ot}=fe,{reactMode:rt}=$,{AbstractRecoilValue:at,RecoilState:it,RecoilValueReadOnly:st,isRecoilValue:ut}=Q,{invalidateMemoizedSnapshot:ct}=Ye;function lt(e,t,n){if("set"===n.type){const{recoilValue:o,valueOrUpdater:r}=n,a=function(e,t,{key:n},o){if("function"==typeof o){const r=Xe(e,t,n);if("loading"===r.state){const e=`Tried to set atom or selector "${n}" using an updater function while the current state is pending, this is not currently supported.`;throw x(e),s(e)}if("hasError"===r.state)throw r.contents;return o(r.contents)}return o}(e,t,o,r),i=Qe(e,t,o.key,a);for(const[e,n]of i.entries())dt(t,e,n)}else if("setLoadable"===n.type){const{recoilValue:{key:e},loadable:o}=n;dt(t,e,o)}else if("markModified"===n.type){const{recoilValue:{key:e}}=n;t.dirtyAtoms.add(e)}else if("setUnvalidated"===n.type){var o;const{recoilValue:{key:e},unvalidatedValue:r}=n,a=nt(e);null==a||null===(o=a.invalidate)||void 0===o||o.call(a,t),t.atomValues.delete(e),t.nonvalidatedAtoms.set(e,r),t.dirtyAtoms.add(e)}else x(`Unknown action ${n.type}`)}function dt(e,t,n){"hasValue"===n.state&&n.contents instanceof ot?e.atomValues.delete(t):e.atomValues.set(t,n),e.dirtyAtoms.add(t),e.nonvalidatedAtoms.delete(t)}function ft(e,t){e.replaceState((n=>{const o=vt(n);for(const n of t)lt(e,o,n);return _t(e,o),ct(),o}))}function ht(e,t){if(pt.length){const n=pt[pt.length-1];let o=n.get(e);o||n.set(e,o=[]),o.push(t)}else ft(e,[t])}const pt=[];function vt(e){return{...e,atomValues:e.atomValues.clone(),nonvalidatedAtoms:e.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(e.dirtyAtoms)}}function _t(e,t){const n=Je(e,t,t.dirtyAtoms);for(const e of n){var o,r;null===(o=nt(e))||void 0===o||null===(r=o.invalidate)||void 0===r||r.call(o,t)}}function yt(e,t,n){ht(e,{type:"set",recoilValue:t,valueOrUpdater:n})}var St={RecoilValueReadOnly:st,AbstractRecoilValue:at,RecoilState:it,getRecoilValueAsLoadable:function(e,{key:t},n=e.getState().currentTree){var o,r;const a=e.getState();n.version!==a.currentTree.version&&n.version!==(null===(o=a.nextTree)||void 0===o?void 0:o.version)&&n.version!==(null===(r=a.previousTree)||void 0===r?void 0:r.version)&&x("Tried to read from a discarded tree");const i=Xe(e,n,t);return"loading"===i.state&&i.contents.catch((()=>{})),i},setRecoilValue:yt,setRecoilValueLoadable:function(e,t,n){if(n instanceof ot)return yt(e,t,n);ht(e,{type:"setLoadable",recoilValue:t,loadable:n})},markRecoilValueModified:function(e,t){ht(e,{type:"markModified",recoilValue:t})},setUnvalidatedRecoilValue:function(e,t,n){ht(e,{type:"setUnvalidated",recoilValue:t,unvalidatedValue:n})},subscribeToRecoilValue:function(e,{key:t},n,o=null){const r=et(),a=e.getState();a.nodeToComponentSubscriptions.has(t)||a.nodeToComponentSubscriptions.set(t,new Map),c(a.nodeToComponentSubscriptions.get(t)).set(r,[null!=o?o:"<not captured>",n]);const i=rt();if(i.early&&("LEGACY"===i.mode||"MUTABLE_SOURCE"===i.mode)){const o=e.getState().nextTree;o&&o.dirtyAtoms.has(t)&&n(o)}return{release:()=>{const n=e.getState(),o=n.nodeToComponentSubscriptions.get(t);void 0!==o&&o.has(r)?(o.delete(r),0===o.size&&n.nodeToComponentSubscriptions.delete(t)):x(`Subscription missing at release time for atom ${t}. This is a bug in Recoil.`)}}},isRecoilValue:ut,applyAtomValueWrites:function(e,t){const n=e.clone();return t.forEach(((e,t)=>{"hasValue"===e.state&&e.contents instanceof ot?n.delete(t):n.set(t,e)})),n},batchStart:function(){const e=new Map;return pt.push(e),()=>{for(const[t,n]of e)ft(t,n);pt.pop()!==e&&x("Incorrect order of batch popping")}},writeLoadableToTreeState:dt,invalidateDownstreams:_t,copyTreeState:vt,refreshRecoilValue:function(e,t){var n;const{currentTree:o}=e.getState(),r=tt(t.key);null===(n=r.clearCache)||void 0===n||n.call(r,e,o)}},mt=function(e,t,n){const o=e.entries();let r=o.next();for(;!r.done;){const a=r.value;if(t.call(n,a[1],a[0],e))return!0;r=o.next()}return!1};const{cleanUpNode:gt}=qe,{deleteNodeConfigIfPossible:Rt,getNode:Tt}=fe,{RetentionZone:bt}=Ie,wt=new Set;function At(e,t){const n=e.getState(),o=n.currentTree;if(n.nextTree)return void x("releaseNodesNowOnCurrentTree should only be called at the end of a batch");const r=new Set;for(const e of t)if(e instanceof bt)for(const t of Nt(n,e))r.add(t);else r.add(e);const a=function(e,t){const n=e.getState(),o=n.currentTree,r=e.getGraph(o.version),a=new Set,i=new Set;return function t(s){const u=new Set,l=function(e,t,n,o,r){const a=e.getGraph(t.version),i=[],s=new Set;for(;n.size>0;)u(c(n.values().next().value));return i;function u(e){if(o.has(e)||r.has(e))return void n.delete(e);if(s.has(e))return;const t=a.nodeToNodeSubscriptions.get(e);if(t)for(const e of t)u(e);s.add(e),n.delete(e),i.push(e)}}(e,o,s,a,i);for(const e of l){var d;if("recoilRoot"===Tt(e).retainedBy){i.add(e);continue}if((null!==(d=n.retention.referenceCounts.get(e))&&void 0!==d?d:0)>0){i.add(e);continue}if(Lt(e).some((e=>n.retention.referenceCounts.get(e)))){i.add(e);continue}const t=r.nodeToNodeSubscriptions.get(e);t&&mt(t,(e=>i.has(e)))?i.add(e):(a.add(e),u.add(e))}const f=new Set;for(const e of u)for(const t of null!==(h=r.nodeDeps.get(e))&&void 0!==h?h:wt){var h;a.has(t)||f.add(t)}f.size&&t(f)}(t),a}(e,r);for(const t of a)Et(e,o,t)}function Et(e,t,n){if(!P("recoil_memory_managament_2020"))return;gt(e,n);const o=e.getState();o.knownAtoms.delete(n),o.knownSelectors.delete(n),o.nodeTransactionSubscriptions.delete(n),o.retention.referenceCounts.delete(n);const r=Lt(n);for(const e of r){var a;null===(a=o.retention.nodesRetainedByZone.get(e))||void 0===a||a.delete(n)}t.atomValues.delete(n),t.dirtyAtoms.delete(n),t.nonvalidatedAtoms.delete(n);const i=o.graphsByVersion.get(t.version);if(i){const e=i.nodeDeps.get(n);if(void 0!==e){i.nodeDeps.delete(n);for(const t of e){var s;null===(s=i.nodeToNodeSubscriptions.get(t))||void 0===s||s.delete(n)}}i.nodeToNodeSubscriptions.delete(n)}Rt(n)}function Nt(e,t){var n;return null!==(n=e.retention.nodesRetainedByZone.get(t))&&void 0!==n?n:wt}function Lt(e){const t=Tt(e).retainedBy;return void 0===t||"components"===t||"recoilRoot"===t?[]:t instanceof bt?[t]:t}function kt(e,t){P("recoil_memory_managament_2020")&&(e.getState().retention.referenceCounts.delete(t),function(e,t){const n=e.getState();n.nextTree?n.retention.retainablesToCheckForRelease.add(t):At(e,new Set([t]))}(e,t))}var Vt={SUSPENSE_TIMEOUT_MS:12e4,updateRetainCount:function(e,t,n){var o;if(!P("recoil_memory_managament_2020"))return;const r=e.getState().retention.referenceCounts,a=(null!==(o=r.get(t))&&void 0!==o?o:0)+n;0===a?kt(e,t):r.set(t,a)},updateRetainCountToZero:kt,releaseScheduledRetainablesNow:function(e){if(!P("recoil_memory_managament_2020"))return;const t=e.getState();At(e,t.retention.retainablesToCheckForRelease),t.retention.retainablesToCheckForRelease.clear()},retainedByOptionWithDefault:function(e){return void 0===e?"recoilRoot":e}};const{unstable_batchedUpdates:Ct}=i();var Mt={unstable_batchedUpdates:Ct};const{unstable_batchedUpdates:Ut}=Mt;var It={unstable_batchedUpdates:Ut};const{batchStart:Bt}=St,{unstable_batchedUpdates:Dt}=It;let Ot=Dt||(e=>e());var Pt={getBatcher:()=>Ot,setBatcher:e=>{Ot=e},batchUpdates:e=>{Ot((()=>{let t=()=>{};try{t=Bt(),e()}finally{t()}}))}},xt=function*(e){for(const t of e)for(const e of t)yield e};const Ft="undefined"==typeof Window||"undefined"==typeof window,zt="undefined"!=typeof navigator&&"ReactNative"===navigator.product;var Gt={isSSR:Ft,isReactNative:zt,isWindow:e=>!Ft&&(e===window||e instanceof Window)},Wt={memoizeWithArgsHash:function(e,t){let n;return(...o)=>{n||(n={});const r=t(...o);return Object.hasOwnProperty.call(n,r)||(n[r]=e(...o)),n[r]}},memoizeOneWithArgsHash:function(e,t){let n,o;return(...r)=>{const a=t(...r);return n===a||(n=a,o=e(...r)),o}},memoizeOneWithArgsHashAndInvalidation:function(e,t){let n,o;return[(...r)=>{const a=t(...r);return n===a||(n=a,o=e(...r)),o},()=>{n=null}]}};const{batchUpdates:$t}=Pt,{initializeNode:Kt,peekNodeInfo:Ht}=qe,{graph:jt}=be,{getNextStoreID:qt}=Ne,{DEFAULT_VALUE:Zt,recoilValues:Yt,recoilValuesForKeys:Jt}=fe,{AbstractRecoilValue:Xt,getRecoilValueAsLoadable:Qt,setRecoilValue:en,setUnvalidatedRecoilValue:tn}=St,{updateRetainCount:nn}=Vt,{setInvalidateMemoizedSnapshot:on}=Ye,{getNextTreeStateVersion:rn,makeEmptyStoreState:an}=Me,{isSSR:sn}=Gt,{memoizeOneWithArgsHashAndInvalidation:un}=Wt;class cn{constructor(e,t){l(this,"_store",void 0),l(this,"_refCount",1),l(this,"getLoadable",(e=>(this.checkRefCount_INTERNAL(),Qt(this._store,e)))),l(this,"getPromise",(e=>(this.checkRefCount_INTERNAL(),this.getLoadable(e).toPromise()))),l(this,"getNodes_UNSTABLE",(e=>{if(this.checkRefCount_INTERNAL(),!0===(null==e?void 0:e.isModified)){if(!1===(null==e?void 0:e.isInitialized))return[];const t=this._store.getState().currentTree;return Jt(t.dirtyAtoms)}const t=this._store.getState().knownAtoms,n=this._store.getState().knownSelectors;return null==(null==e?void 0:e.isInitialized)?Yt.values():!0===e.isInitialized?Jt(xt([t,n])):De(Yt.values(),(({key:e})=>!t.has(e)&&!n.has(e)))})),l(this,"getInfo_UNSTABLE",(({key:e})=>(this.checkRefCount_INTERNAL(),Ht(this._store,this._store.getState().currentTree,e)))),l(this,"map",(e=>{this.checkRefCount_INTERNAL();const t=new hn(this,$t);return e(t),t})),l(this,"asyncMap",(async e=>{this.checkRefCount_INTERNAL();const t=new hn(this,$t);return t.retain(),await e(t),t.autoRelease_INTERNAL(),t})),this._store={storeID:qt(),parentStoreID:t,getState:()=>e,replaceState:t=>{e.currentTree=t(e.currentTree)},getGraph:t=>{const n=e.graphsByVersion;if(n.has(t))return c(n.get(t));const o=jt();return n.set(t,o),o},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw s("Cannot subscribe to Snapshots")}};for(const e of this._store.getState().knownAtoms)Kt(this._store,e,"get"),nn(this._store,e,1);this.autoRelease_INTERNAL()}retain(){this._refCount<=0&&x("Attempt to retain() Snapshot that was already released."),this._refCount++;let e=!1;return()=>{e||(e=!0,this._release())}}autoRelease_INTERNAL(){sn||window.setTimeout((()=>this._release()),10)}_release(){if(this._refCount--,0===this._refCount){if(this._store.getState().nodeCleanupFunctions.forEach((e=>e())),this._store.getState().nodeCleanupFunctions.clear(),!P("recoil_memory_managament_2020"))return}else this._refCount}isRetained(){return this._refCount>0}checkRefCount_INTERNAL(){P("recoil_memory_managament_2020")&&this._refCount}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 ln(e,t,n=!1){const o=e.getState(),r=n?rn():t.version;return{currentTree:{version:n?r:t.version,stateID:n?r: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(o.knownAtoms),knownSelectors:new Set(o.knownSelectors),transactionSubscriptions:new Map,nodeTransactionSubscriptions:new Map,nodeToComponentSubscriptions:new Map,queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set,graphsByVersion:(new Map).set(r,e.getGraph(t.version)),retention:{referenceCounts:new Map,nodesRetainedByZone:new Map,retainablesToCheckForRelease:new Set},nodeCleanupFunctions:new Map(te(o.nodeCleanupFunctions.entries(),(([e])=>[e,()=>{}])))}}const[dn,fn]=un(((e,t)=>{var n;const o=e.getState(),r="latest"===t?null!==(n=o.nextTree)&&void 0!==n?n:o.currentTree:c(o.previousTree);return new cn(ln(e,r),e.storeID)}),((e,t)=>{var n,o;return String(t)+String(e.storeID)+String(null===(n=e.getState().nextTree)||void 0===n?void 0:n.version)+String(e.getState().currentTree.version)+String(null===(o=e.getState().previousTree)||void 0===o?void 0:o.version)}));on(fn);class hn extends cn{constructor(e,t){super(ln(e.getStore_INTERNAL(),e.getStore_INTERNAL().getState().currentTree,!0),e.getStoreID()),l(this,"_batch",void 0),l(this,"set",((e,t)=>{this.checkRefCount_INTERNAL();const n=this.getStore_INTERNAL();this._batch((()=>{nn(n,e.key,1),en(this.getStore_INTERNAL(),e,t)}))})),l(this,"reset",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();this._batch((()=>{nn(t,e.key,1),en(this.getStore_INTERNAL(),e,Zt)}))})),l(this,"setUnvalidatedAtomValues_DEPRECATED",(e=>{this.checkRefCount_INTERNAL();const t=this.getStore_INTERNAL();$t((()=>{for(const[n,o]of e.entries())nn(t,n,1),tn(t,new Xt(n),o)}))})),this._batch=t}}var pn={Snapshot:cn,MutableSnapshot:hn,freshSnapshot:function(e){const t=new cn(an());return null!=e?t.map(e):t},cloneSnapshot:function(e,t="latest"){const n=dn(e,t);return n.isRetained()?n:(fn(),dn(e,t))}},vn=pn.Snapshot,_n=pn.MutableSnapshot,yn=pn.freshSnapshot,Sn=pn.cloneSnapshot,mn=Object.freeze({__proto__:null,Snapshot:vn,MutableSnapshot:_n,freshSnapshot:yn,cloneSnapshot:Sn}),gn=function(...e){const t=new Set;for(const n of e)for(const e of n)t.add(e);return t};const{useRef:Rn}=r();var Tn=function(e){const t=Rn(e);return t.current===e&&"function"==typeof e&&(t.current=e()),t};const{getNextTreeStateVersion:bn,makeEmptyStoreState:wn}=Me,{cleanUpNode:An,getDownstreamNodes:En,initializeNode:Nn,setNodeValue:Ln,setUnvalidatedAtomValue_DEPRECATED:kn}=qe,{graph:Vn}=be,{cloneGraph:Cn}=be,{getNextStoreID:Mn}=Ne,{createMutableSource:Un,reactMode:In}=$,{applyAtomValueWrites:Bn}=St,{releaseScheduledRetainablesNow:Dn}=Vt,{freshSnapshot:On}=mn,{useCallback:Pn,useContext:xn,useEffect:Fn,useMemo:zn,useRef:Gn,useState:Wn}=r();function $n(){throw s("This component must be used inside a <RecoilRoot> component.")}const Kn=Object.freeze({storeID:Mn(),getState:$n,replaceState:$n,getGraph:$n,subscribeToTransactions:$n,addTransactionMetadata:$n});let Hn=!1;function jn(e){if(Hn)throw s("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(null===t.nextTree){P("recoil_memory_managament_2020")&&P("recoil_release_on_cascading_update_killswitch_2021")&&t.commitDepth>0&&Dn(e);const n=t.currentTree.version,o=bn();t.nextTree={...t.currentTree,version:o,stateID:o,dirtyAtoms:new Set,transactionMetadata:{}},t.graphsByVersion.set(o,Cn(c(t.graphsByVersion.get(n))))}}const qn=r().createContext({current:Kn}),Zn=()=>xn(qn),Yn=r().createContext(null);function Jn(e,t,n){const o=En(e,n,n.dirtyAtoms);for(const e of o){const o=t.nodeToComponentSubscriptions.get(e);if(o)for(const[e,[t,r]]of o)r(n)}}function Xn(e){const t=e.getState(),n=t.currentTree,o=n.dirtyAtoms;if(o.size){for(const[n,r]of t.nodeTransactionSubscriptions)if(o.has(n))for(const[t,n]of r)n(e);for(const[n,o]of t.transactionSubscriptions)o(e);(!In().early||t.suspendedComponentResolvers.size>0)&&(Jn(e,t,n),t.suspendedComponentResolvers.forEach((e=>e())),t.suspendedComponentResolvers.clear())}t.queuedComponentCallbacks_DEPRECATED.forEach((e=>e(n))),t.queuedComponentCallbacks_DEPRECATED.splice(0,t.queuedComponentCallbacks_DEPRECATED.length)}function Qn({setNotifyBatcherOfChange:e}){const t=Zn(),[,n]=Wn([]);return e((()=>n({}))),Fn((()=>(e((()=>n({}))),()=>{e((()=>{}))})),[e]),Fn((()=>{he.enqueueExecution("Batcher",(()=>{!function(e){const t=e.getState();t.commitDepth++;try{const{nextTree:n}=t;if(null==n)return;t.previousTree=t.currentTree,t.currentTree=n,t.nextTree=null,Xn(e),null!=t.previousTree?t.graphsByVersion.delete(t.previousTree.version):x("Ended batch with no previous state, which is unexpected","recoil"),t.previousTree=null,P("recoil_memory_managament_2020")&&null==n&&Dn(e)}finally{t.commitDepth--}}(t.current)}))})),null}let eo=0;function to({initializeState_DEPRECATED:e,initializeState:t,store_INTERNAL:n,children:o}){let a;const i=e=>{const t=a.current.graphsByVersion;if(t.has(e))return c(t.get(e));const n=Vn();return t.set(e,n),n},s=(e,t)=>{if(null==t){const{transactionSubscriptions:t}=h.current.getState(),n=eo++;return t.set(n,e),{release:()=>{t.delete(n)}}}{const{nodeTransactionSubscriptions:n}=h.current.getState();n.has(t)||n.set(t,new Map);const o=eo++;return c(n.get(t)).set(o,e),{release:()=>{const e=n.get(t);e&&(e.delete(o),0===e.size&&n.delete(t))}}}},u=e=>{jn(h.current);for(const t of Object.keys(e))c(h.current.getState().nextTree).transactionMetadata[t]=e[t]},l=e=>{jn(h.current);const t=c(a.current.nextTree);let n;try{Hn=!0,n=e(t)}finally{Hn=!1}n!==t&&(a.current.nextTree=n,In().early&&Jn(h.current,a.current,n),c(d.current)())},d=Gn(null),f=Pn((e=>{d.current=e}),[d]),h=Tn((()=>null!=n?n:{storeID:Mn(),getState:()=>a.current,replaceState:l,getGraph:i,subscribeToTransactions:s,addTransactionMetadata:u}));null!=n&&(h.current=n),a=Tn((()=>null!=e?function(e,t){const n=wn();return t({set:(t,o)=>{const r=n.currentTree,a=Ln(e,r,t.key,o),i=new Set(a.keys()),s=r.nonvalidatedAtoms.clone();for(const e of i)s.delete(e);n.currentTree={...r,dirtyAtoms:gn(r.dirtyAtoms,i),atomValues:Bn(r.atomValues,a),nonvalidatedAtoms:s}},setUnvalidatedAtomValues:e=>{e.forEach(((e,t)=>{n.currentTree=kn(n.currentTree,t,e)}))}}),n}(h.current,e):null!=t?function(e){const t=On(e),n=t.getStore_INTERNAL().getState();return t.retain(),n.nodeCleanupFunctions.forEach((e=>e())),n.nodeCleanupFunctions.clear(),n}(t):wn()));const p=zn((()=>null==Un?void 0:Un(a,(()=>a.current.currentTree.version))),[a]);return Fn((()=>{const e=h.current;for(const t of new Set(e.getState().knownAtoms))Nn(e,t,"get");return()=>{for(const t of e.getState().knownAtoms)An(e,t)}}),[h]),r().createElement(qn.Provider,{value:h},r().createElement(Yn.Provider,{value:p},r().createElement(Qn,{setNotifyBatcherOfChange:f}),o))}var no={RecoilRoot:function(e){const{override:t,...n}=e,o=Zn();return!1===t&&o.current!==Kn?e.children:r().createElement(to,n)},useStoreRef:Zn,useRecoilMutableSource:function(){const e=xn(Yn);return null==e&&ee("Attempted to use a Recoil hook outside of a <RecoilRoot>. <RecoilRoot> must be an ancestor of any component that uses Recoil hooks."),e},useRecoilStoreID:function(){return Zn().current.storeID},notifyComponents_FOR_TESTING:Jn,sendEndOfBatchNotifications_FOR_TESTING:Xn};const{useEffect:oo,useRef:ro}=r();var ao=function(e){const t=ro();return oo((()=>{t.current=e})),t.current};const{useStoreRef:io}=no,{SUSPENSE_TIMEOUT_MS:so}=Vt,{updateRetainCount:uo}=Vt,{RetentionZone:co}=Ie,{useEffect:lo,useRef:fo}=r(),{isSSR:ho}=Gt;var po=function(e){if(P("recoil_memory_managament_2020"))return function(e){const t=(Array.isArray(e)?e:[e]).map((e=>e instanceof co?e:e.key)),n=io();lo((()=>{if(!P("recoil_memory_managament_2020"))return;const e=n.current;if(o.current&&!ho)window.clearTimeout(o.current),o.current=null;else for(const n of t)uo(e,n,1);return()=>{for(const n of t)uo(e,n,-1)}}),[n,...t]);const o=fo(),r=ao(t);if(!(ho||void 0!==r&&function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,o=e.length;n<o;n++)if(e[n]!==t[n])return!1;return!0}(r,t))){const e=n.current;for(const n of t)uo(e,n,1);if(r)for(const t of r)uo(e,t,-1);o.current&&window.clearTimeout(o.current),o.current=window.setTimeout((()=>{o.current=null;for(const n of t)uo(e,n,-1)}),so)}}(e)},vo=function(){return"<component name not available>"};const{batchUpdates:_o}=Pt,{DEFAULT_VALUE:yo}=fe,{currentRendererSupportsUseSyncExternalStore:So,reactMode:mo,useMutableSource:go,useSyncExternalStore:Ro}=$,{useRecoilMutableSource:To,useStoreRef:bo}=no,{isRecoilValue:wo}=Q,{AbstractRecoilValue:Ao,getRecoilValueAsLoadable:Eo,setRecoilValue:No,setUnvalidatedRecoilValue:Lo,subscribeToRecoilValue:ko}=St,{useCallback:Vo,useEffect:Co,useMemo:Mo,useRef:Uo,useState:Io}=r(),{setByAddingToSet:Bo}=Be,{isSSR:Do}=Gt;function Oo(e,t,n){if("hasValue"===e.state)return e.contents;if("loading"===e.state)throw new Promise((t=>{const o=n.current.getState().suspendedComponentResolvers;o.add(t),Do&&u(e.contents)&&e.contents.finally((()=>{o.delete(t)}))}));throw"hasError"===e.state?e.contents:s(`Invalid value of loadable atom "${t.key}"`)}function Po(e){const t=bo(),n=vo(),o=Vo((()=>{var n;const o=t.current,r=o.getState(),a=mo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return{loadable:Eo(o,e,a),key:e.key}}),[t,e]),r=Vo((e=>{let t;return()=>{var n,o;const r=e();return null!==(n=t)&&void 0!==n&&n.loadable.is(r.loadable)&&(null===(o=t)||void 0===o?void 0:o.key)===r.key?t:(t=r,r)}}),[]),a=Mo((()=>r(o)),[o,r]),i=Vo((o=>{const r=t.current;return ko(r,e,o,n).release}),[t,e,n]);return Ro(i,a,a).loadable}function xo(e){const t=bo(),n=Vo((()=>{var n;const o=t.current,r=o.getState(),a=mo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return Eo(o,e,a)}),[t,e]),o=Vo((()=>n()),[n]),r=vo(),a=Vo(((o,a)=>{const i=t.current;return ko(i,e,(()=>{if(!P("recoil_suppress_rerender_in_callback"))return a();const e=n();c.current.is(e)||a(),c.current=e}),r).release}),[t,e,r,n]),i=To();if(null==i)throw s("Recoil hooks must be used in components contained within a <RecoilRoot> component.");const u=go(i,o,a),c=Uo(u);return Co((()=>{c.current=u})),u}function Fo(e){const t=bo(),n=vo(),o=Vo((()=>{var n;const o=t.current,r=o.getState(),a=mo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return Eo(o,e,a)}),[t,e]),r=Vo((()=>({loadable:o(),key:e.key})),[o,e.key]),a=Vo((e=>{const t=r();return e.loadable.is(t.loadable)&&e.key===t.key?e:t}),[r]);Co((()=>{const o=ko(t.current,e,(e=>{s(a)}),n);return s(a),o.release}),[n,e,t,a]);const[i,s]=Io(r);return i.key!==e.key?r().loadable:i.loadable}function zo(e){const t=bo(),[,n]=Io([]),o=vo(),r=Vo((()=>{var n;const o=t.current,r=o.getState(),a=mo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree;return Eo(o,e,a)}),[t,e]),a=r(),i=Uo(a);return Co((()=>{i.current=a})),Co((()=>{const a=t.current,s=a.getState(),u=ko(a,e,(e=>{var t;if(!P("recoil_suppress_rerender_in_callback"))return n([]);const o=r();null!==(t=i.current)&&void 0!==t&&t.is(o)||n(o),i.current=o}),o);if(s.nextTree)a.getState().queuedComponentCallbacks_DEPRECATED.push((()=>{i.current=null,n([])}));else{var c;if(!P("recoil_suppress_rerender_in_callback"))return n([]);const e=r();null!==(c=i.current)&&void 0!==c&&c.is(e)||n(e),i.current=e}return u.release}),[o,r,e,t]),a}function Go(e){return P("recoil_memory_managament_2020")&&po(e),{TRANSITION_SUPPORT:Fo,SYNC_EXTERNAL_STORE:So()?Po:Fo,MUTABLE_SOURCE:xo,LEGACY:zo}[mo().mode](e)}function Wo(e){const t=bo();return Oo(Go(e),e,t)}function $o(e){const t=bo();return Vo((n=>{No(t.current,e,n)}),[t,e])}function Ko(e){return P("recoil_memory_managament_2020")&&po(e),Fo(e)}function Ho(e){const t=bo();return Oo(Ko(e),e,t)}var jo={recoilComponentGetRecoilValueCount_FOR_TESTING:{current:0},useRecoilInterface:function(){const e=vo(),t=bo(),[,n]=Io([]),o=Uo(new Set);o.current=new Set;const r=Uo(new Set),a=Uo(new Map),i=Vo((e=>{const t=a.current.get(e);t&&(t.release(),a.current.delete(e))}),[a]),s=Vo(((e,t)=>{a.current.has(t)&&n([])}),[]);return Co((()=>{const n=t.current;ge(o.current,r.current).forEach((t=>{if(a.current.has(t))return void ee(`Double subscription to RecoilValue "${t}"`);const o=ko(n,new Ao(t),(e=>s(e,t)),e);a.current.set(t,o),n.getState().nextTree?n.getState().queuedComponentCallbacks_DEPRECATED.push((()=>{s(n.getState(),t)})):s(n.getState(),t)})),ge(r.current,o.current).forEach((e=>{i(e)})),r.current=o.current})),Co((()=>{const n=a.current;return ge(o.current,new Set(n.keys())).forEach((o=>{const r=ko(t.current,new Ao(o),(e=>s(e,o)),e);n.set(o,r)})),()=>n.forEach(((e,t)=>i(t)))}),[e,t,i,s]),Mo((()=>{function e(e){return n=>{No(t.current,e,n)}}function n(e){var n;o.current.has(e.key)||(o.current=Bo(o.current,e.key));const r=t.current.getState();return Eo(t.current,e,mo().early&&null!==(n=r.nextTree)&&void 0!==n?n:r.currentTree)}function r(e){return Oo(n(e),e,t)}return{getRecoilValue:r,getRecoilValueLoadable:n,getRecoilState:function(t){return[r(t),e(t)]},getRecoilStateLoadable:function(t){return[n(t),e(t)]},getSetRecoilState:e,getResetRecoilState:function(e){return()=>No(t.current,e,yo)}}}),[o,t])},useRecoilState:function(e){return[Wo(e),$o(e)]},useRecoilStateLoadable:function(e){return[Go(e),$o(e)]},useRecoilValue:Wo,useRecoilValueLoadable:Go,useResetRecoilState:function(e){const t=bo();return Vo((()=>{No(t.current,e,yo)}),[t,e])},useSetRecoilState:$o,useSetUnvalidatedAtomValues:function(){const e=bo();return(t,n={})=>{_o((()=>{e.current.addTransactionMetadata(n),t.forEach(((t,n)=>Lo(e.current,new Ao(n),t)))}))}},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Ko,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Ho,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:function(e){return[Ho(e),$o(e)]}};const{batchUpdates:qo}=Pt,{DEFAULT_VALUE:Zo,getNode:Yo,nodes:Jo}=fe,{useStoreRef:Xo}=no,{AbstractRecoilValue:Qo,setRecoilValueLoadable:er}=St,{SUSPENSE_TIMEOUT_MS:tr}=Vt,{cloneSnapshot:nr}=mn,{useCallback:or,useEffect:rr,useRef:ar,useState:ir}=r(),{isSSR:sr}=Gt;function ur(e){const t=Xo();rr((()=>t.current.subscribeToTransactions(e).release),[e,t])}function cr(e){const t=e.atomValues.toMap(),n=Re(function(e,t){const n=new Map;for(const[o,r]of e)t(r,o)&&n.set(o,r);return n}(t,((e,t)=>{const n=Yo(t).persistence_UNSTABLE;return null!=n&&"none"!==n.type&&"hasValue"===e.state})),(e=>e.contents));return function(...e){const t=new Map;for(let n=0;n<e.length;n++){const o=e[n].keys();let r;for(;!(r=o.next()).done;)t.set(r.value,e[n].get(r.value))}return t}(e.nonvalidatedAtoms.toMap(),n)}function lr(e,t){var n;const o=e.getState(),r=null!==(n=o.nextTree)&&void 0!==n?n:o.currentTree,a=t.getStore_INTERNAL().getState().currentTree;qo((()=>{const n=new Set;for(const e of[r.atomValues.keys(),a.atomValues.keys()])for(const t of e){var o,i;(null===(o=r.atomValues.get(t))||void 0===o?void 0:o.contents)!==(null===(i=a.atomValues.get(t))||void 0===i?void 0:i.contents)&&Yo(t).shouldRestoreFromSnapshots&&n.add(t)}n.forEach((t=>{er(e,new Qo(t),a.atomValues.has(t)?c(a.atomValues.get(t)):Zo)})),e.replaceState((e=>({...e,stateID:t.getID()})))}))}var dr={useRecoilSnapshot:function(){const e=Xo(),[t,n]=ir((()=>nr(e.current))),o=ao(t),r=ar(),a=ar();var i;(ur(or((e=>n(nr(e))),[])),rr((()=>{const e=t.retain();var n;return r.current&&!sr&&(window.clearTimeout(r.current),r.current=null,null===(n=a.current)||void 0===n||n.call(a),a.current=null),()=>{window.setTimeout(e,10)}}),[t]),o===t||sr)||(r.current&&(window.clearTimeout(r.current),r.current=null,null===(i=a.current)||void 0===i||i.call(a),a.current=null),a.current=t.retain(),r.current=window.setTimeout((()=>{var e;r.current=null,null===(e=a.current)||void 0===e||e.call(a),a.current=null}),tr));return t},gotoSnapshot:lr,useGotoRecoilSnapshot:function(){const e=Xo();return or((t=>lr(e.current,t)),[e])},useRecoilTransactionObserver:function(e){ur(or((t=>{const n=nr(t,"latest"),o=nr(t,"previous");e({snapshot:n,previousSnapshot:o})}),[e]))},useTransactionObservation_DEPRECATED:function(e){ur(or((t=>{let n=t.getState().previousTree;const o=t.getState().currentTree;n||(x("Transaction subscribers notified without a previous tree being present -- this is a bug in Recoil"),n=t.getState().currentTree);const r=cr(o),a=cr(n),i=Re(Jo,(e=>{var t,n,o,r;return{persistence_UNSTABLE:{type:null!==(t=null===(n=e.persistence_UNSTABLE)||void 0===n?void 0:n.type)&&void 0!==t?t:"none",backButton:null!==(o=null===(r=e.persistence_UNSTABLE)||void 0===r?void 0:r.backButton)&&void 0!==o&&o}}})),s=function(e,t){const n=new Set;for(const o of e)t(o)&&n.add(o);return n}(o.dirtyAtoms,(e=>r.has(e)||a.has(e)));e({atomValues:r,previousAtomValues:a,atomInfo:i,modifiedAtoms:s,transactionMetadata:{...o.transactionMetadata}})}),[e]))},useTransactionSubscription_DEPRECATED:ur};const{peekNodeInfo:fr}=qe,{useStoreRef:hr}=no;const{reactMode:pr}=$,{RecoilRoot:vr,useStoreRef:_r}=no,{useMemo:yr}=r();const{loadableWithValue:Sr}=V,{initializeNode:mr}=qe,{DEFAULT_VALUE:gr,getNode:Rr}=fe,{copyTreeState:Tr,getRecoilValueAsLoadable:br,invalidateDownstreams:wr,writeLoadableToTreeState:Ar}=St;function Er(e){return"atom"===Rr(e.key).nodeType}class Nr{constructor(e,t){l(this,"_store",void 0),l(this,"_treeState",void 0),l(this,"_changes",void 0),l(this,"get",(e=>{if(this._changes.has(e.key))return this._changes.get(e.key);if(!Er(e))throw s("Reading selectors within atomicUpdate is not supported");const t=br(this._store,e,this._treeState);if("hasValue"===t.state)return t.contents;throw"hasError"===t.state?t.contents:s(`Expected Recoil atom ${e.key} to have a value, but it is in a loading state.`)})),l(this,"set",((e,t)=>{if(!Er(e))throw s("Setting selectors within atomicUpdate is not supported");if("function"==typeof t){const n=this.get(e);this._changes.set(e.key,t(n))}else mr(this._store,e.key,"set"),this._changes.set(e.key,t)})),l(this,"reset",(e=>{this.set(e,gr)})),this._store=e,this._treeState=t,this._changes=new Map}newTreeState_INTERNAL(){if(0===this._changes.size)return this._treeState;const e=Tr(this._treeState);for(const[t,n]of this._changes)Ar(e,t,Sr(n));return wr(this._store,e),e}}var Lr=function(e){return t=>{e.replaceState((n=>{const o=new Nr(e,n);return t(o),o.newTreeState_INTERNAL()}))}},kr=Object.freeze({__proto__:null,atomicUpdater:Lr}),Vr=function(e,t){if(!e)throw new Error(t)};const{atomicUpdater:Cr}=kr,{batchUpdates:Mr}=Pt,{DEFAULT_VALUE:Ur}=fe,{useStoreRef:Ir}=no,{refreshRecoilValue:Br,setRecoilValue:Dr}=St,{cloneSnapshot:Or}=mn,{gotoSnapshot:Pr}=dr,{useCallback:xr}=r();class Fr{}const zr=new Fr;function Gr(e,t,n,o){let r,a=zr;var i;return Mr((()=>{const i="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("function"!=typeof t)throw s(i);const u=Oe({...null!=o?o:{},set:(t,n)=>Dr(e,t,n),reset:t=>Dr(e,t,Ur),refresh:t=>Br(e,t),gotoSnapshot:t=>Pr(e,t),transact_UNSTABLE:t=>Cr(e)(t)},{snapshot:()=>{const t=Or(e);return r=t.retain(),t}}),c=t(u);if("function"!=typeof c)throw s(i);a=c(...n)})),a instanceof Fr&&Vr(!1),u(a)?a=a.finally((()=>{var e;null===(e=r)||void 0===e||e()})):null===(i=r)||void 0===i||i(),a}var Wr={recoilCallback:Gr,useRecoilCallback:function(e,t){const n=Ir();return xr(((...t)=>Gr(n.current,e,t)),null!=t?[...t,n]:void 0)}};const{useStoreRef:$r}=no,{refreshRecoilValue:Kr}=St,{useCallback:Hr}=r();const{atomicUpdater:jr}=kr,{useStoreRef:qr}=no,{useMemo:Zr}=r();var Yr=Object.freeze({__proto__:null,WrappedValue:class{constructor(e){l(this,"value",void 0),this.value=e}}});const{isFastRefreshEnabled:Jr}=$;class Xr extends Error{}var Qr=Object.freeze({__proto__:null,TreeCache:class{constructor(e){var t,n,o;l(this,"_name",void 0),l(this,"_numLeafs",void 0),l(this,"_root",void 0),l(this,"_onHit",void 0),l(this,"_onSet",void 0),l(this,"_mapNodeValue",void 0),this._name=null==e?void 0:e.name,this._numLeafs=0,this._root=null,this._onHit=null!==(t=null==e?void 0:e.onHit)&&void 0!==t?t:()=>{},this._onSet=null!==(n=null==e?void 0:e.onSet)&&void 0!==n?n:()=>{},this._mapNodeValue=null!==(o=null==e?void 0:e.mapNodeValue)&&void 0!==o?o:e=>e}size(){return this._numLeafs}root(){return this._root}get(e,t){var n;return null===(n=this.getLeafNode(e,t))||void 0===n?void 0:n.value}getLeafNode(e,t){if(null==this._root)return;let n=this._root;for(;n;){if(null==t||t.onNodeVisit(n),"leaf"===n.type)return this._onHit(n),n;const o=this._mapNodeValue(e(n.nodeKey));n=n.branches.get(o)}}set(e,t,n){const o=()=>{var o,r,a,i;let s,u;for(const[t,o]of e){var c,l,d;const e=this._root;if("leaf"===(null==e?void 0:e.type))throw this.invalidCacheError();const r=s;if(s=r?r.branches.get(u):e,s=null!==(c=s)&&void 0!==c?c:{type:"branch",nodeKey:t,parent:r,branches:new Map,branchKey:u},"branch"!==s.type||s.nodeKey!==t)throw this.invalidCacheError();null==r||r.branches.set(u,s),null==n||null===(l=n.onNodeVisit)||void 0===l||l.call(n,s),u=this._mapNodeValue(o),this._root=null!==(d=this._root)&&void 0!==d?d:s}const f=s?null===(o=s)||void 0===o?void 0:o.branches.get(u):this._root;if(null!=f&&("leaf"!==f.type||f.branchKey!==u))throw this.invalidCacheError();const h={type:"leaf",value:t,parent:s,branchKey:u};null===(r=s)||void 0===r||r.branches.set(u,h),this._root=null!==(a=this._root)&&void 0!==a?a:h,this._numLeafs++,this._onSet(h),null==n||null===(i=n.onNodeVisit)||void 0===i||i.call(n,h)};try{o()}catch(e){if(!(e instanceof Xr))throw e;this.clear(),o()}}delete(e){const t=this.root();if(!t)return!1;if(e===t)return this._root=null,this._numLeafs=0,!0;let n=e.parent,o=e.branchKey;for(;n;){var r;if(n.branches.delete(o),n===t)return 0===n.branches.size?(this._root=null,this._numLeafs=0):this._numLeafs--,!0;if(n.branches.size>0)break;o=null===(r=n)||void 0===r?void 0:r.branchKey,n=n.parent}for(;n!==t;n=n.parent)if(null==n)return!1;return this._numLeafs--,!0}clear(){this._numLeafs=0,this._root=null}invalidCacheError(){const e=Jr()?"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 x(e+(null!=this._name?` - ${this._name}`:"")),new Xr}}}),ea=Object.freeze({__proto__:null,LRUCache:class{constructor(e){var t;l(this,"_maxSize",void 0),l(this,"_size",void 0),l(this,"_head",void 0),l(this,"_tail",void 0),l(this,"_map",void 0),l(this,"_keyMapper",void 0),this._maxSize=e.maxSize,this._size=0,this._head=null,this._tail=null,this._map=new Map,this._keyMapper=null!==(t=e.mapKey)&&void 0!==t?t:e=>e}head(){return this._head}tail(){return this._tail}size(){return this._size}maxSize(){return this._maxSize}has(e){return this._map.has(this._keyMapper(e))}get(e){const t=this._keyMapper(e),n=this._map.get(t);if(n)return this.set(e,n.value),n.value}set(e,t){const n=this._keyMapper(e);this._map.get(n)&&this.delete(e);const o=this.head(),r={key:e,right:o,left:null,value:t};o?o.left=r:this._tail=r,this._map.set(n,r),this._head=r,this._size++,this._maybeDeleteLRU()}_maybeDeleteLRU(){this.size()>this.maxSize()&&this.deleteLru()}deleteLru(){const e=this.tail();e&&this.delete(e.key)}delete(e){const t=this._keyMapper(e);if(!this._size||!this._map.has(t))return;const n=c(this._map.get(t)),o=n.right,r=n.left;o&&(o.left=n.left),r&&(r.right=n.right),n===this.head()&&(this._head=o),n===this.tail()&&(this._tail=r),this._map.delete(t),this._size--}clear(){this._size=0,this._head=null,this._tail=null,this._map=new Map}}});const{LRUCache:ta}=ea,{TreeCache:na}=Qr;var oa=function({name:e,maxSize:t,mapNodeValue:n=(e=>e)}){const o=new ta({maxSize:t}),r=new na({name:e,mapNodeValue:n,onHit:e=>{o.set(e,!0)},onSet:e=>{const n=o.tail();o.set(e,!0),n&&r.size()>t&&r.delete(n.key)}});return r};function ra(e,t,n){if("string"==typeof e&&!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(!0!==(null==t?void 0:t.allowFunctions))throw s("Attempt to serialize function in a Recoil cache key");return`__FUNCTION(${e.name})__`}if(null===e)return"null";var o;if("object"!=typeof e)return null!==(o=JSON.stringify(e))&&void 0!==o?o:"";if(u(e))return"__PROMISE__";if(Array.isArray(e))return`[${e.map(((e,n)=>ra(e,t,n.toString())))}]`;if("function"==typeof e.toJSON)return ra(e.toJSON(n),t,n);if(e instanceof Map){const o={};for(const[n,r]of e)o["string"==typeof n?n:ra(n,t)]=r;return ra(o,t,n)}return e instanceof Set?ra(Array.from(e).sort(((e,n)=>ra(e,t).localeCompare(ra(n,t)))),t,n):void 0!==Symbol&&null!=e[Symbol.iterator]&&"function"==typeof e[Symbol.iterator]?ra(Array.from(e),t,n):`{${Object.keys(e).filter((t=>void 0!==e[t])).sort().map((n=>`${ra(n,t)}:${ra(e[n],t,n)}`)).join(",")}}`}var aa=function(e,t={allowFunctions:!1}){return ra(e,t)};const{TreeCache:ia}=Qr,sa={equality:"reference",eviction:"keep-all",maxSize:1/0};const{isReactNative:ua,isWindow:ca}=Gt;const{isLoadable:la,loadableWithError:da,loadableWithPromise:fa,loadableWithValue:ha}=V,{WrappedValue:pa}=Yr,{getNodeLoadable:va,peekNodeLoadable:_a,setNodeValue:ya}=qe,{saveDepsToStore:Sa}=be,{DEFAULT_VALUE:ma,getConfigDeletionHandler:ga,getNode:Ra,registerNode:Ta}=fe,{isRecoilValue:ba}=Q,{markRecoilValueModified:wa}=St,{retainedByOptionWithDefault:Aa}=Vt,{recoilCallback:Ea}=Wr,{startPerfBlock:Na}={startPerfBlock:function(e){return()=>null}};class La{}const ka=new La,Va=[],Ca=new Map,Ma=(()=>{let e=0;return()=>e++})();function Ua(e){let t=null;const{key:n,get:o,cachePolicy_UNSTABLE:r}=e,a=null!=e.set?e.set:void 0,i=new Set,l=function({equality:e=sa.equality,eviction:t=sa.eviction,maxSize:n=sa.maxSize}=sa,o){const r=function(e){switch(e){case"reference":return e=>e;case"value":return e=>aa(e)}throw s(`Unrecognized equality policy ${e}`)}(e);return function(e,t,n,o){switch(e){case"keep-all":return new ia({name:o,mapNodeValue:n});case"lru":return oa({name:o,maxSize:c(t),mapNodeValue:n});case"most-recent":return oa({name:o,maxSize:1,mapNodeValue:n})}throw s(`Unrecognized eviction policy ${e}`)}(t,n,r,o)}(null!=r?r:{equality:"reference",eviction:"keep-all"},n),d=Aa(e.retainedBy_UNSTABLE),f=new Map;let h=0;function p(){return!P("recoil_memory_managament_2020")||h>0}function v(e){return e.getState().knownSelectors.add(n),h++,()=>{h--}}function _(){return void 0!==ga(n)&&!p()}function y(e,t,n,o,r){k(t,o,r),S(e,n)}function S(e,t){L(e,t)&&N(e),m(t,!0)}function m(e,n){const o=Ca.get(e);if(null!=o){for(const e of o)wa(e,c(t));n&&Ca.delete(e)}}function g(e,t){let n=Ca.get(t);null==n&&Ca.set(t,n=new Set),n.add(e)}function R(e,t,n,o,r,a){return t.then((o=>{if(!p())throw N(e),ka;null!=a.loadingDepKey&&a.loadingDepPromise===t?n.atomValues.set(a.loadingDepKey,ha(o)):e.getState().knownSelectors.forEach((e=>{n.atomValues.delete(e)}));const i=w(e,n);if(i&&"loading"!==i.state){if((L(e,r)||null==E(e))&&S(e,r),"hasValue"===i.state)return i.contents;throw i.contents}if(!L(e,r)){const t=A(e,n);if(null!=t)return t.loadingLoadable.contents}const[s,u]=b(e,n,r);if("loading"!==s.state&&y(e,n,r,s,u),"hasError"===s.state)throw s.contents;return s.contents})).catch((t=>{if(t instanceof La)throw ka;if(!p())throw N(e),ka;const a=da(t);throw y(e,n,r,a,o),t}))}function T(e,t,o,r){var a,s,u,c,l,d,f;(L(e,r)||t.version===(null===(a=e.getState())||void 0===a||null===(s=a.currentTree)||void 0===s?void 0:s.version)||t.version===(null===(u=e.getState())||void 0===u||null===(c=u.nextTree)||void 0===c?void 0:c.version))&&Sa(n,o,e,null!==(l=null===(d=e.getState())||void 0===d||null===(f=d.nextTree)||void 0===f?void 0:f.version)&&void 0!==l?l:e.getState().currentTree.version);for(const e of o)i.add(e)}function b(e,r,a){const i=Na(n);let l=!0,d=!0;const f=()=>{i(),d=!1};let h,v,_=!1;const S={loadingDepKey:null,loadingDepPromise:null},g=new Map;function b({key:t}){const n=va(e,r,t);switch(g.set(t,n),l||(T(e,r,new Set(g.keys()),a),function(e,t){L(e,t)&&(c(E(e)).stateVersions.clear(),m(t,!1))}(e,a)),n.state){case"hasValue":return n.contents;case"hasError":throw n.contents;case"loading":throw S.loadingDepKey=t,S.loadingDepPromise=n.contents,n.contents}throw s("Invalid Loadable state")}const w=n=>(...o)=>{if(d)throw s("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 null==t&&Vr(!1),Ea(e,n,o,{node:t})};try{h=o({get:b,getCallback:w}),h=ba(h)?b(h):h,la(h)&&("hasError"===h.state&&(_=!0),h=h.contents),u(h)?h=function(e,t,n,o,r,a){return t.then((t=>{if(!p())throw N(e),ka;const a=ha(t);return y(e,n,r,a,o),t})).catch((t=>{if(!p())throw N(e),ka;if(u(t))return R(e,t,n,o,r,a);const i=da(t);throw y(e,n,r,i,o),t}))}(e,h,r,g,a,S).finally(f):f(),h=h instanceof pa?h.value:h}catch(t){h=t,u(h)?h=R(e,h,r,g,a,S).finally(f):(_=!0,f())}return v=_?da(h):u(h)?fa(h):ha(h),l=!1,function(e,t,n){if(L(e,t)){const t=E(e);null!=t&&(t.depValuesDiscoveredSoFarDuringAsyncWork=n)}}(e,a,g),T(e,r,new Set(g.keys()),a),[v,g]}function w(e,t){let o=t.atomValues.get(n);if(null!=o)return o;const r=new Set;try{o=l.get((n=>("string"!=typeof n&&Vr(!1),va(e,t,n).contents)),{onNodeVisit:e=>{"branch"===e.type&&e.nodeKey!==n&&r.add(e.nodeKey)}})}catch(e){throw s(`Problem with cache lookup for selector "${n}": ${e.message}`)}var a;return o&&(t.atomValues.set(n,o),T(e,t,r,null===(a=E(e))||void 0===a?void 0:a.executionID)),o}function A(e,t){const n=xt([f.has(e)?[c(f.get(e))]:[],te(De(f,(([t])=>t!==e)),(([,e])=>e))]);function o(n){for(const[o,r]of n)if(!va(e,t,o).is(r))return!0;return!1}for(const e of n){if(e.stateVersions.get(t.version)||!o(e.depValuesDiscoveredSoFarDuringAsyncWork))return e.stateVersions.set(t.version,!0),e;e.stateVersions.set(t.version,!1)}}function E(e){return f.get(e)}function N(e){f.delete(e)}function L(e,t){var n;return t===(null===(n=E(e))||void 0===n?void 0:n.executionID)}function k(e,t,o){e.atomValues.set(n,t);try{l.set(function(e){return Array.from(e.entries()).map((([e,t])=>[e,t.contents]))}(o),t)}catch(e){throw s(`Problem with setting cache for selector "${n}": ${e.message}`)}}function V(e,t){const o=t.atomValues.get(n);return null!=o?o:l.get((n=>{var o;return"string"!=typeof n&&Vr(!1),null===(o=_a(e,t,n))||void 0===o?void 0:o.contents}))}function C(e,t){return function(o){if(Va.includes(n)){const e=`Recoil selector has circular dependencies: ${Va.slice(Va.indexOf(n)).join(" → ")}`;return da(s(e))}Va.push(n);try{return function(e,t){const n=w(e,t);if(null!=n)return N(e),n;const o=A(e,t);var r;if(null!=o)return"loading"===(null===(r=o.loadingLoadable)||void 0===r?void 0:r.state)&&g(e,o.executionID),o.loadingLoadable;const a=Ma(),[i,s]=b(e,t,a);return"loading"===i.state?(function(e,t,n,o,r){f.set(e,{depValuesDiscoveredSoFarDuringAsyncWork:o,executionID:t,loadingLoadable:n,stateVersions:new Map([[r.version,!0]])})}(e,a,i,s,t),g(e,a)):(N(e),k(t,i,s)),i}(e,t)}finally{Va.pop()}}()}function M(e){e.atomValues.delete(n)}function U(e,n){null==t&&Vr(!1);for(const t of i){var o;const r=Ra(t);null===(o=r.clearCache)||void 0===o||o.call(r,e,n)}i.clear(),M(n),l.clear(),wa(e,t)}return t=Ta(null!=a?{key:n,nodeType:"selector",peek:V,get:C,set:(e,t,o)=>{let r=!1;const i=new Map;function c({key:o}){if(r)throw s("Recoil: Async selector sets are not currently supported.");const a=va(e,t,o);if("hasValue"===a.state)return a.contents;if("loading"===a.state){const e=`Getting value of asynchronous atom or selector "${o}" in a pending state while setting selector "${n}" is not yet supported.`;throw x(e),s(e)}throw a.contents}function l(n,o){if(r){const e="Recoil: Async selector sets are not currently supported.";throw x(e),s(e)}const a="function"==typeof o?o(c(n)):o;ya(e,t,n.key,a).forEach(((e,t)=>i.set(t,e)))}const d=a({set:l,get:c,reset:function(e){l(e,ma)}},o);if(void 0!==d)throw u(d)?s("Recoil: Async selector sets are not currently supported."):s("Recoil: selector set should be a void function.");return r=!0,i},init:v,invalidate:M,clearCache:U,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d}:{key:n,nodeType:"selector",peek:V,get:C,init:v,invalidate:M,clearCache:U,shouldDeleteConfigOnRelease:_,dangerouslyAllowMutability:e.dangerouslyAllowMutability,shouldRestoreFromSnapshots:!1,retainedBy:d})}Ua.value=e=>new pa(e);var Ia=Ua;const{isLoadable:Ba,loadableWithError:Da,loadableWithPromise:Oa,loadableWithValue:Pa}=V,{WrappedValue:xa}=Yr,{peekNodeInfo:Fa}=qe,{DEFAULT_VALUE:za,DefaultValue:Ga,getConfigDeletionHandler:Wa,registerNode:$a,setConfigDeletionHandler:Ka}=fe,{isRecoilValue:Ha}=Q,{getRecoilValueAsLoadable:ja,markRecoilValueModified:qa,setRecoilValue:Za,setRecoilValueLoadable:Ya}=St,{retainedByOptionWithDefault:Ja}=Vt,Xa=e=>e instanceof xa?e.value:e;function Qa(e){const{...t}=e,n="default"in e?e.default:new Promise((()=>{}));return Ha(n)?function(e){const t=Qa({...e,default:za,persistence_UNSTABLE:void 0===e.persistence_UNSTABLE?void 0:{...e.persistence_UNSTABLE,validator:t=>t instanceof Ga?t:c(e.persistence_UNSTABLE).validator(t,za)},effects:e.effects,effects_UNSTABLE:e.effects_UNSTABLE}),n=Ia({key:`${e.key}__withFallback`,get:({get:n})=>{const o=n(t);return o instanceof Ga?e.default:o},set:({set:e},n)=>e(t,n),cachePolicy_UNSTABLE:{eviction:"most-recent"},dangerouslyAllowMutability:e.dangerouslyAllowMutability});return Ka(n.key,Wa(e.key)),n}({...t,default:n}):function(e){const{key:t,persistence_UNSTABLE:n}=e,o=Ja(e.retainedBy_UNSTABLE);let r=0;function a(e){return Oa(e.then((e=>(l=Pa(e),e))).catch((e=>{throw l=Da(e),e})))}let i,l=u(e.default)?a(e.default):Ba(e.default)?"loading"===e.default.state?a(e.default.contents):e.default:Pa(Xa(e.default));l.contents;const d=new Map;function f(e,n){var o,r;return null!==(o=null!==(r=n.atomValues.get(t))&&void 0!==r?r:i)&&void 0!==o?o:l}const h=$a({key:t,nodeType:"atom",peek:f,get:function(e,o){if(o.atomValues.has(t))return c(o.atomValues.get(t));if(o.nonvalidatedAtoms.has(t)){if(null!=i)return i;if(null==n)return ee(`Tried to restore a persisted value for atom ${t} but it has no persistence settings.`),l;const e=o.nonvalidatedAtoms.get(t),r=n.validator(e,za),a=r instanceof Ga?l:Pa(r);return i=a,i}return l},set:function(e,n,o){if(n.atomValues.has(t)){const e=c(n.atomValues.get(t));if("hasValue"===e.state&&o===e.contents)return new Map}else if(!n.nonvalidatedAtoms.has(t)&&o instanceof Ga)return new Map;return i=void 0,(new Map).set(t,Pa(o))},init:function(n,o,a){var i;if(r++,n.getState().knownAtoms.add(t),"loading"===l.state){const _=()=>{var e;(null!==(e=n.getState().nextTree)&&void 0!==e?e:n.getState().currentTree).atomValues.has(t)||qa(n,h)};l.contents.finally(_)}const c=null!==(i=e.effects)&&void 0!==i?i:e.effects_UNSTABLE;if(null!=c){let y=za,S=!0,m=!1,g=null;function R(e){if(S&&e.key===t){const e=y;return e instanceof Ga?f(0,o):u(e)?Oa(e.then((e=>e instanceof Ga?l.toPromise():e))):Pa(e)}return ja(n,e)}function T(e){return R(e).toPromise()}function b(e){var o;const r=Fa(n,null!==(o=n.getState().nextTree)&&void 0!==o?o:n.getState().currentTree,e.key);return!S||e.key!==t||y instanceof Ga?r:{...r,isSet:!0,loadable:R(e)}}const w=e=>t=>{if(S){const n=R(h),o="hasValue"===n.state?n.contents:za;y="function"==typeof t?t(o):t,u(y)&&(y=y.then((t=>(g={effect:e,value:t},t))))}else{if(u(t))throw s("Setting atoms to async values is not implemented.");"function"!=typeof t&&(g={effect:e,value:Xa(t)}),Za(n,h,"function"==typeof t?n=>{const o=Xa(t(n));return g={effect:e,value:o},o}:Xa(t))}},A=e=>()=>w(e)(za),E=e=>o=>{var r;const{release:a}=n.subscribeToTransactions((n=>{var r;let{currentTree:a,previousTree:i}=n.getState();i||(x("Transaction subscribers notified without a next tree being present -- this is a bug in Recoil"),i=a);const s=null!==(r=a.atomValues.get(t))&&void 0!==r?r:l;if("hasValue"===s.state){var u,c,d,f;const n=s.contents,r=null!==(u=i.atomValues.get(t))&&void 0!==u?u:l,h="hasValue"===r.state?r.contents:za;(null===(c=g)||void 0===c?void 0:c.effect)!==e||(null===(d=g)||void 0===d?void 0:d.value)!==n?o(n,h,!a.atomValues.has(t)):(null===(f=g)||void 0===f?void 0:f.effect)===e&&(g=null)}}),t);d.set(n,[...null!==(r=d.get(n))&&void 0!==r?r:[],a])};for(const N of c)try{const L=N({node:h,storeID:n.storeID,parentStoreID_UNSTABLE:n.parentStoreID,trigger:a,setSelf:w(N),resetSelf:A(N),onSet:E(N),getPromise:T,getLoadable:R,getInfo_UNSTABLE:b});var p;null!=L&&d.set(n,[...null!==(p=d.get(n))&&void 0!==p?p:[],L])}catch(k){y=k,m=!0}if(S=!1,!(y instanceof Ga)){var v;const V=m?Da(y):u(y)?Oa(function(e,n){const o=n.then((n=>{var r,a;return(null===(a=(null!==(r=e.getState().nextTree)&&void 0!==r?r:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===o&&Za(e,h,n),n})).catch((n=>{var r,a;throw(null===(a=(null!==(r=e.getState().nextTree)&&void 0!==r?r:e.getState().currentTree).atomValues.get(t))||void 0===a?void 0:a.contents)===o&&Ya(e,h,Da(n)),n}));return o}(n,y)):Pa(Xa(y));V.contents,o.atomValues.set(t,V),null===(v=n.getState().nextTree)||void 0===v||v.atomValues.set(t,V)}}return()=>{var e;r--,null===(e=d.get(n))||void 0===e||e.forEach((e=>e())),d.delete(n)}},invalidate:function(){i=void 0},shouldDeleteConfigOnRelease:function(){return void 0!==Wa(t)&&r<=0},dangerouslyAllowMutability:e.dangerouslyAllowMutability,persistence_UNSTABLE:e.persistence_UNSTABLE?{type:e.persistence_UNSTABLE.type,backButton:e.persistence_UNSTABLE.backButton}:void 0,shouldRestoreFromSnapshots:!0,retainedBy:o});return h}({...t,default:n})}Qa.value=e=>new xa(e);var ei=Qa,ti=Object.freeze({__proto__:null,MapCache:class{constructor(e){var t;l(this,"_map",void 0),l(this,"_keyMapper",void 0),this._map=new Map,this._keyMapper=null!==(t=null==e?void 0:e.mapKey)&&void 0!==t?t:e=>e}size(){return this._map.size}has(e){return this._map.has(this._keyMapper(e))}get(e){return this._map.get(this._keyMapper(e))}set(e,t){this._map.set(this._keyMapper(e),t)}delete(e){this._map.delete(this._keyMapper(e))}clear(){this._map.clear()}}});const{LRUCache:ni}=ea,{MapCache:oi}=ti,ri={equality:"reference",eviction:"none",maxSize:1/0};var ai=function({equality:e=ri.equality,eviction:t=ri.eviction,maxSize:n=ri.maxSize}=ri){const o=function(e){switch(e){case"reference":return e=>e;case"value":return e=>aa(e)}throw s(`Unrecognized equality policy ${e}`)}(e);return function(e,t,n){switch(e){case"keep-all":return new oi({mapKey:n});case"lru":return new ni({mapKey:n,maxSize:c(t)});case"most-recent":return new ni({mapKey:n,maxSize:1})}throw s(`Unrecognized eviction policy ${e}`)}(t,n,o)};const{setConfigDeletionHandler:ii}=fe;const{setConfigDeletionHandler:si}=fe;let ui=0;var ci=function(e){var t,n;const o=ai({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return t=>{var n;let r;try{r=o.get(t)}catch(t){throw s(`Problem with cache lookup for selector ${e.key}: ${t.message}`)}if(null!=r)return r;const a=`${e.key}__selectorFamily/${null!==(n=aa(t,{allowFunctions:!0}))&&void 0!==n?n:"void"}/${ui++}`,i=n=>e.get(t)(n),u=e.cachePolicy_UNSTABLE,c="function"==typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE;let l;if(null!=e.set){const n=e.set;l=Ia({key:a,get:i,set:(e,o)=>n(t)(e,o),cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c})}else l=Ia({key:a,get:i,cachePolicy_UNSTABLE:u,dangerouslyAllowMutability:e.dangerouslyAllowMutability,retainedBy_UNSTABLE:c});return o.set(t,l),si(l.key,(()=>{o.delete(t)})),l}};const li=ci({key:"__constant",get:e=>()=>e,cachePolicyForParams_UNSTABLE:{equality:"reference"}});const di=ci({key:"__error",get:e=>()=>{throw s(e)},cachePolicyForParams_UNSTABLE:{equality:"reference"}});const{loadableWithError:fi,loadableWithPromise:hi,loadableWithValue:pi}=V;function vi(e,t){const n=Array(t.length).fill(void 0),o=Array(t.length).fill(void 0);for(const[r,a]of t.entries())try{n[r]=e(a)}catch(e){o[r]=e}return[n,o]}function _i(e){return null!=e&&!u(e)}function yi(e){return Array.isArray(e)?e:Object.getOwnPropertyNames(e).map((t=>e[t]))}function Si(e,t){return Array.isArray(e)?t:Object.getOwnPropertyNames(e).reduce(((e,n,o)=>({...e,[n]:t[o]})),{})}function mi(e,t,n){return Si(e,n.map(((e,n)=>null==e?pi(t[n]):u(e)?hi(e):fi(e))))}var gi={waitForNone:ci({key:"__waitForNone",get:e=>({get:t})=>{const n=yi(e),[o,r]=vi(t,n);return mi(e,o,r)},dangerouslyAllowMutability:!0}),waitForAny:ci({key:"__waitForAny",get:e=>({get:t})=>{const n=yi(e),[o,r]=vi(t,n);return r.some((e=>!u(e)))?mi(e,o,r):new Promise((t=>{for(const[n,a]of r.entries())u(a)&&a.then((a=>{o[n]=a,r[n]=void 0,t(mi(e,o,r))})).catch((a=>{r[n]=a,t(mi(e,o,r))}))}))},dangerouslyAllowMutability:!0}),waitForAll:ci({key:"__waitForAll",get:e=>({get:t})=>{const n=yi(e),[o,r]=vi(t,n);if(r.every((e=>null==e)))return Si(e,o);const a=r.find(_i);if(null!=a)throw a;return Promise.all(r).then((t=>{return Si(e,(n=o,t.map(((e,t)=>void 0===e?n[t]:e))));var n}))},dangerouslyAllowMutability:!0}),waitForAllSettled:ci({key:"__waitForAllSettled",get:e=>({get:t})=>{const n=yi(e),[o,r]=vi(t,n);return r.every((e=>!u(e)))?mi(e,o,r):Promise.all(r.map(((e,t)=>u(e)?e.then((e=>{o[t]=e,r[t]=void 0})).catch((e=>{o[t]=void 0,r[t]=e})):null))).then((()=>mi(e,o,r)))},dangerouslyAllowMutability:!0}),noWait:ci({key:"__noWait",get:e=>({get:t})=>{try{return Ia.value(pi(t(e)))}catch(e){return Ia.value(u(e)?hi(e):fi(e))}},dangerouslyAllowMutability:!0})};const{RecoilLoadable:Ri}=V,{DefaultValue:Ti}=fe,{RecoilRoot:bi,useRecoilStoreID:wi}=no,{isRecoilValue:Ai}=Q,{retentionZone:Ei}=Ie,{freshSnapshot:Ni}=mn,{useRecoilState:Li,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:ki,useRecoilStateLoadable:Vi,useRecoilValue:Ci,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Mi,useRecoilValueLoadable:Ui,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Ii,useResetRecoilState:Bi,useSetRecoilState:Di}=jo,{useGotoRecoilSnapshot:Oi,useRecoilSnapshot:Pi,useRecoilTransactionObserver:xi}=dr,{useRecoilCallback:Fi}=Wr,{noWait:zi,waitForAll:Gi,waitForAllSettled:Wi,waitForAny:$i,waitForNone:Ki}=gi;var Hi={DefaultValue:Ti,isRecoilValue:Ai,RecoilLoadable:Ri,RecoilEnv:U,RecoilRoot:bi,useRecoilStoreID:wi,useRecoilBridgeAcrossReactRoots_UNSTABLE:function(){"MUTABLE_SOURCE"===pr().mode&&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=_r().current;return yr((()=>function({children:t}){return r().createElement(vr,{store_INTERNAL:e},t)}),[e])},atom:ei,selector:Ia,atomFamily:function(e){var t,n;const o=ai({equality:null!==(t=null===(n=e.cachePolicyForParams_UNSTABLE)||void 0===n?void 0:n.equality)&&void 0!==t?t:"value",eviction:"keep-all"});return t=>{var n,r;const a=o.get(t);if(null!=a)return a;const{cachePolicyForParams_UNSTABLE:i,...s}=e,u="default"in e?e.default:new Promise((()=>{})),c=ei({...s,key:`${e.key}__${null!==(n=aa(t))&&void 0!==n?n:"void"}`,default:"function"==typeof u?u(t):u,retainedBy_UNSTABLE:"function"==typeof e.retainedBy_UNSTABLE?e.retainedBy_UNSTABLE(t):e.retainedBy_UNSTABLE,effects:"function"==typeof e.effects?e.effects(t):"function"==typeof e.effects_UNSTABLE?e.effects_UNSTABLE(t):null!==(r=e.effects)&&void 0!==r?r:e.effects_UNSTABLE});return o.set(t,c),ii(c.key,(()=>{o.delete(t)})),c}},selectorFamily:ci,constSelector:function(e){return li(e)},errorSelector:function(e){return di(e)},readOnlySelector:function(e){return e},noWait:zi,waitForNone:Ki,waitForAny:$i,waitForAll:Gi,waitForAllSettled:Wi,useRecoilValue:Ci,useRecoilValueLoadable:Ui,useRecoilState:Li,useRecoilStateLoadable:Vi,useSetRecoilState:Di,useResetRecoilState:Bi,useGetRecoilValueInfo_UNSTABLE:function(){const e=hr();return({key:t})=>fr(e.current,e.current.getState().currentTree,t)},useRecoilRefresher_UNSTABLE:function(e){const t=$r();return Hr((()=>{const n=t.current;Kr(n,e)}),[e,t])},useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:Ii,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:Mi,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:ki,useRecoilCallback:Fi,useRecoilTransaction_UNSTABLE:function(e,t){const n=qr();return Zr((()=>(...t)=>{jr(n.current)((n=>{e(n)(...t)}))}),null!=t?[...t,n]:void 0)},useGotoRecoilSnapshot:Oi,useRecoilSnapshot:Pi,useRecoilTransactionObserver_UNSTABLE:xi,snapshot_UNSTABLE:Ni,useRetain:po,retentionZone:Ei},ji=Hi.DefaultValue,qi=Hi.isRecoilValue,Zi=Hi.RecoilLoadable,Yi=Hi.RecoilEnv,Ji=Hi.RecoilRoot,Xi=Hi.useRecoilStoreID,Qi=Hi.useRecoilBridgeAcrossReactRoots_UNSTABLE,es=Hi.atom,ts=Hi.selector,ns=Hi.atomFamily,os=Hi.selectorFamily,rs=Hi.constSelector,as=Hi.errorSelector,is=Hi.readOnlySelector,ss=Hi.noWait,us=Hi.waitForNone,cs=Hi.waitForAny,ls=Hi.waitForAll,ds=Hi.waitForAllSettled,fs=Hi.useRecoilValue,hs=Hi.useRecoilValueLoadable,ps=Hi.useRecoilState,vs=Hi.useRecoilStateLoadable,_s=Hi.useSetRecoilState,ys=Hi.useResetRecoilState,Ss=Hi.useGetRecoilValueInfo_UNSTABLE,ms=Hi.useRecoilRefresher_UNSTABLE,gs=Hi.useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE,Rs=Hi.useRecoilValue_TRANSITION_SUPPORT_UNSTABLE,Ts=Hi.useRecoilState_TRANSITION_SUPPORT_UNSTABLE,bs=Hi.useRecoilCallback,ws=Hi.useRecoilTransaction_UNSTABLE,As=Hi.useGotoRecoilSnapshot,Es=Hi.useRecoilSnapshot,Ns=Hi.useRecoilTransactionObserver_UNSTABLE,Ls=Hi.snapshot_UNSTABLE,ks=Hi.useRetain,Vs=Hi.retentionZone;t.default=Hi}}]);